任务催办信息保存
This commit is contained in:
parent
776bfcdd5a
commit
e5a3a61f68
@ -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.NoticeSendVO;
|
||||||
import cn.com.tenlion.systemtask.pojo.vos.notice.SmsSendVO;
|
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.receiveruser.ReceiverUserVO;
|
||||||
|
import cn.com.tenlion.systemtask.pojo.vos.urge.UrgeVO;
|
||||||
import cn.com.tenlion.systemtask.remote.IAppTaskMsg;
|
import cn.com.tenlion.systemtask.remote.IAppTaskMsg;
|
||||||
import cn.com.tenlion.systemtask.service.distribute.IDistributeService;
|
import cn.com.tenlion.systemtask.service.distribute.IDistributeService;
|
||||||
import cn.com.tenlion.systemtask.service.distributesub.IDistributeSubService;
|
import cn.com.tenlion.systemtask.service.distributesub.IDistributeSubService;
|
||||||
import cn.com.tenlion.systemtask.service.receiveruser.IReceiverUserService;
|
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.common.base.DefaultBaseService;
|
||||||
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
|
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
@ -50,6 +52,8 @@ public class ReceiverUserServiceImpl extends DefaultBaseService implements IRece
|
|||||||
private ApiPathProperties apiPathProperties;
|
private ApiPathProperties apiPathProperties;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAppTaskMsg appTaskMsg;
|
private IAppTaskMsg appTaskMsg;
|
||||||
|
@Autowired
|
||||||
|
private IUrgeService urgeService;
|
||||||
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -302,17 +306,27 @@ public class ReceiverUserServiceImpl extends DefaultBaseService implements IRece
|
|||||||
int days = receiverUserDTO.getDays();
|
int days = receiverUserDTO.getDays();
|
||||||
int hours = receiverUserDTO.getHours();
|
int hours = receiverUserDTO.getHours();
|
||||||
boolean flag = distributeService.dateBig(nowDateStr, deadTime);
|
boolean flag = distributeService.dateBig(nowDateStr, deadTime);
|
||||||
|
UrgeVO urgeVO = new UrgeVO();
|
||||||
|
urgeVO.setTaskId(receiverUserDTO.getDistributeId());
|
||||||
if(flag) {
|
if(flag) {
|
||||||
params.put("taskType", "已超期");
|
params.put("taskType", "已超期");
|
||||||
|
// app和短信催办
|
||||||
sendAppMsg("任务超期", "您的任务:" + receiverUserDTO.getDistributeTitle() + "已经超期。", receiverUserDTO.getUserId());
|
sendAppMsg("任务超期", "您的任务:" + receiverUserDTO.getDistributeTitle() + "已经超期。", receiverUserDTO.getUserId());
|
||||||
sendNoteMsg("您的任务:" + receiverUserDTO.getDistributeTitle() + "已经超期。", receiverUserDTO.getUserId());
|
sendNoteMsg("您的任务:" + receiverUserDTO.getDistributeTitle() + "已经超期。", receiverUserDTO.getUserId());
|
||||||
|
// 保存催办信息
|
||||||
|
urgeVO.setUserId(receiverUserDTO.getUserId());
|
||||||
|
urgeService.save(urgeVO);
|
||||||
}else {
|
}else {
|
||||||
int daysDiff = distributeService.dateDiff(nowDateStr, deadTime, 1);
|
int daysDiff = distributeService.dateDiff(nowDateStr, deadTime, 1);
|
||||||
int hoursDiff = distributeService.dateDiff(nowDateStr, deadTime, 2);
|
int hoursDiff = distributeService.dateDiff(nowDateStr, deadTime, 2);
|
||||||
if(days < daysDiff || hours < hoursDiff) {
|
if(days < daysDiff || hours < hoursDiff) {
|
||||||
params.put("taskType", "即将超期");
|
params.put("taskType", "即将超期");
|
||||||
|
// app和短信催办
|
||||||
sendAppMsg("即将超期", "您的任务:" + receiverUserDTO.getDistributeTitle() + "即将超期,请及时处理。", receiverUserDTO.getUserId());
|
sendAppMsg("即将超期", "您的任务:" + receiverUserDTO.getDistributeTitle() + "即将超期,请及时处理。", receiverUserDTO.getUserId());
|
||||||
sendNoteMsg("您的任务:" + receiverUserDTO.getDistributeTitle() + "即将超期,请及时处理。", receiverUserDTO.getUserId());
|
sendNoteMsg("您的任务:" + receiverUserDTO.getDistributeTitle() + "即将超期,请及时处理。", receiverUserDTO.getUserId());
|
||||||
|
// 保存催办信息
|
||||||
|
urgeVO.setUserId(receiverUserDTO.getUserId());
|
||||||
|
urgeService.save(urgeVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateTask(receiverUserDTO.getReceiverUserId(), params);
|
updateTask(receiverUserDTO.getReceiverUserId(), params);
|
||||||
|
Loading…
Reference in New Issue
Block a user