Преглед изворни кода

微信审批开发,冲突二次提交

wangxiaoming пре 6 година
родитељ
комит
ae7845faa4
16 измењених фајлова са 1269 додато и 101 уклоњено
  1. 90 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalApplyPick.java
  2. 28 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalInfo.java
  3. 24 5
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalProduction.java
  4. 18 8
      watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalProductionContract.java
  5. 60 1
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/approval/ApprovalOrderService.java
  6. 133 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/approval/ApprovalOrderServiceImpl.java
  7. 57 0
      watero-rst-service/src/main/java/com/iamberry/rst/service/approval/mapper/ApprovalOrderMapper.java
  8. 422 11
      watero-rst-service/src/main/java/com/iamberry/rst/service/approval/mapper/approvalOrderMapper.xml
  9. 212 0
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/approval/ApprovalController.java
  10. 27 10
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java
  11. 48 30
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java
  12. 9 8
      watero-rst-web/src/main/resources/watero-rst-orm.xml
  13. 113 0
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/download_order_store.ftl
  14. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/list_wait_send_order.ftl
  15. 26 25
      watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl
  16. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl

+ 90 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalApplyPick.java

@@ -1,11 +1,13 @@
 package com.iamberry.rst.core.approval;
 
 import java.io.Serializable;
+import java.util.List;
 
 /**
  * Created by Administrator on 2018/9/29.
  */
 public class ApprovalApplyPick implements Serializable{
+    private static final long serialVersionUID = -2650565647759079562L;
     private Integer applyPickId;//
     private Integer approvalId;//审批订单信息id
     private Integer adminId;//申请人id
@@ -16,5 +18,93 @@ public class ApprovalApplyPick implements Serializable{
     private Integer applyPickRemk;//备注信息
     private Integer applyPickCreateTime;//
     private Integer applyPickUpdateTime;//
+    private List<ApprovalApplyPickItem> listApplyPickItem;//产品项集合
 
+    public Integer getApplyPickId() {
+        return applyPickId;
+    }
+
+    public void setApplyPickId(Integer applyPickId) {
+        this.applyPickId = applyPickId;
+    }
+
+    public Integer getApprovalId() {
+        return approvalId;
+    }
+
+    public void setApprovalId(Integer approvalId) {
+        this.approvalId = approvalId;
+    }
+
+    public Integer getAdminId() {
+        return adminId;
+    }
+
+    public void setAdminId(Integer adminId) {
+        this.adminId = adminId;
+    }
+
+    public Integer getApplyPickName() {
+        return applyPickName;
+    }
+
+    public void setApplyPickName(Integer applyPickName) {
+        this.applyPickName = applyPickName;
+    }
+
+    public Integer getApplyPickTel() {
+        return applyPickTel;
+    }
+
+    public void setApplyPickTel(Integer applyPickTel) {
+        this.applyPickTel = applyPickTel;
+    }
+
+    public Integer getApplyPickReason() {
+        return applyPickReason;
+    }
+
+    public void setApplyPickReason(Integer applyPickReason) {
+        this.applyPickReason = applyPickReason;
+    }
+
+    public Integer getApplyPickStruts() {
+        return applyPickStruts;
+    }
+
+    public void setApplyPickStruts(Integer applyPickStruts) {
+        this.applyPickStruts = applyPickStruts;
+    }
+
+    public Integer getApplyPickRemk() {
+        return applyPickRemk;
+    }
+
+    public void setApplyPickRemk(Integer applyPickRemk) {
+        this.applyPickRemk = applyPickRemk;
+    }
+
+    public Integer getApplyPickCreateTime() {
+        return applyPickCreateTime;
+    }
+
+    public void setApplyPickCreateTime(Integer applyPickCreateTime) {
+        this.applyPickCreateTime = applyPickCreateTime;
+    }
+
+    public Integer getApplyPickUpdateTime() {
+        return applyPickUpdateTime;
+    }
+
+    public void setApplyPickUpdateTime(Integer applyPickUpdateTime) {
+        this.applyPickUpdateTime = applyPickUpdateTime;
+    }
+
+    public List<ApprovalApplyPickItem> getListApplyPickItem() {
+        return listApplyPickItem;
+    }
+
+    public void setListApplyPickItem(List<ApprovalApplyPickItem> listApplyPickItem) {
+        this.listApplyPickItem = listApplyPickItem;
+    }
 }

+ 28 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalInfo.java

@@ -2,6 +2,7 @@ package com.iamberry.rst.core.approval;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 1.9.1	审批信息
@@ -20,6 +21,9 @@ public class ApprovalInfo implements Serializable{
     private String approvalDetails;//审批内容
     private String approvalRemark;//备注信息
     private Date approvalCreateTime;//申请时间
+    private ApprovalProduction approvalProduction;//生产审批集合
+    private ApprovalApplyPick approvalApplyPick;//提货申请集合
+    private List<ApprovalProductionContract> listProductionContract;//审批合同集合
 
     public Integer getApprovalId() {
         return approvalId;
@@ -108,4 +112,28 @@ public class ApprovalInfo implements Serializable{
     public void setApprovalCreateTime(Date approvalCreateTime) {
         this.approvalCreateTime = approvalCreateTime;
     }
+
+    public List<ApprovalProductionContract> getListProductionContract() {
+        return listProductionContract;
+    }
+
+    public void setListProductionContract(List<ApprovalProductionContract> listProductionContract) {
+        this.listProductionContract = listProductionContract;
+    }
+
+    public ApprovalProduction getApprovalProduction() {
+        return approvalProduction;
+    }
+
+    public void setApprovalProduction(ApprovalProduction approvalProduction) {
+        this.approvalProduction = approvalProduction;
+    }
+
+    public ApprovalApplyPick getApprovalApplyPick() {
+        return approvalApplyPick;
+    }
+
+    public void setApprovalApplyPick(ApprovalApplyPick approvalApplyPick) {
+        this.approvalApplyPick = approvalApplyPick;
+    }
 }

+ 24 - 5
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalProduction.java

@@ -2,12 +2,14 @@ package com.iamberry.rst.core.approval;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 1.9.2	生产审批信息表
  * Created by Administrator on 2018/9/28.
  */
 public class ApprovalProduction implements Serializable {
+    private static final long serialVersionUID = -899265869408828769L;
     private Integer productionId;//
     private Integer approvalId;//所属审批
     private String applicantOrderNo;//订单编号*系统自动生成;了解生产规则
@@ -24,7 +26,16 @@ public class ApprovalProduction implements Serializable {
     private String productionPackingWay;//包装方式
     private String productionRemark;//备注信息
     private Date productionCreateTime;
-    private Date productionUpdateYime;
+    private Date productionUpdateTime;
+    private List<ApprovalProductionItem> listProductionItem;//产品项
+
+    public Integer getProductionId() {
+        return productionId;
+    }
+
+    public void setProductionId(Integer productionId) {
+        this.productionId = productionId;
+    }
 
     public Integer getApprovalId() {
         return approvalId;
@@ -146,11 +157,19 @@ public class ApprovalProduction implements Serializable {
         this.productionCreateTime = productionCreateTime;
     }
 
-    public Date getProductionUpdateYime() {
-        return productionUpdateYime;
+    public Date getProductionUpdateTime() {
+        return productionUpdateTime;
+    }
+
+    public void setProductionUpdateTime(Date productionUpdateTime) {
+        this.productionUpdateTime = productionUpdateTime;
+    }
+
+    public List<ApprovalProductionItem> getListProductionItem() {
+        return listProductionItem;
     }
 
-    public void setProductionUpdateYime(Date productionUpdateYime) {
-        this.productionUpdateYime = productionUpdateYime;
+    public void setListProductionItem(List<ApprovalProductionItem> listProductionItem) {
+        this.listProductionItem = listProductionItem;
     }
 }

+ 18 - 8
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalProductionContract.java

@@ -10,8 +10,9 @@ import java.util.Date;
 public class ApprovalProductionContract implements Serializable {
     private static final long serialVersionUID = -6409909802307248086L;
     private Integer contractId;//
-    private Integer productionId;//生产id
+    private Integer approvalId;//审批id
     private String contractUrl;//url
+    private String contractName;//合同名称
     private Date contractCreateTime;
 
     public Integer getContractId() {
@@ -22,13 +23,6 @@ public class ApprovalProductionContract implements Serializable {
         this.contractId = contractId;
     }
 
-    public Integer getProductionId() {
-        return productionId;
-    }
-
-    public void setProductionId(Integer productionId) {
-        this.productionId = productionId;
-    }
 
     public String getContractUrl() {
         return contractUrl;
@@ -45,4 +39,20 @@ public class ApprovalProductionContract implements Serializable {
     public void setContractCreateTime(Date contractCreateTime) {
         this.contractCreateTime = contractCreateTime;
     }
+
+    public Integer getApprovalId() {
+        return approvalId;
+    }
+
+    public void setApprovalId(Integer approvalId) {
+        this.approvalId = approvalId;
+    }
+
+    public String getContractName() {
+        return contractName;
+    }
+
+    public void setContractName(String contractName) {
+        this.contractName = contractName;
+    }
 }

+ 60 - 1
watero-rst-interface/src/main/java/com/iamberry/rst/faces/approval/ApprovalOrderService.java

@@ -1,6 +1,11 @@
 package com.iamberry.rst.faces.approval;
 
+import com.iamberry.rst.core.approval.*;
+import com.iamberry.rst.core.cm.CustomerInfo;
+import com.iamberry.rst.core.page.PagedResult;
+
 import java.util.List;
+import java.util.Map;
 
 /**
  *  提货项信息接口
@@ -8,5 +13,59 @@ import java.util.List;
  * @Date 2018-09-19
  */
 public interface ApprovalOrderService {
-
+    /**
+     * 新增审批信息
+     * @return
+     */
+    Integer insertApprovalInfo(ApprovalInfo approvalInfo);
+    /**
+     * 新增生产审批信息
+     * @return
+     */
+    Boolean insertApprovalProduction(ApprovalProduction approvalProduction,List<ApprovalProductionItem> listApprovalProductionItem, List<ApprovalProductionContract> productionContracts,Map<String, Object> tasknfo);
+    /**
+     * 新增生产审批信息产品
+     * @return
+     */
+    Integer insertItem(List<ApprovalProductionItem> listApprovalProductionItem);
+    /**
+     * 新增生产审批合同信息
+     * @return
+     */
+    Integer insertProductionContract(ApprovalProductionContract approvalProductionContract);
+    /**
+     * 新增流程信息
+     * @return
+     */
+    Integer insertProcessInfo(ProcessInfo processInfo);
+    /**
+     * 新增历史审批记录
+     * @return
+     */
+    Integer insertHistoricalRecord(HistoricalRecord historicalRecord);
+    /**
+     * 查询审批信息列表
+     * @return
+     */
+    PagedResult<ApprovalInfo> listApprovalInfo(int pageNO, int pageSize, ApprovalInfo approvalInfo, boolean isTotalNum);
+    /**
+     * 修改历史记录审核状态
+     * @return
+     */
+    Integer updateHistoricalRecord(HistoricalRecord historicalRecord);
+    /**
+     * 查询单个审核历史记录
+     * @return
+     */
+    HistoricalRecord getHistoricalRecord(HistoricalRecord historicalRecord);
+    /**
+     * 查询审核历史记录
+     * @return
+     */
+    List<ProcessInfo> listProcessInfo(ProcessInfo processInfo);
+    /**
+     * 修改审批信息
+     * @return
+     */
+    Integer updateApprovalInfo(ApprovalInfo approvalInfo);
 }

+ 133 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/approval/ApprovalOrderServiceImpl.java

@@ -1,11 +1,21 @@
 package com.iamberry.rst.service.approval;
 
+import com.github.pagehelper.PageHelper;
+import com.iamberry.rst.core.approval.*;
+import com.iamberry.rst.core.cm.CustomerInfo;
+import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.faces.approval.ApprovalOrderService;
+import com.iamberry.rst.faces.approval.ApprovalTaskService;
 import com.iamberry.rst.service.approval.mapper.ApprovalOrderMapper;
+import com.iamberry.rst.util.PageUtil;
+import com.iamberry.wechat.tools.ResponseJson;
+import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
-import java.util.List;
+import java.util.*;
 
 /**
  *  提货项信息接口
@@ -14,5 +24,127 @@ import java.util.List;
  */
 @Service
 public class ApprovalOrderServiceImpl implements ApprovalOrderService {
+    @Autowired
+    private ApprovalOrderMapper approvalOrderMapper;
 
+
+    @Override
+    public Integer insertApprovalInfo(ApprovalInfo approvalInfo) {
+        return approvalOrderMapper.insertApprovalInfo(approvalInfo);
+    }
+
+    @Override
+    @Transactional
+    public Boolean insertApprovalProduction(ApprovalProduction approvalProduction,
+                                            List<ApprovalProductionItem> listApprovalProductionItem,
+                                            List<ApprovalProductionContract> productionContracts,
+                                            Map<String, Object> tasknfo) {
+
+        //添加审批信息
+        ApprovalInfo approvalInfo = new ApprovalInfo();
+        approvalInfo.setApprovalName("XXX的审批订单");
+        approvalInfo.setApprovalType(1);
+        approvalInfo.setApprovalStatus(1);
+        approvalInfo.setApprovalStatusDetails("待 "+tasknfo.get("users").toString()+"审批");
+        approvalInfo.setAdminId(null);
+        approvalInfo.setApprovalApplicant(approvalProduction.getApplicantName());
+        approvalInfo.setActivitiId(tasknfo.get("pid").toString());
+        approvalInfo.setApprovalDetails("html内容");
+        approvalInfo.setApprovalRemark(approvalProduction.getProductionRemark());
+        int returnValue = approvalOrderMapper.insertApprovalInfo(approvalInfo);
+        if(returnValue < 1){
+            throw new RuntimeException("添加审批信息失败");
+        }
+        //添加生产审批信息
+        approvalProduction.setApprovalId(approvalInfo.getApprovalId());
+        approvalProduction.setApplicantOrderNo("订单编号");
+        approvalProduction.setApplicantName("申请人姓名");
+        approvalProduction.setApplicantId(1);//申请人ID
+        approvalProduction.setProductionState(1);
+        int returnValue2 = approvalOrderMapper.insertApprovalProduction(approvalProduction);
+        if(returnValue2 < 1){
+            throw new RuntimeException("添加生产审批信息失败");
+        }
+        //添加合同信息
+        for(ApprovalProductionContract approvalProductionContract : productionContracts){
+            approvalProductionContract.setApprovalId(approvalProduction.getProductionId());
+            approvalProductionContract.setContractName("XXX的审批订单合同");
+            approvalOrderMapper.insertProductionContract(approvalProductionContract);
+        }
+        //封装生产审批产品项
+        int returnValue3 = approvalOrderMapper.insertItem(listApprovalProductionItem);
+        if(returnValue3 < 1){
+            throw new RuntimeException("添加生产审批产品项信息失败");
+        }
+        //添加流程信息
+        ProcessInfo processInfo = new ProcessInfo();
+        processInfo.setAdminId(1);
+        processInfo.setApprovalId(approvalInfo.getApprovalId());
+        processInfo.setProcessDesc(approvalInfo.getApprovalDetails());
+        processInfo.setProcessState(1);
+        int returnValue4 = approvalOrderMapper.insertProcessInfo(processInfo);
+        if(returnValue4 < 1){
+            throw new RuntimeException("添加生产审批流程信息失败");
+        }
+        //添加审批历史记录
+        HistoricalRecord historicalRecord = new HistoricalRecord();
+        historicalRecord.setApprovalId(approvalInfo.getApprovalId());
+        historicalRecord.setAdminId(1);
+        historicalRecord.setRecordState(1);
+        historicalRecord.setTaskId(tasknfo.get("taskId").toString());
+        historicalRecord.setApprovalTime(new Date());
+        int returnValue5 = approvalOrderMapper.insertHistoricalRecord(historicalRecord);
+        if(returnValue5 < 1){
+            throw new RuntimeException("添加生产审批历史记录失败");
+        }
+        return true;
+    }
+
+    @Override
+    public Integer insertItem(List<ApprovalProductionItem> listApprovalProductionItem) {
+        return approvalOrderMapper.insertItem(listApprovalProductionItem);
+    }
+
+    @Override
+    public Integer insertProductionContract(ApprovalProductionContract approvalProductionContract) {
+        return approvalOrderMapper.insertProductionContract(approvalProductionContract);
+    }
+
+    @Override
+    public Integer insertProcessInfo(ProcessInfo processInfo) {
+        return approvalOrderMapper.insertProcessInfo(processInfo);
+    }
+
+    @Override
+    public Integer insertHistoricalRecord(HistoricalRecord historicalRecord) {
+        return approvalOrderMapper.insertHistoricalRecord(historicalRecord);
+    }
+
+    @Override
+    public PagedResult<ApprovalInfo> listApprovalInfo(int pageNO, int pageSize, ApprovalInfo approvalInfo, boolean isTotalNum) {
+        PageHelper.startPage(pageNO, pageSize, isTotalNum);
+        //查询客诉列表
+        List<ApprovalInfo> approvalList = approvalOrderMapper.listApprovalInfo(approvalInfo);
+        return PageUtil.getPage(approvalList);
+    }
+
+    @Override
+    public Integer updateHistoricalRecord(HistoricalRecord historicalRecord) {
+        return approvalOrderMapper.updateHistoricalRecord(historicalRecord);
+    }
+
+    @Override
+    public HistoricalRecord getHistoricalRecord(HistoricalRecord historicalRecord) {
+        return approvalOrderMapper.getHistoricalRecord(historicalRecord);
+    }
+
+    @Override
+    public List<ProcessInfo> listProcessInfo(ProcessInfo processInfo) {
+        return approvalOrderMapper.listProcessInfo(processInfo);
+    }
+
+    @Override
+    public Integer updateApprovalInfo(ApprovalInfo approvalInfo) {
+        return approvalOrderMapper.updateApprovalInfo(approvalInfo);
+    }
 }

+ 57 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/approval/mapper/ApprovalOrderMapper.java

@@ -1,6 +1,8 @@
 package com.iamberry.rst.service.approval.mapper;
 
 
+import com.iamberry.rst.core.approval.*;
+
 import java.util.List;
 
 /**
@@ -8,5 +10,60 @@ import java.util.List;
  */
 public interface ApprovalOrderMapper {
 
+    /**
+     * 新增审批信息
+     * @return
+     */
+     Integer insertApprovalInfo(ApprovalInfo approvalInfo);
+     /**
+     * 新增生产审批信息
+     * @return
+     */
+     Integer insertApprovalProduction(ApprovalProduction approvalProduction);
+     /**
+     * 新增生产审批信息产品
+     * @return
+     */
+     Integer insertItem(List<ApprovalProductionItem> listApprovalProductionItem);
+     /**
+     * 新增生产审批合同信息
+     * @return
+     */
+     Integer insertProductionContract(ApprovalProductionContract approvalProductionContract);
+     /**
+     * 新增流程信息
+     * @return
+     */
+     Integer insertProcessInfo(ProcessInfo processInfo);
+     /**
+     * 新增历史审批记录
+     * @return
+     */
+     Integer insertHistoricalRecord(HistoricalRecord historicalRecord);
+     /**
+     * 查询审批信息列表
+     * @return
+     */
+     List<ApprovalInfo> listApprovalInfo(ApprovalInfo approvalInfo);
+     /**
+     * 修改历史记录审核状态
+     * @return
+     */
+     Integer updateHistoricalRecord(HistoricalRecord historicalRecord);
+     /**
+     * 查询单个审核历史记录
+     * @return
+     */
+     HistoricalRecord getHistoricalRecord(HistoricalRecord historicalRecord);
+     /**
+     * 查询审核历史记录
+     * @return
+     */
+     List<ProcessInfo> listProcessInfo(ProcessInfo processInfo);
+     /**
+      * 修改审批信息
+      * @return
+      */
+     Integer updateApprovalInfo(ApprovalInfo approvalInfo);
 
 }

+ 422 - 11
watero-rst-service/src/main/java/com/iamberry/rst/service/approval/mapper/approvalOrderMapper.xml

@@ -14,7 +14,11 @@
     <result column="approval_details" property="approvalDetails" jdbcType="VARCHAR" />
     <result column="approval_remark" property="approvalRemark" jdbcType="VARCHAR" />
     <result column="approval_create_time" property="approvalCreateTime" jdbcType="TIMESTAMP" />
+    <collection property="approvalProduction" column="approval_id" ofType="ApprovalProduction" select="getApprovalProduction"/>
+    <collection property="approvalApplyPick" column="approval_id" ofType="ApprovalApplyPick" select="getApplyPick"/>
+    <collection property="listProductionContract" column="approval_id" ofType="ApprovalProductionContract" select="listProductionContract"/>
   </resultMap>
+
   <resultMap id="ApprovalProductionResultMap" type="ApprovalProduction" >
     <id column="production_id" property="productionId" jdbcType="INTEGER" />
     <result column="approval_id" property="approvalId" jdbcType="VARCHAR" />
@@ -33,10 +37,428 @@
     <result column="production_remark" property="productionRemark" jdbcType="VARCHAR" />
     <result column="production_create_time" property="productionCreateTime" jdbcType="TIMESTAMP" />
     <result column="production_update_time" property="productionUpdateTime" jdbcType="TIMESTAMP" />
+    <collection property="listProductionItem" column="production_id" ofType="ApprovalProductionItem" select="listProductionItem"/>
+  </resultMap>
+
+  <resultMap id="ApprovalApplyPickMap" type="ApprovalApplyPick" >
+    <id column="apply_pick_id" property="applyPickId" jdbcType="INTEGER" />
+    <result column="approval_id" property="approvalId" jdbcType="INTEGER" />
+    <result column="admin_id" property="adminId" jdbcType="INTEGER" />
+    <result column="apply_pick_name" property="applyPickName" jdbcType="VARCHAR" />
+    <result column="apply_pick_tel" property="applyPickTel" jdbcType="VARCHAR" />
+    <result column="apply_pick_reason" property="applyPickReason" jdbcType="VARCHAR" />
+    <result column="apply_pick_struts" property="applyPickStruts" jdbcType="INTEGER" />
+    <result column="apply_pick_remk" property="applyPickRemk" jdbcType="VARCHAR" />
+    <result column="apply_pick_create_time" property="applyPickCreateTime" jdbcType="TIMESTAMP" />
+    <result column="apply_pick_update_time" property="applyPickUpdateTime" jdbcType="TIMESTAMP" />
+    <collection property="listApplyPickItem" column="apply_pick_id" ofType="ApprovalApplyPickItem" select="listApplyPickItem"/>
+  </resultMap>
+
+
+  <resultMap id="ApprovalProductionItemMap" type="ApprovalProductionItem" >
+    <id column="item_id" property="itemId" jdbcType="INTEGER" />
+    <result column="production_id" property="productionId" jdbcType="INTEGER" />
+    <result column="product_id" property="productId" jdbcType="INTEGER" />
+    <result column="item_product_name" property="itemProductName" jdbcType="VARCHAR" />
+    <result column="item_color_name" property="itemColorName" jdbcType="VARCHAR" />
+    <result column="item_product_num" property="itemProductNum" jdbcType="INTEGER" />
+    <result column="item_brand_name" property="itemBrandName" jdbcType="VARCHAR" />
+    <result column="item_product_model" property="itemProductModel" jdbcType="VARCHAR" />
+    <result column="item_product_unit" property="itemProductUnit" jdbcType="VARCHAR" />
+    <result column="item_product_box_number" property="itemProductBoxNumber" jdbcType="INTEGER" />
+    <result column="item_create_time" property="itemCreateTime" jdbcType="TIMESTAMP" />
+    <result column="item_update_time" property="itemUpdateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+
+
+  <resultMap id="ApprovalProductionContractMap" type="ApprovalProductionContract" >
+    <id column="contract_id" property="contractId" jdbcType="INTEGER" />
+    <result column="approval_id" property="approvalId" jdbcType="INTEGER" />
+    <result column="contract_url" property="contractUrl" jdbcType="VARCHAR" />
+    <result column="contract_name" property="contractName" jdbcType="VARCHAR" />
+    <result column="contract_create_time" property="contractCreateTime" jdbcType="TIMESTAMP" />
   </resultMap>
 
 
+  <resultMap id="ProcessInfoMap" type="ProcessInfo" >
+    <id column="process_id" property="processId" jdbcType="INTEGER" />
+    <result column="approval_id" property="approvalId" jdbcType="INTEGER" />
+    <result column="admin_id" property="adminId" jdbcType="INTEGER" />
+    <result column="process_desc" property="processDesc" jdbcType="VARCHAR" />
+    <result column="process_state" property="processState" jdbcType="INTEGER" />
+    <result column="process_create_time" property="processCreateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+
+
+  <resultMap id="ProcessInfoMap" type="ProcessInfo" >
+    <id column="record_id" property="recordId" jdbcType="INTEGER" />
+    <result column="approval_id" property="approvalId" jdbcType="INTEGER" />
+    <result column="admin_id" property="adminId" jdbcType="INTEGER" />
+    <result column="record_state" property="recordState" jdbcType="INTEGER" />
+    <result column="task_id" property="taskId" jdbcType="VARCHAR" />
+    <result column="approval_time" property="approvalTime" jdbcType="TIMESTAMP" />
+    <result column="record_create_time" property="recordCreateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+
+
+
+  <insert id="insertApprovalInfo" parameterType="ApprovalInfo"  useGeneratedKeys="true" keyProperty="approvalId">
+    INSERT INTO tb_rst_approval_info(approval_id,approval_name,approval_type,approval_status,
+    approval_status_details,admin_id,approval_applicant,activiti_id,
+    approval_details,approval_remark,approval_create_time)
+    VALUES
+    (#{approvalId},#{approvalName},#{approvalType},#{approvalStatus},#{approvalStatusDetails}
+    ,#{adminId},#{approvalApplicant},#{activitiId},#{approvalDetails}
+    ,#{approvalRemark},NOW())
+  </insert>
+
+  <insert id="insertApprovalProduction" parameterType="ApprovalProduction"  useGeneratedKeys="true" keyProperty="productionId">
+    INSERT INTO tb_rst_approval_production(
+          production_id,
+          approval_id,
+          applicant_order_no,
+          applicant_name,
+          applicant_id,
+          order_name,
+          company_name,
+          contact_name,
+          contact_tel,
+          production_delivery_date,
+          production_delivery_way,
+          production_delivery_desc,
+          production_state,
+          production_packing_way,
+          production_remark,
+          production_create_time
+          )
+    VALUES
+    (#{approvalId},#{approvalId},#{applicantOrderNo},#{applicantName},#{applicantId}
+    ,#{orderName},#{companyName},#{contactName},#{contactTel,#{productionDeliveryDate
+    ,#{productionDeliveryWay},#{productionDeliveryDesc},#{productionState},#{productionPackingWay}
+    ,#{productionRemark},NOW())
+  </insert>
+
+  <!-- 批量添加订单项数据-->
+  <insert id="insertItem" parameterType="ArrayList">
+    INSERT INTO tb_rst_approval_production_item
+    (
+    production_id,
+    product_id,
+    item_product_name,
+    item_color_name,
+    item_product_num,
+    item_brand_name,
+    item_product_model,
+    item_product_unit,
+    item_product_box_number,
+    item_create_time,
+    )
+    VALUES
+    <foreach collection="list" item="item" separator=",">
+      (
+      #{item.productionId},#{item.productId},#{item.itemProductName},#{item.itemColorName},
+      #{item.itemProductNum},#{item.itemBrandName},#{item.itemProductModel},#{item.itemProductUnit}
+      ,#{item.itemProductBoxNumber},NOW()
+      )
+    </foreach>
+  </insert>
+
+
+  <insert id="insertProductionContract" parameterType="ApprovalProductionContract">
+    INSERT INTO tb_rst_approval_production_contract(
+    contract_id
+    production_id
+    contract_url
+    contract_type
+    contract_create_time
+    )
+    VALUES
+    (#{contractId},#{productionId},#{contractUrl},#{contractType},NOW())
+  </insert>
+
+  <insert id="insertProcessInfo" parameterType="ProcessInfo">
+    INSERT INTO tb_rst_process_info(
+    approval_id
+    admin_id
+    process_desc
+    process_state
+    process_create_time
+    )
+    VALUES
+    (#{approvalId},#{adminId},#{processDesc},#{processState},NOW())
+  </insert>
+
+  <insert id="insertHistoricalRecord" parameterType="HistoricalRecord">
+    INSERT INTO tb_rst_historical_record(
+    approval_id
+    admin_id
+    record_state
+    task_id
+    approval_time
+    record_create_time
+    )
+    VALUES
+    (#{approvalId},#{adminId},#{processDesc},#{processState},NOW())
+  </insert>
 
+
+  <!-- 修改流程信息状态-->
+  <update id="updateProcessInfo" parameterType="ProcessInfo">
+    update tb_rst_process_info
+    <set >
+      <if test="processState != null" >
+        process_state = #{processState}
+      </if>
+    </set>
+    <where>
+      <if test="approvalId != null and approvalId != ''">
+        approval_id = #{approvalId}
+      </if>
+      <if test="processId != null and processId != ''">
+        AND  process_id = #{processId}
+      </if>
+      <if test="adminId != null and adminId != ''">
+        AND  admin_id = #{adminId}
+      </if>
+    </where>
+  </update>
+  <!-- 修改历史记录状态-->
+  <update id="updateHistoricalRecord" parameterType="HistoricalRecord">
+    update tb_rst_historical_record
+    <set >
+      <if test="recordState != null" >
+        record_state = #{recordState},
+      </if>
+      <if test="approvalTime != null" >
+        approval_time = #{approvalTime}
+      </if>
+    </set>
+    <where>
+      <if test="recordId != null and recordId != ''">
+        record_id = #{recordId}
+      </if>
+      <if test="approvalId != null and approvalId != ''">
+        AND  approval_id = #{approvalId}
+      </if>
+      <if test="taskId != null and taskId != ''">
+        AND  task_id = #{taskId}
+      </if>
+    </where>
+  </update>
+
+
+<!--查询审批信息列表-->
+  <select id="listApprovalInfo" parameterType="ApprovalInfo" resultMap="ApprovalInfoResultMap">
+    SELECT
+    ai.approval_id
+    ai.approval_name
+    ai.approval_type
+    ai.approval_status
+    ai.approval_status_details
+    ai.admin_id
+    ai.approval_applicant
+    ai.activiti_id
+    ai.approval_details
+    ai.approval_remark
+    ai.approval_create_time
+    from tb_rst_approval_info ai
+    LEFT JOIN  tb_rst_historical_record hr ON ai.approval_id = hr.approval_id
+    <where>
+      <if test="adminId != null and adminId != ''">
+        ai.admin_id = #{adminId}
+      </if>
+      <if test="approvalType != null and approvalType != ''">
+        ai.approval_type = #{approvalType}
+      </if>
+      <if test="approvalStatus != null and approvalStatus != ''">
+        ai.approval_status = #{approvalStatus}
+      </if>
+      <if test="adminId != null and adminId != ''">
+        hr.admin_id = #{adminId}
+      </if>
+    </where>
+  </select>
+
+  <!--查询生产审批信息-->
+  <select id="getApprovalProduction" parameterType="Integer" resultMap="ApprovalProductionResultMap">
+    SELECT
+    ap.production_id,
+    ap.approval_id,
+    ap.applicant_order_no,
+    ap.applicant_name,
+    ap.applicant_id,
+    ap.order_name,
+    ap.company_name,
+    ap.contact_name,
+    ap.contact_tel,
+    ap.production_delivery_date,
+    ap.production_delivery_way,
+    ap.production_delivery_desc,
+    ap.production_state,
+    ap.production_packing_way,
+    ap.production_remark,
+    ap.production_create_time,
+    ap.production_update_time
+    from tb_rst_approval_production ap
+    where
+        ap.approval_id = #{approvalId}
+  </select>
+
+
+  <!--查询提货申请信息-->
+  <select id="getApplyPick" parameterType="ApprovalApplyPick" resultMap="ApprovalApplyPickMap">
+    SELECT
+    aap.apply_pick_id,
+    aap.approval_id,
+    aap.admin_id,
+    aap.apply_pick_name,
+    aap.apply_pick_tel,
+    aap.apply_pick_reason,
+    aap.apply_pick_struts,
+    aap.apply_pick_remk,
+    aap.apply_pick_create_time,
+    aap.apply_pick_update_time
+    from tb_rst_approval_apply_pick aap
+    where
+        aap.approval_id = #{approvalId}
+  </select>
+
+
+  <!--查询提货产品项信息-->
+  <select id="listProductionItem" parameterType="Integer" resultType="ApprovalProductionItem">
+    SELECT
+    api.item_id itemId,
+    api.production_id productionId,
+    api.product_id productId,
+    api.item_product_name itemProductName,
+    api.item_color_name itemColorName,
+    api.item_product_num itemProductNum,
+    api.item_brand_name itemBrandName,
+    api.item_product_model itemProductModel,
+    api.item_product_unit itemProductUnit,
+    api.item_product_box_number itemProductBoxNumber,
+    api.item_create_time itemCreateTime,
+    api.item_update_time itemUpdateTime
+    from tb_rst_approval_production_item api
+    where
+        api.production_id = #{productionId}
+  </select>
+
+
+  <!--查询提货产品项信息-->
+  <select id="listApplyPickItem" parameterType="Integer" resultType="ApprovalApplyPickItem">
+    SELECT
+    aapi.apply_item_id applyItemId,
+    aapi.apply_pick_id applyPickId,
+    aapi.product_id productId,
+    aapi.item_product_name itemProductName,
+    aapi.item_color_name itemColorName,
+    aapi.item_product_num itemProductNum,
+    aapi.item_brand_name itemBrandName,
+    aapi.item_product_model itemProductModel,
+    aapi.item_product_unit itemProductUnit,
+    aapi.item_product_box_number itemProductBoxNumber,
+    aapi.item_create_time itemCreateTime,
+    aapi.item_update_time itemUpdateTime
+    from tb_rst_approval_apply_pick_item aapi
+    where
+        aapi.apply_pick_id = #{applyPickId}
+  </select>
+
+  <!--查询审批合同信息-->
+  <select id="listProductionContract" parameterType="Integer" resultType="ApprovalProductionContract">
+    SELECT
+    apc.contract_id contractId,
+    apc.approval_id approvalId,
+    apc.contract_url contractUrl,
+    apc.contract_name contractName,
+    apc.contract_create_time contractCreateTime
+    from tb_rst_approval_production_contract apc
+    where
+        apc.approval_id = #{approvalId}
+  </select>
+
+
+  <select id="getHistoricalRecord" parameterType="HistoricalRecord" resultType="HistoricalRecord">
+    SELECT
+    hr.record_id recordId,
+    hr.approval_id approvalId,
+    hr.admin_id adminId,
+    hr.record_state recordState,
+    hr.task_id taskId,
+    hr.approval_time approvalTime,
+    hr.record_create_time recordCreateTime
+    from tb_rst_historical_record hr
+    <where>
+      <if test="adminId != null and adminId != ''">
+        hr.admin_id = #{adminId}
+      </if>
+      <if test="approvalId != null and approvalId != ''">
+        hr.approval_id = #{approvalId}
+      </if>
+    </where>
+  </select>
+
+  <select id="getHistoricalRecord" parameterType="HistoricalRecord" resultType="HistoricalRecord">
+    SELECT
+    hr.record_id recordId,
+    hr.approval_id approvalId,
+    hr.admin_id adminId,
+    hr.record_state recordState,
+    hr.task_id taskId,
+    hr.approval_time approvalTime,
+    hr.record_create_time recordCreateTime
+    from tb_rst_historical_record hr
+    <where>
+      <if test="adminId != null and adminId != ''">
+        hr.admin_id = #{adminId}
+      </if>
+      <if test="approvalId != null and approvalId != ''">
+        hr.approval_id = #{approvalId}
+      </if>
+    </where>
+  </select>
+
+  <select id="listProcessInfo" parameterType="ProcessInfo" resultType="ProcessInfo">
+    SELECT
+    process_id processId,
+    approval_id approvalId,
+    admin_id adminId,
+    process_desc processDesc,
+    process_state processState,
+    process_create_time processCreateTime
+    from tb_rst_process_info
+    <where>
+      <if test="approvalId != null and approvalId != ''">
+        approval_id = #{approvalId}
+      </if>
+      <if test="adminId != null and adminId != ''">
+        admin_id = #{adminId}
+      </if>
+    </where>
+  </select>
+
+
+  <!-- 修改审批信息-->
+  <update id="updateApprovalInfo" parameterType="ApprovalInfo">
+    update tb_rst_approval_info
+    <set >
+      <if test="approvalStatus != null" >
+        approval_status = #{approvalStatus},
+      </if>
+      <if test="approvalStatusDetails != null" >
+        approval_status_details = #{approvalStatusDetails}
+      </if>
+      <if test="approvalDetails != null" >
+        approval_details = #{approvalDetails}
+      </if>
+    </set>
+    <where>
+      <if test="approvalId != null and approvalId != ''">
+        approval_id = #{approvalId}
+      </if>
+    </where>
+  </update>
  <!-- <resultMap id="BaseResultMap" type="ApprovalOrderInfo" >
     <id column="approval_id" property="approvalId" jdbcType="INTEGER" />
     <result column="applicant_name" property="applicantName" jdbcType="VARCHAR" />
@@ -74,17 +496,6 @@
     record_id,approval_name,admin_id,approval_id,record_state,approval_time,approval_desc,record_create_time,record_update_time
   </sql>
 
-<insert id="insert" parameterType="ApprovalOrderInfo"  useGeneratedKeys="true" keyProperty="approvalId">
-    INSERT INTO tb_rst_approval_order(approval_id,applicant_name,applicant_id,order_name,
-    company_name,contact_name,contact_tel,delivery_time,
-    delivery_way,contract_name,contract_img,attachment_img,
-    approval_state,current_admin_id,approval_desc,approval_create_time)
-    VALUES
-    (#{approvalId},(#{applicantName},#{applicantId},#{orderName},#{companyName}
-    ,#{contactName},#{contactTel},#{deliveryTime},#{deliveryWay}
-    ,#{contractName},#{contractImg},#{attachmentImg},#{approvalState}
-    ,#{currentAdminId},#{approvalDesc},NOW())
-</insert>
   &lt;!&ndash; 批量添加订单项数据 &ndash;&gt;
   <insert id="insertItem" parameterType="ArrayList">
     INSERT INTO tb_rst_approval_order_item

+ 212 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/approval/ApprovalController.java

@@ -0,0 +1,212 @@
+package com.iamberry.rst.controllers.approval;
+
+import com.iamberry.rst.core.approval.*;
+import com.iamberry.rst.core.page.PageRequest;
+import com.iamberry.rst.core.page.PagedResult;
+import com.iamberry.rst.faces.approval.ApprovalOrderService;
+import com.iamberry.rst.faces.approval.ApprovalTaskService;
+import com.iamberry.wechat.tools.ResponseJson;
+import com.iamberry.wechat.tools.ResultInfo;
+import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.context.ContextLoader;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by Administrator on 2018/10/9.
+ */
+public class ApprovalController {
+    private ApprovalOrderService approvalOrderService;
+    @Autowired
+    private ApprovalTaskService approvalTaskService;
+    /**
+     * 新增审批信息
+     * @param request
+     * @param approvalProduction
+     * @param productionItems
+     * @return
+     */
+    public ResponseJson addApproval(HttpServletRequest request, ApprovalProduction approvalProduction, String productionItems,String productionContracts){
+        ResponseJson rj =new ResponseJson(200, "添加成功", 200);
+        if (approvalProduction == null || productionItems == null) {
+            return  ResponseJson.getFAILURE();
+        }
+        //获取审批任务id
+        Map<String, Object> taskinfo = approvalTaskService.salesmanSubmitApply(1);
+
+        //封装生产审批产品项
+        List<ApprovalProductionItem> listApprovalProductionItem = new ArrayList<ApprovalProductionItem>();
+        JSONArray jsonProductionItems = JSONArray.fromObject(productionItems);
+        for (int i = 0; i < jsonProductionItems.size(); i++) {
+            JSONObject orderItem = jsonProductionItems.getJSONObject(i);
+            //添加产品项内容
+            ApprovalProductionItem approvalProductionItem = new ApprovalProductionItem();
+            approvalProductionItem.setItemBrandName(orderItem.getString("itemBrandName"));
+            approvalProductionItem.setProductId(orderItem.getInt("productId"));
+            approvalProductionItem.setItemProductName(orderItem.getString("itemProductName"));
+            approvalProductionItem.setItemColorName(orderItem.getString("itemColorName"));
+            approvalProductionItem.setItemProductNum(orderItem.getInt("itemProductNum"));
+            approvalProductionItem.setItemProductModel(orderItem.getString("itemProductModel"));
+            approvalProductionItem.setItemProductUnit(orderItem.getString("itemProductUnit"));
+            approvalProductionItem.setItemProductBoxNumber(orderItem.getInt("itemProductBoxNumber"));
+            listApprovalProductionItem.add(approvalProductionItem);
+        }
+        //封装生产审批合同
+        List<ApprovalProductionContract> listProductionContract = new ArrayList<ApprovalProductionContract>();
+        JSONArray jsonproductionContracts = JSONArray.fromObject(productionContracts);
+        for (int i = 0; i < jsonProductionItems.size(); i++) {
+            JSONObject contract = jsonproductionContracts.getJSONObject(i);
+            ApprovalProductionContract contractInfo = new ApprovalProductionContract();
+            contractInfo.setContractUrl(contract.getString("contractUrl"));
+            listProductionContract.add(contractInfo);
+        }
+
+        boolean returnValue = approvalOrderService.insertApprovalProduction(approvalProduction,listApprovalProductionItem,listProductionContract,taskinfo);
+        if(!returnValue){
+            return  ResponseJson.getFAILURE();
+        }
+        return rj;
+    }
+
+
+    /**
+     * 上传合同图片
+     * 通过流的方式上传文件
+     * @RequestParam("file") 将name=file控件得到的文件封装成CommonsMultipartFile 对象
+     */
+    @ResponseBody
+    @RequestMapping("/fileUpload")
+    public ResponseJson  fileUpload(HttpServletRequest request,@RequestParam("file") CommonsMultipartFile file) throws IOException {
+        ResponseJson responseJson = new ResponseJson();
+        System.out.println("fileName:"+file.getOriginalFilename());
+        //获取项目根目录
+        WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
+        ServletContext servletContext = webApplicationContext.getServletContext();
+        String realPath = servletContext.getRealPath(ResultInfo.CONTRACT_IMAGE);
+        String imgUrl = new Date().getTime()+file.getOriginalFilename();
+        try {
+            //获取输出流
+            OutputStream os=new FileOutputStream(realPath+imgUrl);
+
+            //获取输入流 CommonsMultipartFile 中可以直接得到文件的流
+            InputStream is=file.getInputStream();
+            byte[] bts = new byte[1024];
+            //一个一个字节的读取并写入
+            while(is.read(bts)!=-1)
+            {
+                os.write(bts);
+            }
+            os.flush();
+            os.close();
+            is.close();
+
+        } catch (FileNotFoundException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        responseJson.setReturnCode(200);
+        responseJson.addResponseKeyValue("imgUrl",ResultInfo.CONTRACT_IMAGE+imgUrl);
+        return responseJson;
+    }
+
+/**
+ *  查询待审批/我发起的 列表
+ * @param approvalInfo
+ * @param pageSize
+ * @param pageNO
+ * @param totalNum
+ * @return
+ * @throws Exception
+ */
+    @ResponseBody
+    @RequestMapping(value = "/approvalInfoList")
+    public ResponseJson listApprovalInfo(
+            ApprovalInfo approvalInfo,
+            @RequestParam(value = "pageSize", defaultValue = "10", required = false) Integer pageSize,
+            @RequestParam(value = "pageNO", defaultValue = "1", required = false) Integer pageNO,
+            @RequestParam(value = "totalNum", defaultValue = "0", required = false) Integer totalNum) throws Exception {
+        ResponseJson rj =new ResponseJson(200, "查询成功", 200);
+
+        PagedResult<ApprovalInfo> pagedResult = approvalOrderService.listApprovalInfo(pageNO, pageSize,approvalInfo,totalNum == null);
+        if (totalNum != 0) {
+            pagedResult.setTotal(totalNum);
+        }
+        List<ApprovalInfo> approvalList = pagedResult.getDataList();
+        rj.addResponseKeyValue("approvalList",approvalList);
+        return rj;
+    }
+
+    /**
+     * 修改审批状态 (1 通过 2驳回 3撤销 4评论)
+     * @param
+     * @return
+     * @throws Exception
+     */
+    @ResponseBody
+    @RequestMapping(value = "/updateApprovalInfo")
+    public ResponseJson updateApprovalInfo(
+            ApprovalInfo approvalInfo,Integer status) throws Exception {
+        ResponseJson rj =new ResponseJson(200, "操作成功", 200);
+        if(status == null){
+            return  ResponseJson.getFAILURE();
+        }
+        HistoricalRecord historicalRecord = new HistoricalRecord();
+        historicalRecord.setApprovalId(approvalInfo.getApprovalId());
+        historicalRecord.setAdminId(1);
+        switch (status){
+            case 1:
+
+                //查询当前审核人当前审核任务信息
+                HistoricalRecord record = approvalOrderService.getHistoricalRecord(historicalRecord);
+                if(record == null){
+                    return  ResponseJson.getFAILURE();
+                }
+                //修改审核历史记录状态为已通过
+                historicalRecord.setRecordState(2);
+                if(approvalOrderService.updateHistoricalRecord(historicalRecord) < 1){
+                    return  ResponseJson.getFAILURE();
+                }
+                //获取下一个审核人,并添加审核历史信息
+                Map<String, Object> taskMap = approvalTaskService.completeTask(approvalInfo.getActivitiId(),record.getTaskId());
+                if(taskMap == null){
+                    return  ResponseJson.getFAILURE();
+                }
+                if(taskMap.get("status") == 1){//没有下一个审批人,修改审批任务状态为已审批通过
+
+                }else if(taskMap.get("status") == 0){//还有下一个审批人,需要增加审批历史记录
+
+                }
+                break;
+            case 2:
+                //修改状态为已驳回
+                historicalRecord.setRecordState(3);
+                if(approvalOrderService.updateHistoricalRecord(historicalRecord) < 1){
+                    return  ResponseJson.getFAILURE();
+                }
+                ApprovalInfo approvalinfo = new ApprovalInfo();
+                approvalinfo.setApprovalId(approvalInfo.getApprovalId());
+                approvalinfo.setApprovalStatus(3);
+                if(approvalOrderService.updateApprovalInfo(approvalinfo) < 1){
+                    return  ResponseJson.getFAILURE();
+                }
+                //添加流程信息记录
+
+                break;
+        }
+        return rj;
+    }
+
+}

+ 27 - 10
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -39,9 +39,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * 订单信息
@@ -798,28 +796,30 @@ public class AdminSalesOrderController {
                                       SalesOrder salesOrder,
                                       String orderItemString
     ) throws Exception {
-        ResponseJson rj = new ResponseJson();
-
         JSONArray jsonArray = JSONArray.fromObject(orderItemString);
-        List<SalesOrderItem> salesOrderItemList = (List) JSONArray.toCollection(jsonArray, SalesOrderItem.class);
-        for (SalesOrderItem salesOrderItem:salesOrderItemList) {
+        List salesOrderItemList = ((List)JSONArray.toCollection(jsonArray, SalesOrderItem.class));
+        for (Object temp:salesOrderItemList) {
+            SalesOrderItem salesOrderItem = (SalesOrderItem) temp;
             if(salesOrderItem.getItemNum() > 0 && salesOrderItem.getItemColorId() > 0){
                 ProductColor productColor = productService.getProduceColor(salesOrderItem.getItemColorId());
                 if(productColor == null){
                     return  new ResponseJson(500, "商品不存在", 500);
                 }
-                salesOrderItem.setItemProductId(productColor.getColorProductId());  ////产品id
+                ////产品id
+                salesOrderItem.setItemProductId(productColor.getColorProductId());
                 salesOrderItem.setItemColorId(productColor.getColorId());
                 salesOrderItem.setItemProductType(productColor.getProductType());
                 salesOrderItem.setItemProductName(productColor.getProductName());
                 salesOrderItem.setItemProductPic(productColor.getColorPicture());
                 salesOrderItem.setItemProductColor(productColor.getColorName());
-                salesOrderItem.setItemColorBar(productColor.getColorBar()); ///产品SKU码(百胜)
+                ///产品SKU码(百胜)
+                salesOrderItem.setItemColorBar(productColor.getColorBar());
                 salesOrderItem.setItemProductPrice(productColor.getColorPrice());
                 salesOrderItem.setItemProductDiscount(productColor.getColorDiscount());
                 salesOrderItem.setItemCreateTime(new Date());
                 salesOrderItem.setItemIsSource(1);
-                salesOrderItem.setItemOrderId(salesOrder.getSalesId()); //---- updata new add
+                //---- updata new add
+                salesOrderItem.setItemOrderId(salesOrder.getSalesId());
             }else{
                 return  new ResponseJson(500, "添加商品错误", 500);
             }
@@ -1014,5 +1014,22 @@ public class AdminSalesOrderController {
         return mv;
     }
 
+    /**
+     * 【仓库】进入导出订单页面
+     * @param request
+     * @param salesOrder
+     * @return
+     */
+    @RequestMapping("/to_download_order_excel_by_store")
+    @RequiresPermissions("salesOrder:download:Logistics")
+    public ModelAndView downloadOrderExcelByStore(HttpServletRequest request, SalesOrder salesOrder) {
+        ModelAndView mv = new ModelAndView("order/salesOrder/download_order_store");
+        List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
+        List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
+        mv.addObject("listStoreInfo",listStoreInfo);
+        mv.addObject("logisticsInfoList",logisticsInfoList);
+        return mv;
+    }
+
 
 }

+ 48 - 30
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java

@@ -56,7 +56,15 @@ public class AwaitSendController {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(AwaitSendController.class);
 
-    // 仓库查询待发货订单
+    /**
+     * 仓库查询待发货订单
+     * @param request
+     * @param salesOrder
+     * @param pageSize
+     * @param pageNO
+     * @param totalNum
+     * @return
+     */
     @RequestMapping("/listAwaitSendOrder")
     @RequiresPermissions("order:listAwaitSendOrder")
     public ModelAndView listAwaitSendOrder(HttpServletRequest request, SalesOrder salesOrder,
@@ -161,7 +169,14 @@ public class AwaitSendController {
         return new ModelAndView("order/salesOrder/print_order").addObject("page", postMap).addObject("orderSize", pagedResult.getDataList().size()).addObject("errorOrderNum", errorOrderNum);
     }
 
-    // 打单发货
+    /**
+     * 打单发货
+     * @param post
+     * @param orderId
+     * @param salesId
+     * @param request
+     * @return
+     */
     @ResponseBody
     @RequestMapping("/printOrder")
     @RequiresPermissions("order:listAwaitSendOrder")
@@ -221,39 +236,40 @@ public class AwaitSendController {
         }
 
         // 获取收件人邮编
-        String PostCode = AddrUtil.getPostCode(addrs[2]);
-        if (PostCode == null || "".equals(PostCode)) {
-            PostCode = AddrUtil.getPostCode(addrs[1]);
+        String postCode = AddrUtil.getPostCode(addrs[2]);
+        if (postCode == null || "".equals(postCode)) {
+            postCode = AddrUtil.getPostCode(addrs[1]);
         }
-        if (PostCode == null || "".equals(PostCode)) {
-            PostCode = AddrUtil.getPostCode(addrs[0]);
+        if (postCode == null || "".equals(postCode)) {
+            postCode = AddrUtil.getPostCode(addrs[0]);
         }
 
-        Map<String, Object> Receiver = new HashMap<String, Object>();
-        Receiver.put("Name", salesOrderInfo.getSalesAddressName());
-        Receiver.put("Tel", salesOrderInfo.getSalesAddressTel());
-        Receiver.put("ProvinceName", AddrUtil.dealProvince(addrs[0]));
-        Receiver.put("CityName", addrs[1]);
-        Receiver.put("ExpAreaName", addrs[2]);
-        Receiver.put("Address", salesOrderInfo.getSalesAddressInfo());
-        Receiver.put("PostCode", PostCode);
-        eOrderRequestData.Receiver = (Receiver);
+        Map<String, Object> receiver = new HashMap<String, Object>();
+        receiver.put("Name", salesOrderInfo.getSalesAddressName());
+        receiver.put("Tel", salesOrderInfo.getSalesAddressTel());
+        receiver.put("ProvinceName", AddrUtil.dealProvince(addrs[0]));
+        receiver.put("CityName", addrs[1]);
+        receiver.put("ExpAreaName", addrs[2]);
+        receiver.put("Address", salesOrderInfo.getSalesAddressInfo());
+        receiver.put("PostCode", postCode);
+        eOrderRequestData.Receiver = (receiver);
         // 发件人信息
-        Map<String, Object> Sender = new HashMap<String, Object>();
-        Sender.put("Name", storeShip.getStoreShipName());
-        Sender.put("Tel", storeShip.getStoreShipTel());
-        Sender.put("ProvinceName", storeShip.getStoreShipProvince());
-        Sender.put("CityName", storeShip.getStoreShipCity());
-        Sender.put("ExpAreaName", "清溪镇");
-        Sender.put("Address", storeShip.getStoreShipAddress());
-        Sender.put("PostCode", "523660");
-        eOrderRequestData.Sender = (Sender);
+        Map<String, Object> sender = new HashMap<String, Object>();
+        sender.put("Name", storeShip.getStoreShipName());
+        sender.put("Tel", storeShip.getStoreShipTel());
+        sender.put("ProvinceName", storeShip.getStoreShipProvince());
+        sender.put("CityName", storeShip.getStoreShipCity());
+        sender.put("ExpAreaName", "清溪镇");
+        sender.put("Address", storeShip.getStoreShipAddress());
+        sender.put("PostCode", "523660");
+        eOrderRequestData.Sender = (sender);
         // 产品信息
-        List<Map<String, Object>> Commodity = new ArrayList<>();
+        List<Map<String, Object>> commodity = new ArrayList<>();
         SalesOrderItem item = new SalesOrderItem();
         item.setItemOrderId(salesOrderInfo.getSalesId());
         List<SalesOrderItem> items = salesOrderService.listSalesOrderItem(item);
-        Double colorIsWeight = 0.00;  //克
+        // 整个产品的重量
+        Double colorIsWeight = 0.00;
         String goodName = "";
         int Goodsquantity = 0;
         for (SalesOrderItem temp : items) {
@@ -269,9 +285,9 @@ public class AwaitSendController {
         product1.put("Goodsquantity", Goodsquantity);
         // 计算产品重量
         product1.put("GoodsWeight", colorIsWeight/1000);
-        Commodity.add(product1);
+        commodity.add(product1);
 
-        eOrderRequestData.Commodity = (Commodity);
+        eOrderRequestData.Commodity = (commodity);
         eOrderRequestData.Weight = (colorIsWeight/1000);
         eOrderRequestData.Quantity = (1);
         eOrderRequestData.IsReturnPrintTemplate = (1);
@@ -299,7 +315,9 @@ public class AwaitSendController {
                     dir.mkdir();
                 }
                 File file = new File(dir.getAbsolutePath() + File.separator + orderId + ".txt");
-                file.createNewFile();
+                if (!file.createNewFile()) {
+                    return ResponseJson.getFAILURE().addResponseKeyValue("error", "创建文件失败");
+                }
                 FileWriter fileWriter = null;
                 try {
                     fileWriter = new FileWriter(file, false);

+ 9 - 8
watero-rst-web/src/main/resources/watero-rst-orm.xml

@@ -115,14 +115,15 @@
 		<typeAlias type="com.iamberry.rst.core.cm.WarehouseInfo" alias="WarehouseInfo"/>
 		<typeAlias type="com.iamberry.rst.core.cm.FactoryInfo" alias="FactoryInfo"/>
 		<!-- 审批实体类 -->
-		<!--<typeAlias type="com.iamberry.rst.core.approval.ApprovalOrderInfo" alias="ApprovalOrderInfo"/>
-		<typeAlias type="com.iamberry.rst.core.approval.ApprovalOrderItem" alias="ApprovalOrderItem"/>
-		<typeAlias type="com.iamberry.rst.core.approval.ApprovalPeople" alias="ApprovalPeople"/>
-		<typeAlias type="com.iamberry.rst.core.approval.ApprovalRecord" alias="ApprovalRecord"/>
-		<typeAlias type="com.iamberry.rst.core.approval.ApplyPick" alias="ApplyPick"/>
-		<typeAlias type="com.iamberry.rst.core.approval.ApplyPickItem" alias="ApplyPickItem"/>-->
-
-
+        <typeAlias type="com.iamberry.rst.core.approval.ApprovalApplyPick" alias="ApprovalApplyPick"/>
+        <typeAlias type="com.iamberry.rst.core.approval.ApprovalApplyPickItem" alias="ApprovalApplyPickItem"/>
+        <typeAlias type="com.iamberry.rst.core.approval.ApprovalInfo" alias="ApprovalInfo"/>
+        <typeAlias type="com.iamberry.rst.core.approval.ApprovalInventoryRecords" alias="ApprovalInventoryRecords"/>
+        <typeAlias type="com.iamberry.rst.core.approval.ApprovalProduction" alias="ApprovalProduction"/>
+        <typeAlias type="com.iamberry.rst.core.approval.ApprovalProductionContract" alias="ApprovalProductionContract"/>
+        <typeAlias type="com.iamberry.rst.core.approval.ApprovalProductionItem" alias="ApprovalProductionItem"/>
+        <typeAlias type="com.iamberry.rst.core.approval.HistoricalRecord" alias="HistoricalRecord"/>
+        <typeAlias type="com.iamberry.rst.core.approval.ProcessInfo" alias="ProcessInfo"/>
 		<!--member-->
 		<typeAlias type="com.iamberry.wechat.core.entity.member.Member" alias="Member"/>
 

+ 113 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/download_order_store.ftl

@@ -0,0 +1,113 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="renderer" content="webkit|ie-comp|ie-stand">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
+    <meta http-equiv="Cache-Control" content="no-siteapp" />
+    <link rel="Bookmark" href="/favicon.ico" >
+    <link rel="Shortcut Icon" href="/favicon.ico" />
+    <#include "/base/list_base.ftl">
+    <title>订单下载</title>
+    <style>
+        *{padding: 0;margin: 0;}
+        .my-input{border: 1px solid rgba(0,0,0,.1);padding: 1px 5px;height: 32px;margin-right: 10px;}
+        .my-select{border: 1px solid rgba(0,0,0,.1);height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
+        .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
+        .table-bg thead th{background-color: #e2f6ff;}
+        .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
+        .my-order{left: 0px;cursor:pointer; position: absolute;border-bottom: 1px solid rgb(255, 255, 255);float: left;width: 110px;height: 36px;}
+    </style>
+</head>
+<body>
+<!--  录入订单 -->
+<div class="page-container">
+    <div class="" id="form-download">
+        <form action="" method="post" style="margin-left: 24px;">
+                <select class="my-select" name="salesIsDownload" id="salesIsDownload" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;display: none">
+                    <option value ="">导出状态</option>
+                    <option value ="2" >已导出</option>
+                    <option value ="1" >未导出</option>
+                </select>
+
+                <select class="my-select" name="salesShippingStatus" id="salesShippingStatus" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                    <option value ="11" >已通知配货</option>
+                    <option value ="1" selected>已发货</option>
+                </select>
+
+                <select class="my-select" name="salesDeliver" id="salesDeliver" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;">
+                    <option value ="">出库状态</option>
+                    <option value ="1" >未出库</option>
+                    <option value ="2" >已出库</option>
+                </select>
+
+                <select class="my-select" name="salesStatus" id="salesStatus" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;display: none">
+                    <option value ="">确认状态</option>
+                    <option value ="0" >未确认</option>
+                    <option value ="1" >确认</option>
+                    <option value ="2" >挂起</option>
+                </select>
+
+                <select name="salesStoreId" id="salesStoreId" class="my-select" style="height: 36px;width: 120px;margin: 0px;margin-bottom: 10px;"">
+                    <option value="">店铺</option>
+                    <#if listStoreInfo?? &&  (listStoreInfo?size > 0) >
+                        <#list listStoreInfo as info>
+                            <option value="${info.storeId!''}" <#if salesOrder.salesStoreId??><#if salesOrder.salesStoreId == info.storeId >selected="selected"</#if></#if>>${info.storeName!''}</option>
+                        </#list>
+                    </#if>
+                </select>
+
+            <input type="text" style="width:120px;height:36px;margin-right: 0px;" name="startDate" id="startDate" class="input-text" placeholder="开始时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',skin:'whyGreen' })" value="${(salesOrder.startDate?string("yyyy-MM-dd HH:mm:ss"))!''}" readonly="readonly"/>
+            <input type="text" style="width:120px;height:36px;margin-right: 0px;" name="endDate" id="endDate" class="input-text" placeholder="结束时间" onClick="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',skin:'whyGreen' })" value="${(salesOrder.endDate?string("yyyy-MM-dd HH:mm:ss"))!''}" readonly="readonly"/>
+            <input type="text" class="my-input trim_input"  style="width:120px;margin-right: 0px;padding: 0px;" value="${salesOrder.salesBatchId!}" placeholder="订单批次号" name="salesBatchId" id="salesBatchId">
+            <button onClick="download();" class="btn radius" style="background: #32a3d8;color: #fff;width: 120px" type="button" title="下载订单">下载订单</button>
+        </form>
+    </div>
+</div>
+<script type="text/javascript">
+        function download(){
+            var salesIsDownload = $("#salesIsDownload").val(); //是否导出
+            var salesStatus = $("#salesStatus").val();; //订单状态
+            var salesShippingStatus = $("#salesShippingStatus").val(); //是否已发货
+            var salesDeliver = $("#salesDeliver").val(); //是否已发货
+            var salesStoreId = $("#salesStoreId").val(); //店铺
+            var startDate = $("#startDate").val();
+            var endDate = $("#endDate").val();
+            var salesBatchId = $("#salesBatchId").val();
+            $.ajax({
+                type:'POST',
+                url: '${path}/admin/order/val_download_order_excel',
+                data:{
+                    "salesIsDownload" : salesIsDownload,
+                    "salesStatus" : salesStatus,
+                    "salesShippingStatus" : salesShippingStatus,
+                    "salesDeliver" : salesDeliver,
+                    "salesStoreId" : salesStoreId,
+                    "startDate" : startDate,
+                    "endDate" : endDate,
+                    "salesBatchId" : salesBatchId
+                },
+                dataType: 'json',
+                async: false,
+                success:function(res) {
+                    if(res.returnCode != 200){
+                        layer.msg(res.resultMsg,{icon: 2,time:3000});
+                        return false;
+                    }else{
+                        window.location="${path}/admin/order/download_order_excel?"
+                                +"salesIsDownload="+salesIsDownload
+                                +"&salesStatus="+salesStatus
+                                +"&salesShippingStatus="+salesShippingStatus
+                                +"&salesDeliver="+salesDeliver
+                                +"&salesStoreId="+salesStoreId
+                                +"&startDate="+startDate
+                                +"&endDate="+endDate
+                                +"&salesBatchId="+salesBatchId;
+                    }
+                }
+            });
+        }
+    </script>
+</body>
+</html>

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/list_wait_send_order.ftl

@@ -249,7 +249,7 @@
      * 跳转到下载页面
      */
     function downloadOrderPage(){
-        layer_show("商品列表","${path}/admin/salesOrder/to_download_order_excel","600","250");
+        layer_show("导出订单","${path}/admin/salesOrder/to_download_order_excel_by_store","600","250");
     }
 </script>
 

+ 26 - 25
watero-rst-web/src/main/webapp/WEB-INF/views/order/salesOrder/sales_order_list.ftl

@@ -17,6 +17,7 @@
         .my-select{border: 1px solid rgba(0,0,0,.1);height: 34px;margin: 0 10px; -webkit-appearance:none;appearance:none;background: url(${path}/common/images/pts/select-1.png) right center no-repeat;background-size:auto 100%;}
         .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
         .table-bg thead th{background-color: #e2f6ff;}
+        .order-addresss{white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 100px}
         .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
         /*input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/rst/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(/rst/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}*/
@@ -102,17 +103,12 @@
                 <th width="16"><input type="checkbox" ></th>
                 <th width="50">订单类型</th>
                 <th width="60">订单号</th>
-                <th width="70">交易号</th>
                 <th width="72">批次号</th>
-                <th width="60">收货人姓名</th>
-                <th width="70">收货人电话</th>
+                <th width="70">姓名/电话</th>
                 <th width="100">收货地址</th>
                 <th width="50">是否发货</th>
                 <th width="60">订单状态</th>
                 <th width="60">物流信息</th>
-                <#--<th width="50">订单金额</th>
-                <th width="50">支付金额</th>
-                <th width="50">是否付款</th>-->
                 <th width="50">用户备注</th>
                 <th width="50">产品</th>
                 <th width="65">创建时间</th>
@@ -126,40 +122,45 @@
                     <td width="16"><input type="checkbox" class="sales_id" value="${order.salesId!''}" ></td>
                     <td width="16">
                         <#if (order.salesCustomerId)??>
-                            <div>售后订单</div>
                             <div>
-                                (
                                 <#if order.customerIsSolve == 1>
                                     已解决
                                 <#elseif order.customerIsSolve == 2>
                                     未解决
                                 <#elseif order.customerIsSolve == 3>
-                                    换
+                                    换
                                 <#elseif order.customerIsSolve == 4>
-                                    
+                                    修
                                 <#elseif order.customerIsSolve == 5>
-                                    补
+                                    补
                                 <#elseif order.customerIsSolve == 6>
-                                    退
+                                    退
                                 <#elseif order.customerIsSolve == 7>
                                     无理由退货
                                 </#if>
-                                )
                             </div>
                         <#else>
-                            正常订单
+                            正常
                         </#if>
                     </td>
                     <td>${order.salesOrderId!''}</td>
-                    <td>${order.salesDealCode!''}</td>
                     <td>${order.salesBatchId!''}</td>
-                    <td>${order.salesAddressName!''}</td>
-                    <#if (order.salesAddressTel)?? && order.salesAddressTel?length gt 7>
-                        <td>${order.salesAddressTel?substring(0,3)}***${order.salesAddressTel?substring(order.salesAddressTel?length-4,order.salesAddressTel?length)}</td>
-                    <#else>
-                        <td>${order.salesAddressTel!''}</td>
-                    </#if>
-                    <td>${order.salesAddressInfo!''}</td>
+                    <td>${order.salesAddressName!''}
+                        <p>
+                            <#if (order.salesAddressTel)?? && order.salesAddressTel?length gt 7>
+                                ${order.salesAddressTel?substring(0,3)}***${order.salesAddressTel?substring(order.salesAddressTel?length-4,order.salesAddressTel?length)}
+                            <#else>
+                                ${order.salesAddressTel!''}
+                            </#if>
+                        </p>
+                    </td>
+                    <td alt="${order.salesAddressInfo!''}" title="${order.salesAddressInfo!''}">
+                        <#if order.salesAddressInfo?length gt 15>
+                            ${order.salesAddressInfo?substring(0,12)}...
+                        <#else>
+                            ${order.salesAddressInfo!''}
+                        </#if>
+                    </td>
                     <td>
                         <#if order.salesShippingStatus == 0>
                             未发货
@@ -201,7 +202,7 @@
                         </#if>
                     </td>-->
                     <td>${order.salesUserRemark!''}</td>
-                    <td>
+                    <td style="text-align: left;">
                         <#if order.salesOrderItemList ??>
                             <#list order.salesOrderItemList as d>
                                 <span class="label label-success radius">${(d.itemProductName)!}(${(d.itemProductColor)!})*${(d.itemNum)!}</span>
@@ -210,7 +211,7 @@
                     </td>
 
                     <td>
-                        ${(order.salesCreateTime?string("yyyy-MM-dd"))!''}</br>
+                        ${(order.salesCreateTime?string("yy-MM-dd"))!''}</br>
                         ${(order.salesCreateTime?string("HH:mm:ss"))!''}
                     </td>
                     <td>
@@ -236,7 +237,7 @@
                 </tr>
                 </#list>
             <#else>
-                <tr><td colspan="15" class="td-manage text-c" >暂时没有订单信息,请添加!</td></tr>
+                <tr><td colspan="13" class="td-manage text-c" >暂时没有订单信息,请添加!</td></tr>
             </#if>
             </tbody>
         </table>

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_print_List.ftl

@@ -34,7 +34,7 @@
         </div>
         <input class="my-input" type="hidden" id="machineIsPrint" name="machineIsPrint" />
         <input  class="my-input" type="text" value="每个二维码打印数量:" readonly="readonly" style="border: 0;margin-top: 8px;margin-right: 0"/>
-        <input class="my-input" type="text" id="settingNumber" name="printNumber" value="3" placeholder="打印数量" style="margin-top: 10px;"/>
+        <input class="my-input" type="text" id="settingNumber" name="printNumber" value="1" placeholder="打印数量" style="margin-top: 10px;"/>
         <button type="button" class="my-btn-search" onclick="printList();" style="cursor:pointer; margin-right: 50px;margin-top: 10px;">打印</button>
         <button id="updatePrintId" type="button" class="my-btn-search" onclick="batchUpdatePring();" style="cursor:pointer; margin-right: 50px;margin-top: 10px;">修改为已打印</button>
     </form>