|
|
@@ -738,7 +738,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
return entity;
|
|
|
}
|
|
|
|
|
|
- public IndustrialLandSupplyDetail selectByIdWithDepartment(String id) {
|
|
|
+ public IndustrialLandSupplyDetail selectByIdWithDepartment(String id) throws ParseException {
|
|
|
|
|
|
IndustrialLandSupplyDetail entity = industrialLandSupplyDetailDao.selectById(id);
|
|
|
//文件
|
|
|
@@ -770,6 +770,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
industrialLandSupplyConsultation.setDepartment_id(department.getId() + "");
|
|
|
industrialLandSupplyConsultation.setDel_flag(false);
|
|
|
List<IndustrialLandSupplyConsultation> industrialLandSupplyConsultationList = industrialLandSupplyConsultationService.findListByWhere(industrialLandSupplyConsultation);
|
|
|
+ int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
|
|
|
for (IndustrialLandSupplyConsultation landSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
//文件
|
|
|
List<Attachment> feedbackAttachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_FEEDBACK, landSupplyConsultation.getId(), null);
|
|
|
@@ -779,6 +780,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
|
Department depart = departmentService.selectById(Integer.valueOf(landSupplyConsultation.getDepartment_id()));
|
|
|
landSupplyConsultation.setDepartment_name(depart.getName());
|
|
|
+ //剩余时间
|
|
|
+ landSupplyConsultation.setRemain_time(DateUtil.getTimeDiff(
|
|
|
+ landSupplyConsultation.getCreate_time(),
|
|
|
+ landSupplyConsultation.getUpdate_time(),
|
|
|
+ days,
|
|
|
+ sysConfigService.getValueByKey("year_" + DateUtil.getCurrentDateString("yyyy"))
|
|
|
+ ));
|
|
|
+
|
|
|
}
|
|
|
entity.setConsultationList(industrialLandSupplyConsultationList);
|
|
|
|
|
|
@@ -788,6 +797,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
industrialLandSupplyDistribution.setDepartment_id(department.getId() + "");
|
|
|
industrialLandSupplyDistribution.setDel_flag(false);
|
|
|
List<IndustrialLandSupplyDistribution> industrialLandSupplyDistributionList = industrialLandSupplyDistributionService.findListByWhere(industrialLandSupplyDistribution);
|
|
|
+ days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(DISTRIBUTE_TIME));
|
|
|
for (IndustrialLandSupplyDistribution landSupplyDistribution : industrialLandSupplyDistributionList) {
|
|
|
//文件
|
|
|
List<Attachment> attachmentList = null;
|
|
|
@@ -805,6 +815,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
|
Department depart = departmentService.selectById(Integer.valueOf(landSupplyDistribution.getDepartment_id()));
|
|
|
landSupplyDistribution.setDepartment_name(depart.getName());
|
|
|
+ //剩余时间
|
|
|
+ landSupplyDistribution.setRemain_time(DateUtil.getTimeDiff(
|
|
|
+ landSupplyDistribution.getCreate_time(),
|
|
|
+ landSupplyDistribution.getUpdate_time(),
|
|
|
+ days,
|
|
|
+ sysConfigService.getValueByKey("year_" + DateUtil.getCurrentDateString("yyyy"))
|
|
|
+ ));
|
|
|
}
|
|
|
entity.setDistributionList(industrialLandSupplyDistributionList);
|
|
|
|
|
|
@@ -1894,7 +1911,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
boolean sumbitToSummary = true;
|
|
|
for (IndustrialLandSupplyConsultation landSupplyConsultation : industrialLandSupplyConsultationList) {
|
|
|
//如果所有咨询都已回答 进入待汇总
|
|
|
- if (CommonUtils.isNull(landSupplyConsultation.getFeedback()) || CommonUtils.isNull(landSupplyConsultation.getUpdate_by())) {
|
|
|
+ if (/*CommonUtils.isNull(landSupplyConsultation.getFeedback()) || */CommonUtils.isNull(landSupplyConsultation.getUpdate_by())) {
|
|
|
sumbitToSummary = false;
|
|
|
break;
|
|
|
} else {
|
|
|
@@ -2169,6 +2186,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_7 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
}
|
|
|
|
|
|
+ //短信给行政审批局
|
|
|
group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_6);
|
|
|
userGroups = userGroupService.findByGroupId(group.getId());
|
|
|
for (UserGroup userGroup : userGroups) {
|
|
|
@@ -2187,6 +2205,41 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //如果是政府业务员提交的 只给商务业务员发
|
|
|
+ Integer createId = detail.getCreate_by();
|
|
|
+ User creater = userService.getUser(createId);
|
|
|
+ if(!Objects.equals(creater.getUser_type(),Constant.UserType.GOVERNMENT)){
|
|
|
+ //如果不是政府账号创建 说明是街道提交 则给提交人也发短信
|
|
|
+ //发送短信
|
|
|
+ templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_YS;
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ creater.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //短信给商务受理员
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_1);
|
|
|
+ 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_YS;
|
|
|
+ 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);
|
|
|
@@ -2401,13 +2454,14 @@ 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();
|
|
|
-// }
|
|
|
+ templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_GD;
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2415,6 +2469,60 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
if (sb.length() == 0) {
|
|
|
throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_7 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
}
|
|
|
+
|
|
|
+ //如果是政府业务员提交的 只给商务业务员发
|
|
|
+ Integer createId = detail.getCreate_by();
|
|
|
+ User creater = userService.getUser(createId);
|
|
|
+ if(!Objects.equals(creater.getUser_type(),Constant.UserType.GOVERNMENT)){
|
|
|
+ //如果不是政府账号创建 说明是街道提交 则给提交人也发短信
|
|
|
+ //发送短信
|
|
|
+ templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY_GD;
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ creater.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //短信给商务受理员
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_1);
|
|
|
+ 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_GD;
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //短信给经发
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_8);
|
|
|
+ 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_GD;
|
|
|
+ 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.LAND_SUPPLY_LEADER_PASS);
|