批量任务
This commit is contained in:
parent
e390c9f4cd
commit
b8278d930e
@ -12,6 +12,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
|||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -87,10 +88,12 @@ public class BatchSendTaskInfo extends BaseEntity {
|
|||||||
* 就诊/体检时间,时间格式:yyyy-MM-dd
|
* 就诊/体检时间,时间格式:yyyy-MM-dd
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "就诊/出院/体检时间,时间格式:yyyy-MM-dd")
|
@ApiModelProperty(value = "就诊/出院/体检时间,时间格式:yyyy-MM-dd")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@Excel(name = "就诊/出院/体检时间", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private LocalDateTime visitDate;
|
private LocalDateTime visitDate;
|
||||||
|
|
||||||
|
@Excel(name = "就诊/出院/体检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date visitTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 体检/门诊/住院号
|
* 体检/门诊/住院号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -58,6 +58,7 @@ import javax.annotation.Resource;
|
|||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
|
import java.time.ZoneId;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -232,6 +233,7 @@ public class BatchSendTaskInfoServiceImpl implements IBatchSendTaskInfoService {
|
|||||||
batchSendTaskInfo.setCreateTime(LocalDateTime.now());
|
batchSendTaskInfo.setCreateTime(LocalDateTime.now());
|
||||||
batchSendTaskInfo.setCreateBy(SecurityUtils.getUsername());
|
batchSendTaskInfo.setCreateBy(SecurityUtils.getUsername());
|
||||||
batchSendTaskInfo.setDelFlag(0);
|
batchSendTaskInfo.setDelFlag(0);
|
||||||
|
batchSendTaskInfo.setVisitDate(batchSendTaskInfo.getVisitTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime());
|
||||||
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.DISCHARGED.getInfo())) {
|
if (batchSendTaskInfo.getPersonnelType().equals(PersonnelTypeEnum.DISCHARGED.getInfo())) {
|
||||||
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.DISCHARGED.getCode());
|
batchSendTaskInfo.setPersonnelType(PersonnelTypeEnum.DISCHARGED.getCode());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,6 +131,7 @@
|
|||||||
<if test="physicalExaminationLabel != null and physicalExaminationLabel != ''">
|
<if test="physicalExaminationLabel != null and physicalExaminationLabel != ''">
|
||||||
and physical_examination_label like concat('%', #{physicalExaminationLabel}, '%')
|
and physical_examination_label like concat('%', #{physicalExaminationLabel}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY create_time DESC
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,6 @@ import javax.annotation.Resource;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -249,20 +248,21 @@ public class SendTextMessageServiceImpl implements SendTextMessageService {
|
|||||||
JSONObject retObj = new JSONObject();
|
JSONObject retObj = new JSONObject();
|
||||||
retObj.fluentPut("code", 0).fluentPut("msg", "成功");
|
retObj.fluentPut("code", 0).fluentPut("msg", "成功");
|
||||||
SignPatientManageRouteNode signPatientManageRouteNode = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(Long.valueOf(data.getOut_id()));
|
SignPatientManageRouteNode signPatientManageRouteNode = signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(Long.valueOf(data.getOut_id()));
|
||||||
|
if (Objects.nonNull(signPatientManageRouteNode) && signPatientManageRouteNode.getNodeExecuteStatus().equals(NodeExecuteStatusEnum.EXECUTED.getInfo())) {
|
||||||
|
return retObj;
|
||||||
|
}
|
||||||
ShortMessageSendRecord shortMessageSendRecord = new ShortMessageSendRecord();
|
ShortMessageSendRecord shortMessageSendRecord = new ShortMessageSendRecord();
|
||||||
if (ObjectUtils.isNotEmpty(signPatientManageRouteNode) && signPatientManageRouteNode.getMessagePushSign() == 1) {
|
if (ObjectUtils.isNotEmpty(signPatientManageRouteNode) && signPatientManageRouteNode.getMessagePushSign() == 1) {
|
||||||
if (data.getSuccess()) {
|
if (data.getSuccess()) {
|
||||||
// 标记任务执行状态
|
// 标记任务执行状态
|
||||||
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getInfo());
|
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getInfo());
|
||||||
signPatientManageRouteNode.setMessageNodeExecuteResultStatus(NodeExecuteResultStatusEnum.SUCCESS.getInfo());
|
signPatientManageRouteNode.setMessageNodeExecuteResultStatus(NodeExecuteResultStatusEnum.SUCCESS.getInfo());
|
||||||
signPatientManageRouteNode.setNodeFinishDate(LocalDateTime.parse(data.getReport_time(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
||||||
shortMessageSendRecord.setErrorStatus(ErrorStatusEnum.success.getValue());
|
shortMessageSendRecord.setErrorStatus(ErrorStatusEnum.success.getValue());
|
||||||
shortMessageSendRecord.setErrorCode(0L);
|
shortMessageSendRecord.setErrorCode(0L);
|
||||||
} else {
|
} else {
|
||||||
// 标记任务执行状态
|
// 标记任务执行状态
|
||||||
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getInfo());
|
signPatientManageRouteNode.setNodeExecuteStatus(NodeExecuteStatusEnum.EXECUTED.getInfo());
|
||||||
signPatientManageRouteNode.setMessageNodeExecuteResultStatus(NodeExecuteResultStatusEnum.FAILURE.getInfo());
|
signPatientManageRouteNode.setMessageNodeExecuteResultStatus(NodeExecuteResultStatusEnum.FAILURE.getInfo());
|
||||||
signPatientManageRouteNode.setNodeFinishDate(LocalDateTime.parse(data.getReport_time(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
|
||||||
shortMessageSendRecord.setErrorStatus(ErrorStatusEnum.fail.getValue());
|
shortMessageSendRecord.setErrorStatus(ErrorStatusEnum.fail.getValue());
|
||||||
shortMessageSendRecord.setErrorCode(1L);
|
shortMessageSendRecord.setErrorCode(1L);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user