From 7afa1f6faff168435bb3506534566e5e522287ff Mon Sep 17 00:00:00 2001 From: CD <1103614279@qq.com> Date: Mon, 7 Nov 2022 11:55:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=84=8F=E8=A7=81=E6=94=B6?= =?UTF-8?q?=E9=9B=86=E9=A3=9E=E4=B9=A6=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/LawsOpinionGatherRemindJob.java | 41 +++++++++++-------- .../impl/LawsOpinionGatherEOServiceImpl.java | 25 ++++++++--- .../feginClient/WorkFlowFeignClient.java | 2 +- 3 files changed, 43 insertions(+), 25 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/job/LawsOpinionGatherRemindJob.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/job/LawsOpinionGatherRemindJob.java index fe112748e..2c11e5c82 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/job/LawsOpinionGatherRemindJob.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/job/LawsOpinionGatherRemindJob.java @@ -17,10 +17,7 @@ import org.quartz.JobExecutionException; import org.springframework.beans.factory.annotation.Autowired; import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.List; +import java.util.*; /** * 法规意见收集表 - 定时器 @@ -62,22 +59,30 @@ public class LawsOpinionGatherRemindJob implements Job { throw new JeroBootException("日期转换错误"); } if (days == 3) { - List userIdList = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId()); - if(CollectionUtils.isNotEmpty(userIdList)){ - JSONObject sendJsonObject = new JSONObject(); - sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue()); - sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId()); - sendJsonObject.put("userIdList",userIdList); - this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject); + Map map = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId()); + if(!map.isEmpty()){ + for (String key : map.keySet()) { + JSONObject sendJsonObject = new JSONObject(); + sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue()); + sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId()); + sendJsonObject.put("taskId",map.get(key)); + sendJsonObject.put("actiProcInstId",lawsOpinionGatherEO.getActiProcInstId()); + sendJsonObject.put("evaluatorIds",key); + this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject); + } } } else if (endTime.equals(now)) { - List userIdList = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId()); - if(CollectionUtils.isNotEmpty(userIdList)){ - JSONObject sendJsonObject = new JSONObject(); - sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue()); - sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId()); - sendJsonObject.put("userIdList",userIdList); - this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject); + Map map = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId()); + if(!map.isEmpty()){ + for (String key : map.keySet()) { + JSONObject sendJsonObject = new JSONObject(); + sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue()); + sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId()); + sendJsonObject.put("taskId",map.get(key)); + sendJsonObject.put("actiProcInstId",lawsOpinionGatherEO.getActiProcInstId()); + sendJsonObject.put("evaluatorIds",key); + this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject); + } } } /*if(StringUtils.equals(nextDayStr,sdf.format(lawsOpinionGatherEO.getEndTime()))){ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java index 2d490d9f3..021c749ed 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/lawsOpinionGather/service/impl/LawsOpinionGatherEOServiceImpl.java @@ -214,6 +214,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl) jsonObject.get("userIdList"); + userIdList.add(jsonObject.getString("evaluatorIds")); cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!"; cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() + @@ -366,9 +374,10 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl) jsonObject.get("userIdList"); + hrefFeishu = backUrl + "/regulatoryProcessReview?prcId="+ actiProcInstId +"&taskIds="+ taskId +"&prcType=5&router=%2FregulatoryAssessmentTasks&prcNum="+ lawsOpinionGatherEO.getPrcNum() +"&taskDefinitionKey=pgrpg&isDisabled=false"; + } else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue())){ + userIdList.add(jsonObject.getString("evaluatorIds")); cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!"; cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() + "\n标题: " + lawsOpinionGatherEO.getTitle() + @@ -378,6 +387,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl) jsonObject.get("userIdList"); @@ -405,8 +419,7 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl deleteProcessInstanceByTaskId(@RequestParam("taskId") String taskId); @RequestMapping(value = "/bat-wkflow/task/getLawsOpinionGatherFlowAssigneeList",method = RequestMethod.GET) - List getLawsOpinionGatherFlowAssigneeList(@RequestParam("lawsOpinionGatherId") String lawsOpinionGatherId); + Map getLawsOpinionGatherFlowAssigneeList(@RequestParam("lawsOpinionGatherId") String lawsOpinionGatherId); @RequestMapping(value = "/bat-wkflow/task/getTaskAssigneeListByPrcIds",method = RequestMethod.GET) List getTaskAssigneeListByPrcIds(@RequestParam("actiProcInstIds") String actiProcInstIds);