wangxiaoming 6 rokov pred
rodič
commit
c62af10529

+ 11 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/approval/ApprovalApplyPickItem.java

@@ -40,6 +40,9 @@ public class ApprovalApplyPickItem implements Serializable{
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date itemUpdateTime;
 
+    /* 生产项id */
+    private Integer itemId;
+
     public Integer getApplyItemId(){
         return applyItemId;
     }
@@ -135,4 +138,12 @@ public class ApprovalApplyPickItem implements Serializable{
     public void setItemUpdateTime(Date  itemUpdateTime){
         this.itemUpdateTime=itemUpdateTime;
     }
+
+    public Integer getItemId() {
+        return itemId;
+    }
+
+    public void setItemId(Integer itemId) {
+        this.itemId = itemId;
+    }
 }

+ 9 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/cm/SalesOrder.java

@@ -102,6 +102,7 @@ public class SalesOrder implements Serializable {
 
     private Integer salesAddType;           //增加订单方式 1:手动增加 2:Excel导入 3:客诉增加订单
     private Integer salesAdminId;           //录入人id
+    private String salesAdminName;           //录入人名称
 
     private Integer salesCustomerId;           //客诉id
     //  处理结果: 1:已解决  2:未解决 3:换新  4:维修 5:补发 6:退货 7:无理由退货
@@ -647,4 +648,12 @@ public class SalesOrder implements Serializable {
     public void setSalesDeliver(Integer salesDeliver) {
         this.salesDeliver = salesDeliver;
     }
+
+    public String getSalesAdminName() {
+        return salesAdminName;
+    }
+
+    public void setSalesAdminName(String salesAdminName) {
+        this.salesAdminName = salesAdminName;
+    }
 }

+ 19 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/approval/ApplyPickServiceImpl.java

@@ -8,6 +8,7 @@ import com.iamberry.rst.faces.approval.ApplyPickService;
 import com.iamberry.rst.service.approval.mapper.ApplyPickItemMapper;
 import com.iamberry.rst.service.approval.mapper.ApplyPickMapper;
 import com.iamberry.rst.service.approval.mapper.ApprovalOrderMapper;
+import com.iamberry.rst.service.approval.mapper.ApprovalProductionMapper;
 import com.iamberry.rst.service.sys.mapper.SysMapper;
 import com.iamberry.rst.util.PageUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,6 +34,8 @@ public class ApplyPickServiceImpl  implements ApplyPickService {
     private SysMapper sysMapper;
     @Autowired
     private ApprovalOrderMapper approvalOrderMapper;
+    @Autowired
+    private ApprovalProductionMapper approvalProductionMapper;
 
 
     /**
@@ -93,6 +96,22 @@ public class ApplyPickServiceImpl  implements ApplyPickService {
         }
         for (ApprovalApplyPickItem approvalApplyPickItem:approvalApplyPick.getListApplyPickItem()) {
             approvalApplyPickItem.setApplyPickId(approvalApplyPick.getApplyPickId());
+
+            ApprovalProductionItem  approvalProductionItem = new ApprovalProductionItem();
+            approvalProductionItem.setItemId(approvalApplyPickItem.getItemId());
+            List<ApprovalProductionItem> approvalProductionItemList = approvalProductionMapper.getApprovalProductionItemList(approvalProductionItem);
+            approvalProductionItem = approvalProductionItemList.get(0);
+
+            if(approvalApplyPickItem.getItemProductNum() > approvalProductionItem.getItemProductNum() ){
+                throw new RuntimeException(approvalProductionItem.getItemProductName()+"("+ approvalProductionItem.getItemColorName() +")"+"的提货数量不能大于"+approvalProductionItem.getItemProductNum());
+            }
+            approvalApplyPickItem.setProductId(approvalProductionItem.getProductId());
+            approvalApplyPickItem.setItemProductName(approvalProductionItem.getItemProductName());
+            approvalApplyPickItem.setItemColorName(approvalProductionItem.getItemColorName());
+            approvalApplyPickItem.setItemBrandName(approvalProductionItem.getItemBrandName());
+            approvalApplyPickItem.setItemProductModel(approvalProductionItem.getItemProductModel());
+            approvalApplyPickItem.setItemProductUnit(approvalProductionItem.getItemProductUnit());
+            approvalApplyPickItem.setItemProductBoxNumber(approvalProductionItem.getItemProductBoxNumber());
         }
         flag = applyPickItemMapper.saveList(approvalApplyPick.getListApplyPickItem());
         if(flag < 1){

+ 3 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/salesOrderMapper.xml

@@ -163,13 +163,15 @@
     trsc.company_name companyName,
     trsi.store_name  storeName,
     ci.customer_is_solve customerIsSolve,
-    od.batch_create_time  batchCreateTime
+    od.batch_create_time  batchCreateTime,
+    ao.admin_name AS salesAdminName
     from tb_rst_sales_order_info
     LEFT JOIN tb_rst_sales_company trsc ON tb_rst_sales_order_info.sales_company_id = trsc.company_id
     LEFT JOIN tb_rst_store_info trsi ON tb_rst_sales_order_info.sales_store_id = trsi.store_id
     LEFT JOIN tb_rst_order_batch od ON tb_rst_sales_order_info.sales_batch_id = od.batch_id
     LEFT JOIN tb_rst_customer_info ci ON tb_rst_sales_order_info.sales_customer_id = ci.customer_id
     LEFT JOIN tb_rst_sales_order_item oi ON tb_rst_sales_order_info.sales_id = oi.item_order_id
+    LEFT JOIN tb_rst_sys_admin ao ON tb_rst_sales_order_info.sales_admin_id = ao.admin_id
     <where>
       <if test="salesIsDownload !=null and salesIsDownload !=''">
         AND sales_is_download = #{salesIsDownload}

+ 1 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/approval/ApplyPickController.java

@@ -122,7 +122,7 @@ public class ApplyPickController {
           applyPickService.save(approvalApplyPick,openId,taskinfo,approvalProductionContractList);
         }catch (Exception e){
             e.printStackTrace();
-            rj.setResultMsg("添加提货失败,"+ e.getMessage());
+            rj.setResultMsg("提货失败,详情:"+ e.getMessage());
             return rj;
         }
         rj = ResponseJson.getSUCCESS();

+ 10 - 9
watero-rst-web/src/main/resources/platform.properties

@@ -75,6 +75,9 @@ token=weixin
 # partnerkey
 partnerkey=cdb9075e7ecad945ba788bc5aedM212B
 
+# pubNo -- soodo-test
+pubNo=gh_8ddb1d63343c
+
 # appId-test
 #appId=wxc71b789fad06a2d7
 # appId-wateroPF
@@ -89,6 +92,13 @@ appSecret=39c8f8742c3f084e1da5b75520436a70
 # appSecret-watero\u6C34\u65F6\u4EE3
 #appSecret=97b2f2991e4ff0f2567fbc625f858377
 
+# wechat auth back url
+WECHAT_BACK_URL=http://test.iamberry.com/wechatBack
+
+# index redirect url
+redirectUrl_index=redirect:/wechat/index
+
+
 SUCCESSINFO=SUCCESS
 
 #cm-website-send-msg
@@ -99,13 +109,4 @@ scanningQrCode=https://w.iamberry.com/tooth/wechat/qr/
 #ReqURL=http://api.kdniao.cc/api/Eorderservice
 ReqURL=http://testapi.kdniao.cc:8081/api/EOrderService
 
-# wechat auth back url
-WECHAT_BACK_URL=http://test.iamberry.com/wechatBack
-
-# index redirect url
-redirectUrl_index=redirect:/wechat/index
 
-#ROOT_PATH=rst
-
-# pubNo -- soodo-test
-pubNo=gh_8ddb1d63343c

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

@@ -115,6 +115,14 @@
                 <th width="10">支付时间:</th>
                 <td width="10" style="font-weight: normal;"><span>${(order.salesPayTime?string("yyyy-MM-dd HH:mm:ss"))!''}</span></td>
             </tr>
+            <tr>
+                <th width="10">录入人:</th>
+                <td width="10" style="font-weight: normal;"></td>
+                    ${order.salesAdminName!''}
+                <td width="10"></td>
+                <th width="10"></th>
+                <td width="10" style="font-weight: normal;"><span></span></td>
+            </tr>
             </thead>
         </table>
         <div class="row cl">

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

@@ -135,11 +135,11 @@
                     <td>${order.salesBatchId!''}</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>
+                            <#--<#if (order.salesAddressTel)?? && order.salesAddressTel?length gt 7>-->
+                            <#--<#else>-->
+                                <#--${order.salesAddressTel!''}-->
+                            <#--</#if>-->
+                            ${order.salesAddressTel!''}
                         </p>
                     </td>
                     <td alt="${order.salesAddressInfo!''}" title="${order.salesAddressInfo!''}">