package com.ruoyi.common.core.service.dto;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
|
/**
|
* 一条待执行随访子任务的摘要({@link VisitTaskCreateApi#findPendingSubtasks} 的返回元素)。
|
* <p>
|
* 只包含「再入院判定」真正用到的字段(见迁移前
|
* {@code PatMedInhospServiceImpl#writeInSubTask} L758-843 与 {@code #dealInHospInfo} L1321-1359):
|
* <ul>
|
* <li>{@code longSendTime == null} → 不是长期任务,<b>直接跳过不处理</b>;</li>
|
* <li>{@code endtime} 用于和"准备新增的子任务"的出院时间比较,决定停哪一边;</li>
|
* <li>{@code serviceType == "2"} 是"科室/病区再入院停机"分支的必要条件;</li>
|
* <li>{@code orgid} 用于景宁白名单 {@code 47255004333112711A1001} 判断。</li>
|
* </ul>
|
*
|
* @see com.ruoyi.common.core.service.VisitTaskCreateApi#findPendingSubtasks(Long, Long)
|
*/
|
public class VisitPendingSubtaskDto implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/** 子任务ID */
|
private Long id;
|
|
/**
|
* 完成时间(原 {@code finishtime})。
|
* <p>
|
* ⚠️ <b>为什么需要它</b>:出入院侧的 {@code writeInSubTask} 停旧子任务时
|
* <b>不</b>设置 finishtime(基线里那行本来就被注释掉了,原样保留),
|
* 所以出入院路径从不填它 —— 行为不变;
|
* 但<b>门急诊侧</b>停旧子任务时设了
|
* {@code serviceSubtask1.setFinishtime(new Date())}(原
|
* {@code PatMedOuthospServiceImpl#writeInSubTask} L477,是活代码),
|
* 因此契约必须能承载它,否则门诊移植会静默丢掉这一列的写入。
|
*/
|
private Date finishtime;
|
|
/** 出院时间(原 endtime) */
|
private Date endtime;
|
|
/** 长期任务发送时间;为 null 表示不是长期任务 */
|
private Date longSendTime;
|
|
/** 服务类型("2" 出院随访 / "13" 专病随访 …) */
|
private String serviceType;
|
|
/** 机构ID(用于景宁白名单判断) */
|
private String orgid;
|
|
/** 发送状态(这里的记录一律是 2 = 待发送) */
|
private Long sendstate;
|
|
/**
|
* 任务ID。
|
* <p>
|
* ⚠️ {@code updateServiceSubtask} 的 SQL 里有一条 {@code <if test="taskid != null">taskid = #{taskid}</if>}
|
* —— 若回写时这个字段为 null,任务归属就不会被写坏(不改动),
|
* 但为了与原实现<b>逐字段一致</b>(原实现传的是查询出来的完整对象),这里必须带上。
|
*/
|
private Long taskid;
|
|
/**
|
* 要写回的「结果」值。
|
* <p>
|
* ⚠️ <b>这是调用方在"移出"一条待执行子任务时改的字段</b>:
|
* 原实现是把查询出来的对象 {@code setResult("error")} 后再传给 update。
|
* 过渡实现直接把它 {@code setResult(...)} 回本 DTO,从而保证
|
* "先查完整对象、改几个字段、再整体回写"这条语义<b>逐字段不变</b>。
|
*/
|
private String result;
|
|
/**
|
* 要写回的备注(原实现会把新文案拼在已有 remark 后面)。
|
*/
|
private String remark;
|
|
/** 更新人(原实现 {@code setUpdateBy(serviceTask.getUpdateBy())}) */
|
private String updateBy;
|
|
/** 更新时间(原实现 {@code setUpdateTime(new Date())}) */
|
private Date updateTime;
|
|
/**
|
* 是否再次随访(原 {@code isVisitAgain})。
|
* <p>
|
* ⚠️ 这是 {@code dealInHospInfo}「再入院停机」要写的字段(原 L1346 {@code setIsVisitAgain(2)})。
|
* 不加它,停机时这个标记就会丢。
|
*/
|
private Integer isVisitAgain;
|
|
public Date getFinishtime() {
|
return finishtime;
|
}
|
|
public void setFinishtime(Date finishtime) {
|
this.finishtime = finishtime;
|
}
|
|
public Long getId() {
|
return id;
|
}
|
|
public void setId(Long id) {
|
this.id = id;
|
}
|
|
public Date getEndtime() {
|
return endtime;
|
}
|
|
public void setEndtime(Date endtime) {
|
this.endtime = endtime;
|
}
|
|
public Date getLongSendTime() {
|
return longSendTime;
|
}
|
|
public void setLongSendTime(Date longSendTime) {
|
this.longSendTime = longSendTime;
|
}
|
|
public String getServiceType() {
|
return serviceType;
|
}
|
|
public void setServiceType(String serviceType) {
|
this.serviceType = serviceType;
|
}
|
|
public String getOrgid() {
|
return orgid;
|
}
|
|
public void setOrgid(String orgid) {
|
this.orgid = orgid;
|
}
|
|
public Long getSendstate() {
|
return sendstate;
|
}
|
|
public void setSendstate(Long sendstate) {
|
this.sendstate = sendstate;
|
}
|
|
public Long getTaskid() {
|
return taskid;
|
}
|
|
public void setTaskid(Long taskid) {
|
this.taskid = taskid;
|
}
|
|
public String getResult() {
|
return result;
|
}
|
|
public void setResult(String result) {
|
this.result = result;
|
}
|
|
public String getRemark() {
|
return remark;
|
}
|
|
public void setRemark(String remark) {
|
this.remark = remark;
|
}
|
|
public String getUpdateBy() {
|
return updateBy;
|
}
|
|
public void setUpdateBy(String updateBy) {
|
this.updateBy = updateBy;
|
}
|
|
public Date getUpdateTime() {
|
return updateTime;
|
}
|
|
public void setUpdateTime(Date updateTime) {
|
this.updateTime = updateTime;
|
}
|
|
public Integer getIsVisitAgain() {
|
return isVisitAgain;
|
}
|
|
public void setIsVisitAgain(Integer isVisitAgain) {
|
this.isVisitAgain = isVisitAgain;
|
}
|
}
|