短信推送
This commit is contained in:
parent
f63d0dae57
commit
7ed2f813ef
@ -8,7 +8,7 @@ import java.time.LocalDate;
|
||||
/**
|
||||
* @Description 查询短信发送实体类
|
||||
* @Author zh
|
||||
* @Date 2024-05-24
|
||||
* @Date 2024-07-22
|
||||
*/
|
||||
@Data
|
||||
public class TextMessage {
|
||||
@ -61,6 +61,9 @@ public class TextMessage {
|
||||
@ApiModelProperty(value = "短信推送标识,0:未开启,1:已开启")
|
||||
private Integer messagePushSign;
|
||||
|
||||
@ApiModelProperty(value = "短信ID")
|
||||
private String textMessageId;
|
||||
|
||||
@ApiModelProperty(value = "节点id")
|
||||
private Long signPatientManageRouteNodeId;
|
||||
}
|
||||
|
||||
@ -840,10 +840,12 @@
|
||||
pi.admission_time,
|
||||
pi.discharge_time,
|
||||
pi.visit_date,
|
||||
pi.visit_method
|
||||
pi.visit_method,
|
||||
tm.text_message_id
|
||||
from sign_patient_manage_route_node spmrn
|
||||
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 text_message tm ON tm.id = spmrn.message_template_id
|
||||
where spmrn.message_push_sign = 1
|
||||
and spmrn.del_flag = 0
|
||||
and spmrn.node_execute_status = 'UNEXECUTED'
|
||||
|
||||
@ -36,6 +36,11 @@ public class SendTextMessageServiceImpl implements SendTextMessageService {
|
||||
@Resource
|
||||
private AliYunSmsTwoConfig aliYunSmsTwoConfig;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径节点短信发送定时任务
|
||||
*
|
||||
* @throws ClientException 发送信息
|
||||
*/
|
||||
@Override
|
||||
public void sendTextMessageSendTask() throws ClientException {
|
||||
//查询短信发送数据
|
||||
@ -90,6 +95,8 @@ public class SendTextMessageServiceImpl implements SendTextMessageService {
|
||||
smsInfoDTO.setPhoneNumbers(message.getPatientPhone());
|
||||
smsInfoDTO.setSignName(aliYunSmsTwoConfig.getSignName());
|
||||
smsInfoDTO.setTemplateCode(aliYunSmsTwoConfig.getTemplateCode());
|
||||
// 根据模版id发送
|
||||
//smsInfoDTO.setTemplateCode(message.getTextMessageId());
|
||||
Boolean aBoolean = smsSendUtils.sendTextMessage(smsInfoDTO);
|
||||
if (aBoolean) {
|
||||
ids.add(message.getSignPatientManageRouteNodeId());
|
||||
|
||||
@ -11,7 +11,7 @@ import javax.annotation.Resource;
|
||||
/**
|
||||
* @Description 短信相关定时任务
|
||||
* @Author zh
|
||||
* @Date 2024-05-24
|
||||
* @Date 2024-07-22
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("sendTextMessageTask")
|
||||
@ -21,7 +21,7 @@ public class SendTextMessageTask {
|
||||
private SendTextMessageService sendTextMessageService;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务路径节点短信发送定时任务,每10分钟执行一次
|
||||
* 签约患者管理任务路径节点短信发送定时任务
|
||||
*/
|
||||
public void automaticSendTextMessageTask() throws ClientException {
|
||||
log.info("开始执行签约患者管理任务短信推送定时任务......");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user