增加签约管理路径相关接口。

This commit is contained in:
haown 2024-03-19 09:05:52 +08:00
parent dcb5144533
commit cb1337df60
28 changed files with 2641 additions and 85 deletions

View File

@ -4,6 +4,7 @@ import com.xinelu.common.annotation.Log;
import com.xinelu.common.constant.UserConstants;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.domain.R;
import com.xinelu.common.core.domain.entity.SysRole;
import com.xinelu.common.core.domain.entity.SysUser;
import com.xinelu.common.core.page.TableDataInfo;
@ -15,6 +16,8 @@ import com.xinelu.system.domain.vo.AgencyNameVO;
import com.xinelu.system.service.ISysPostService;
import com.xinelu.system.service.ISysRoleService;
import com.xinelu.system.service.ISysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
@ -31,6 +34,7 @@ import java.util.stream.Collectors;
*
* @author xinelu
*/
@Api(tags = "用户信息控制器")
@RestController
@RequestMapping("/system/user")
public class SysUserController extends BaseController {
@ -54,6 +58,19 @@ public class SysUserController extends BaseController {
return getDataTable(list);
}
/**
* 获取用户列表
* @param user
* @return
*/
@ApiOperation("获取用户列表")
@PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping("/getList")
public R<List<SysUser>> getList(SysUser user) {
List<SysUser> list = userService.selectUserList(user);
return R.ok(list);
}
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:user:export')")
@PostMapping("/export")

View File

@ -0,0 +1,19 @@
package com.xinelu.common.constant;
/**
* @description: 任务创建类型常量
* @author: haown
* @create: 2024-03-18 16:24
**/
public class TaskCreateTypeConstant {
/**
* 手动创建
*/
public static final String MANUAL_CREATE = "MANUAL_CREATE";
/**
* 自动匹配
*/
public static final String MANUAL_MATCHE = "MANUAL_MATCHE";
}

View File

@ -0,0 +1,97 @@
package com.xinelu.manage.controller.signpatientmanageroute;
import com.xinelu.common.annotation.Log;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.BusinessType;
import com.xinelu.common.utils.poi.ExcelUtil;
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 签约患者管理任务路径Controller
*
* @author haown
* @date 2024-03-18
*/
@RestController
@RequestMapping("/manage/signroute")
public class SignPatientManageRouteController extends BaseController {
@Resource
private ISignPatientManageRouteService signPatientManageRouteService;
/**
* 查询签约患者管理任务路径列表
*/
@PreAuthorize("@ss.hasPermi('manage:signroute:list')")
@GetMapping("/list")
public TableDataInfo list(SignPatientManageRoute signPatientManageRoute) {
startPage();
List<SignPatientManageRoute> list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute);
return getDataTable(list);
}
/**
* 导出签约患者管理任务路径列表
*/
@PreAuthorize("@ss.hasPermi('manage:signroute:export')")
@Log(title = "签约患者管理任务路径", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SignPatientManageRoute signPatientManageRoute) {
List<SignPatientManageRoute> list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute);
ExcelUtil<SignPatientManageRoute> util = new ExcelUtil<SignPatientManageRoute>(SignPatientManageRoute. class);
util.exportExcel(response, list, "签约患者管理任务路径数据");
}
/**
* 获取签约患者管理任务路径详细信息
*/
@PreAuthorize("@ss.hasPermi('manage:signroute:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(signPatientManageRouteService.selectSignPatientManageRouteById(id));
}
/**
* 新增签约患者管理任务路径
*/
@PreAuthorize("@ss.hasPermi('manage:signroute:add')")
@Log(title = "签约患者管理任务路径", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SignPatientManageRoute signPatientManageRoute) {
return toAjax(signPatientManageRouteService.insertSignPatientManageRoute(signPatientManageRoute));
}
/**
* 修改签约患者管理任务路径
*/
@PreAuthorize("@ss.hasPermi('manage:signroute:edit')")
@Log(title = "签约患者管理任务路径", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SignPatientManageRoute signPatientManageRoute) {
return toAjax(signPatientManageRouteService.updateSignPatientManageRoute(signPatientManageRoute));
}
/**
* 删除签约患者管理任务路径
*/
@PreAuthorize("@ss.hasPermi('manage:signroute:remove')")
@Log(title = "签约患者管理任务路径", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(signPatientManageRouteService.deleteSignPatientManageRouteByIds(ids));
}
}

View File

@ -0,0 +1,114 @@
package com.xinelu.manage.domain.signpatientmanageroute;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* 签约患者管理任务路径对象 sign_patient_manage_route
*
* @author haown
* @date 2024-03-18
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "签约患者管理任务路径对象", description = "sign_patient_manage_route")
public class SignPatientManageRoute extends BaseEntity {
private static final long serialVersionUID=1L;
/** 主键id */
private Long id;
/** 签约记录表id */
@ApiModelProperty(value = "签约记录表id")
@Excel(name = "签约记录表id")
private Long signPatientRecordId;
/** 患者表id */
@ApiModelProperty(value = "患者表id")
@Excel(name = "患者表id")
private Long patientId;
/** 患者姓名 */
@ApiModelProperty(value = "患者姓名")
@Excel(name = "患者姓名")
private String patientName;
/** 所属科室id */
@ApiModelProperty(value = "所属科室id")
@Excel(name = "所属科室id")
private Long departmentId;
/** 所属科室名称 */
@ApiModelProperty(value = "所属科室名称")
@Excel(name = "所属科室名称")
private String departmentName;
/** 所属服务包表id */
@ApiModelProperty(value = "所属服务包表id")
@Excel(name = "所属服务包表id")
private Long servicePackageId;
/** 服务包名称 */
@ApiModelProperty(value = "服务包名称")
@Excel(name = "服务包名称")
private String packageName;
/** 病种id */
@ApiModelProperty(value = "病种id")
@Excel(name = "病种id")
private Long diseaseTypeId;
/** 病种名称 */
@ApiModelProperty(value = "病种名称")
@Excel(name = "病种名称")
private String diseaseTypeName;
/** 路径主键 */
@ApiModelProperty(value = "路径主键")
@Excel(name = "路径主键", readConverterExp = "路径主键")
private Long routeId;
/** 路径名称(任务名称) */
@ApiModelProperty(value = "路径名称")
@Excel(name = "路径名称", readConverterExp = "任=务名称")
private String routeName;
/** 任务创建类型手动创建MANUAL_CREATE自动匹配MANUAL_MATCHE */
@ApiModelProperty(value = "任务创建类型手动创建MANUAL_CREATE自动匹配MANUAL_MATCHE")
@Excel(name = "任务创建类型手动创建MANUAL_CREATE自动匹配MANUAL_MATCHE")
private String taskCreateType;
/** 版本号 */
@ApiModelProperty(value = "版本号")
@Excel(name = "版本号")
private String version;
/** 路径分类任务分类全部ALL科室管理路径DEPARTMENT_MANAGE_PATH专病管理路径SPECIAL_DIEASE_MANAGE_PATH */
@ApiModelProperty(value = "路径分类")
@Excel(name = "路径分类", readConverterExp = "任=务分类")
private String routeClassify;
/** 适用范围在院IN_THE_HOSPITAL出院DISCHARGE门诊OUTPATIENT_SERVICE门诊+出院OUTPATIENT_SERVICE_DISCHARGE */
@ApiModelProperty(value = "适用范围在院IN_THE_HOSPITAL出院DISCHARGE门诊OUTPATIENT_SERVICE门诊+出院OUTPATIENT_SERVICE_DISCHARGE")
@Excel(name = "适用范围在院IN_THE_HOSPITAL出院DISCHARGE门诊OUTPATIENT_SERVICE门诊+出院OUTPATIENT_SERVICE_DISCHARGE")
private String suitRange;
/** 排序 */
@ApiModelProperty(value = "排序")
@Excel(name = "排序")
private Integer routeSort;
/** 备注信息 */
@ApiModelProperty(value = "备注信息")
@Excel(name = "备注信息")
private String routeRemark;
}

View File

@ -0,0 +1,308 @@
package com.xinelu.manage.domain.signpatientmanageroutenode;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* 签约患者管理任务路径节点对象 sign_patient_manage_route_node
*
* @author haown
* @date 2024-03-18
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "签约患者管理任务路径节点对象", description = "sign_patient_manage_route_node")
public class SignPatientManageRouteNode extends BaseEntity {
private static final long serialVersionUID=1L;
/** 主键id */
private Long id;
/** 签约患者管理任务表id */
@ApiModelProperty(value = "签约患者管理任务表id")
@Excel(name = "签约患者管理任务表id")
private Long manageRouteId;
/** 路径名称(任务名称) */
@ApiModelProperty(value = "路径名称")
@Excel(name = "路径名称", readConverterExp = "任=务名称")
private String manageRouteName;
/** 管理路径节点名称 */
@ApiModelProperty(value = "管理路径节点名称")
@Excel(name = "管理路径节点名称")
private String routeNodeName;
/** 管理路径节点时间,时间单位为:天 */
@ApiModelProperty(value = "管理路径节点时间,时间单位为:天")
@Excel(name = "管理路径节点时间,时间单位为:天")
private Integer routeNodeDay;
/** 任务类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE宣教文章PROPAGANDA_ARTICLE文字提醒TEXT_REMIND人工随访ARTIFICIAL_FOLLOW_UP */
@ApiModelProperty(value = "任务类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE宣教文章PROPAGANDA_ARTICLE文字提醒TEXT_REMIND人工随访ARTIFICIAL_FOLLOW_UP")
@Excel(name = "任务类型电话外呼PHONE_OUTBOUND问卷量表QUESTIONNAIRE_SCALE宣教文章PROPAGANDA_ARTICLE文字提醒TEXT_REMIND人工随访ARTIFICIAL_FOLLOW_UP")
private String taskType;
/** 任务状态 */
@ApiModelProperty(value = "任务状态")
@Excel(name = "任务状态")
private String taskStatus;
/** 任务细分 */
@ApiModelProperty(value = "任务细分")
@Excel(name = "任务细分")
private String taskSubdivision;
/** 二级分类描述 */
@ApiModelProperty(value = "二级分类描述")
@Excel(name = "二级分类描述")
private String secondClassifyDescribe;
/** 执行时间格式HH:mm */
@ApiModelProperty(value = "执行时间格式HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "执行时间格式HH:mm", width = 30, dateFormat = "yyyy-MM-dd")
private Date executeTime;
/** 电话推送标识0未开启1已开启 */
@ApiModelProperty(value = "电话推送标识0未开启1已开启")
@Excel(name = "电话推送标识0未开启1已开启")
private Integer phonePushSign;
/** 电话话术表id */
@ApiModelProperty(value = "电话话术表id")
@Excel(name = "电话话术表id")
private Long phoneId;
/** 电话模板ID */
@ApiModelProperty(value = "电话模板ID")
@Excel(name = "电话模板ID")
private String phoneTemplateId;
/** 电话模板名称 */
@ApiModelProperty(value = "电话模板名称")
@Excel(name = "电话模板名称")
private String phoneTemplateName;
/** 电话内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
@ApiModelProperty(value = "电话内容")
@Excel(name = "电话内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记")
private String phoneNodeContent;
/** 电话重拨次数重拨一次REDIAL_ONCE重拨二次REDIAL_TWICE不重播NOT_REPLAY */
@ApiModelProperty(value = "电话重拨次数重拨一次REDIAL_ONCE重拨二次REDIAL_TWICE不重播NOT_REPLAY")
@Excel(name = "电话重拨次数重拨一次REDIAL_ONCE重拨二次REDIAL_TWICE不重播NOT_REPLAY")
private String phoneRedialTimes;
/** 电话时间间隔,单位为:分钟 */
@ApiModelProperty(value = "电话时间间隔,单位为:分钟")
@Excel(name = "电话时间间隔,单位为:分钟")
private Integer phoneTimeInterval;
/** 电话短信提醒不发送短信NOT_SEND_MESSAGE未接通发短信NOT_CONNECTED_SEND_MESSAGE接通后发短信CONNECTED_SEND_MESSAGE所有人发短信EVERYONE_SEND_MESSAGE */
@ApiModelProperty(value = "电话短信提醒不发送短信NOT_SEND_MESSAGE未接通发短信NOT_CONNECTED_SEND_MESSAGE接通后发短信CONNECTED_SEND_MESSAGE所有人发短信EVERYONE_SEND_MESSAGE")
@Excel(name = "电话短信提醒不发送短信NOT_SEND_MESSAGE未接通发短信NOT_CONNECTED_SEND_MESSAGE接通后发短信CONNECTED_SEND_MESSAGE所有人发短信EVERYONE_SEND_MESSAGE")
private String phoneMessageRemind;
/** 电话短信模板表id */
@ApiModelProperty(value = "电话短信模板表id")
@Excel(name = "电话短信模板表id")
private Long phoneMessageTemplateId;
/** 电话短信模板名称 */
@ApiModelProperty(value = "电话短信模板名称")
@Excel(name = "电话短信模板名称")
private String phoneMessageTemplateName;
/** 问卷表id */
@ApiModelProperty(value = "问卷表id")
@Excel(name = "问卷表id")
private Long questionInfoId;
/** 问卷模板名称 */
@ApiModelProperty(value = "问卷模板名称")
@Excel(name = "问卷模板名称")
private String questionnaireName;
/** 问卷模板内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
@ApiModelProperty(value = "问卷模板内容")
@Excel(name = "问卷模板内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记")
private String questionnaireContent;
/** 问卷有效期,单位:天 */
@ApiModelProperty(value = "问卷有效期,单位:天")
@Excel(name = "问卷有效期,单位:天")
private Integer questionExpirationDate;
/** 宣教文章表id */
@ApiModelProperty(value = "宣教文章表id")
@Excel(name = "宣教文章表id")
private Long propagandaInfoId;
/** 宣教文章模板标题(宣教模板名称) */
@ApiModelProperty(value = "宣教文章模板标题")
@Excel(name = "宣教文章模板标题", readConverterExp = "宣=教模板名称")
private String propagandaTitle;
/** 宣教文章内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
@ApiModelProperty(value = "宣教文章内容")
@Excel(name = "宣教文章内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记")
private String propagandaContent;
/** 短信推送标识0未开启1已开启 */
@ApiModelProperty(value = "短信推送标识0未开启1已开启")
@Excel(name = "短信推送标识0未开启1已开启")
private Integer messagePushSign;
/** 短信模板表id */
@ApiModelProperty(value = "短信模板表id")
@Excel(name = "短信模板表id")
private Long messageTemplateId;
/** 短信模板名称 */
@ApiModelProperty(value = "短信模板名称")
@Excel(name = "短信模板名称")
private String messageTemplateName;
/** 短信预览 */
@ApiModelProperty(value = "短信预览")
@Excel(name = "短信预览")
private String messagePreview;
/** 短信节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
@ApiModelProperty(value = "短信节点内容")
@Excel(name = "短信节点内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记")
private String messageNodeContent;
/** 公众号推送标识0未开启1已开启 */
@ApiModelProperty(value = "公众号推送标识0未开启1已开启")
@Excel(name = "公众号推送标识0未开启1已开启")
private Integer officialPushSign;
/** 公众号模板表id */
@ApiModelProperty(value = "公众号模板表id")
@Excel(name = "公众号模板表id")
private Long officialTemplateId;
/** 公众号模板名称 */
@ApiModelProperty(value = "公众号模板名称")
@Excel(name = "公众号模板名称")
private String officialTemplateName;
/** 公众号提醒内容 */
@ApiModelProperty(value = "公众号提醒内容")
@Excel(name = "公众号提醒内容")
private String officialRemindContent;
/** 公众号节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
@ApiModelProperty(value = "公众号节点内容")
@Excel(name = "公众号节点内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记")
private String officialNodeContent;
/** 小程序推送标识0未开启1已开启 */
@ApiModelProperty(value = "小程序推送标识0未开启1已开启")
@Excel(name = "小程序推送标识0未开启1已开启")
private Integer appletPushSign;
/** 小程序模板表id */
@ApiModelProperty(value = "小程序模板表id")
@Excel(name = "小程序模板表id")
private Long appletTemplateId;
/** 小程序模板名称 */
@ApiModelProperty(value = "小程序模板名称")
@Excel(name = "小程序模板名称")
private String appletTemplateName;
/** 小程序提醒内容 */
@ApiModelProperty(value = "小程序提醒内容")
@Excel(name = "小程序提醒内容")
private String appletRemindContent;
/** 小程序提示说明 */
@ApiModelProperty(value = "小程序提示说明")
@Excel(name = "小程序提示说明")
private String appletPromptDescription;
/** 小程序节点内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
@ApiModelProperty(value = "小程序节点内容")
@Excel(name = "小程序节点内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记")
private String appletNodeContent;
/** 人工随访模板表id */
@ApiModelProperty(value = "人工随访模板表id")
@Excel(name = "人工随访模板表id")
private Long followTemplateId;
/** 人工随访模板名称 */
@ApiModelProperty(value = "人工随访模板名称")
@Excel(name = "人工随访模板名称")
private String followTemplateName;
/** 人工随访模板内容(富文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记) */
@ApiModelProperty(value = "人工随访模板内容")
@Excel(name = "人工随访模板内容", readConverterExp = "富=文本存放整个节点的信息,包含标签画像的名称以及其它,标签画像名称使用特殊符号进行标记")
private String followContent;
/** 节点审核状态同意AGREE不同意DISAGREE */
@ApiModelProperty(value = "节点审核状态同意AGREE不同意DISAGREE")
@Excel(name = "节点审核状态同意AGREE不同意DISAGREE")
private String routeCheckStatus;
/** 节点审核人姓名 */
@ApiModelProperty(value = "节点审核人姓名")
@Excel(name = "节点审核人姓名")
private String routeCheckPerson;
/** 节点审核时间 */
@ApiModelProperty(value = "节点审核时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "节点审核时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date routeCheckDate;
/** 节点审核备注信息,存储审核备注信息以及审核不通过原因等信息 */
@ApiModelProperty(value = "节点审核备注信息,存储审核备注信息以及审核不通过原因等信息")
@Excel(name = "节点审核备注信息,存储审核备注信息以及审核不通过原因等信息")
private String routeCheckRemark;
/** 备注信息 */
@ApiModelProperty(value = "备注信息")
@Excel(name = "备注信息")
private String routeNodeRemark;
/** 节点任务执行状态已执行EXECUTED未执行UNEXECUTED */
@ApiModelProperty(value = "节点任务执行状态已执行EXECUTED未执行UNEXECUTED")
@Excel(name = "节点任务执行状态已执行EXECUTED未执行UNEXECUTED")
private String nodeExecuteStatus;
/** 任务处理信息 */
@ApiModelProperty(value = "任务处理信息")
@Excel(name = "任务处理信息")
private String routeHandleRemark;
/** 任务处理人id */
@ApiModelProperty(value = "任务处理人id")
@Excel(name = "任务处理人id")
private Long routeHandleId;
/** 任务处理人姓名 */
@ApiModelProperty(value = "任务处理人姓名")
@Excel(name = "任务处理人姓名")
private String routeHandlePerson;
/** 任务链接 */
@ApiModelProperty(value = "任务链接")
@Excel(name = "任务链接")
private String routeLink;
}

View File

@ -72,9 +72,18 @@ public class SignPatientPackage extends BaseEntity {
@Excel(name = "服务结束时间格式yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
private Date serviceEndTime;
/** 服务周期,单位是月 */
@ApiModelProperty(value = "服务周期,单位是月")
@Excel(name = "服务周期,单位是月")
private Integer serviceCycle;
/**
* 服务包期限
*/
@ApiModelProperty(value = "服务包期限")
@Excel(name = "服务包期限")
private Integer packageTerm;
/**
* 服务包期限单位
*/
@ApiModelProperty(value = "服务包期限单位,年,月,日")
@Excel(name = "服务包期限单位,年,月,日")
private String packageTermUnit;
}

View File

@ -0,0 +1,71 @@
package com.xinelu.manage.domain.signroutetriggercondition;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* 签约患者管理任务路径触发条件关系对象 sign_route_trigger_condition
*
* @author haown
* @date 2024-03-18
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "签约患者管理任务(路径)触发条件关系对象", description = "sign_route_trigger_condition")
public class SignRouteTriggerCondition extends BaseEntity {
private static final long serialVersionUID=1L;
/** 主键id */
private Long id;
/** 签约患者管理任务表id */
@ApiModelProperty(value = "签约患者管理任务表id")
@Excel(name = "签约患者管理任务表id")
private Long patientManageRouteId;
/** 路径名称(任务名称) */
@ApiModelProperty(value = "路径名称")
@Excel(name = "路径名称", readConverterExp = "任=务名称")
private String routeName;
/** 触发条件编码 */
@ApiModelProperty(value = "触发条件编码")
@Excel(name = "触发条件编码")
private String triggerConditionCode;
/** 触发条件名称诊断DIAGNOSIS换药日期DRESSING_CHANGE_DATE治疗方式TREATMENT_METHOD手术名称SURGICAL_NAME药品名称DRUG_NAME */
@ApiModelProperty(value = "触发条件名称诊断DIAGNOSIS换药日期DRESSING_CHANGE_DATE治疗方式TREATMENT_METHOD手术名称SURGICAL_NAME药品名称DRUG_NAME")
@Excel(name = "触发条件名称诊断DIAGNOSIS换药日期DRESSING_CHANGE_DATE治疗方式TREATMENT_METHOD手术名称SURGICAL_NAME药品名称DRUG_NAME")
private String triggerConditionName;
/** 触发条件运算符包含CONTAIN不包含NOT_CONTAIN等于EQUAL_TO不等于NOT_EQUAL_TO */
@ApiModelProperty(value = "触发条件运算符包含CONTAIN不包含NOT_CONTAIN等于EQUAL_TO不等于NOT_EQUAL_TO")
@Excel(name = "触发条件运算符包含CONTAIN不包含NOT_CONTAIN等于EQUAL_TO不等于NOT_EQUAL_TO")
private String triggerConditionOperator;
/** 触发条件值 */
@ApiModelProperty(value = "触发条件值")
@Excel(name = "触发条件值")
private String triggerConditionValue;
/** 排序 */
@ApiModelProperty(value = "排序")
@Excel(name = "排序")
private Integer triggerConditionSort;
/** 备注信息 */
@ApiModelProperty(value = "备注信息")
@Excel(name = "备注信息")
private String triggerConditionRemark;
}

View File

@ -0,0 +1,62 @@
package com.xinelu.manage.dto.signpatientpackage;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
* @description: 居民签约服务包保存传输对象
* @author: haown
* @create: 2024-03-18 14:35
**/
@ApiModel("居民签约服务包保存传输对象")
@Data
public class SignPatientPackageSaveDto {
/** 服务包表id */
@ApiModelProperty(value = "服务包表id")
@NotNull(message = "请选择服务包!")
private Long servicePackageId;
/** 服务包名称 */
@ApiModelProperty(value = "服务包名称")
private String packageName;
/** 服务包缴费状态已缴费PAID未交费UNPAID_FEES */
@ApiModelProperty(value = "服务包缴费状态已缴费PAID未交费UNPAID_FEES")
private String packagePaymentStatus;
/** 服务包价格,小数点后两位 */
@ApiModelProperty(value = "服务包价格,小数点后两位")
@NotNull(message = "服务包价格不能为空!")
private BigDecimal packagePrice;
/** 服务开始时间格式yyyy-MM-dd HH:mm:ss */
@ApiModelProperty(value = "服务开始时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@NotNull(message = "服务开始时间不能为空!")
private Date serviceStartTime;
/** 服务结束时间格式yyyy-MM-dd HH:mm:ss */
@ApiModelProperty(value = "服务结束时间格式yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
@NotNull(message = "服务结束时间不能为空!")
private Date serviceEndTime;
/**
* 服务包周期
*/
@ApiModelProperty(value = "服务包周期")
private Integer packageTerm;
/**
* 服务包周期单位
*/
@ApiModelProperty(value = "服务包周期单位,年,月,日")
private String packageTermUnit;
}

View File

@ -1,11 +1,13 @@
package com.xinelu.manage.dto.signpatientrecord;
import com.xinelu.manage.domain.signpatientinformed.SignPatientInformed;
import com.xinelu.manage.domain.signpatientpackage.SignPatientPackage;
import com.xinelu.manage.domain.signpatientpackagehardware.SignPatientPackageHardware;
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
import com.xinelu.manage.dto.signpatientpackage.SignPatientPackageSaveDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import javax.validation.constraints.NotNull;
import lombok.Data;
/**
@ -19,7 +21,18 @@ public class SignPatientAddDto {
private SignPatientRecord record;
private SignPatientPackage signPackage;
/**
* 服务包
*/
@ApiModelProperty("服务包对象")
private SignPatientPackageSaveDto signPackage;
/**
* 管理路径
*/
@ApiModelProperty("管理路径id")
@NotNull(message = "请选择管理路径")
private Long routeId;
private List<SignPatientPackageHardware> devices;

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.mapper.signpatientmanageroute;
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
import java.util.List;
/**
* 签约患者管理任务路径Mapper接口
*
* @author haown
* @date 2024-03-18
*/
public interface SignPatientManageRouteMapper {
/**
* 查询签约患者管理任务路径
*
* @param id 签约患者管理任务路径主键
* @return 签约患者管理任务路径
*/
public SignPatientManageRoute selectSignPatientManageRouteById(Long id);
/**
* 查询签约患者管理任务路径列表
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 签约患者管理任务路径集合
*/
public List<SignPatientManageRoute> selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute);
/**
* 新增签约患者管理任务路径
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 结果
*/
public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute);
/**
* 修改签约患者管理任务路径
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 结果
*/
public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute);
/**
* 删除签约患者管理任务路径
*
* @param id 签约患者管理任务路径主键
* @return 结果
*/
public int deleteSignPatientManageRouteById(Long id);
/**
* 批量删除签约患者管理任务路径
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSignPatientManageRouteByIds(Long[] ids);
}

View File

@ -0,0 +1,63 @@
package com.xinelu.manage.mapper.signpatientmanageroutenode;
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
import java.util.List;
import org.apache.ibatis.annotations.Param;
/**
* 签约患者管理任务路径节点Mapper接口
*
* @author haown
* @date 2024-03-18
*/
public interface SignPatientManageRouteNodeMapper {
/**
* 查询签约患者管理任务路径节点
*
* @param id 签约患者管理任务路径节点主键
* @return 签约患者管理任务路径节点
*/
public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id);
/**
* 查询签约患者管理任务路径节点列表
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 签约患者管理任务路径节点集合
*/
public List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode);
/**
* 新增签约患者管理任务路径节点
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 结果
*/
public int insertSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode);
int insertBatch(@Param("nodeList") List<SignPatientManageRouteNode> nodeList);
/**
* 修改签约患者管理任务路径节点
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 结果
*/
public int updateSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode);
/**
* 删除签约患者管理任务路径节点
*
* @param id 签约患者管理任务路径节点主键
* @return 结果
*/
public int deleteSignPatientManageRouteNodeById(Long id);
/**
* 批量删除签约患者管理任务路径节点
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSignPatientManageRouteNodeByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.mapper.signroutetriggercondition;
import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition;
import java.util.List;
/**
* 签约患者管理任务路径触发条件关系Mapper接口
*
* @author haown
* @date 2024-03-18
*/
public interface SignRouteTriggerConditionMapper {
/**
* 查询签约患者管理任务路径触发条件关系
*
* @param id 签约患者管理任务路径触发条件关系主键
* @return 签约患者管理任务路径触发条件关系
*/
public SignRouteTriggerCondition selectSignRouteTriggerConditionById(Long id);
/**
* 查询签约患者管理任务路径触发条件关系列表
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 签约患者管理任务路径触发条件关系集合
*/
public List<SignRouteTriggerCondition> selectSignRouteTriggerConditionList(SignRouteTriggerCondition signRouteTriggerCondition);
/**
* 新增签约患者管理任务路径触发条件关系
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 结果
*/
public int insertSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition);
/**
* 修改签约患者管理任务路径触发条件关系
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 结果
*/
public int updateSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition);
/**
* 删除签约患者管理任务路径触发条件关系
*
* @param id 签约患者管理任务路径触发条件关系主键
* @return 结果
*/
public int deleteSignRouteTriggerConditionById(Long id);
/**
* 批量删除签约患者管理任务路径触发条件关系
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSignRouteTriggerConditionByIds(Long[] ids);
}

View File

@ -94,6 +94,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
// 查询患者信息
PatientInfo patientInfo = patientMapper.selectPatientInfoById(saveDto.getPatientId());
BeanUtils.copyBeanProp(patientVisitRecord, patientInfo);
patientMapper.updatePatientInfo(patientInfo);
BeanUtils.copyBeanProp(patientVisitRecord, saveDto);
patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
patientVisitRecord.setCreateTime(DateUtils.getNowDate());
@ -102,8 +103,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
LocalDate dischargeTime = saveDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime);
patientVisitRecord.setHospitalizationDays((int) daysBetween + 1);
patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord);
return 0;
return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord);
}
/**
@ -181,23 +181,6 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
patientVisitRecord.setInHospitalNumber(item.getOutpatientNumber());// 门诊住院号共用一个字段
break;
}
// 根据身份证号查询患者信息
PatientInfoDto patientQuery = new PatientInfoDto();
patientQuery.setCardNo(item.getCardNo());
List<PatientInfo> patientInfoList = patientMapper.selectPatientInfoList(patientQuery);
if (CollectionUtils.isNotEmpty(patientInfoList)) {
// 修改居民信息
PatientInfo updInfo = patientInfoList.get(0);
BeanUtils.copyBeanProp(updInfo, item);
patientMapper.updatePatientInfo(updInfo);
patientVisitRecord.setPatientId(patientInfoList.get(0).getId());
} else {
PatientInfo saveInfo = new PatientInfo();
// 添加居民
BeanUtils.copyBeanProp(saveInfo, item);
patientMapper.insertPatientInfo(saveInfo);
patientVisitRecord.setPatientId(saveInfo.getId());
}
// 根据医院名称查询医院id
Agency agency = new Agency();
if (StringUtils.isNotBlank(item.getHospitalAgencyName())) {
@ -251,6 +234,25 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
patientVisitRecord.setWardId(deptList.get(0).getId());
}
}
// 根据身份证号查询患者信息
PatientInfoDto patientQuery = new PatientInfoDto();
patientQuery.setCardNo(item.getCardNo());
patientQuery.setHospitalAgencyId(patientVisitRecord.getHospitalAgencyId());
List<PatientInfo> patientInfoList = patientMapper.selectPatientInfoList(patientQuery);
if (CollectionUtils.isNotEmpty(patientInfoList)) {
// 修改居民信息
PatientInfo updInfo = patientInfoList.get(0);
BeanUtils.copyBeanProp(updInfo, item);
patientMapper.updatePatientInfo(updInfo);
patientVisitRecord.setPatientId(patientInfoList.get(0).getId());
} else {
PatientInfo saveInfo = new PatientInfo();
// 添加居民
BeanUtils.copyBeanProp(saveInfo, item);
patientMapper.insertPatientInfo(saveInfo);
patientVisitRecord.setPatientId(saveInfo.getId());
}
// 根据门诊/住院编号查询是否有记录
PatientVisitRecordDto recordQuery = new PatientVisitRecordDto();
recordQuery.setVisitType(patientType);
@ -275,11 +277,4 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService
return AjaxResult.success();
}
public static void main(String[] args) {
LocalDate date1 = LocalDate.of(2020, 1, 1);
LocalDate date2 = LocalDate.of(2020, 1, 2);
long daysBetween = ChronoUnit.DAYS.between(date1, date2);
System.out.println("Days between: " + daysBetween);
}
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.service.signpatientmanageroute;
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
import java.util.List;
/**
* 签约患者管理任务路径Service接口
*
* @author haown
* @date 2024-03-18
*/
public interface ISignPatientManageRouteService {
/**
* 查询签约患者管理任务路径
*
* @param id 签约患者管理任务路径主键
* @return 签约患者管理任务路径
*/
public SignPatientManageRoute selectSignPatientManageRouteById(Long id);
/**
* 查询签约患者管理任务路径列表
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 签约患者管理任务路径集合
*/
public List<SignPatientManageRoute> selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute);
/**
* 新增签约患者管理任务路径
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 结果
*/
public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute);
/**
* 修改签约患者管理任务路径
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 结果
*/
public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute);
/**
* 批量删除签约患者管理任务路径
*
* @param ids 需要删除的签约患者管理任务路径主键集合
* @return 结果
*/
public int deleteSignPatientManageRouteByIds(Long[] ids);
/**
* 删除签约患者管理任务路径信息
*
* @param id 签约患者管理任务路径主键
* @return 结果
*/
public int deleteSignPatientManageRouteById(Long id);
}

View File

@ -0,0 +1,89 @@
package com.xinelu.manage.service.signpatientmanageroute.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
import com.xinelu.manage.service.signpatientmanageroute.ISignPatientManageRouteService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 签约患者管理任务路径Service业务层处理
*
* @author haown
* @date 2024-03-18
*/
@Service
public class SignPatientManageRouteServiceImpl implements ISignPatientManageRouteService {
@Resource
private SignPatientManageRouteMapper signPatientManageRouteMapper;
/**
* 查询签约患者管理任务路径
*
* @param id 签约患者管理任务路径主键
* @return 签约患者管理任务路径
*/
@Override
public SignPatientManageRoute selectSignPatientManageRouteById(Long id) {
return signPatientManageRouteMapper.selectSignPatientManageRouteById(id);
}
/**
* 查询签约患者管理任务路径列表
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 签约患者管理任务路径
*/
@Override
public List<SignPatientManageRoute> selectSignPatientManageRouteList(SignPatientManageRoute signPatientManageRoute) {
return signPatientManageRouteMapper.selectSignPatientManageRouteList(signPatientManageRoute);
}
/**
* 新增签约患者管理任务路径
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 结果
*/
@Override
public int insertSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) {
signPatientManageRoute.setCreateTime(DateUtils.getNowDate());
return signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute);
}
/**
* 修改签约患者管理任务路径
*
* @param signPatientManageRoute 签约患者管理任务路径
* @return 结果
*/
@Override
public int updateSignPatientManageRoute(SignPatientManageRoute signPatientManageRoute) {
signPatientManageRoute.setUpdateTime(DateUtils.getNowDate());
return signPatientManageRouteMapper.updateSignPatientManageRoute(signPatientManageRoute);
}
/**
* 批量删除签约患者管理任务路径
*
* @param ids 需要删除的签约患者管理任务路径主键
* @return 结果
*/
@Override
public int deleteSignPatientManageRouteByIds(Long[] ids) {
return signPatientManageRouteMapper.deleteSignPatientManageRouteByIds(ids);
}
/**
* 删除签约患者管理任务路径信息
*
* @param id 签约患者管理任务路径主键
* @return 结果
*/
@Override
public int deleteSignPatientManageRouteById(Long id) {
return signPatientManageRouteMapper.deleteSignPatientManageRouteById(id);
}
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.service.signpatientmanageroutenode;
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
import java.util.List;
/**
* 签约患者管理任务路径节点Service接口
*
* @author haown
* @date 2024-03-18
*/
public interface ISignPatientManageRouteNodeService {
/**
* 查询签约患者管理任务路径节点
*
* @param id 签约患者管理任务路径节点主键
* @return 签约患者管理任务路径节点
*/
public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id);
/**
* 查询签约患者管理任务路径节点列表
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 签约患者管理任务路径节点集合
*/
public List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode);
/**
* 新增签约患者管理任务路径节点
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 结果
*/
public int insertSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode);
/**
* 修改签约患者管理任务路径节点
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 结果
*/
public int updateSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode);
/**
* 批量删除签约患者管理任务路径节点
*
* @param ids 需要删除的签约患者管理任务路径节点主键集合
* @return 结果
*/
public int deleteSignPatientManageRouteNodeByIds(Long[] ids);
/**
* 删除签约患者管理任务路径节点信息
*
* @param id 签约患者管理任务路径节点主键
* @return 结果
*/
public int deleteSignPatientManageRouteNodeById(Long id);
}

View File

@ -0,0 +1,89 @@
package com.xinelu.manage.service.signpatientmanageroutenode.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
import com.xinelu.manage.service.signpatientmanageroutenode.ISignPatientManageRouteNodeService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 签约患者管理任务路径节点Service业务层处理
*
* @author haown
* @date 2024-03-18
*/
@Service
public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManageRouteNodeService {
@Resource
private SignPatientManageRouteNodeMapper signPatientManageRouteNodeMapper;
/**
* 查询签约患者管理任务路径节点
*
* @param id 签约患者管理任务路径节点主键
* @return 签约患者管理任务路径节点
*/
@Override
public SignPatientManageRouteNode selectSignPatientManageRouteNodeById(Long id) {
return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeById(id);
}
/**
* 查询签约患者管理任务路径节点列表
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 签约患者管理任务路径节点
*/
@Override
public List<SignPatientManageRouteNode> selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode) {
return signPatientManageRouteNodeMapper.selectSignPatientManageRouteNodeList(signPatientManageRouteNode);
}
/**
* 新增签约患者管理任务路径节点
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 结果
*/
@Override
public int insertSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode) {
signPatientManageRouteNode.setCreateTime(DateUtils.getNowDate());
return signPatientManageRouteNodeMapper.insertSignPatientManageRouteNode(signPatientManageRouteNode);
}
/**
* 修改签约患者管理任务路径节点
*
* @param signPatientManageRouteNode 签约患者管理任务路径节点
* @return 结果
*/
@Override
public int updateSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode) {
signPatientManageRouteNode.setUpdateTime(DateUtils.getNowDate());
return signPatientManageRouteNodeMapper.updateSignPatientManageRouteNode(signPatientManageRouteNode);
}
/**
* 批量删除签约患者管理任务路径节点
*
* @param ids 需要删除的签约患者管理任务路径节点主键
* @return 结果
*/
@Override
public int deleteSignPatientManageRouteNodeByIds(Long[] ids) {
return signPatientManageRouteNodeMapper.deleteSignPatientManageRouteNodeByIds(ids);
}
/**
* 删除签约患者管理任务路径节点信息
*
* @param id 签约患者管理任务路径节点主键
* @return 结果
*/
@Override
public int deleteSignPatientManageRouteNodeById(Long id) {
return signPatientManageRouteNodeMapper.deleteSignPatientManageRouteNodeById(id);
}
}

View File

@ -19,18 +19,22 @@ public interface ISignPatientRecordService {
/**
* 根据签约编号查询居民签约信息
* @param id
* @return
* @param id 签约主键
* @return SignPatientInfoVo签约信息视图类
*/
SignPatientInfoVo getByRecordId(Long id);
/**
* 根据患者主键查询患者签约记录列表
* @param patientId
* @return
* @param patientId 患者主键
* @return 签约信息列表
*/
List<SignPatientRecordVo> getByPatient(Long patientId);
/**
* 签约/续约
* @param body:签约传输对象
*/
int add(SignPatientAddDto body);
int updateSignStatus(SignPatientStatusDto patientCancelSignDto);

View File

@ -2,32 +2,44 @@ package com.xinelu.manage.service.signpatientrecord.impl;
import com.xinelu.common.constant.PaymentStatusConstants;
import com.xinelu.common.constant.SignRecordServiceStatusConstants;
import com.xinelu.common.constant.TaskCreateTypeConstant;
import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.bean.BeanUtils;
import com.xinelu.manage.domain.patientinfo.PatientInfo;
import com.xinelu.manage.domain.servicepackage.ServicePackage;
import com.xinelu.manage.domain.signpatientinformed.SignPatientInformed;
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
import com.xinelu.manage.domain.signpatientmanageroutenode.SignPatientManageRouteNode;
import com.xinelu.manage.domain.signpatientpackage.SignPatientPackage;
import com.xinelu.manage.domain.signpatientpackagehardware.SignPatientPackageHardware;
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode;
import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute;
import com.xinelu.manage.dto.signpatientpackage.SignPatientPackageSaveDto;
import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto;
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.servicepackage.ServicePackageMapper;
import com.xinelu.manage.mapper.signpatientinformed.SignPatientInformedMapper;
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
import com.xinelu.manage.mapper.signpatientpackage.SignPatientPackageMapper;
import com.xinelu.manage.mapper.signpatientpackagehardware.SignPatientPackageHardwareMapper;
import com.xinelu.manage.mapper.signpatientrecord.SignPatientRecordMapper;
import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper;
import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper;
import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
import java.util.Calendar;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
@ -55,6 +67,16 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
private SignPatientPackageHardwareMapper signPatientPackageHardwareMapper;
@Resource
private SignPatientInformedMapper signPatientInformedMapper;
@Resource
private ServicePackageMapper servicePackageMapper;
@Resource
private SpecialDiseaseRouteMapper specialDiseaseRouteMapper;
@Resource
private SignPatientManageRouteMapper signPatientManageRouteMapper;
@Resource
private SpecialDiseaseNodeMapper specialDiseaseNodeMapper;
@Resource
private SignPatientManageRouteNodeMapper manageRouteNodeMapper;
@Override public List<SignPatientListVo> selectList(SignPatientListDto signPatientRecord) {
return signPatientRecordMapper.selectList(signPatientRecord);
@ -82,7 +104,10 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
@Override
@Transactional(rollbackFor = Exception.class)
public int add(SignPatientAddDto body) {
SignPatientPackage signPatientPackage = body.getSignPackage();
if (ObjectUtils.isEmpty(body.getSignPackage())) {
throw new ServiceException("请选择服务包");
}
SignPatientPackageSaveDto signPatientPackageDto = body.getSignPackage();
if (ObjectUtils.isNotEmpty(body.getRecord())) {
SignPatientRecord signPatientRecord = body.getRecord();
signPatientRecord.setId(null);
@ -98,53 +123,65 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
signPatientRecord.setPaymentStatus(PaymentStatusConstants.UNPAID_FEES);
signPatientRecord.setSignTime(DateUtils.getNowDate());
signPatientRecord.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN);
signPatientRecord.setPrice(signPatientPackageDto.getPackagePrice());
signPatientRecord.setCreateTime(DateUtils.getNowDate());
signPatientRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
// 保存签约记录
int flag = signPatientRecordMapper.insert(signPatientRecord);
if (signPatientPackage != null) {
signPatientRecord.setPrice(signPatientPackage.getPackagePrice());
} else {
throw new ServiceException("请选择服务包");
}
// 签约信息保存到患者表
patient.setSignPatientRecordId(signPatientRecord.getId());
patient.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN);
patient.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER);
patient.setSignTime(DateUtils.getNowDate());
patientInfoMapper.updatePatientInfo(patient);
// 保存签约记录
int flag = signPatientRecordMapper.insert(signPatientRecord);
if (flag > 0) {
// 保存签约服务包信息
if (signPatientPackage != null) {
signPatientPackage.setSignPatientRecordId(signPatientRecord.getId());
signPatientPackage.setPatientId(signPatientRecord.getPatientId());
signPatientPackage.setPackagePaymentStatus(PaymentStatusConstants.UNPAID_FEES);
if (signPatientPackage.getServiceStartTime() == null) {
signPatientPackage.setServiceStartTime(DateUtils.parseDate(DateFormatUtils.format(DateUtils.getNowDate(), "yyyy-MM-dd") + " 00:00:00"));
Calendar calendar = Calendar.getInstance();
// 将日期设置为1号每次计算都从第一天开始
calendar.setTime(DateUtils.getNowDate());
// 添加一个月
calendar.add(Calendar.MONTH, signPatientPackage.getServiceCycle());
// 再减去一天
calendar.add(Calendar.DATE, -1);
signPatientPackage.setServiceEndTime(DateUtils.parseDate(DateFormatUtils.format(calendar.getTime(), "yyyy-MM-dd") + " 23:59:59"));
} else {
signPatientPackage.setServiceStartTime(DateUtils.parseDate(DateFormatUtils.format(signPatientPackage.getServiceStartTime(), "yyyy-MM-dd") + " 00:00:00"));
if (signPatientPackage.getServiceStartTime() == null) {
Calendar calendar = Calendar.getInstance();
// 将日期设置为1号每次计算都从第一天开始
calendar.setTime(signPatientPackage.getServiceStartTime());
// 添加一个月
calendar.add(Calendar.MONTH, signPatientPackage.getServiceCycle());
// 再减去一天
calendar.add(Calendar.DATE, -1);
signPatientPackage.setServiceEndTime(DateUtils.parseDate(DateFormatUtils.format(calendar.getTime(), "yyyy-MM-dd") + " 23:59:59"));
} else {
signPatientPackage.setServiceEndTime(DateUtils.parseDate(DateFormatUtils.format(signPatientPackage.getServiceEndTime(), "yyyy-MM-dd") + " 23:59:59"));
}
ServicePackage servicePackage = servicePackageMapper.selectServicePackageById(signPatientPackageDto.getServicePackageId());
SignPatientPackage signPatientPackage = new SignPatientPackage();
BeanUtils.copyBeanProp(signPatientPackage, servicePackage);
// 服务开始时间服务结束时间
BeanUtils.copyBeanProp(signPatientPackage, signPatientPackageDto);
signPatientPackage.setSignPatientRecordId(signPatientRecord.getId());
signPatientPackage.setPatientId(signPatientRecord.getPatientId());
signPatientPackage.setPackagePaymentStatus(PaymentStatusConstants.UNPAID_FEES);
signPatientPackage.setCreateTime(DateUtils.getNowDate());
signPatientPackage.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
signPatientPackage.setId(null);
signPatientPackageMapper.insertSignPatientPackage(signPatientPackage);
// 保存管理路径
if (body.getRouteId() != null) {
SpecialDiseaseRoute specialDiseaseRoute = specialDiseaseRouteMapper.selectSpecialDiseaseRouteById(body.getRouteId());
SignPatientManageRoute signPatientManageRoute = new SignPatientManageRoute();
BeanUtils.copyBeanProp(signPatientManageRoute, specialDiseaseRoute);
signPatientManageRoute.setSignPatientRecordId(signPatientRecord.getId());
signPatientManageRoute.setRouteId(specialDiseaseRoute.getId());
signPatientManageRoute.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
signPatientManageRoute.setCreateTime(DateUtils.getNowDate());
signPatientManageRoute.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute);
// 保存管理节点
SpecialDiseaseNode specialDiseaseNode = new SpecialDiseaseNode();
specialDiseaseNode.setRouteId(body.getRouteId());
List<SpecialDiseaseNode> nodeList = specialDiseaseNodeMapper.selectSpecialDiseaseNodeList(specialDiseaseNode);
if (CollectionUtils.isEmpty(nodeList)) {
throw new ServiceException("该管理任务没有任务节点");
}
signPatientPackageMapper.insertSignPatientPackage(signPatientPackage);
List<SignPatientManageRouteNode> manageNodeList = nodeList.stream().map(node -> {
SignPatientManageRouteNode manageRouteNode = new SignPatientManageRouteNode();
BeanUtils.copyBeanProp(manageRouteNode, node);
manageRouteNode.setManageRouteId(body.getRouteId());
manageRouteNode.setCreateTime(DateUtils.getNowDate());
manageRouteNode.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName());
return manageRouteNode;
}).collect(Collectors.toList());
// 批量保存
manageRouteNodeMapper.insertBatch(manageNodeList);
// 保存触发条件
}
// 保存硬件
if (!CollectionUtils.isEmpty(body.getDevices())) {
for(SignPatientPackageHardware hardware : body.getDevices()) {
@ -189,8 +226,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
patient.setServiceStatus(patientCancelSignDto.getServiceStatus());
patientInfoMapper.updatePatientInfo(patient);
}
int flag = signPatientRecordMapper.updateByPrimaryKeySelective(signRecord);
return flag;
return signPatientRecordMapper.updateByPrimaryKeySelective(signRecord);
}
}

View File

@ -0,0 +1,61 @@
package com.xinelu.manage.service.signroutetriggercondition;
import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition;
import java.util.List;
/**
* 签约患者管理任务路径触发条件关系Service接口
*
* @author haown
* @date 2024-03-18
*/
public interface ISignRouteTriggerConditionService {
/**
* 查询签约患者管理任务路径触发条件关系
*
* @param id 签约患者管理任务路径触发条件关系主键
* @return 签约患者管理任务路径触发条件关系
*/
public SignRouteTriggerCondition selectSignRouteTriggerConditionById(Long id);
/**
* 查询签约患者管理任务路径触发条件关系列表
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 签约患者管理任务路径触发条件关系集合
*/
public List<SignRouteTriggerCondition> selectSignRouteTriggerConditionList(SignRouteTriggerCondition signRouteTriggerCondition);
/**
* 新增签约患者管理任务路径触发条件关系
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 结果
*/
public int insertSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition);
/**
* 修改签约患者管理任务路径触发条件关系
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 结果
*/
public int updateSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition);
/**
* 批量删除签约患者管理任务路径触发条件关系
*
* @param ids 需要删除的签约患者管理任务路径触发条件关系主键集合
* @return 结果
*/
public int deleteSignRouteTriggerConditionByIds(Long[] ids);
/**
* 删除签约患者管理任务路径触发条件关系信息
*
* @param id 签约患者管理任务路径触发条件关系主键
* @return 结果
*/
public int deleteSignRouteTriggerConditionById(Long id);
}

View File

@ -0,0 +1,89 @@
package com.xinelu.manage.service.signroutetriggercondition.impl;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.manage.domain.signroutetriggercondition.SignRouteTriggerCondition;
import com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper;
import com.xinelu.manage.service.signroutetriggercondition.ISignRouteTriggerConditionService;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/**
* 签约患者管理任务路径触发条件关系Service业务层处理
*
* @author haown
* @date 2024-03-18
*/
@Service
public class SignRouteTriggerConditionServiceImpl implements ISignRouteTriggerConditionService {
@Resource
private SignRouteTriggerConditionMapper signRouteTriggerConditionMapper;
/**
* 查询签约患者管理任务路径触发条件关系
*
* @param id 签约患者管理任务路径触发条件关系主键
* @return 签约患者管理任务路径触发条件关系
*/
@Override
public SignRouteTriggerCondition selectSignRouteTriggerConditionById(Long id) {
return signRouteTriggerConditionMapper.selectSignRouteTriggerConditionById(id);
}
/**
* 查询签约患者管理任务路径触发条件关系列表
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 签约患者管理任务路径触发条件关系
*/
@Override
public List<SignRouteTriggerCondition> selectSignRouteTriggerConditionList(SignRouteTriggerCondition signRouteTriggerCondition) {
return signRouteTriggerConditionMapper.selectSignRouteTriggerConditionList(signRouteTriggerCondition);
}
/**
* 新增签约患者管理任务路径触发条件关系
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 结果
*/
@Override
public int insertSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition) {
signRouteTriggerCondition.setCreateTime(DateUtils.getNowDate());
return signRouteTriggerConditionMapper.insertSignRouteTriggerCondition(signRouteTriggerCondition);
}
/**
* 修改签约患者管理任务路径触发条件关系
*
* @param signRouteTriggerCondition 签约患者管理任务路径触发条件关系
* @return 结果
*/
@Override
public int updateSignRouteTriggerCondition(SignRouteTriggerCondition signRouteTriggerCondition) {
signRouteTriggerCondition.setUpdateTime(DateUtils.getNowDate());
return signRouteTriggerConditionMapper.updateSignRouteTriggerCondition(signRouteTriggerCondition);
}
/**
* 批量删除签约患者管理任务路径触发条件关系
*
* @param ids 需要删除的签约患者管理任务路径触发条件关系主键
* @return 结果
*/
@Override
public int deleteSignRouteTriggerConditionByIds(Long[] ids) {
return signRouteTriggerConditionMapper.deleteSignRouteTriggerConditionByIds(ids);
}
/**
* 删除签约患者管理任务路径触发条件关系信息
*
* @param id 签约患者管理任务路径触发条件关系主键
* @return 结果
*/
@Override
public int deleteSignRouteTriggerConditionById(Long id) {
return signRouteTriggerConditionMapper.deleteSignRouteTriggerConditionById(id);
}
}

View File

@ -126,10 +126,23 @@ public class SignPatientInfoVo {
@ApiModelProperty(value = "签约状态在签IN_SIGN忽略IGNORE_SIGN解约SEPARATE_SIGN续约CONTINUOUS_SIGN过期EXPIRE_SIGN")
private String signStatus;
/**
* 健康管理师id
*/
@ApiModelProperty(value = "健康管理师id")
private Long healthManageId;
/**
* 健康管理师姓名
*/
@ApiModelProperty(value = "健康管理师姓名")
private String healthManageName;
@ApiModelProperty(value = "患者签约记录表id")
@Excel(name = "患者签约记录表id")
private Long signPatientRecordId;
// ------服务包相关begin
/** 服务包表id */
@ApiModelProperty(value = "服务包表id")
private Long servicePackageId;
@ -156,9 +169,17 @@ public class SignPatientInfoVo {
@JsonFormat(pattern = "yyyy-MM-dd")
private Date serviceEndTime;
/** 服务周期,单位是月 */
@ApiModelProperty(value = "服务周期,单位是月")
private Integer serviceCycle;
/**
* 服务包期限
*/
@ApiModelProperty(value = "服务包期限")
private Integer packageTerm;
/**
* 服务包期限单位
*/
@ApiModelProperty(value = "服务包期限单位,年,月,日")
private String packageTermUnit;
@ApiModelProperty(value = "签约硬件设备列表")
private List<SignPatientPackageHardware> signDevices;

View File

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xinelu.manage.mapper.patientvisitrecord.PatientVisitRecordMapper">
<resultMap type="PatientVisitRecord" id="PatientVisitRecordResult">
<resultMap type="com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord" id="PatientVisitRecordResult">
<result property="id" column="id"/>
<result property="patientId" column="patient_id"/>
<result property="cardNo" column="card_no"/>
@ -80,7 +80,7 @@
where id = #{id}
</select>
<insert id="insertPatientVisitRecord" parameterType="PatientVisitRecord" useGeneratedKeys="true"
<insert id="insertPatientVisitRecord" parameterType="com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord" useGeneratedKeys="true"
keyProperty="id">
insert into patient_visit_record
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -173,7 +173,7 @@
</trim>
</insert>
<update id="updatePatientVisitRecord" parameterType="PatientVisitRecord">
<update id="updatePatientVisitRecord" parameterType="com.xinelu.manage.domain.patientvisitrecord.PatientVisitRecord">
update patient_visit_record
<trim prefix="SET" suffixOverrides=",">
<if test="patientId != null">patient_id =

View File

@ -0,0 +1,269 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper">
<resultMap type="com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute" id="SignPatientManageRouteResult">
<result property="id" column="id"/>
<result property="signPatientRecordId" column="sign_patient_record_id"/>
<result property="patientId" column="patient_id"/>
<result property="patientName" column="patient_name"/>
<result property="departmentId" column="department_id"/>
<result property="departmentName" column="department_name"/>
<result property="servicePackageId" column="service_package_id"/>
<result property="packageName" column="package_name"/>
<result property="diseaseTypeId" column="disease_type_id"/>
<result property="diseaseTypeName" column="disease_type_name"/>
<result property="routeId" column="route_id"/>
<result property="routeName" column="route_name"/>
<result property="taskCreateType" column="task_create_type"/>
<result property="version" column="version"/>
<result property="routeClassify" column="route_classify"/>
<result property="suitRange" column="suit_range"/>
<result property="routeSort" column="route_sort"/>
<result property="routeRemark" column="route_remark"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectSignPatientManageRouteVo">
select id, sign_patient_record_id, patient_id, patient_name, department_id, department_name, service_package_id, package_name, disease_type_id, disease_type_name, route_id, route_name, task_create_type, version, route_classify, suit_range, route_sort, route_remark, create_by, create_time, update_by, update_time from sign_patient_manage_route
</sql>
<select id="selectSignPatientManageRouteList" parameterType="com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute" resultMap="SignPatientManageRouteResult">
<include refid="selectSignPatientManageRouteVo"/>
<where>
<if test="signPatientRecordId != null ">
and sign_patient_record_id = #{signPatientRecordId}
</if>
<if test="patientId != null ">
and patient_id = #{patientId}
</if>
<if test="patientName != null and patientName != ''">
and patient_name like concat('%', #{patientName}, '%')
</if>
<if test="departmentId != null ">
and department_id = #{departmentId}
</if>
<if test="departmentName != null and departmentName != ''">
and department_name like concat('%', #{departmentName}, '%')
</if>
<if test="servicePackageId != null ">
and service_package_id = #{servicePackageId}
</if>
<if test="packageName != null and packageName != ''">
and package_name like concat('%', #{packageName}, '%')
</if>
<if test="diseaseTypeId != null ">
and disease_type_id = #{diseaseTypeId}
</if>
<if test="diseaseTypeName != null and diseaseTypeName != ''">
and disease_type_name like concat('%', #{diseaseTypeName}, '%')
</if>
<if test="routeName != null and routeName != ''">
and route_name like concat('%', #{routeName}, '%')
</if>
<if test="taskCreateType != null and taskCreateType != ''">
and task_create_type = #{taskCreateType}
</if>
<if test="version != null and version != ''">
and version = #{version}
</if>
<if test="routeClassify != null and routeClassify != ''">
and route_classify = #{routeClassify}
</if>
<if test="suitRange != null and suitRange != ''">
and suit_range = #{suitRange}
</if>
<if test="routeSort != null ">
and route_sort = #{routeSort}
</if>
<if test="routeRemark != null and routeRemark != ''">
and route_remark = #{routeRemark}
</if>
</where>
</select>
<select id="selectSignPatientManageRouteById" parameterType="Long"
resultMap="SignPatientManageRouteResult">
<include refid="selectSignPatientManageRouteVo"/>
where id = #{id}
</select>
<insert id="insertSignPatientManageRoute" parameterType="com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute" useGeneratedKeys="true"
keyProperty="id">
insert into sign_patient_manage_route
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="signPatientRecordId != null">sign_patient_record_id,
</if>
<if test="patientId != null">patient_id,
</if>
<if test="patientName != null">patient_name,
</if>
<if test="departmentId != null">department_id,
</if>
<if test="departmentName != null">department_name,
</if>
<if test="servicePackageId != null">service_package_id,
</if>
<if test="packageName != null">package_name,
</if>
<if test="diseaseTypeId != null">disease_type_id,
</if>
<if test="diseaseTypeName != null">disease_type_name,
</if>
<if test="routeId != null">route_id,
</if>
<if test="routeName != null">route_name,
</if>
<if test="taskCreateType != null">task_create_type,
</if>
<if test="version != null">version,
</if>
<if test="routeClassify != null">route_classify,
</if>
<if test="suitRange != null">suit_range,
</if>
<if test="routeSort != null">route_sort,
</if>
<if test="routeRemark != null">route_remark,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="signPatientRecordId != null">#{signPatientRecordId},
</if>
<if test="patientId != null">#{patientId},
</if>
<if test="patientName != null">#{patientName},
</if>
<if test="departmentId != null">#{departmentId},
</if>
<if test="departmentName != null">#{departmentName},
</if>
<if test="servicePackageId != null">#{servicePackageId},
</if>
<if test="packageName != null">#{packageName},
</if>
<if test="diseaseTypeId != null">#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">#{diseaseTypeName},
</if>
<if test="routeId != null">#{routeId},
</if>
<if test="routeName != null">#{routeName},
</if>
<if test="taskCreateType != null">#{taskCreateType},
</if>
<if test="version != null">#{version},
</if>
<if test="routeClassify != null">#{routeClassify},
</if>
<if test="suitRange != null">#{suitRange},
</if>
<if test="routeSort != null">#{routeSort},
</if>
<if test="routeRemark != null">#{routeRemark},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<update id="updateSignPatientManageRoute" parameterType="com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute">
update sign_patient_manage_route
<trim prefix="SET" suffixOverrides=",">
<if test="signPatientRecordId != null">sign_patient_record_id =
#{signPatientRecordId},
</if>
<if test="patientId != null">patient_id =
#{patientId},
</if>
<if test="patientName != null">patient_name =
#{patientName},
</if>
<if test="departmentId != null">department_id =
#{departmentId},
</if>
<if test="departmentName != null">department_name =
#{departmentName},
</if>
<if test="servicePackageId != null">service_package_id =
#{servicePackageId},
</if>
<if test="packageName != null">package_name =
#{packageName},
</if>
<if test="diseaseTypeId != null">disease_type_id =
#{diseaseTypeId},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
<if test="routeId != null">route_id =
#{routeId},
</if>
<if test="routeName != null">route_name =
#{routeName},
</if>
<if test="taskCreateType != null">task_create_type =
#{taskCreateType},
</if>
<if test="version != null">version =
#{version},
</if>
<if test="routeClassify != null">route_classify =
#{routeClassify},
</if>
<if test="suitRange != null">suit_range =
#{suitRange},
</if>
<if test="routeSort != null">route_sort =
#{routeSort},
</if>
<if test="routeRemark != null">route_remark =
#{routeRemark},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSignPatientManageRouteById" parameterType="Long">
delete from sign_patient_manage_route where id = #{id}
</delete>
<delete id="deleteSignPatientManageRouteByIds" parameterType="String">
delete from sign_patient_manage_route where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,708 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper">
<resultMap type="SignPatientManageRouteNode" id="SignPatientManageRouteNodeResult">
<result property="id" column="id"/>
<result property="manageRouteId" column="manage_route_id"/>
<result property="manageRouteName" column="manage_route_name"/>
<result property="routeNodeName" column="route_node_name"/>
<result property="routeNodeDay" column="route_node_day"/>
<result property="taskType" column="task_type"/>
<result property="taskStatus" column="task_status"/>
<result property="taskSubdivision" column="task_subdivision"/>
<result property="secondClassifyDescribe" column="second_classify_describe"/>
<result property="executeTime" column="execute_time"/>
<result property="phonePushSign" column="phone_push_sign"/>
<result property="phoneId" column="phone_id"/>
<result property="phoneTemplateId" column="phone_template_id"/>
<result property="phoneTemplateName" column="phone_template_name"/>
<result property="phoneNodeContent" column="phone_node_content"/>
<result property="phoneRedialTimes" column="phone_redial_times"/>
<result property="phoneTimeInterval" column="phone_time_interval"/>
<result property="phoneMessageRemind" column="phone_message_remind"/>
<result property="phoneMessageTemplateId" column="phone_message_template_id"/>
<result property="phoneMessageTemplateName" column="phone_message_template_name"/>
<result property="questionInfoId" column="question_info_id"/>
<result property="questionnaireName" column="questionnaire_name"/>
<result property="questionnaireContent" column="questionnaire_content"/>
<result property="questionExpirationDate" column="question_expiration_date"/>
<result property="propagandaInfoId" column="propaganda_info_id"/>
<result property="propagandaTitle" column="propaganda_title"/>
<result property="propagandaContent" column="propaganda_content"/>
<result property="messagePushSign" column="message_push_sign"/>
<result property="messageTemplateId" column="message_template__id"/>
<result property="messageTemplateName" column="message_template_name"/>
<result property="messagePreview" column="message_preview"/>
<result property="messageNodeContent" column="message_node_content"/>
<result property="officialPushSign" column="official_push_sign"/>
<result property="officialTemplateId" column="official_template_id"/>
<result property="officialTemplateName" column="official_template_name"/>
<result property="officialRemindContent" column="official_remind_content"/>
<result property="officialNodeContent" column="official_node_content"/>
<result property="appletPushSign" column="applet_push_sign"/>
<result property="appletTemplateId" column="applet_template_id"/>
<result property="appletTemplateName" column="applet_template_name"/>
<result property="appletRemindContent" column="applet_remind_content"/>
<result property="appletPromptDescription" column="applet_prompt_description"/>
<result property="appletNodeContent" column="applet_node_content"/>
<result property="followTemplateId" column="follow_template_id"/>
<result property="followTemplateName" column="follow_template_name"/>
<result property="followContent" column="follow_content"/>
<result property="routeCheckStatus" column="route_check_status"/>
<result property="routeCheckPerson" column="route_check_person"/>
<result property="routeCheckDate" column="route_check_date"/>
<result property="routeCheckRemark" column="route_check_remark"/>
<result property="routeNodeRemark" column="route_node_remark"/>
<result property="nodeExecuteStatus" column="node_execute_status"/>
<result property="routeHandleRemark" column="route_handle_remark"/>
<result property="routeHandleId" column="route_handle_id"/>
<result property="routeHandlePerson" column="route_handle_person"/>
<result property="routeLink" column="route_link"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectSignPatientManageRouteNodeVo">
select id, manage_route_id, manage_route_name, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe, execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id, phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign, message_template__id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content, official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id, follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark, route_handle_id, route_handle_person, route_link, create_by, create_time, update_by, update_time from sign_patient_manage_route_node
</sql>
<select id="selectSignPatientManageRouteNodeList" parameterType="SignPatientManageRouteNode" resultMap="SignPatientManageRouteNodeResult">
<include refid="selectSignPatientManageRouteNodeVo"/>
<where>
<if test="manageRouteId != null ">
and manage_route_id = #{manageRouteId}
</if>
<if test="manageRouteName != null and manageRouteName != ''">
and manage_route_name like concat('%', #{manageRouteName}, '%')
</if>
<if test="routeNodeName != null and routeNodeName != ''">
and route_node_name like concat('%', #{routeNodeName}, '%')
</if>
<if test="routeNodeDay != null ">
and route_node_day = #{routeNodeDay}
</if>
<if test="taskType != null and taskType != ''">
and task_type = #{taskType}
</if>
<if test="taskStatus != null and taskStatus != ''">
and task_status = #{taskStatus}
</if>
<if test="taskSubdivision != null and taskSubdivision != ''">
and task_subdivision = #{taskSubdivision}
</if>
<if test="secondClassifyDescribe != null and secondClassifyDescribe != ''">
and second_classify_describe = #{secondClassifyDescribe}
</if>
<if test="executeTime != null ">
and execute_time = #{executeTime}
</if>
<if test="phonePushSign != null ">
and phone_push_sign = #{phonePushSign}
</if>
<if test="phoneId != null ">
and phone_id = #{phoneId}
</if>
<if test="phoneTemplateId != null and phoneTemplateId != ''">
and phone_template_id = #{phoneTemplateId}
</if>
<if test="phoneTemplateName != null and phoneTemplateName != ''">
and phone_template_name like concat('%', #{phoneTemplateName}, '%')
</if>
<if test="phoneNodeContent != null and phoneNodeContent != ''">
and phone_node_content = #{phoneNodeContent}
</if>
<if test="phoneRedialTimes != null and phoneRedialTimes != ''">
and phone_redial_times = #{phoneRedialTimes}
</if>
<if test="phoneTimeInterval != null ">
and phone_time_interval = #{phoneTimeInterval}
</if>
<if test="phoneMessageRemind != null and phoneMessageRemind != ''">
and phone_message_remind = #{phoneMessageRemind}
</if>
<if test="phoneMessageTemplateId != null ">
and phone_message_template_id = #{phoneMessageTemplateId}
</if>
<if test="phoneMessageTemplateName != null and phoneMessageTemplateName != ''">
and phone_message_template_name like concat('%', #{phoneMessageTemplateName}, '%')
</if>
<if test="questionInfoId != null ">
and question_info_id = #{questionInfoId}
</if>
<if test="questionnaireName != null and questionnaireName != ''">
and questionnaire_name like concat('%', #{questionnaireName}, '%')
</if>
<if test="questionnaireContent != null and questionnaireContent != ''">
and questionnaire_content = #{questionnaireContent}
</if>
<if test="questionExpirationDate != null ">
and question_expiration_date = #{questionExpirationDate}
</if>
<if test="propagandaInfoId != null ">
and propaganda_info_id = #{propagandaInfoId}
</if>
<if test="propagandaTitle != null and propagandaTitle != ''">
and propaganda_title = #{propagandaTitle}
</if>
<if test="propagandaContent != null and propagandaContent != ''">
and propaganda_content = #{propagandaContent}
</if>
<if test="messagePushSign != null ">
and message_push_sign = #{messagePushSign}
</if>
<if test="messageTemplateId != null ">
and message_template__id = #{messageTemplateId}
</if>
<if test="messageTemplateName != null and messageTemplateName != ''">
and message_template_name like concat('%', #{messageTemplateName}, '%')
</if>
<if test="messagePreview != null and messagePreview != ''">
and message_preview = #{messagePreview}
</if>
<if test="messageNodeContent != null and messageNodeContent != ''">
and message_node_content = #{messageNodeContent}
</if>
<if test="officialPushSign != null ">
and official_push_sign = #{officialPushSign}
</if>
<if test="officialTemplateId != null ">
and official_template_id = #{officialTemplateId}
</if>
<if test="officialTemplateName != null and officialTemplateName != ''">
and official_template_name like concat('%', #{officialTemplateName}, '%')
</if>
<if test="officialRemindContent != null and officialRemindContent != ''">
and official_remind_content = #{officialRemindContent}
</if>
<if test="officialNodeContent != null and officialNodeContent != ''">
and official_node_content = #{officialNodeContent}
</if>
<if test="appletPushSign != null ">
and applet_push_sign = #{appletPushSign}
</if>
<if test="appletTemplateId != null ">
and applet_template_id = #{appletTemplateId}
</if>
<if test="appletTemplateName != null and appletTemplateName != ''">
and applet_template_name like concat('%', #{appletTemplateName}, '%')
</if>
<if test="appletRemindContent != null and appletRemindContent != ''">
and applet_remind_content = #{appletRemindContent}
</if>
<if test="appletPromptDescription != null and appletPromptDescription != ''">
and applet_prompt_description = #{appletPromptDescription}
</if>
<if test="appletNodeContent != null and appletNodeContent != ''">
and applet_node_content = #{appletNodeContent}
</if>
<if test="followTemplateId != null ">
and follow_template_id = #{followTemplateId}
</if>
<if test="followTemplateName != null and followTemplateName != ''">
and follow_template_name like concat('%', #{followTemplateName}, '%')
</if>
<if test="followContent != null and followContent != ''">
and follow_content = #{followContent}
</if>
<if test="routeCheckStatus != null and routeCheckStatus != ''">
and route_check_status = #{routeCheckStatus}
</if>
<if test="routeCheckPerson != null and routeCheckPerson != ''">
and route_check_person = #{routeCheckPerson}
</if>
<if test="routeCheckDate != null ">
and route_check_date = #{routeCheckDate}
</if>
<if test="routeCheckRemark != null and routeCheckRemark != ''">
and route_check_remark = #{routeCheckRemark}
</if>
<if test="routeNodeRemark != null and routeNodeRemark != ''">
and route_node_remark = #{routeNodeRemark}
</if>
<if test="nodeExecuteStatus != null and nodeExecuteStatus != ''">
and node_execute_status = #{nodeExecuteStatus}
</if>
<if test="routeHandleRemark != null and routeHandleRemark != ''">
and route_handle_remark = #{routeHandleRemark}
</if>
<if test="routeHandleId != null ">
and route_handle_id = #{routeHandleId}
</if>
<if test="routeHandlePerson != null and routeHandlePerson != ''">
and route_handle_person = #{routeHandlePerson}
</if>
<if test="routeLink != null and routeLink != ''">
and route_link = #{routeLink}
</if>
</where>
</select>
<select id="selectSignPatientManageRouteNodeById" parameterType="Long"
resultMap="SignPatientManageRouteNodeResult">
<include refid="selectSignPatientManageRouteNodeVo"/>
where id = #{id}
</select>
<insert id="insertSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode" useGeneratedKeys="true"
keyProperty="id">
insert into sign_patient_manage_route_node
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="manageRouteId != null">manage_route_id,
</if>
<if test="manageRouteName != null">manage_route_name,
</if>
<if test="routeNodeName != null">route_node_name,
</if>
<if test="routeNodeDay != null">route_node_day,
</if>
<if test="taskType != null">task_type,
</if>
<if test="taskStatus != null">task_status,
</if>
<if test="taskSubdivision != null">task_subdivision,
</if>
<if test="secondClassifyDescribe != null">second_classify_describe,
</if>
<if test="executeTime != null">execute_time,
</if>
<if test="phonePushSign != null">phone_push_sign,
</if>
<if test="phoneId != null">phone_id,
</if>
<if test="phoneTemplateId != null">phone_template_id,
</if>
<if test="phoneTemplateName != null">phone_template_name,
</if>
<if test="phoneNodeContent != null">phone_node_content,
</if>
<if test="phoneRedialTimes != null">phone_redial_times,
</if>
<if test="phoneTimeInterval != null">phone_time_interval,
</if>
<if test="phoneMessageRemind != null">phone_message_remind,
</if>
<if test="phoneMessageTemplateId != null">phone_message_template_id,
</if>
<if test="phoneMessageTemplateName != null">phone_message_template_name,
</if>
<if test="questionInfoId != null">question_info_id,
</if>
<if test="questionnaireName != null">questionnaire_name,
</if>
<if test="questionnaireContent != null">questionnaire_content,
</if>
<if test="questionExpirationDate != null">question_expiration_date,
</if>
<if test="propagandaInfoId != null">propaganda_info_id,
</if>
<if test="propagandaTitle != null">propaganda_title,
</if>
<if test="propagandaContent != null">propaganda_content,
</if>
<if test="messagePushSign != null">message_push_sign,
</if>
<if test="messageTemplateId != null">message_template__id,
</if>
<if test="messageTemplateName != null">message_template_name,
</if>
<if test="messagePreview != null">message_preview,
</if>
<if test="messageNodeContent != null">message_node_content,
</if>
<if test="officialPushSign != null">official_push_sign,
</if>
<if test="officialTemplateId != null">official_template_id,
</if>
<if test="officialTemplateName != null">official_template_name,
</if>
<if test="officialRemindContent != null">official_remind_content,
</if>
<if test="officialNodeContent != null">official_node_content,
</if>
<if test="appletPushSign != null">applet_push_sign,
</if>
<if test="appletTemplateId != null">applet_template_id,
</if>
<if test="appletTemplateName != null">applet_template_name,
</if>
<if test="appletRemindContent != null">applet_remind_content,
</if>
<if test="appletPromptDescription != null">applet_prompt_description,
</if>
<if test="appletNodeContent != null">applet_node_content,
</if>
<if test="followTemplateId != null">follow_template_id,
</if>
<if test="followTemplateName != null">follow_template_name,
</if>
<if test="followContent != null">follow_content,
</if>
<if test="routeCheckStatus != null">route_check_status,
</if>
<if test="routeCheckPerson != null">route_check_person,
</if>
<if test="routeCheckDate != null">route_check_date,
</if>
<if test="routeCheckRemark != null">route_check_remark,
</if>
<if test="routeNodeRemark != null">route_node_remark,
</if>
<if test="nodeExecuteStatus != null">node_execute_status,
</if>
<if test="routeHandleRemark != null">route_handle_remark,
</if>
<if test="routeHandleId != null">route_handle_id,
</if>
<if test="routeHandlePerson != null">route_handle_person,
</if>
<if test="routeLink != null">route_link,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="manageRouteId != null">#{manageRouteId},
</if>
<if test="manageRouteName != null">#{manageRouteName},
</if>
<if test="routeNodeName != null">#{routeNodeName},
</if>
<if test="routeNodeDay != null">#{routeNodeDay},
</if>
<if test="taskType != null">#{taskType},
</if>
<if test="taskStatus != null">#{taskStatus},
</if>
<if test="taskSubdivision != null">#{taskSubdivision},
</if>
<if test="secondClassifyDescribe != null">#{secondClassifyDescribe},
</if>
<if test="executeTime != null">#{executeTime},
</if>
<if test="phonePushSign != null">#{phonePushSign},
</if>
<if test="phoneId != null">#{phoneId},
</if>
<if test="phoneTemplateId != null">#{phoneTemplateId},
</if>
<if test="phoneTemplateName != null">#{phoneTemplateName},
</if>
<if test="phoneNodeContent != null">#{phoneNodeContent},
</if>
<if test="phoneRedialTimes != null">#{phoneRedialTimes},
</if>
<if test="phoneTimeInterval != null">#{phoneTimeInterval},
</if>
<if test="phoneMessageRemind != null">#{phoneMessageRemind},
</if>
<if test="phoneMessageTemplateId != null">#{phoneMessageTemplateId},
</if>
<if test="phoneMessageTemplateName != null">#{phoneMessageTemplateName},
</if>
<if test="questionInfoId != null">#{questionInfoId},
</if>
<if test="questionnaireName != null">#{questionnaireName},
</if>
<if test="questionnaireContent != null">#{questionnaireContent},
</if>
<if test="questionExpirationDate != null">#{questionExpirationDate},
</if>
<if test="propagandaInfoId != null">#{propagandaInfoId},
</if>
<if test="propagandaTitle != null">#{propagandaTitle},
</if>
<if test="propagandaContent != null">#{propagandaContent},
</if>
<if test="messagePushSign != null">#{messagePushSign},
</if>
<if test="messageTemplateId != null">#{messageTemplateId},
</if>
<if test="messageTemplateName != null">#{messageTemplateName},
</if>
<if test="messagePreview != null">#{messagePreview},
</if>
<if test="messageNodeContent != null">#{messageNodeContent},
</if>
<if test="officialPushSign != null">#{officialPushSign},
</if>
<if test="officialTemplateId != null">#{officialTemplateId},
</if>
<if test="officialTemplateName != null">#{officialTemplateName},
</if>
<if test="officialRemindContent != null">#{officialRemindContent},
</if>
<if test="officialNodeContent != null">#{officialNodeContent},
</if>
<if test="appletPushSign != null">#{appletPushSign},
</if>
<if test="appletTemplateId != null">#{appletTemplateId},
</if>
<if test="appletTemplateName != null">#{appletTemplateName},
</if>
<if test="appletRemindContent != null">#{appletRemindContent},
</if>
<if test="appletPromptDescription != null">#{appletPromptDescription},
</if>
<if test="appletNodeContent != null">#{appletNodeContent},
</if>
<if test="followTemplateId != null">#{followTemplateId},
</if>
<if test="followTemplateName != null">#{followTemplateName},
</if>
<if test="followContent != null">#{followContent},
</if>
<if test="routeCheckStatus != null">#{routeCheckStatus},
</if>
<if test="routeCheckPerson != null">#{routeCheckPerson},
</if>
<if test="routeCheckDate != null">#{routeCheckDate},
</if>
<if test="routeCheckRemark != null">#{routeCheckRemark},
</if>
<if test="routeNodeRemark != null">#{routeNodeRemark},
</if>
<if test="nodeExecuteStatus != null">#{nodeExecuteStatus},
</if>
<if test="routeHandleRemark != null">#{routeHandleRemark},
</if>
<if test="routeHandleId != null">#{routeHandleId},
</if>
<if test="routeHandlePerson != null">#{routeHandlePerson},
</if>
<if test="routeLink != null">#{routeLink},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<insert id="insertBatch">
insert into sign_patient_manage_route_node(manage_route_id, manage_route_name, route_node_name, route_node_day, task_type, task_status, task_subdivision, second_classify_describe,
execute_time, phone_push_sign, phone_id, phone_template_id, phone_template_name, phone_node_content, phone_redial_times, phone_time_interval, phone_message_remind, phone_message_template_id,
phone_message_template_name, question_info_id, questionnaire_name, questionnaire_content, question_expiration_date, propaganda_info_id, propaganda_title, propaganda_content, message_push_sign,
message_template__id, message_template_name, message_preview, message_node_content, official_push_sign, official_template_id, official_template_name, official_remind_content,
official_node_content, applet_push_sign, applet_template_id, applet_template_name, applet_remind_content, applet_prompt_description, applet_node_content, follow_template_id,
follow_template_name, follow_content, route_check_status, route_check_person, route_check_date, route_check_remark, route_node_remark, node_execute_status, route_handle_remark,
route_handle_id, route_handle_person, route_link, create_by, create_time, update_by, update_time)
values
<foreach collection="nodeList" item="item" separator=",">
(#{item.manageRouteId},#{item.manageRouteName},#{item.routeNodeName},#{item.routeNodeDay},#{item.taskType},#{item.taskStatus},#{item.taskSubdivision},#{item.secondClassifyDescribe},
#{item.executeTime},#{item.phonePushSign},#{item.phoneId},#{item.phoneTemplateId},#{item.phoneTemplateName},#{item.phoneNodeContent},#{item.phoneRedialTimes},#{item.phoneTimeInterval},#{item.phoneMessageRemind},#{item.phoneMessageTemplateId},#{item.phoneMessageTemplateName},
#{item.questionInfoId},#{item.questionnaireName},#{item.questionnaireContent},#{item.questionExpirationDate},#{item.propagandaInfoId},#{item.propagandaTitle},#{item.propagandaContent},#{item.messagePushSign},#{item.messageTemplateId},
#{item.messageTemplateName},#{item.messagePreview},#{item.messageNodeContent},#{item.officialPushSign},#{item.officialTemplateId},#{item.officialTemplateName},#{item.officialRemindContent},#{item.officialNodeContent},
#{item.appletPushSign},#{item.appletTemplateId},#{item.appletTemplateName},#{item.appletRemindContent},#{item.appletPromptDescription},#{item.appletNodeContent},#{item.followTemplateId},
#{item.followTemplateName},#{item.followContent},#{item.routeCheckStatus},#{item.routeCheckPerson},#{item.routeCheckDate},#{item.routeCheckRemark},#{item.routeNodeRemark},#{item.nodeExecuteStatus},#{item.routeHandleRemark},
#{item.routeHandleId},#{item.routeHandlePerson},#{item.routeLink},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime})
</foreach>
</insert>
<update id="updateSignPatientManageRouteNode" parameterType="SignPatientManageRouteNode">
update sign_patient_manage_route_node
<trim prefix="SET" suffixOverrides=",">
<if test="manageRouteId != null">manage_route_id =
#{manageRouteId},
</if>
<if test="manageRouteName != null">manage_route_name =
#{manageRouteName},
</if>
<if test="routeNodeName != null">route_node_name =
#{routeNodeName},
</if>
<if test="routeNodeDay != null">route_node_day =
#{routeNodeDay},
</if>
<if test="taskType != null">task_type =
#{taskType},
</if>
<if test="taskStatus != null">task_status =
#{taskStatus},
</if>
<if test="taskSubdivision != null">task_subdivision =
#{taskSubdivision},
</if>
<if test="secondClassifyDescribe != null">second_classify_describe =
#{secondClassifyDescribe},
</if>
<if test="executeTime != null">execute_time =
#{executeTime},
</if>
<if test="phonePushSign != null">phone_push_sign =
#{phonePushSign},
</if>
<if test="phoneId != null">phone_id =
#{phoneId},
</if>
<if test="phoneTemplateId != null">phone_template_id =
#{phoneTemplateId},
</if>
<if test="phoneTemplateName != null">phone_template_name =
#{phoneTemplateName},
</if>
<if test="phoneNodeContent != null">phone_node_content =
#{phoneNodeContent},
</if>
<if test="phoneRedialTimes != null">phone_redial_times =
#{phoneRedialTimes},
</if>
<if test="phoneTimeInterval != null">phone_time_interval =
#{phoneTimeInterval},
</if>
<if test="phoneMessageRemind != null">phone_message_remind =
#{phoneMessageRemind},
</if>
<if test="phoneMessageTemplateId != null">phone_message_template_id =
#{phoneMessageTemplateId},
</if>
<if test="phoneMessageTemplateName != null">phone_message_template_name =
#{phoneMessageTemplateName},
</if>
<if test="questionInfoId != null">question_info_id =
#{questionInfoId},
</if>
<if test="questionnaireName != null">questionnaire_name =
#{questionnaireName},
</if>
<if test="questionnaireContent != null">questionnaire_content =
#{questionnaireContent},
</if>
<if test="questionExpirationDate != null">question_expiration_date =
#{questionExpirationDate},
</if>
<if test="propagandaInfoId != null">propaganda_info_id =
#{propagandaInfoId},
</if>
<if test="propagandaTitle != null">propaganda_title =
#{propagandaTitle},
</if>
<if test="propagandaContent != null">propaganda_content =
#{propagandaContent},
</if>
<if test="messagePushSign != null">message_push_sign =
#{messagePushSign},
</if>
<if test="messageTemplateId != null">message_template__id =
#{messageTemplateId},
</if>
<if test="messageTemplateName != null">message_template_name =
#{messageTemplateName},
</if>
<if test="messagePreview != null">message_preview =
#{messagePreview},
</if>
<if test="messageNodeContent != null">message_node_content =
#{messageNodeContent},
</if>
<if test="officialPushSign != null">official_push_sign =
#{officialPushSign},
</if>
<if test="officialTemplateId != null">official_template_id =
#{officialTemplateId},
</if>
<if test="officialTemplateName != null">official_template_name =
#{officialTemplateName},
</if>
<if test="officialRemindContent != null">official_remind_content =
#{officialRemindContent},
</if>
<if test="officialNodeContent != null">official_node_content =
#{officialNodeContent},
</if>
<if test="appletPushSign != null">applet_push_sign =
#{appletPushSign},
</if>
<if test="appletTemplateId != null">applet_template_id =
#{appletTemplateId},
</if>
<if test="appletTemplateName != null">applet_template_name =
#{appletTemplateName},
</if>
<if test="appletRemindContent != null">applet_remind_content =
#{appletRemindContent},
</if>
<if test="appletPromptDescription != null">applet_prompt_description =
#{appletPromptDescription},
</if>
<if test="appletNodeContent != null">applet_node_content =
#{appletNodeContent},
</if>
<if test="followTemplateId != null">follow_template_id =
#{followTemplateId},
</if>
<if test="followTemplateName != null">follow_template_name =
#{followTemplateName},
</if>
<if test="followContent != null">follow_content =
#{followContent},
</if>
<if test="routeCheckStatus != null">route_check_status =
#{routeCheckStatus},
</if>
<if test="routeCheckPerson != null">route_check_person =
#{routeCheckPerson},
</if>
<if test="routeCheckDate != null">route_check_date =
#{routeCheckDate},
</if>
<if test="routeCheckRemark != null">route_check_remark =
#{routeCheckRemark},
</if>
<if test="routeNodeRemark != null">route_node_remark =
#{routeNodeRemark},
</if>
<if test="nodeExecuteStatus != null">node_execute_status =
#{nodeExecuteStatus},
</if>
<if test="routeHandleRemark != null">route_handle_remark =
#{routeHandleRemark},
</if>
<if test="routeHandleId != null">route_handle_id =
#{routeHandleId},
</if>
<if test="routeHandlePerson != null">route_handle_person =
#{routeHandlePerson},
</if>
<if test="routeLink != null">route_link =
#{routeLink},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSignPatientManageRouteNodeById" parameterType="Long">
delete from sign_patient_manage_route_node where id = #{id}
</delete>
<delete id="deleteSignPatientManageRouteNodeByIds" parameterType="String">
delete from sign_patient_manage_route_node where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -401,10 +401,12 @@
sign.campus_agency_name,sign.department_name,
sign.ward_name,sign.visit_serial_number,
sign.visit_method,sign.in_hospital_number,sign.sign_diagnosis,sign.review_diagnosis,
sign.service_status,sign.sign_status,sign.payment_status,sign.price,
p.service_package_id, p.package_name, p.package_payment_status, p.package_price, p.service_start_time, p.service_end_time, p.service_cycle
sign.service_status,sign.sign_status,sign.payment_status,sign.price,sign.health_manage_id,sign.health_manage_name,
p.service_package_id, p.package_name, p.package_payment_status, p.package_price, p.service_start_time, p.service_end_time,
p.package_term, p.package_term_unit, route.route_id, route.route_name
from sign_patient_record sign
left join sign_patient_package p on p.sign_patient_record_id = sign.id
left join sign_patient_manage_route route on route.sign_patient_record_id = sign.id
<where>
sign.del_flag = 0 and sign.id = #{id}
</where>

View File

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xinelu.manage.mapper.signroutetriggercondition.SignRouteTriggerConditionMapper">
<resultMap type="SignRouteTriggerCondition" id="SignRouteTriggerConditionResult">
<result property="id" column="id"/>
<result property="patientManageRouteId" column="patient_manage_route_id"/>
<result property="routeName" column="route_name"/>
<result property="triggerConditionCode" column="trigger_condition_code"/>
<result property="triggerConditionName" column="trigger_condition_name"/>
<result property="triggerConditionOperator" column="trigger_condition_operator"/>
<result property="triggerConditionValue" column="trigger_condition_value"/>
<result property="triggerConditionSort" column="trigger_condition_sort"/>
<result property="triggerConditionRemark" column="trigger_condition_remark"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectSignRouteTriggerConditionVo">
select id, patient_manage_route_id, route_name, trigger_condition_code, trigger_condition_name, trigger_condition_operator, trigger_condition_value, trigger_condition_sort, trigger_condition_remark, create_by, create_time, update_by, update_time from sign_route_trigger_condition
</sql>
<select id="selectSignRouteTriggerConditionList" parameterType="SignRouteTriggerCondition" resultMap="SignRouteTriggerConditionResult">
<include refid="selectSignRouteTriggerConditionVo"/>
<where>
<if test="patientManageRouteId != null ">
and patient_manage_route_id = #{patientManageRouteId}
</if>
<if test="routeName != null and routeName != ''">
and route_name like concat('%', #{routeName}, '%')
</if>
<if test="triggerConditionCode != null and triggerConditionCode != ''">
and trigger_condition_code = #{triggerConditionCode}
</if>
<if test="triggerConditionName != null and triggerConditionName != ''">
and trigger_condition_name like concat('%', #{triggerConditionName}, '%')
</if>
<if test="triggerConditionOperator != null and triggerConditionOperator != ''">
and trigger_condition_operator = #{triggerConditionOperator}
</if>
<if test="triggerConditionValue != null and triggerConditionValue != ''">
and trigger_condition_value = #{triggerConditionValue}
</if>
<if test="triggerConditionSort != null ">
and trigger_condition_sort = #{triggerConditionSort}
</if>
<if test="triggerConditionRemark != null and triggerConditionRemark != ''">
and trigger_condition_remark = #{triggerConditionRemark}
</if>
</where>
</select>
<select id="selectSignRouteTriggerConditionById" parameterType="Long"
resultMap="SignRouteTriggerConditionResult">
<include refid="selectSignRouteTriggerConditionVo"/>
where id = #{id}
</select>
<insert id="insertSignRouteTriggerCondition" parameterType="SignRouteTriggerCondition" useGeneratedKeys="true"
keyProperty="id">
insert into sign_route_trigger_condition
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientManageRouteId != null">patient_manage_route_id,
</if>
<if test="routeName != null">route_name,
</if>
<if test="triggerConditionCode != null">trigger_condition_code,
</if>
<if test="triggerConditionName != null">trigger_condition_name,
</if>
<if test="triggerConditionOperator != null">trigger_condition_operator,
</if>
<if test="triggerConditionValue != null">trigger_condition_value,
</if>
<if test="triggerConditionSort != null">trigger_condition_sort,
</if>
<if test="triggerConditionRemark != null">trigger_condition_remark,
</if>
<if test="createBy != null">create_by,
</if>
<if test="createTime != null">create_time,
</if>
<if test="updateBy != null">update_by,
</if>
<if test="updateTime != null">update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="patientManageRouteId != null">#{patientManageRouteId},
</if>
<if test="routeName != null">#{routeName},
</if>
<if test="triggerConditionCode != null">#{triggerConditionCode},
</if>
<if test="triggerConditionName != null">#{triggerConditionName},
</if>
<if test="triggerConditionOperator != null">#{triggerConditionOperator},
</if>
<if test="triggerConditionValue != null">#{triggerConditionValue},
</if>
<if test="triggerConditionSort != null">#{triggerConditionSort},
</if>
<if test="triggerConditionRemark != null">#{triggerConditionRemark},
</if>
<if test="createBy != null">#{createBy},
</if>
<if test="createTime != null">#{createTime},
</if>
<if test="updateBy != null">#{updateBy},
</if>
<if test="updateTime != null">#{updateTime},
</if>
</trim>
</insert>
<update id="updateSignRouteTriggerCondition" parameterType="SignRouteTriggerCondition">
update sign_route_trigger_condition
<trim prefix="SET" suffixOverrides=",">
<if test="patientManageRouteId != null">patient_manage_route_id =
#{patientManageRouteId},
</if>
<if test="routeName != null">route_name =
#{routeName},
</if>
<if test="triggerConditionCode != null">trigger_condition_code =
#{triggerConditionCode},
</if>
<if test="triggerConditionName != null">trigger_condition_name =
#{triggerConditionName},
</if>
<if test="triggerConditionOperator != null">trigger_condition_operator =
#{triggerConditionOperator},
</if>
<if test="triggerConditionValue != null">trigger_condition_value =
#{triggerConditionValue},
</if>
<if test="triggerConditionSort != null">trigger_condition_sort =
#{triggerConditionSort},
</if>
<if test="triggerConditionRemark != null">trigger_condition_remark =
#{triggerConditionRemark},
</if>
<if test="createBy != null">create_by =
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSignRouteTriggerConditionById" parameterType="Long">
delete from sign_route_trigger_condition where id = #{id}
</delete>
<delete id="deleteSignRouteTriggerConditionByIds" parameterType="String">
delete from sign_route_trigger_condition where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -119,6 +119,9 @@
<if test="phonenumber != null and phonenumber != ''">
AND u.phonenumber like concat('%', #{phonenumber}, '%')
</if>
<if test="postName != null and postName != ''">
and u.post_name = #{userBirthDate}
</if>
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
</if>