diff --git a/src/main/java/cn/com/tenlion/systemtask/service/receiveruser/impl/ReceiverUserServiceImpl.java b/src/main/java/cn/com/tenlion/systemtask/service/receiveruser/impl/ReceiverUserServiceImpl.java index 5592e11..32b8d4c 100644 --- a/src/main/java/cn/com/tenlion/systemtask/service/receiveruser/impl/ReceiverUserServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemtask/service/receiveruser/impl/ReceiverUserServiceImpl.java @@ -8,10 +8,12 @@ import cn.com.tenlion.systemtask.pojo.pos.receiveruser.ReceiverUserPO; import cn.com.tenlion.systemtask.pojo.vos.notice.NoticeSendVO; import cn.com.tenlion.systemtask.pojo.vos.notice.SmsSendVO; import cn.com.tenlion.systemtask.pojo.vos.receiveruser.ReceiverUserVO; +import cn.com.tenlion.systemtask.pojo.vos.urge.UrgeVO; import cn.com.tenlion.systemtask.remote.IAppTaskMsg; import cn.com.tenlion.systemtask.service.distribute.IDistributeService; import cn.com.tenlion.systemtask.service.distributesub.IDistributeSubService; import cn.com.tenlion.systemtask.service.receiveruser.IReceiverUserService; +import cn.com.tenlion.systemtask.service.urge.IUrgeService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager; import ink.wgink.pojo.ListPage; @@ -50,6 +52,8 @@ public class ReceiverUserServiceImpl extends DefaultBaseService implements IRece private ApiPathProperties apiPathProperties; @Autowired private IAppTaskMsg appTaskMsg; + @Autowired + private IUrgeService urgeService; SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @Override @@ -302,17 +306,27 @@ public class ReceiverUserServiceImpl extends DefaultBaseService implements IRece int days = receiverUserDTO.getDays(); int hours = receiverUserDTO.getHours(); boolean flag = distributeService.dateBig(nowDateStr, deadTime); + UrgeVO urgeVO = new UrgeVO(); + urgeVO.setTaskId(receiverUserDTO.getDistributeId()); if(flag) { params.put("taskType", "已超期"); + // app和短信催办 sendAppMsg("任务超期", "您的任务:" + receiverUserDTO.getDistributeTitle() + "已经超期。", receiverUserDTO.getUserId()); sendNoteMsg("您的任务:" + receiverUserDTO.getDistributeTitle() + "已经超期。", receiverUserDTO.getUserId()); + // 保存催办信息 + urgeVO.setUserId(receiverUserDTO.getUserId()); + urgeService.save(urgeVO); }else { int daysDiff = distributeService.dateDiff(nowDateStr, deadTime, 1); int hoursDiff = distributeService.dateDiff(nowDateStr, deadTime, 2); if(days < daysDiff || hours < hoursDiff) { params.put("taskType", "即将超期"); + // app和短信催办 sendAppMsg("即将超期", "您的任务:" + receiverUserDTO.getDistributeTitle() + "即将超期,请及时处理。", receiverUserDTO.getUserId()); sendNoteMsg("您的任务:" + receiverUserDTO.getDistributeTitle() + "即将超期,请及时处理。", receiverUserDTO.getUserId()); + // 保存催办信息 + urgeVO.setUserId(receiverUserDTO.getUserId()); + urgeService.save(urgeVO); } } updateTask(receiverUserDTO.getReceiverUserId(), params);