定时任务
This commit is contained in:
parent
fd1f709db5
commit
5d8b110ef1
@ -37,6 +37,9 @@ public class SubscribeMessageSendDataServiceImpl implements SubscribeMessageSend
|
|||||||
public void subscribeMessageSendDataTask() {
|
public void subscribeMessageSendDataTask() {
|
||||||
List<PatientVO> patient = homePageMapper.selectResidentAndSubscribeMessageRecord(SubscribeStatusEnum.accept.getValue(), weChatAppletChatConfig.getSignTemplateId());
|
List<PatientVO> patient = homePageMapper.selectResidentAndSubscribeMessageRecord(SubscribeStatusEnum.accept.getValue(), weChatAppletChatConfig.getSignTemplateId());
|
||||||
List<Long> collect = patient.stream().filter(Objects::nonNull).map(PatientVO::getPatientId).filter(Objects::nonNull).collect(Collectors.toList());
|
List<Long> collect = patient.stream().filter(Objects::nonNull).map(PatientVO::getPatientId).filter(Objects::nonNull).collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isEmpty(collect)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
List<PatientVO> signPatientManageRouteNodes = homePageMapper.selectSignPatientManageRouteNode(collect);
|
List<PatientVO> signPatientManageRouteNodes = homePageMapper.selectSignPatientManageRouteNode(collect);
|
||||||
List<PatientVO> patientVOS = new ArrayList<>();
|
List<PatientVO> patientVOS = new ArrayList<>();
|
||||||
for (PatientVO signPatientManageRouteNode : signPatientManageRouteNodes) {
|
for (PatientVO signPatientManageRouteNode : signPatientManageRouteNodes) {
|
||||||
|
|||||||
@ -116,17 +116,21 @@
|
|||||||
spmrn.task_subdivision,
|
spmrn.task_subdivision,
|
||||||
spmrn.applet_push_sign,
|
spmrn.applet_push_sign,
|
||||||
spmrn.node_content,
|
spmrn.node_content,
|
||||||
spmrn.node_execute_status
|
spmrn.node_execute_status,
|
||||||
|
spmr.patient_id
|
||||||
from sign_patient_manage_route_node spmrn
|
from sign_patient_manage_route_node spmrn
|
||||||
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = spmrn.manage_route_id
|
LEFT JOIN sign_patient_manage_route spmr ON spmr.id = spmrn.manage_route_id
|
||||||
LEFT JOIN patient_info pi ON pi.id = spmr.patient_id
|
LEFT JOIN patient_info pi ON pi.id = spmr.patient_id
|
||||||
<where>
|
<where>
|
||||||
|
<if test="patientId != null and patientId.size() > 0">
|
||||||
spmr.patient_id in
|
spmr.patient_id in
|
||||||
<foreach item="patientId" collection="patientId" open="(" separator="," close=")">
|
<foreach item="patientId" collection="patientId" open="(" separator="," close=")">
|
||||||
#{patientId}
|
#{patientId}
|
||||||
</foreach>
|
</foreach>
|
||||||
and node_execute_status = 'UNEXECUTED'
|
</if>
|
||||||
and del_flag = 0
|
and spmrn.node_execute_status = 'UNEXECUTED'
|
||||||
|
and spmrn.del_flag = 0
|
||||||
|
and pi.del_flag = 0
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
package com.xinelu.quartz.controller;
|
||||||
|
|
||||||
|
import com.xinelu.quartz.task.SubscribeTask;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息推送
|
||||||
|
*
|
||||||
|
* @author xinelu
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/monitor/messageSubscription")
|
||||||
|
public class MessageSubscriptionController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SubscribeTask subscribeTask;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动执行专病路径定时任务
|
||||||
|
*/
|
||||||
|
@GetMapping("/signPatientManageRouteNode")
|
||||||
|
public void signPatientManageRouteNode() {
|
||||||
|
subscribeTask.automaticSendSignPatientManageRouteNodeTask();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -21,7 +21,7 @@ public class SubscribeTask {
|
|||||||
/**
|
/**
|
||||||
* 签约患者管理任务路径节点消息推送定时任务,每10分钟执行一次
|
* 签约患者管理任务路径节点消息推送定时任务,每10分钟执行一次
|
||||||
*/
|
*/
|
||||||
public void automaticSendGoodsOrderTask() {
|
public void automaticSendSignPatientManageRouteNodeTask() {
|
||||||
log.info("开始执行签约患者管理任务路径节点推送定时任务......");
|
log.info("开始执行签约患者管理任务路径节点推送定时任务......");
|
||||||
subscribeTaskService.signPatientManageRouteNodeTask();
|
subscribeTaskService.signPatientManageRouteNodeTask();
|
||||||
log.info("完成订阅签约患者管理任务路径节点推送定时任务......");
|
log.info("完成订阅签约患者管理任务路径节点推送定时任务......");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user