Browse Source

添加待确认收货状态

wangxiaoming 7 years ago
parent
commit
889c1bb742

+ 7 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/cm/CustomerCommonService.java

@@ -19,4 +19,11 @@ public interface CustomerCommonService {
      */
     List<CustomerCommon> listCustomerCommon(CustomerCommon customerCommon);
 
+    /**
+     * 修改
+     * @param customerCommon
+     * @return
+     */
+    Integer updateCustomerCommon(CustomerCommon customerCommon);
+
 }

+ 31 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/CustomerCommonServiceImpl.java

@@ -71,29 +71,55 @@ public class CustomerCommonServiceImpl implements CustomerCommonService {
 //        Renewed renewed = (Renewed)CustomerCommonUtil.getRelation(3,customerCommon);
 //        List<Renewed> renewedList = renewedMapper.listRenewed(renewed);
 //        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(3,renewedList));
-//
 //         /*维修*/
 //        Repair repair = (Repair)CustomerCommonUtil.getRelation(4,customerCommon);
 //        List<Repair> repairList = repairMapper.listRepair(repair);
 //        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(4,repairList));
-//
 //        /*补发*/
 //        Reissue reissue = (Reissue)CustomerCommonUtil.getRelation(5,customerCommon);
 //        List<Reissue> reissueList = reissueMapper.listReissue(reissue);
 //        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(5,reissueList));
-//
 //        /*退货*/
 //        BackGoods backGoods = (BackGoods)CustomerCommonUtil.getRelation(6,customerCommon);
 //        List<BackGoods> backGoodsList = backGoodsMapper.listBackGoods(backGoods);
 //        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(6,backGoodsList));
-//
 //        /*无理由退货*/
 //        NoreasonBack noreasonBack = (NoreasonBack)CustomerCommonUtil.getRelation(7,customerCommon);
 //        List<NoreasonBack> noreasonBackList = noreasonBackMapper.listNoreasonBack(noreasonBack);
 //        customerCommonList.addAll(CustomerCommonUtil.listToCustomerCommon(7,noreasonBackList));
-
         return customerCommonList;
     }
 
+    @Override
+    public Integer updateCustomerCommon(CustomerCommon customerCommon) {
+        Integer flag = 0;
+        switch (customerCommon.getCustomerIsSolve()){
+            case 3:
+                Renewed renewed = (Renewed)CustomerCommonUtil.getRelation(3,customerCommon);
+                flag = renewedMapper.updateRenewedInfo(renewed);
+                break;
+            case 4:
+                Repair repair = (Repair)CustomerCommonUtil.getRelation(4,customerCommon);
+                flag = repairMapper.updateRepairInfo(repair);
+                break;
+            case 5:
+                Reissue reissue = (Reissue)CustomerCommonUtil.getRelation(5,customerCommon);
+                flag = reissueMapper.updateReissueInfo(reissue);
+                break;
+            case 6:
+                BackGoods backGoods = (BackGoods)CustomerCommonUtil.getRelation(6,customerCommon);
+                flag = backGoodsMapper.updateBackGoods(backGoods);
+                break;
+            case 7:
+                NoreasonBack noreasonBack = (NoreasonBack)CustomerCommonUtil.getRelation(7,customerCommon);
+                flag = noreasonBackMapper.updateNoreasonBack(noreasonBack);
+                break;
+            default:
+                flag = 0;
+                break;
+        }
+        return flag;
+    }
+
 
 }

+ 0 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/NoreasonBackMapper.java

@@ -27,8 +27,6 @@ public interface NoreasonBackMapper {
      */
     Integer updateNoreasonBack(NoreasonBack record);
 
-    int updateByPrimaryKey(NoreasonBack record);
-
     /**
      * 查询售后无理由退货集合
      * @param noreasonBack

+ 0 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/ReissueMapper.java

@@ -27,8 +27,6 @@ public interface ReissueMapper {
      */
     Integer updateReissueInfo(Reissue record);
 
-    int updateByPrimaryKey(Reissue record);
-
     /**
      * 查询售后补发集合
      * @param reissue

+ 0 - 2
watero-rst-service/src/main/java/com/iamberry/rst/service/cm/mapper/RepairMapper.java

@@ -13,8 +13,6 @@ public interface RepairMapper {
 
     int updateByPrimaryKeySelective(Repair record);
 
-    int updateByPrimaryKey(Repair record);
-
     /**
      * 查询售后维修集合
      * @param repair

+ 12 - 13
watero-rst-web/src/main/java/com/iamberry/rst/controllers/mq/MQTask.java

@@ -425,29 +425,28 @@ public class MQTask implements InitializingBean {
 
 
 	/**客诉系统  自动追踪发货信息**/
-//	@Scheduled(cron = "0 0/30 * * * ?")//每30分钟执行一次
-		@Scheduled(cron = "0 0/3 * * * ?")//每三分钟执行一次
+	@Scheduled(cron = "0 0/30 * * * ?")//每30分钟执行一次
 	public void syncSendBackCustomer()throws Exception{
 		CustomerCommon customerCommon = new CustomerCommon();
 		customerCommon.setRelationBackStatus(2);
 		List<CustomerCommon> customerCommonList = customerCommonService.listCustomerCommon(customerCommon);
 		for(int i=0;i<customerCommonList.size();i++){
 			CustomerCommon cc = customerCommonList.get(i);
-			if(!StringUtils.isEmpty(cc.getRelationBackLogisticsCompany()) && StringUtils.isEmpty(cc.getRelationBackLogisticsNo())){
+			if(!StringUtils.isEmpty(cc.getRelationBackLogisticsCompany()) && !StringUtils.isEmpty(cc.getRelationBackLogisticsNo())){
 				JSONObject rst = kuaidi100.getExpressInfo(cc.getRelationBackLogisticsCompany(),cc.getRelationBackLogisticsNo());
 				if(rst.has("state") && rst.getInt("state") == 3){
+					CustomerCommon newCc = new CustomerCommon();
+					newCc.setRelationId(cc.getRelationId());
+					newCc.setRelationBackStatus(4);		//已签收
+					newCc.setCustomerIsSolve(cc.getCustomerIsSolve());
+					Integer flag = customerCommonService.updateCustomerCommon(newCc);
+					if(flag < 1){
+						logger.info("====== 客诉寄回签收失败 :客诉id:"+cc.getCustomerId()+" ======");
+					}else{
+						logger.info("====== 客诉寄回签收成功 :客诉id:"+cc.getCustomerId()+" ======");
+					}
 				}
 			}
 		}
-
 	}
-
-
-	public static void main(String[] args) {
-		KuaiDi100 kuaiDi100 = new KuaiDi100();
-		JSONObject rst = kuaiDi100.getExpressInfo("sto","3347947142695");
-
-	}
-
-
 }

+ 4 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_back_goods.ftl

@@ -62,6 +62,10 @@
                             <label for="tel-4">已寄回</label>
                         </div>
                         <div class="radio-box">
+                            <input type="radio" id="tel-5" name="backGoodsBackStatus" value="4" seleType="send">
+                            <label for="tel-5">签收待确认</label>
+                        </div>
+                        <div class="radio-box">
                             <input type="radio" id="tel-5" name="backGoodsBackStatus" value="3" seleType="send">
                             <label for="tel-5">已收货</label>
                         </div>

+ 4 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_noreason_back.ftl

@@ -55,6 +55,10 @@
                             <label for="tel-4">已寄回</label>
                         </div>
                         <div class="radio-box">
+                            <input type="radio" id="tel-5" name="noreasonBackBackStatus" value="4" seleType="send">
+                            <label for="tel-5">签收待确认</label>
+                        </div>
+                        <div class="radio-box">
                             <input type="radio" id="tel-5" name="noreasonBackBackStatus" value="3" seleType="send">
                             <label for="tel-5">已收货</label>
                         </div>

+ 4 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_renewed.ftl

@@ -70,6 +70,10 @@
                         <label for="tel-4">已寄回</label>
                     </div>
                     <div class="radio-box">
+                        <input type="radio" id="tel-5" name="renewedBackStatus" value="4" seleType="send">
+                        <label for="tel-5">签收待确认</label>
+                    </div>
+                    <div class="radio-box">
                         <input type="radio" id="tel-5" name="renewedBackStatus" value="3" seleType="send">
                         <label for="tel-5">已收货</label>
                     </div>

+ 4 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/update_repair.ftl

@@ -72,6 +72,10 @@
                             <label for="tel-4">已寄回</label>
                         </div>
                         <div class="radio-box">
+                            <input type="radio" id="tel-5" name="repairBackStatus" value="4" seleType="send">
+                            <label for="tel-5">签收待确认</label>
+                        </div>
+                        <div class="radio-box">
                             <input type="radio" id="tel-5" name="repairBackStatus" value="3" seleType="send">
                             <label for="tel-5">已收货</label>
                         </div>

+ 7 - 3
watero-rst-web/src/main/webapp/common/js/customer/customer.js

@@ -895,14 +895,13 @@ function saveQuestion(type){
             questionProfile : desc       //回复内容
         },
         url: url_path + "/admin/complaintQuestion/save_question",
-        async: true,
+        async: false,
         success: function(data){
             if (data.returnCode == 200) {
                 $("#questionId").val(data.returnMsg.questionId);
                 if(type == 1){
                     layer.msg(data.resultMsg, {icon: 1, time: 3000});
                 }
-
             }else{
                 if(type == 1) {
                     layer.msg(data.resultMsg, {icon: 5, time: 3000});
@@ -1478,7 +1477,6 @@ $(function(){
         tipSweep: true, //若为true,则只在表单提交时验证
         ajaxPost: true, //异步提交
         beforeCheck: function (curform) {  //验证通过之前执行的函数
-
         },
         beforeSubmit: function (curform) {  //验证通过之后执行的函数
             var flag  = addCustomerReady();
@@ -1506,6 +1504,7 @@ $(function(){
 function addCustomerReady(){
     //保存AQ
     saveQuestion(2);
+
     /* 录入电话号码和姓名到客诉基本信息里面  */
     /*if(allCustomerType == 3 || allCustomerType == 4 || allCustomerType == 5 || allCustomerType == 6 || allCustomerType == 7){
         $("#customerName").val($("#sendName").val());
@@ -1572,6 +1571,11 @@ function addCustomerReady(){
     /* 地址拼接  */
 
     /*----问题描述- start --*/
+    var quId = $("#questionId").val();
+    if(quId == null || quId == ""){
+        vailErrorMsg($("#questionId"),"未保存QA!");
+        return false;
+    }
     var describeContentText = UE.getEditor('describeContentText').getContent();
     if(describeContentText == null || describeContentText == ""){
         //layer.msg("未填写问题描述", {icon: 5, time: 3000});