瀏覽代碼

客诉列表修改

liujiankang 6 年之前
父節點
當前提交
14efa4c26c

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

@@ -42,6 +42,7 @@ public class CustomerStatisticalInfo implements Serializable {
     private String adminName;//根据客服姓名
     private Integer relationFactoryCosts;//工厂维修报价
     private Integer relationCustomerCosts;//客户报价
+    private Integer relationId;//处理主键
 
     public Integer getCustomerId() {
         return customerId;
@@ -274,4 +275,12 @@ public class CustomerStatisticalInfo implements Serializable {
     public void setRelationCustomerCosts(Integer relationCustomerCosts) {
         this.relationCustomerCosts = relationCustomerCosts;
     }
+
+    public Integer getRelationId() {
+        return relationId;
+    }
+
+    public void setRelationId(Integer relationId) {
+        this.relationId = relationId;
+    }
 }

+ 2 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerService.java

@@ -231,4 +231,6 @@ public interface CustomerService {
     CmRelation getCmRelationInfo(CmRelation cmRelation);
 
     Integer updateRelation(CustomerInfo cm);
+
+    List<CustomerCommon> listCustomerCommons(CustomerCommon customerCommon);
 }

+ 34 - 0
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerServiceImpl.java

@@ -81,6 +81,8 @@ public class CustomerServiceImpl implements CustomerService {
     private ProcMethodService procMethodService;
     @Autowired
     private CmRelationMapper cmRelationMapper;
+    @Autowired
+    private RelationOrderMapper relationOrderMapper;
 
     @Override
     public CustomerInfo getCustomerInfo(Integer customerId) {
@@ -1524,4 +1526,36 @@ public class CustomerServiceImpl implements CustomerService {
 //        return flag;
         return 0;
     }
+    @Override
+    public List<CustomerCommon> listCustomerCommons(CustomerCommon customerCommon) {
+        List<CustomerCommon> customerCommonList  = new ArrayList<>();
+        customerCommonList.add(customerCommon);
+        for (CustomerCommon c : customerCommonList) {
+            RelationOrder relationOrder = new RelationOrder();
+            relationOrder.setRelationId(c.getRelationId());
+            List<RelationOrder> relationOrderList = relationOrderMapper.getRelationOrderList(relationOrder);
+            List<SalesOrder> orderList = new ArrayList<>();
+            for (RelationOrder ro : relationOrderList) {
+                SalesOrder salesOrder = salesOrderMapper.getSalesOrderById(ro.getSalesId());
+                if(salesOrder != null ){
+                    SalesOrderItem salesOrderItem = new SalesOrderItem();
+                    salesOrderItem.setItemOrderId(salesOrder.getSalesId());
+                    salesOrder.setSalesOrderItemList(salesOrderMapper.listSalesOrderItem(salesOrderItem));
+                    orderList.add(salesOrder);
+                }
+            }
+            c.setSalesOrderList(orderList);
+
+            SendProdcue sendProdcue  = new SendProdcue();
+            sendProdcue.setRelationId(c.getRelationId());
+            List<SendProdcue> sendProdcueList = sendProdcueMapper.listSendProdcue(sendProdcue);
+            c.setSendProdcues(sendProdcueList);
+
+            ClosedProdcue closedProdcue = new ClosedProdcue();
+            closedProdcue.setRelationId(c.getRelationId());
+            List<ClosedProdcue> closedProdcueList = closedProdcueMapper.listclosedProdcue(closedProdcue);
+            c.setClosedProdcues(closedProdcueList);
+        }
+        return customerCommonList;
+    }
 }

+ 15 - 19
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/customerInfoMapper.xml

@@ -693,24 +693,7 @@ ct.complaint_class_name as complaintClassName,
 csc.small_class_name as smallClassName,
 qd.describe_title as describeTitle,
 qd.describe_handle_desc as describeHandleDesc,
-(CASE
-WHEN c.customer_is_solve = 1 THEN
-	'已解决'
-WHEN c.customer_is_solve = 2 THEN
-	'未解决'
-WHEN c.customer_is_solve = 3 THEN
-	'换新'
-WHEN c.customer_is_solve = 4 THEN
-	'维修'
-WHEN c.customer_is_solve = 5 THEN
-	'补发'
-WHEN c.customer_is_solve = 6 THEN
-	'退货'
-WHEN c.customer_is_solve = 7 THEN
-	'无理由退货'
-ELSE
-	'未知'
-END) AS customerIsSolve,
+cpt.proc_type_name AS customerIsSolve,
 null  AS salesPayTime,
 sc.company_name AS companyName,
 si.store_name AS storeName,
@@ -739,7 +722,16 @@ WHEN c.customer_secondary_customer = 2 THEN
 ELSE
 	'未知'
 END) AS customerSecondaryCustomer,
-sa.admin_name AS adminName
+sa.admin_name AS adminName,
+cr.relation_back_logistics_company AS relationBackLogisticsCompany,
+cr.relation_back_logistics_no AS relationBackLogisticsNo,
+cr.relation_back_receipt_date AS relationBackReceiptDate,
+cr.relation_send_status AS relationBackStatus,
+cr.relation_send_logistics_company AS relationSendLogisticsCompany,
+cr.relation_send_logistics_no AS relationSendLogisticsNo,
+cr.relation_factory_costs AS relationFactoryCosts,
+cr.relation_customer_costs AS relationCustomerCosts,
+cr.relation_id AS relationId
 FROM
 	tb_rst_cm_customer_info c
 LEFT JOIN tb_rst_cm_question_describe qd ON c.customer_id = qd.customer_id
@@ -749,6 +741,9 @@ LEFT JOIN tb_rst_cm_complaint_type ct ON ct.complaint_id = csc.complaint_id
 LEFT JOIN tb_rst_sales_company sc ON c.company_id = sc.company_id
 LEFT JOIN tb_rst_store_info si ON c.store_id = si.store_id
 LEFT JOIN tb_rst_sys_admin sa ON c.admin_id = sa.admin_id
+LEFT JOIN tb_rst_cm_relation cr ON cr.customer_id = c.customer_id
+LEFT JOIN tb_rst_cm_proc_method cpm ON cpm.proc_method_id = cr.proc_method_id
+LEFT JOIN tb_rst_cm_proc_type cpt ON cpt.proc_type_id = cpm.proc_type_id
   </select>
   <!-- 退换货统计sql start -->
   <!-- 总销量 -->
@@ -1048,4 +1043,5 @@ LEFT JOIN tb_rst_sys_admin sa ON c.admin_id = sa.admin_id
       </if>
     </where>
   </select>
+
 </mapper>

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

@@ -151,6 +151,9 @@
                         #{node}
                     </foreach >
                 </if>
+                <if test="salesWarehouseId != null ">
+                    AND sales_warehouse_id = #{salesWarehouseId}
+                </if>
             </where>
             GROUP BY
             soi.sales_id

+ 2 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -1761,7 +1761,8 @@ public class AdminCustomerController {
             BeanUtils.copyProperties(customerInfo, customer);
             CustomerCommon customerCommon = new CustomerCommon();
             customerCommon.setCustomerId(customerInfo.getCustomerId());
-            List<CustomerCommon> listCustomerCommon = new ArrayList<>();//customerCommonService.listCustomerCommon(customerCommon);
+            customerCommon.setRelationId(customerInfo.getRelationId());
+            List<CustomerCommon> listCustomerCommon = customerService.listCustomerCommons(customerCommon);
             if(listCustomerCommon.size() > 0) {
                 for (CustomerCommon common : listCustomerCommon) {
                     if (common.getSalesOrderList().size() > 0) {

+ 7 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AwaitSendController.java

@@ -143,6 +143,13 @@ public class AwaitSendController {
         } else {
             salesOrder.setSalesIds(orders);
         }
+        Admin admin = AdminUtils.getLoginAdmin();
+        //查询当前登录人属于哪个仓库
+        OrderWarehouse orderWarehouse = salesOrderService.selectAdminWarehouse(admin.getAdminId());
+        if(orderWarehouse == null){
+            return null;
+        }
+        salesOrder.setSalesWarehouseId(orderWarehouse.getWarehouseId());
         // 查询确认的订单
         salesOrder.setSalesStatus(1);
         PagedResult<SalesOrder> pagedResult = salesOrderService.listSalesOrderPage(1, 1000, salesOrder, false);

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

@@ -201,7 +201,7 @@
                             '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
                             '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
                             '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
-                            '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
+                            '<img style="position: absolute;right: 5px;top:23px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
                             '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;display: none;">'+ produceCreateTime +'</span>' +
                             '</div>');
                     }else{
@@ -389,7 +389,7 @@
                             '<span style="position: absolute;top: 40px;left: 10px;font-size: 12px;visibility:hidden;">S/N</span>' +
                             '<div style="position: absolute;left: 5px;top: 64px;height: 30px;" id="bcTarget2" class="barcodeImg">'+barcodes+'</div>' +
                             '<span style="position: absolute;top: 85px;left: 10px;font-size: 12px;width: 116px;text-align: center;" id="barcodeId">'+machineBarcode+'</span>' +
-                            '<img style="position: absolute;right: 5px;top:18px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
+                            '<img style="position: absolute;right: 5px;top:23px;width: 76px;height: 76px;" id="qrcodeImg" src="'+machineQrcode+'" /> ' +
                             '<span style="position: absolute;right: 9px;top: 85px;font-size: 12px;display: none;">'+ produceCreateTime +'</span>' +
                             '</div>');
                 }else{