|
|
@@ -1066,6 +1066,18 @@ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
//保存咨询列表
|
|
|
List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = apply.getConsultationList();
|
|
|
if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
@@ -1206,7 +1218,12 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
|
|
|
//短信参数
|
|
|
Map<String, String> params = new HashMap<>();
|
|
|
- IndustrialLandSupplyDetail detail = this.findById(applyId);
|
|
|
+ IndustrialLandSupplyDetail detail = null;
|
|
|
+ try {
|
|
|
+ detail = this.selectById(applyId + "");
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
params.put("title", detail.getTitle());
|
|
|
params.put("no", detail.getNo());
|
|
|
String templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY;
|
|
|
@@ -1270,7 +1287,34 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (UserGroup userGroup : userGroups) {
|
|
|
for (User user : users) {
|
|
|
if (Objects.equals(user.getId(), userGroup.getUser_id())) {
|
|
|
- sb.append(userGroup.getUser_id() + ",");
|
|
|
+ if (newApproval.getAfter_approvalstatus().equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK)) {
|
|
|
+ List<IndustrialLandSupplyConsultation> ids = detail.getConsultationList();
|
|
|
+ for (IndustrialLandSupplyConsultation ilsc : ids) {
|
|
|
+ if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// String message = user.getUser_name() +0 ",您好。“" + company.getCompany_name() + "企业”的“" + projectName + "项目”申请需要您审核。谢谢。";
|
|
|
// messages.setContent(message);
|
|
|
// int[] streetArrInt = new int[1];
|
|
|
@@ -1278,15 +1322,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// messageService.saveMessageAndPush(messages, streetArrInt, Constant.UserType.GOVERNMENT);
|
|
|
// waitToDoService.newTODO("区级智能制造审核", "/government/projectIntelligent/approve/" + projectApplication.getId(), Constant.WaitToDo_OperType.AUDIT, projectApplication.getId(),
|
|
|
// Constant.DictionaryType.PROJECT_INTELLIGENT, projectApplication.getApply_no(), userGroup.getUser_id().toString(), Constant.WaitToDo_IsSerial.IS_SERIAL, false);
|
|
|
-
|
|
|
- //发送短信
|
|
|
- try {
|
|
|
- AlibabaSMSUtil.sendSMSMessage(
|
|
|
- user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
- );
|
|
|
- } catch (ClientException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1374,15 +1409,32 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ if (newApproval.getAfter_approvalstatus().equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK)) {
|
|
|
+ List<IndustrialLandSupplyConsultation> ids = detail.getConsultationList();
|
|
|
+ for (IndustrialLandSupplyConsultation ilsc : ids) {
|
|
|
+ if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1471,14 +1523,32 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ if (newApproval.getAfter_approvalstatus().equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK)) {
|
|
|
+ List<IndustrialLandSupplyConsultation> ids = detail.getConsultationList();
|
|
|
+ for (IndustrialLandSupplyConsultation ilsc : ids) {
|
|
|
+ if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1557,14 +1627,32 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ if (newApproval.getAfter_approvalstatus().equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK)) {
|
|
|
+ List<IndustrialLandSupplyConsultation> ids = detail.getConsultationList();
|
|
|
+ for (IndustrialLandSupplyConsultation ilsc : ids) {
|
|
|
+ if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1978,14 +2066,32 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ if (newApproval.getAfter_approvalstatus().equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_PENDIND_FEEDBACK)) {
|
|
|
+ List<IndustrialLandSupplyDistribution> ids = detail.getDistributionList();
|
|
|
+ for (IndustrialLandSupplyDistribution ilsc : ids) {
|
|
|
+ if (Objects.equals(user.getDepartment_id() + "", ilsc.getDepartment_id())) {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ sb.append(userGroup.getUser_id() + ",");
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2199,6 +2305,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
entity.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
|
|
|
industrialLandSupplyDetailDao.updateByPrimaryKeySelective(entity);
|
|
|
approvalService.insertAndGetId(newApproval);
|
|
|
+ sendToLeader(params);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -3000,8 +3107,20 @@ 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);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //保存咨询列表
|
|
|
List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = apply.getConsultationList();
|
|
|
if (!CollectionUtils.isEmpty(industrialLandSupplyConsultationList)) {
|
|
|
|