|
|
@@ -1,5 +1,7 @@
|
|
|
package platform.modules.government.service;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.aliyuncs.exceptions.ClientException;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
|
|
@@ -20,10 +22,7 @@ import platform.modules.government.dto.IndustrialLandSupplyDto;
|
|
|
import platform.modules.government.dto.IndustrialLandSupplyParam;
|
|
|
import platform.modules.government.entity.*;
|
|
|
import platform.modules.sys.entity.*;
|
|
|
-import platform.modules.sys.service.ApprovalService;
|
|
|
-import platform.modules.sys.service.DepartmentService;
|
|
|
-import platform.modules.sys.service.GroupService;
|
|
|
-import platform.modules.sys.service.UserGroupService;
|
|
|
+import platform.modules.sys.service.*;
|
|
|
import tk.mybatis.mapper.entity.Example;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -77,6 +76,9 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
@Autowired
|
|
|
private DictionaryItemService dictionaryItemService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RoleService roleService;
|
|
|
+
|
|
|
private static String FEEDBACK_TIME = "1";
|
|
|
|
|
|
private static String SUMMARY_TIME = "2";
|
|
|
@@ -123,7 +125,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
getPendingDepartment(entity);
|
|
|
|
|
|
if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_FEEDBACK, entity.getApprove_status())
|
|
|
- ||Objects.equals("a", entity.getApprove_status())) {
|
|
|
+ || Objects.equals("a", entity.getApprove_status())) {
|
|
|
|
|
|
//咨询待反馈剩余时间
|
|
|
int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(FEEDBACK_TIME));
|
|
|
@@ -145,7 +147,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
if (!CollectionUtils.isEmpty(approvals)) {
|
|
|
dealTime = approvals.get(approvals.size() - 1).getCreate_time();
|
|
|
try {
|
|
|
- if(entity.getUpdate_time()==null){
|
|
|
+ if (entity.getUpdate_time() == null) {
|
|
|
entity.setUpdate_time("1970-01-01 00:00:00");
|
|
|
}
|
|
|
Date d1 = DateUtil.parseTimeStringToDate(entity.getUpdate_time(), "yyyy-MM-dd hh:mm:ss");
|
|
|
@@ -193,7 +195,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
entity.setRemain_time(DateUtil.getTimeDiff(approve.getCreate_time(), dealTime, days));
|
|
|
}
|
|
|
} else if (Objects.equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_PENDIND_FEEDBACK, entity.getApprove_status())
|
|
|
- ||Objects.equals("a", entity.getApprove_status())) {
|
|
|
+ || Objects.equals("a", entity.getApprove_status())) {
|
|
|
|
|
|
//分发待反馈剩余时间
|
|
|
int days = Integer.parseInt(industrialLandSupplyConfigService.getValueByType(DISTRIBUTE_TIME));
|
|
|
@@ -899,7 +901,7 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
for (Approval approval : consulApprovalList) {
|
|
|
if (Objects.equals(entity.getId(), approval.getApply_id())) {
|
|
|
try {
|
|
|
- if(entity.getUpdate_time()==null){
|
|
|
+ if (entity.getUpdate_time() == null) {
|
|
|
entity.setUpdate_time("1970-01-01 00:00:00");
|
|
|
}
|
|
|
Date d1 = DateUtil.parseTimeStringToDate(entity.getUpdate_time(), "yyyy-MM-dd hh:mm:ss");
|
|
|
@@ -1202,14 +1204,12 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
newApproval.setOper_type(Constant.OperType.APPROVED);
|
|
|
newApproval.setDeal_time(DateUtil.getTimeString(new Date()));
|
|
|
|
|
|
-// ProjectIntelligent projectApplication = projectIntelligentDao.findApplyById(applyId);
|
|
|
-// User companyAdmin = userService.findCompanyAdmin(projectApplication.getCompany_id());
|
|
|
-
|
|
|
//短信参数
|
|
|
-// Map<String, String> params = new HashMap<>();
|
|
|
-// params.put("project_no", projectApplication.getApply_no());
|
|
|
-// params.put("apply_name", Constant.ProjectType.PROJECT_INTELLIGENT);
|
|
|
-// String templateCode = Constant.SMS_TemplateCode.RPOJECT_APPROVAL_REMIND;
|
|
|
+ Map<String, String> params = new HashMap<>();
|
|
|
+ IndustrialLandSupplyDetail detail = this.findById(applyId);
|
|
|
+ params.put("title", detail.getTitle());
|
|
|
+ params.put("no", detail.getNo());
|
|
|
+ String templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY;
|
|
|
|
|
|
if (CommonUtils.isNull(approval)) {
|
|
|
//待属地提交 --》待商务局受理员审核 或 待咨询反馈
|
|
|
@@ -1257,7 +1257,6 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
}
|
|
|
|
|
|
List<UserGroup> userGroups = userGroupService.findByGroupId(group.getId());
|
|
|
-// ProjectIntelligentDeclaration projectProvincesDeclaration = this.selectById(projectApplication.getDeclaration_id().toString());
|
|
|
List<User> users = userService.findListByWhere(new User());
|
|
|
StringBuffer sb = new StringBuffer("");
|
|
|
// platform.modules.build.entity.Company company = companyService.findById(projectApplication.getCompany_id());
|
|
|
@@ -1281,8 +1280,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// Constant.DictionaryType.PROJECT_INTELLIGENT, projectApplication.getApply_no(), userGroup.getUser_id().toString(), Constant.WaitToDo_IsSerial.IS_SERIAL, false);
|
|
|
|
|
|
//发送短信
|
|
|
-// AlibabaSMSUtil.sendSMSMessage(
|
|
|
-// user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params));
|
|
|
+ try {
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1317,6 +1321,7 @@ 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())) {
|
|
|
//属地撤回 --》待商务局受理员审核 或 待咨询反馈
|
|
|
@@ -1370,6 +1375,15 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1404,6 +1418,7 @@ 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())) {
|
|
|
//商务局受理员待提交--》待商务局受理员审核 或 待咨询反馈
|
|
|
@@ -1457,6 +1472,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1491,6 +1514,7 @@ 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())) {
|
|
|
//待商务局受理员审核 --》 待咨询反馈
|
|
|
@@ -1534,6 +1558,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1609,6 +1641,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1630,6 +1670,7 @@ 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())) {
|
|
|
//待咨询反馈 --》 待咨询汇总
|
|
|
@@ -1676,6 +1717,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1721,6 +1770,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1738,6 +1795,7 @@ 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())) {
|
|
|
//待商务局分管领导审批 --》 待管委会分管领导审批
|
|
|
@@ -1755,6 +1813,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1768,6 +1834,7 @@ 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())) {
|
|
|
//商务局受理员退回--》待商务局受理员审核
|
|
|
@@ -1786,6 +1853,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1799,6 +1874,7 @@ 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())) {
|
|
|
//商务局分管领导退回 --》待商务局商务局分管领导审核
|
|
|
@@ -1818,6 +1894,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1831,6 +1915,7 @@ 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())) {
|
|
|
// 分管领导审核通过 --》 预审通过待分发
|
|
|
@@ -1850,6 +1935,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1863,6 +1956,7 @@ 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.PRE_APPROVE_PENDIND_DISTRIBUTE, approval.getAfter_approvalstatus())
|
|
|
@@ -1885,6 +1979,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1898,6 +2000,7 @@ 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())) {
|
|
|
//分发待反馈 --》 待分发汇总
|
|
|
@@ -1946,6 +2049,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1986,6 +2097,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2018,6 +2137,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2031,6 +2158,7 @@ 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())) {
|
|
|
//待供地审批通过 --》 最终信息 待供地审批通过
|
|
|
@@ -2050,6 +2178,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2114,8 +2250,15 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// params.put("apply_name", Constant.ProjectType.PROJECT_INTELLIGENT);
|
|
|
// String templateCode = Constant.SMS_TemplateCode.RPOJECT_MATTERS_REJECT;
|
|
|
|
|
|
+ //短信参数
|
|
|
+ Map<String, String> params = new HashMap<>();
|
|
|
+ IndustrialLandSupplyDetail detail = this.findById(applyId);
|
|
|
+ params.put("title", detail.getTitle());
|
|
|
+ params.put("no", detail.getNo());
|
|
|
+ String templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY;
|
|
|
if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
|
|
|
//商务局业务办理员退回 --》 街道板块
|
|
|
+ newApproval.setOper_type(Constant.OperType.REJECT);
|
|
|
newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_PENDING_HANDLE);
|
|
|
newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_RETURN);
|
|
|
newApproval.setNextchecker(entity.getCreate_by().toString());
|
|
|
@@ -2131,26 +2274,86 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// Constant.DictionaryType.PROJECT_INTELLIGENT, projectApplication.getApply_no(), companyAdmin.getId().toString(), Constant.WaitToDo_IsSerial.IS_SERIAL, false);
|
|
|
|
|
|
//发送短信
|
|
|
-// AlibabaSMSUtil.sendSMS(
|
|
|
-// companyAdmin.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params));
|
|
|
+ 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.COMMERCE_LEADER_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
|
|
|
//商务局领导退回 --》 商务局业务员
|
|
|
+ Group group = null;
|
|
|
+ newApproval.setOper_type(Constant.OperType.REJECT);
|
|
|
newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE);
|
|
|
newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_RETURN);
|
|
|
- newApproval.setNextchecker(entity.getCreate_by().toString());
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_1);
|
|
|
+ if (null == group) {
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_1 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
+ }
|
|
|
+ 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_1 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
+ }
|
|
|
IndustrialLandSupplyDetail p = new IndustrialLandSupplyDetail();
|
|
|
p.setId(applyId);
|
|
|
p.setApprove_status(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_RETURN);
|
|
|
p.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
|
|
|
industrialLandSupplyDetailDao.updateByPrimaryKeySelective(p);
|
|
|
approvalService.insertAndGetId(newApproval);
|
|
|
+
|
|
|
return true;
|
|
|
} else if (Objects.equals(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
|
|
|
//管委会领导退回 --》 商务局业务员
|
|
|
+ Group group = null;
|
|
|
+ newApproval.setOper_type(Constant.OperType.REJECT);
|
|
|
newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_PENDING_HANDLE);
|
|
|
newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_RETURN);
|
|
|
- newApproval.setNextchecker(entity.getCreate_by().toString());
|
|
|
+ group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_1);
|
|
|
+ if (null == group) {
|
|
|
+ throw new BaseException("操作失败," + Constant.INDUSTRIALLANDSUPPLY_1 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
+ }
|
|
|
+ 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_1 + "没有该项目责任单位的人员,请联系管理员配置");
|
|
|
+ }
|
|
|
IndustrialLandSupplyDetail p = new IndustrialLandSupplyDetail();
|
|
|
p.setId(applyId);
|
|
|
p.setApprove_status(Constant.LandSupplyApproveStatus.MANAGEMENT_COMMITTEE_LEADER_RETURN);
|
|
|
@@ -2160,21 +2363,50 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
return true;
|
|
|
} else if (Objects.equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_PENDIND_HANDLE, approval.getAfter_approvalstatus())) {
|
|
|
//供地领导退回 --》 资源规划局务员
|
|
|
+ Group group = null;
|
|
|
+ newApproval.setOper_type(Constant.OperType.REJECT);
|
|
|
newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_PENDIND_HANDLE);
|
|
|
newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_RETURN);
|
|
|
- newApproval.setNextchecker(entity.getCreate_by().toString());
|
|
|
- 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_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);
|
|
|
return true;
|
|
|
} else if (Objects.equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_RETURN, approval.getAfter_approvalstatus())) {
|
|
|
//供地审批退回 --》 预审通过待分发
|
|
|
|
|
|
Group group = null;
|
|
|
- newApproval.setOper_type(Constant.OperType.SUBMIT);
|
|
|
+ newApproval.setOper_type(Constant.OperType.REJECT);
|
|
|
newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_RETURN);
|
|
|
newApproval.setAfter_approvalstatus(Constant.LandSupplyApproveStatus.PRE_APPROVE_PENDIND_DISTRIBUTE);
|
|
|
group = groupService.findByNameOnly(Constant.INDUSTRIALLANDSUPPLY_5);
|
|
|
@@ -2188,6 +2420,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
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();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2234,7 +2474,12 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
newApproval.setDeal_time(DateUtil.getTimeString(new Date()));
|
|
|
|
|
|
IndustrialLandSupplyDetail entity = industrialLandSupplyDetailDao.selectById(applyId + "");
|
|
|
-// User companyAdmin = userService.findCompanyAdmin(projectApplication.getCompany_id());
|
|
|
+ //短信参数
|
|
|
+ Map<String, String> params = new HashMap<>();
|
|
|
+ IndustrialLandSupplyDetail detail = this.findById(applyId);
|
|
|
+ params.put("title", detail.getTitle());
|
|
|
+ params.put("no", detail.getNo());
|
|
|
+ String templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY;
|
|
|
if (Objects.equals(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE, approval.getAfter_approvalstatus())) {
|
|
|
//商务局分管领导拒绝
|
|
|
newApproval.setBefore_approvalstatus(Constant.LandSupplyApproveStatus.COMMERCE_LEADER_PENDING_HANDLE);
|
|
|
@@ -2262,12 +2507,13 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// messageService.saveMessageAndPush(messages, streetArrInt, Constant.UserType.COMPANY);
|
|
|
|
|
|
//发送短信
|
|
|
-// Map<String, String> params = new HashMap<>();
|
|
|
-// params.put("project_no", projectApplication.getApply_no());
|
|
|
-// params.put("apply_name", Constant.ProjectType.PROJECT_INTELLIGENT);
|
|
|
-// String templateCode = Constant.SMS_TemplateCode.RPOJECT_MATTERS_UNPASS;
|
|
|
-// AlibabaSMSUtil.sendSMS(
|
|
|
-// companyAdmin.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params));
|
|
|
+ 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())) {
|
|
|
@@ -2281,6 +2527,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
p.setProcess_stage(Constant.LandSupplyApproveStage.PRE_AUDIT);
|
|
|
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();
|
|
|
+ }
|
|
|
return true;
|
|
|
} else if (Objects.equals(Constant.LandSupplyApproveStatus.LAND_SUPPLY_LEADER_PENDIND_HANDLE, approval.getAfter_approvalstatus())) {
|
|
|
//供地分管领导拒绝
|
|
|
@@ -2293,6 +2547,14 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
p.setProcess_stage(Constant.LandSupplyApproveStage.SUPPLY);
|
|
|
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();
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
@@ -3024,6 +3286,23 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
|
|
|
// this.pass(industrialLandSupplyDetail.getId(), null);
|
|
|
}
|
|
|
|
|
|
+ public void sendToLeader(Map<String, String> params) {
|
|
|
+ String ids = userService.getUserIdsByUserTypeAndRole(0, "产业供地领导", null);
|
|
|
+ String[] idArr = ids.split(",");
|
|
|
+ for (String id : idArr) {
|
|
|
+ //发送短信
|
|
|
+ try {
|
|
|
+ String templateCode = Constant.SMS_TemplateCode.INDUSTRIAL_LAND_SUPPLY;
|
|
|
+ User user = userService.getUser(Integer.parseInt(id));
|
|
|
+ AlibabaSMSUtil.sendSMSMessage(
|
|
|
+ user.getPhone(), templateCode, Constant.SINGNAMW, JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ } catch (ClientException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public void exportCountersignWord(int id, HttpServletResponse response) throws IOException {
|
|
|
|
|
|
IndustrialLandSupplyDetail entity = this.findById(id);
|