Parcourir la source

产业供地短信模板细分

huZhiHao il y a 5 ans
Parent
commit
c6d5a5c6c3

+ 34 - 0
src/main/java/platform/common/Constant.java

@@ -903,6 +903,40 @@ public final class Constant {
         public static String S_REGISTER_REMIND = "SMS_171118215";
         //产业供地提醒
         public static String INDUSTRIAL_LAND_SUPPLY = "SMS_187942403";
+
+        //产业供地提醒 板块到商务
+        public static String INDUSTRIAL_LAND_SUPPLY_COMMERE = "SMS_189027404";
+
+        //商务咨询分发
+        public static String INDUSTRIAL_LAND_SUPPLY_CONSUL = "SMS_189032857";
+
+        //预审结束给党政办
+        public static String INDUSTRIAL_LAND_SUPPLY_LEADER = "SMS_***";
+
+        //预审结束给分管领导
+        public static String INDUSTRIAL_LAND_SUPPLY_COMMITTEE_LEADER = "SMS_189032860";
+
+        //分管领导到行政
+        public static String INDUSTRIAL_LAND_SUPPLY_XINGZHENG = "SMS_189017471";
+
+        //分管领导到资源规划
+        public static String INDUSTRIAL_LAND_SUPPLY_ZIGUI = "SMS_189027408";
+
+        //咨询待汇总
+        public static String INDUSTRIAL_LAND_SUPPLY_COMMERCE_SUMMARY = "SMS_189027797";
+
+        //供地的分发
+        public static String INDUSTRIAL_LAND_SUPPLY_DISTRIBUTE = "SMS_189017925";
+
+        //供地的分发待汇总
+        public static String INDUSTRIAL_LAND_SUPPLY_DISTRIBUTE_SUMMARY = "SMS_188993222";
+
+        //供地汇总后待管委会领导审批
+        public static String INDUSTRIAL_LAND_SUPPLY_LEADER_HANDLE = "SMS_189027697";
+
+        //商务业务员退回至板块中心
+        public static String INDUSTRIAL_LAND_SUPPLY_UNTREAD = "SMS_189017795";
+
     }
 
     /**

+ 174 - 110
src/main/java/platform/modules/government/service/IndustrialLandSupplyDetailService.java

@@ -87,6 +87,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
 
     private static String JOINT_TRIAL_TIME = "4";
 
+    private static String CONSULTATION_MESSAGE = "请反馈明确意见";
+
     /**
      * @Author: huZhiHao
      * @Description: 分页查询
@@ -1068,14 +1070,16 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
         }
         //保存默认咨询列表
         List<String> defaultList = apply.getDefaultList();
-        for (String departmentId : defaultList) {
-            if (departmentId != null && departmentId != "") {
-                IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
-                industrialLandSupplyConsultation.setIndustrial_land_supply_id(apply.getId() + "");
-                industrialLandSupplyConsultation.setConsultation_time(dateTime);
-                industrialLandSupplyConsultation.setDepartment_id(departmentId);
-                industrialLandSupplyConsultation.setConsultation("请反馈明确意见");
-                industrialLandSupplyConsultationService.save(industrialLandSupplyConsultation);
+        if(!CollectionUtils.isEmpty(defaultList)){
+            for (String departmentId : defaultList) {
+                if (departmentId != null && departmentId != "") {
+                    IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
+                    industrialLandSupplyConsultation.setIndustrial_land_supply_id(apply.getId() + "");
+                    industrialLandSupplyConsultation.setConsultation_time(dateTime);
+                    industrialLandSupplyConsultation.setDepartment_id(departmentId);
+                    industrialLandSupplyConsultation.setConsultation(CONSULTATION_MESSAGE);
+                    industrialLandSupplyConsultationService.save(industrialLandSupplyConsultation);
+                }
             }
         }
         //保存咨询列表
@@ -1292,7 +1296,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                             for (IndustrialLandSupplyConsultation ilsc : ids) {
                                 if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
                                     sb.append(userGroup.getUser_id() + ",");
+                                    if (Objects.equals(ilsc.getConsultation(), CONSULTATION_MESSAGE)) {
+
+                                    }
                                     //发送短信
+                                    templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_CONSUL;
+                                    int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
+                                    params.put("days", days + "");
                                     try {
                                         AlibabaSMSUtil.sendSMSMessage(
                                                 user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1306,6 +1316,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                         } else {
                             sb.append(userGroup.getUser_id() + ",");
                             //发送短信
+                            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_COMMERE;
                             try {
                                 AlibabaSMSUtil.sendSMSMessage(
                                         user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1356,7 +1367,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.PLATE_WITHDRAW, approval.getAfter_approvalstatus())) {
             //属地撤回 --》待商务局受理员审核 或 待咨询反馈
@@ -1415,6 +1425,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                                 if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
                                     sb.append(userGroup.getUser_id() + ",");
                                     //发送短信
+                                    templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_CONSUL;
+                                    int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
+                                    params.put("days", days + "");
                                     try {
                                         AlibabaSMSUtil.sendSMSMessage(
                                                 user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1428,6 +1441,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                         } else {
                             sb.append(userGroup.getUser_id() + ",");
                             //发送短信
+                            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_COMMERE;
                             try {
                                 AlibabaSMSUtil.sendSMSMessage(
                                         user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1470,7 +1484,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_SUBMIT, approval.getAfter_approvalstatus())) {
             //商务局受理员待提交--》待商务局受理员审核 或 待咨询反馈
@@ -1529,6 +1542,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                                 if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
                                     sb.append(userGroup.getUser_id() + ",");
                                     //发送短信
+                                    templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_CONSUL;
+                                    int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
+                                    params.put("days", days + "");
                                     try {
                                         AlibabaSMSUtil.sendSMSMessage(
                                                 user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1584,10 +1600,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
-            //待商务局受理员审核 --》 待咨询反馈
+            //待商务局受理员审核 --》 待咨询反馈 或 管委会领导审核
 
             IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
             industrialLandSupplyConsultation.setIndustrial_land_supply_id(applyId + "");
@@ -1633,6 +1648,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                                 if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
                                     sb.append(userGroup.getUser_id() + ",");
                                     //发送短信
+                                    templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_CONSUL;
+                                    int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
+                                    params.put("days", days + "");
                                     try {
                                         AlibabaSMSUtil.sendSMSMessage(
                                                 user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1730,6 +1748,15 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        if (sumbitToSummary) {
+                            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_COMMERCE_SUMMARY;
+                            int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(SUMMARY_TIME));
+                            params.put("days", days + "");
+                        } else {
+                            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_CONSUL;
+                            int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
+                            params.put("days", days + "");
+                        }
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1758,7 +1785,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK, approval.getAfter_approvalstatus())) {
             //待咨询反馈  --》 待咨询汇总
@@ -1806,13 +1832,17 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        if (sumbitToSummary) {
+                            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_COMMERCE_SUMMARY;
+                            int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(DISTRIBUTE_TIME));
+                            params.put("days", days + "");
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
                             );
                         } catch (ClientException e) {
                             e.printStackTrace();
-                        }
+                        }}
                     }
                 }
             }
@@ -1859,6 +1889,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_COMMITTEE_LEADER;
+                        int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(SUMMARY_TIME));
+                        params.put("days", days + "");
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1883,7 +1916,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
             //待商务局分管领导审批  --》 待管委会分管领导审批
@@ -1922,7 +1954,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_RETURN, approval.getAfter_approvalstatus())) {
             //商务局受理员退回--》待商务局受理员审核
@@ -1942,6 +1973,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_COMMERE;
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -1962,7 +1994,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_RETURN, approval.getAfter_approvalstatus())) {
             //商务局分管领导退回  --》待商务局商务局分管领导审核
@@ -2003,7 +2034,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
             // 分管领导审核通过  --》 预审通过待分发
@@ -2024,6 +2054,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_ZIGUI;
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -2038,13 +2069,32 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             if (sb.length() == 0) {
                 throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_7 + "没有该项目责任单位的人员,请联系管理员配置");
             }
+
+            group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_6);
+            userGroups = userGroupService.findByGroupId(group.getId());
+            for (UserGroup userGroup : userGroups) {
+                for (User user : users) {
+                    if (Objects.equals(user.getId(), userGroup.getUser_id())) {
+                        //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_XINGZHENG;
+                        try {
+                            AlibabaSMSUtil.sendSMSMessage(
+                                    user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+                            );
+                        } catch (ClientException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+            }
+
             IndustrialLandSupplyDetail entity = new IndustrialLandSupplyDetail();
             entity.setId(applyId);
             entity.setApprove_status(Constant.LandSupplyApproveStatus.PRE_APPROVE_PENDIND_DISTRIBUTE);
             entity.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
+//            sendToLeader(params);
             return true;
         } else if (
                 Objects.equals(Constant.LandSupplyApproveStatus.PRE_APPROVE_PENDIND_DISTRIBUTE, approval.getAfter_approvalstatus())
@@ -2072,6 +2122,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                                 if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
                                     sb.append(userGroup.getUser_id() + ",");
                                     //发送短信
+                                    templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_DISTRIBUTE;
+                                    int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(DISTRIBUTE_TIME));
+                                    params.put("days", days + "");
                                     try {
                                         AlibabaSMSUtil.sendSMSMessage(
                                                 user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -2106,7 +2159,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_PENDIND_FEEDBACK, approval.getAfter_approvalstatus())) {
             //分发待反馈  --》 待分发汇总
@@ -2156,12 +2208,17 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
-                        try {
-                            AlibabaSMSUtil.sendSMSMessage(
-                                    user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
-                            );
-                        } catch (ClientException e) {
-                            e.printStackTrace();
+                        if (sumbitToSummary) {
+                            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_DISTRIBUTE_SUMMARY;
+                            int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
+                            params.put("days", days + "");
+                            try {
+                                AlibabaSMSUtil.sendSMSMessage(
+                                        user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+                                );
+                            } catch (ClientException e) {
+                                e.printStackTrace();
+                            }
                         }
                     }
                 }
@@ -2204,6 +2261,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_LEADER_HANDLE;
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -2244,13 +2302,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
-                        try {
-                            AlibabaSMSUtil.sendSMSMessage(
-                                    user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
-                            );
-                        } catch (ClientException e) {
-                            e.printStackTrace();
-                        }
+//                        try {
+//                            AlibabaSMSUtil.sendSMSMessage(
+//                                    user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+//                            );
+//                        } catch (ClientException e) {
+//                            e.printStackTrace();
+//                        }
                     }
                 }
             }
@@ -2264,7 +2322,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_PASS, approval.getAfter_approvalstatus())) {
             //待供地审批通过 --》 最终信息 待供地审批通过
@@ -2285,13 +2342,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
-                        try {
-                            AlibabaSMSUtil.sendSMSMessage(
-                                    user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
-                            );
-                        } catch (ClientException e) {
-                            e.printStackTrace();
-                        }
+//                        try {
+//                            AlibabaSMSUtil.sendSMSMessage(
+//                                    user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+//                            );
+//                        } catch (ClientException e) {
+//                            e.printStackTrace();
+//                        }
                     }
                 }
             }
@@ -2305,7 +2362,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             entity.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
             approvalService.insertAndGetId(newApproval);
-            sendToLeader(params);
             return true;
         }
 
@@ -2362,6 +2418,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
         IndustrialLandSupplyDetail detail = this.findById(applyId);
         params.put("title", detail.getTitle());
         params.put("no", detail.getNo());
+        params.put("reason", comment);
         String templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY;
         if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
             //商务局业务办理员退回  --》 街道板块
@@ -2381,6 +2438,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
 //                    Constant.DictionaryType.PROJECT_INTELLIGENT, projectApplication.getApply_no(), companyAdmin.getId().toString(), Constant.WaitToDo_IsSerial.IS_SERIAL, false);
 
             //发送短信
+            templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_UNTREAD;
             try {
                 AlibabaSMSUtil.sendSMSMessage(
                         userService.getUser(entity.getCreate_by()).getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -2407,6 +2465,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_UNTREAD;
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -2447,6 +2506,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_UNTREAD;
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -2475,39 +2535,40 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_PENDIND_HANDLE);
             newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_RETURN);
 
-//            group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_5);
-//            if (null == group) {
-//                throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_5 + "没有该项目责任单位的人员,请联系管理员配置");
-//            }
-//            List<UserGroup> userGroups = userGroupService.findByGroupId(group.getId());
-//            List<User> users = userService.findListByWhere(new User());
-//            StringBuffer sb = new StringBuffer("");
-//            for (UserGroup userGroup : userGroups) {
-//                for (User user : users) {
-//                    if (Objects.equals(user.getId(), userGroup.getUser_id())) {
-//                        sb.append(userGroup.getUser_id() + ",");
-//                        //发送短信
-//                        try {
-//                            AlibabaSMSUtil.sendSMSMessage(
-//                                    user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
-//                            );
-//                        } catch (ClientException e) {
-//                            e.printStackTrace();
-//                        }
-//                    }
-//                }
-//            }
-//            newApproval.setNextchecker(sb.toString());
-//            if (sb.length() == 0) {
-//                throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_5 + "没有该项目责任单位的人员,请联系管理员配置");
-//            }
-//
-//            IndustrialLandSupplyDetail p = new IndustrialLandSupplyDetail();
-//            p.setId(applyId);
-//            p.setApprove_status(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_RETURN);
-//            p.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
-//            industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
-//            approvalService.insertAndGetId(newApproval);
+            group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_7);
+            if (null == group) {
+                throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_7 + "没有该项目责任单位的人员,请联系管理员配置");
+            }
+            List<UserGroup> userGroups = userGroupService.findByGroupId(group.getId());
+            List<User> users = userService.findListByWhere(new User());
+            StringBuffer sb = new StringBuffer("");
+            for (UserGroup userGroup : userGroups) {
+                for (User user : users) {
+                    if (Objects.equals(user.getId(), userGroup.getUser_id())) {
+                        sb.append(userGroup.getUser_id() + ",");
+                        //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_UNTREAD;
+                        try {
+                            AlibabaSMSUtil.sendSMSMessage(
+                                    user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+                            );
+                        } catch (ClientException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }
+            }
+            newApproval.setNextchecker(sb.toString());
+            if (sb.length() == 0) {
+                throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_5 + "没有该项目责任单位的人员,请联系管理员配置");
+            }
+
+            IndustrialLandSupplyDetail p = new IndustrialLandSupplyDetail();
+            p.setId(applyId);
+            p.setApprove_status(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_RETURN);
+            p.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
+            industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
+            approvalService.insertAndGetId(newApproval);
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_RETURN, approval.getAfter_approvalstatus())) {
             //供地审批退回 --》 预审通过待分发
@@ -2528,6 +2589,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                     if (Objects.equals(user.getId(), userGroup.getUser_id())) {
                         sb.append(userGroup.getUser_id() + ",");
                         //发送短信
+                        templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_UNTREAD;
                         try {
                             AlibabaSMSUtil.sendSMSMessage(
                                     user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
@@ -2614,13 +2676,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
 //        messageService.saveMessageAndPush(messages, streetArrInt, Constant.UserType.COMPANY);
 
             //发送短信
-            try {
-                AlibabaSMSUtil.sendSMSMessage(
-                        userService.getUser(entity.getCreate_by()).getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
-                );
-            } catch (ClientException e) {
-                e.printStackTrace();
-            }
+//            try {
+//                AlibabaSMSUtil.sendSMSMessage(
+//                        userService.getUser(entity.getCreate_by()).getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+//                );
+//            } catch (ClientException e) {
+//                e.printStackTrace();
+//            }
 
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
@@ -2635,13 +2697,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
             approvalService.insertAndGetId(newApproval);
             //发送短信
-            try {
-                AlibabaSMSUtil.sendSMSMessage(
-                        userService.getUser(entity.getCreate_by()).getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
-                );
-            } catch (ClientException e) {
-                e.printStackTrace();
-            }
+//            try {
+//                AlibabaSMSUtil.sendSMSMessage(
+//                        userService.getUser(entity.getCreate_by()).getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+//                );
+//            } catch (ClientException e) {
+//                e.printStackTrace();
+//            }
             return true;
         } else if (Objects.equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_PENDIND_HANDLE, approval.getAfter_approvalstatus())) {
             //供地分管领导拒绝
@@ -2655,13 +2717,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
             approvalService.insertAndGetId(newApproval);
             //发送短信
-            try {
-                AlibabaSMSUtil.sendSMSMessage(
-                        userService.getUser(entity.getCreate_by()).getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
-                );
-            } catch (ClientException e) {
-                e.printStackTrace();
-            }
+//            try {
+//                AlibabaSMSUtil.sendSMSMessage(
+//                        userService.getUser(entity.getCreate_by()).getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
+//                );
+//            } catch (ClientException e) {
+//                e.printStackTrace();
+//            }
             return true;
         }
         return false;
@@ -3107,20 +3169,8 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             attachmentService.deleteByBusiness(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_COMMERCE_SUPPLEMENT, id);
             attachmentService.updateAttachment(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_COMMERCE_SUPPLEMENT, id, apply.getFileDown().getFile_id());
         }
-        //保存默认咨询列表
-        String dateTime = DateUtil.getTimeString(new Date());
-        List<String> defaultList = apply.getDefaultList();
-        for (String departmentId : defaultList) {
-            if (departmentId != null && departmentId != "") {
-                IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
-                industrialLandSupplyConsultation.setIndustrial_land_supply_id(apply.getId() + "");
-                industrialLandSupplyConsultation.setConsultation_time(dateTime);
-                industrialLandSupplyConsultation.setDepartment_id(departmentId);
-                industrialLandSupplyConsultation.setConsultation("请反馈明确意见");
-                industrialLandSupplyConsultationService.save(industrialLandSupplyConsultation);
-            }
-        }
         //保存咨询列表
+        String dateTime = DateUtil.getTimeString(new Date());
         List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = apply.getConsultationList();
         if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
 
@@ -3152,6 +3202,20 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
                 industrialLandSupplyConsultationService.saveList(industrialLandSupplyConsultationList);
             }
         }
+        //保存默认咨询列表
+        List<String> defaultList = apply.getDefaultList();
+        if(!CollectionUtils.isEmpty(defaultList)){
+            for (String departmentId : defaultList) {
+                if (departmentId != null && departmentId != "") {
+                    IndustrialLandSupplyConsultation industrialLandSupplyConsultation = new IndustrialLandSupplyConsultation();
+                    industrialLandSupplyConsultation.setIndustrial_land_supply_id(apply.getId() + "");
+                    industrialLandSupplyConsultation.setConsultation_time(dateTime);
+                    industrialLandSupplyConsultation.setDepartment_id(departmentId);
+                    industrialLandSupplyConsultation.setConsultation(CONSULTATION_MESSAGE);
+                    industrialLandSupplyConsultationService.save(industrialLandSupplyConsultation);
+                }
+            }
+        }
         //直接提交申请,添加流程信息
         pass(id, null);
         return id;
@@ -3411,7 +3475,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
         for (String id : idArr) {
             //发送短信
             try {
-                String templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY;
+                String templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_LEADER;
                 User user = userService.getUser(Integer.parseInt(id));
                 AlibabaSMSUtil.sendSMSMessage(
                         user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)