催办部分
This commit is contained in:
@@ -3,10 +3,13 @@ package com.yxt.messagecenter.biz.messageurgeList;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.yxt.anrui.flowable.api.flow2.FlowFeign;
|
||||
import com.yxt.anrui.flowable.api.flow2.FlowableMessageVo;
|
||||
import com.yxt.anrui.portal.api.sysuser.UserQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.messagecenter.api.message.OrderListMessageDto;
|
||||
import com.yxt.messagecenter.api.message.OrderMesageDto;
|
||||
import com.yxt.messagecenter.api.message.PushMessageQuery;
|
||||
import com.yxt.messagecenter.api.messageurgeList.MessageListDto;
|
||||
import com.yxt.messagecenter.biz.message.MessageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -27,11 +30,13 @@ public class ScheduledMessageService {
|
||||
private FlowFeign flowFeign;
|
||||
@Autowired
|
||||
private MessageUrgeListService messageUrgeListService;
|
||||
@Autowired
|
||||
private MessageService messageService;
|
||||
|
||||
|
||||
// @Scheduled(cron = "0 0 0 * * ?")
|
||||
// @Scheduled(cron = "0 0 0 * * ?")
|
||||
// @Scheduled(cron = "0 0/5 16 * * ?")
|
||||
public void remindVehicle() {
|
||||
public void remindMessage() {
|
||||
Date now = new Date();
|
||||
//获取当前时间
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
@@ -46,6 +51,18 @@ public class ScheduledMessageService {
|
||||
FlowableMessageVo flowableMessageVo = list.get(i);
|
||||
MessageListDto messageListDto = new MessageListDto();
|
||||
BeanUtil.copyProperties(flowableMessageVo, messageListDto);
|
||||
//===================================================
|
||||
List<String> recipientSidList = Arrays.asList(flowableMessageVo.getAssignee().split(","));
|
||||
PushMessageQuery pushMessageQuery = new PushMessageQuery();
|
||||
pushMessageQuery.setReceivedSids(recipientSidList);
|
||||
pushMessageQuery.setModuleName("业务");
|
||||
pushMessageQuery.setMsgContent("您有待办理的审批,请登录平台及时处理");
|
||||
pushMessageQuery.setApp_type("2");
|
||||
// pushMessageQuery.setModuleSid("e25e13b5-f2ed-421f-bdb3-6f2eca2a3028");
|
||||
pushMessageQuery.setMsgTitle("审批催办提醒");
|
||||
// pushMessageQuery.setBusinessSid(busDeliveredApply.getSid());
|
||||
// 消息推送
|
||||
messageService.pushNoUriMessage(pushMessageQuery);
|
||||
messageUrgeListService.saveMessage(messageListDto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user