ソースを参照

Merge branch 'develop' of http://git.iamberry.com/hexiugang/iamberry-common-parent into develop

wangxiaoming 6 年 前
コミット
050b394b05

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

@@ -122,6 +122,8 @@ public class SalesOrder implements Serializable {
 
     private Date salesDistributionTime;//通知配货时间
 
+    private String procTypeName;//通知配货时间
+
     public Integer getStartOrderNO() {
         return startOrderNO;
     }
@@ -713,4 +715,12 @@ public class SalesOrder implements Serializable {
     public void setIsSelectCustomer(Integer isSelectCustomer) {
         this.isSelectCustomer = isSelectCustomer;
     }
+
+    public String getProcTypeName() {
+        return procTypeName;
+    }
+
+    public void setProcTypeName(String procTypeName) {
+        this.procTypeName = procTypeName;
+    }
 }

+ 12 - 81
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -1021,87 +1021,12 @@ public class CustomerServiceImpl implements CustomerService {
         }
         CustomerInfo customer = customerList.get(0);
         map.put("customer",customer);
-        int orderId = 0;
-//        switch (customer.getCustomerIsSolve().intValue()) {
-//            case 3://换新
-//                Renewed renewedInfo = new Renewed();
-//                renewedInfo.setRenewedState(1);
-//                renewedInfo.setCustomerId(customerInfo.getCustomerId());
-//                //查询售后换新详情
-//                renewedInfo = renewedMapper.getRenewedInfo(renewedInfo);
-//                //orderId = renewedInfo.getOrderId();
-//                customerCommon = CustomerCommonUtil.getCustomerCommon(3,renewedInfo);
-//                customerCommon = customerService.selectProdcueAndFitting(customerCommon,3);
-//                break;
-//            case 4://维修
-//                Repair repairInfo = new Repair();
-//                repairInfo.setRepairState(1);
-//                repairInfo.setCustomerId(customerInfo.getCustomerId());
-//                //查询售后维修集合
-//                repairInfo = repairMapper.getRepairInfo(repairInfo);
-//                /*if (repairInfo.getComplaintDetectList() != null && repairInfo.getComplaintDetectList().size() > 0) {
-//                    repairInfo.setDetectState(repairInfo.getComplaintDetectList().get(0).getDetectState());
-//                }*/
-//                //orderId = repairInfo.getOrderId();
-//                customerCommon = CustomerCommonUtil.getCustomerCommon(4,repairInfo);
-//                customerCommon = customerService.selectProdcueAndFitting(customerCommon,4);
-//                break;
-//            case 5://补发
-//                Reissue reissueInfo = new Reissue();
-//                reissueInfo.setReissueState(1);
-//                reissueInfo.setCustomerId(customerInfo.getCustomerId());
-//                //查询售后补发集合
-//                List<Reissue> reissueList = reissueMapper.listReissue(reissueInfo);
-//                if (reissueList == null || reissueList.size() == 0) {
-//                    return null;
-//                }
-//                reissueInfo = reissueList.get(0);
-//                //orderId = reissueInfo.getOrderId();
-//                customerCommon = CustomerCommonUtil.getCustomerCommon(5,reissueInfo);
-//                customerCommon = customerService.selectProdcueAndFitting(customerCommon,5);
-//                break;
-//            case 6://退货
-//                //查询售后退货集合
-//                BackGoods backGoodsInfo = new BackGoods();
-//                backGoodsInfo.setBackGoodsState(1);
-//                backGoodsInfo.setCustomerId(customerInfo.getCustomerId());
-//                List<BackGoods> backGoodsList = backGoodsMapper.listBackGoods(backGoodsInfo);
-//                if (backGoodsList == null || backGoodsList.size() == 0) {
-//                    return null;
-//                }
-//                backGoodsInfo = backGoodsList.get(0);
-//                /*if (backGoodsInfo.getComplaintDetectList() != null && backGoodsInfo.getComplaintDetectList().size() > 0) {
-//                    backGoodsInfo.setDetectState(backGoodsInfo.getComplaintDetectList().get(0).getDetectState());
-//                }*/
-//                //orderId = backGoodsInfo.getOrderId();
-//                customerCommon = CustomerCommonUtil.getCustomerCommon(6,backGoodsInfo);
-//                customerCommon = customerService.selectProdcueAndFitting(customerCommon,6);
-//                break;
-//            case 7://无理由退货
-//                //查询售后无理由退货集合
-//                NoreasonBack noreasonBackInfo = new NoreasonBack();
-//                noreasonBackInfo.setNoreasonBackState(1);
-//                noreasonBackInfo.setCustomerId(customerInfo.getCustomerId());
-//                List<NoreasonBack> noreasonBackList = noreasonBackMapper.listNoreasonBack(noreasonBackInfo);
-//                if (noreasonBackList == null || noreasonBackList.size() == 0) {
-//                    return null;
-//                }
-//                noreasonBackInfo = noreasonBackList.get(0);
-//                /*if (noreasonBackInfo.getComplaintDetectList() != null && noreasonBackInfo.getComplaintDetectList().size() > 0) {
-//                    noreasonBackInfo.setDetectState(noreasonBackInfo.getComplaintDetectList().get(0).getDetectState());
-//                }*/
-//                //orderId = noreasonBackInfo.getOrderId();
-//                customerCommon = CustomerCommonUtil.getCustomerCommon(7,noreasonBackInfo);
-//                customerCommon = customerService.selectProdcueAndFitting(customerCommon,7);
-//                break;
-//        }
-
-        if(customerCommon != null && customer.getCustomerIsSolve() != null && (customer.getCustomerIsSolve() == 3 || customer.getCustomerIsSolve() == 4 ||
-        customer.getCustomerIsSolve() == 5 || customer.getCustomerIsSolve() == 6 || customer.getCustomerIsSolve() == 7)
-                ){
+        CmRelation cmRelation = new CmRelation();
+        cmRelation.setCustomerId(customer.getCustomerId());
+        cmRelation = customerInfoMapper.getCmRelationInfo(cmRelation);
             RelationOrder relationOrder = new RelationOrder();
-            relationOrder.setRelationType(customerCommon.getCustomerIsSolve());
-            relationOrder.setRelationId(customerCommon.getRelationId());
+            relationOrder.setRelationId(cmRelation.getRelationId());
+            relationOrder.setRelationCustomerId(customer.getCustomerId());
             List<RelationOrder> relationOrderList = relationOrderService.getRelationOrderList(relationOrder);
             if(relationOrderList != null && relationOrderList.size() > 0){
                 String[] salesIds = new String[relationOrderList.size()];
@@ -1121,7 +1046,13 @@ public class CustomerServiceImpl implements CustomerService {
                 }
                 map.put("orderList",orderList);
             }
-        }
+        //查询寄回寄出产品
+        ClosedProdcue record = new ClosedProdcue();
+        record.setRelationId(cmRelation.getRelationId());
+        customerCommon.setClosedProdcues(closedProdcueMapper.listclosedProdcue(record));
+        SendProdcue sendrecord = new SendProdcue();
+        sendrecord.setRelationId(cmRelation.getRelationId());
+        customerCommon.setSendProdcues(sendProdcueMapper.listSendProdcue(sendrecord));
         map.put("customerCommon",customerCommon);
         return map;
     }

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

@@ -65,7 +65,7 @@
             temp.*,
             trsc.company_name companyName,
             trsi.store_name  storeName,
-            ci.customer_is_solve customerIsSolve,
+            pt.proc_type_name procTypeName,
             od.batch_create_time  batchCreateTime,
             ao.admin_name  salesAdminName
         FROM
@@ -160,7 +160,9 @@
         LEFT JOIN tb_rst_sales_company trsc ON temp.sales_company_id = trsc.company_id
         LEFT JOIN tb_rst_store_info trsi ON temp.sales_store_id = trsi.store_id
         LEFT JOIN tb_rst_order_batch od ON temp.sales_batch_id = od.batch_id
-        LEFT JOIN tb_rst_cm_customer_info ci ON temp.sales_customer_id = ci.customer_id
+        LEFT JOIN tb_rst_cm_relation cr ON temp.sales_customer_id = cr.customer_id
+        LEFT JOIN tb_rst_cm_proc_method pm ON pm.proc_method_id = cr.proc_method_id
+        LEFT JOIN tb_rst_cm_proc_type pt ON pt.proc_type_id = pm.proc_type_id
         LEFT JOIN tb_rst_sys_admin ao ON temp.sales_admin_id = ao.admin_id
     </select>
 

+ 7 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -563,6 +563,13 @@ public class AdminCustomerController {
         customerInfo.setCustomerId(Integer.parseInt(customerId));
         Map<String, Object> map = customerService.getCustomerInfo(customerInfo);
         ResponseJson rj = new ResponseJson(200, "修改成功!", 200);
+        //查询处理方式信息
+        CmRelation cmRelation = new CmRelation();
+        cmRelation.setCustomerId(customerInfo.getCustomerId());
+        cmRelation = customerService.getCmRelationInfo(cmRelation);
+        ProcMethod procMethod = customerService.getProcMethod(cmRelation.getProcMethodId());
+        rj.addResponseKeyValue("cmRelation", cmRelation);
+        rj.addResponseKeyValue("procMethod", procMethod);
         rj.addResponseKeyValue("customerCommon", map.get("customerCommon"));
         rj.addResponseKeyValue("customer", map.get("customer"));
         rj.addResponseKeyValue("orderList", map.get("orderList"));

+ 15 - 65
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/custome_detail.ftl

@@ -193,7 +193,7 @@
                     处理结果(<span id="customerIsSolve" style="color: red"></span>)
                     <span id="postage" style="color: red"></span>
                 </th>
-                <th width="40" style="font-weight: normal;">
+                <#--<th width="40" style="font-weight: normal;">
                     <div class="row cl">
                         <label class="form-label col-1 col-sm-1"></label>
                         <div class="formControls col-10 col-sm-10">
@@ -202,7 +202,7 @@
                             </ul>
                         </div>
                     </div>
-                </th>
+                </th>-->
             </tr>
             </thead>
         </table>
@@ -231,49 +231,7 @@
             </tr>
             </thead>
         </table>
-        <#--<div id="div_costomer" style="display: none;">
-            <div class="row cl" id="divCloseProdcue">
-                <label class="form-label col-1 col-sm-1">寄回产品:</label>
-                <div class="formControls col-7 col-sm-7">
-                    <div class="update-parts" id="closeprodcue"></div><br/>
-                </div>
-
-            </div>
-            <div class="row cl" style="margin-top: 0px;">
-                <label class="form-label col-1 col-sm-1"></label>
-                <div class="formControls col-5 col-sm-5">
-                    <!--TDS收集&ndash;&gt;
-                    <label id="customerTDS"></label>
-                    <div style="border-bottom:#ddd 1px solid; overflow:hidden"></div>
-                </div>
-
-            </div>
-            <div class="row cl" id="sendMergeAddressDiv">
-                <label class="form-label col-1 col-sm-1">收货地址:</label>
-                <div class="formControls col-5 col-sm-5">
-                    <label id="relationSendMergeAddress"></label>
-                </div>
-
-            </div>
-            <div class="row cl" id="divSendProdcue">
-                <label class="form-label col-1 col-sm-1">寄送产品:</label>
-                <div class="formControls col-7 col-sm-7">
-                    <div class="update-parts" id="sendprodcue"></div>
-                </div>
-            </div>
-        </div>
 
-        <div class="row cl" style="display: none">
-            <label class="form-label col-1 col-sm-1">客服备注:</label>
-            <div class="formControls col-7 col-sm-7" id="describeHandleDesc" style="border: 1px solid #ddd;">
-            </div>
-        </div>--><#--
-        <div class="row cl">
-            <label class="form-label col-1 col-sm-1">回访信息:</label>
-            <div class="formControls col-7 col-sm-7">
-                <label id="txtVisit"></label>
-            </div>
-        </div>-->
     </form>
     </div>
 </article>
@@ -334,10 +292,12 @@
                     var customerCommon = data.returnMsg.customerCommon;
                     var salesOrder = data.returnMsg.salesOrder;
                     var orderList = data.returnMsg.orderList;
+                    var cmRelation = data.returnMsg.cmRelation;
+                    var procMethod = data.returnMsg.procMethod;
 
-                    if (customer.customerIsSolve != 1 && customer.customerIsSolve != 2) {
-                        resultshow(customer.customerIsSolve, customerCommon.relationBackStatus,customerCommon.relationSendStatus,
-                                customerCommon.maintenanceIsRepair,customerCommon.detectState);
+                    /*if (customer.customerIsSolve != 1 && customer.customerIsSolve != 2) {*/
+                        /*resultshow(customer.customerIsSolve, customerCommon.relationBackStatus,customerCommon.relationSendStatus,
+                                customerCommon.maintenanceIsRepair,customerCommon.detectState);*/
                         var postage = '';
                         var postageMoney = 0;
                         if (customerCommon.relationBackPostage != null) {
@@ -355,7 +315,7 @@
                                 break;
                         }
                         $('#postage').html(postage);
-                    }
+                    /*}*/
 
                     $('#adminName').html(customer.adminName);
                     var customerSource = '';
@@ -363,6 +323,10 @@
                         case 1:customerSource = '400电话';break;
                         case 2:customerSource = '微信公众号';break;
                         case 3:customerSource = customer.customerSource;break;
+                        case 4:customerSource = "QQ群";break;
+                        case 5:customerSource = "微信群";break;
+                        case 6:customerSource = "个人微信";break;
+                        case 7:customerSource = "有赞";break;
                     }
                     $('#customerSourceType').html(customerSource);
                     var customerCounsel = '';
@@ -384,22 +348,8 @@
                     $('#customerName').html(customer.customerName);
                     $('#customerTel').html(customer.customerTel);
                     $('#customerWechatName').html(customer.customerWechatName);
-                    var txtcustomerIsSolve = '';
-                    switch (customer.customerIsSolve) {
-                        case 1:txtcustomerIsSolve = '已解决';break;
-                        case 2:txtcustomerIsSolve = '未解决';break;
-                        case 3:txtcustomerIsSolve = '换新';break;
-                        case 4:txtcustomerIsSolve = '维修';break;
-                        case 5:txtcustomerIsSolve = '补发';break;
-                        case 6:
-                            $('#sendMergeAddressDiv').hide();
-                            txtcustomerIsSolve = '退货';
-                            break;
-                        case 7:
-                            $('#sendMergeAddressDiv').hide();
-                            txtcustomerIsSolve = '无理由退货';
-                            break;
-                    }
+                    var txtcustomerIsSolve = procMethod.procMethodName;
+
                     $('#customerIsSolve').html(txtcustomerIsSolve);
 //                    $('#companyName').html(convertUndefinedToEmpty(customer.companyName)+"-"+convertUndefinedToEmpty(customer.storeName));
 
@@ -436,7 +386,7 @@
 //                    })
 //                    $('#salesItem').html(salesItem);
 //                    $('#salesPayTime').html(salesOrder.salesPayTime);
-                    $('#relationSendMergeAddress').html( convertUndefinedToEmpty(customerCommon.relationSendMergeAddress)+"-"+convertUndefinedToEmpty(customerCommon.relationSendAddress));
+                    $('#relationSendMergeAddress').html( convertUndefinedToEmpty(cmRelation.relationSendMergeAddress)+"-"+convertUndefinedToEmpty(cmRelation.relationSendAddress));
                     $('#describeHandleDesc').html(customer.describeHandleDesc);
 
                     if (customerCommon.sendProdcues != null && customerCommon.sendProdcues.length > 0) {

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

@@ -139,35 +139,10 @@
                     <td width="16">
                         <#if (order.salesCustomerId)??>
                             <div>
-                                <#if order.customerIsSolve == 1>
-                                <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="admin_details_customer(${order.salesCustomerId!''})">
-                                    <font color=#06c>已解决</font>
-                                </a>
-                                <#elseif order.customerIsSolve == 2>
+
                                 <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="admin_details_customer(${order.salesCustomerId!''})">
-                                    <font color=#06c>未解决</font>
+                                    <font color=#06c>${order.procTypeName}</font>
                                 </a>
-                                <#elseif order.customerIsSolve == 3>
-                                    <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="admin_details_customer(${order.salesCustomerId!''})">
-                                        <font color=#06c>换</font>
-                                    </a>
-                                <#elseif order.customerIsSolve == 4>
-                                    <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="admin_details_customer(${order.salesCustomerId!''})">
-                                        <font color=#06c>修</font>
-                                    </a>
-                                <#elseif order.customerIsSolve == 5>
-                                    <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="admin_details_customer(${order.salesCustomerId!''})">
-                                        <font color=#06c>补</font>
-                                    </a>
-                                <#elseif order.customerIsSolve == 6>
-                                    <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="admin_details_customer(${order.salesCustomerId!''})">
-                                        <font color=#06c>退</font>
-                                    </a>
-                                <#elseif order.customerIsSolve == 7>
-                                    <a style="text-decoration:none" href="javascript:void(0);" title="详情" onclick="admin_details_customer(${order.salesCustomerId!''})">
-                                        <font color=#06c>无理由退货</font>
-                                    </a>
-                                </#if>
                             </div>
                         <#else>
                             正常