From cb1337df60031e101d9172a7cae422ce89292692 Mon Sep 17 00:00:00 2001 From: haown <454902499@qq.com> Date: Tue, 19 Mar 2024 09:05:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AD=BE=E7=BA=A6?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=B7=AF=E5=BE=84=E7=9B=B8=E5=85=B3=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SysUserController.java | 17 + .../constant/TaskCreateTypeConstant.java | 19 + .../SignPatientManageRouteController.java | 97 +++ .../SignPatientManageRoute.java | 114 +++ .../SignPatientManageRouteNode.java | 308 ++++++++ .../SignPatientPackage.java | 17 +- .../SignRouteTriggerCondition.java | 71 ++ .../SignPatientPackageSaveDto.java | 62 ++ .../signpatientrecord/SignPatientAddDto.java | 17 +- .../SignPatientManageRouteMapper.java | 61 ++ .../SignPatientManageRouteNodeMapper.java | 63 ++ .../SignRouteTriggerConditionMapper.java | 61 ++ .../impl/PatientVisitRecordServiceImpl.java | 47 +- .../ISignPatientManageRouteService.java | 61 ++ .../SignPatientManageRouteServiceImpl.java | 89 +++ .../ISignPatientManageRouteNodeService.java | 61 ++ ...SignPatientManageRouteNodeServiceImpl.java | 89 +++ .../ISignPatientRecordService.java | 12 +- .../impl/SignPatientRecordServiceImpl.java | 118 ++- .../ISignRouteTriggerConditionService.java | 61 ++ .../SignRouteTriggerConditionServiceImpl.java | 89 +++ .../signpatientrecord/SignPatientInfoVo.java | 27 +- .../PatientVisitRecordMapper.xml | 6 +- .../SignPatientManageRouteMapper.xml | 269 +++++++ .../SignPatientManageRouteNodeMapper.xml | 708 ++++++++++++++++++ .../SignPatientRecordMapper.xml | 6 +- .../SignRouteTriggerConditionMapper.xml | 173 +++++ .../resources/mapper/system/SysUserMapper.xml | 3 + 28 files changed, 2641 insertions(+), 85 deletions(-) create mode 100644 postdischarge-common/src/main/java/com/xinelu/common/constant/TaskCreateTypeConstant.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroutenode/SignPatientManageRouteNode.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/signroutetriggercondition/SignRouteTriggerCondition.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientpackage/SignPatientPackageSaveDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signroutetriggercondition/SignRouteTriggerConditionMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/ISignRouteTriggerConditionService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/impl/SignRouteTriggerConditionServiceImpl.java create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/signroutetriggercondition/SignRouteTriggerConditionMapper.xml diff --git a/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java b/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java index 7e2f7e67..4ef7d94e 100644 --- a/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java +++ b/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java @@ -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> getList(SysUser user) { + List list = userService.selectUserList(user); + return R.ok(list); + } + @Log(title = "用户管理", businessType = BusinessType.EXPORT) @PreAuthorize("@ss.hasPermi('system:user:export')") @PostMapping("/export") diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/TaskCreateTypeConstant.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/TaskCreateTypeConstant.java new file mode 100644 index 00000000..77cf4ea4 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/TaskCreateTypeConstant.java @@ -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"; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java new file mode 100644 index 00000000..9a0ba9ca --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/signpatientmanageroute/SignPatientManageRouteController.java @@ -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 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 list = signPatientManageRouteService.selectSignPatientManageRouteList(signPatientManageRoute); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java new file mode 100644 index 00000000..ef213555 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroute/SignPatientManageRoute.java @@ -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; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroutenode/SignPatientManageRouteNode.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroutenode/SignPatientManageRouteNode.java new file mode 100644 index 00000000..4cdea3ed --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientmanageroutenode/SignPatientManageRouteNode.java @@ -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; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientpackage/SignPatientPackage.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientpackage/SignPatientPackage.java index 22441b64..dcc5e289 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientpackage/SignPatientPackage.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signpatientpackage/SignPatientPackage.java @@ -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; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signroutetriggercondition/SignRouteTriggerCondition.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signroutetriggercondition/SignRouteTriggerCondition.java new file mode 100644 index 00000000..78acf909 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/signroutetriggercondition/SignRouteTriggerCondition.java @@ -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; + + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientpackage/SignPatientPackageSaveDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientpackage/SignPatientPackageSaveDto.java new file mode 100644 index 00000000..d4461869 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientpackage/SignPatientPackageSaveDto.java @@ -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; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientAddDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientAddDto.java index 31971f04..96a2d062 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientAddDto.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/signpatientrecord/SignPatientAddDto.java @@ -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 devices; diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java new file mode 100644 index 00000000..66c696ed --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroute/SignPatientManageRouteMapper.java @@ -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 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); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java new file mode 100644 index 00000000..0174be35 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.java @@ -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 selectSignPatientManageRouteNodeList(SignPatientManageRouteNode signPatientManageRouteNode); + + /** + * 新增签约患者管理任务路径节点 + * + * @param signPatientManageRouteNode 签约患者管理任务路径节点 + * @return 结果 + */ + public int insertSignPatientManageRouteNode(SignPatientManageRouteNode signPatientManageRouteNode); + + int insertBatch(@Param("nodeList") List 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); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signroutetriggercondition/SignRouteTriggerConditionMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signroutetriggercondition/SignRouteTriggerConditionMapper.java new file mode 100644 index 00000000..8f71ca95 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/signroutetriggercondition/SignRouteTriggerConditionMapper.java @@ -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 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); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java index 0bee65c1..f08ccf43 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java @@ -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 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 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); - } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java new file mode 100644 index 00000000..3cdf8c1c --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/ISignPatientManageRouteService.java @@ -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 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); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java new file mode 100644 index 00000000..efcfb4f3 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroute/impl/SignPatientManageRouteServiceImpl.java @@ -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 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); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java new file mode 100644 index 00000000..2db9a65f --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/ISignPatientManageRouteNodeService.java @@ -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 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); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java new file mode 100644 index 00000000..5ab8bac3 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientmanageroutenode/impl/SignPatientManageRouteNodeServiceImpl.java @@ -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 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); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/ISignPatientRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/ISignPatientRecordService.java index e8332221..b02f1a62 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/ISignPatientRecordService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/ISignPatientRecordService.java @@ -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 getByPatient(Long patientId); + /** + * 签约/续约 + * @param body:签约传输对象 + */ int add(SignPatientAddDto body); int updateSignStatus(SignPatientStatusDto patientCancelSignDto); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java index c71e99b1..eb94c1b9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java @@ -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 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 nodeList = specialDiseaseNodeMapper.selectSpecialDiseaseNodeList(specialDiseaseNode); + if (CollectionUtils.isEmpty(nodeList)) { + throw new ServiceException("该管理任务没有任务节点"); } - signPatientPackageMapper.insertSignPatientPackage(signPatientPackage); + List 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); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/ISignRouteTriggerConditionService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/ISignRouteTriggerConditionService.java new file mode 100644 index 00000000..01e8af06 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/ISignRouteTriggerConditionService.java @@ -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 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); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/impl/SignRouteTriggerConditionServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/impl/SignRouteTriggerConditionServiceImpl.java new file mode 100644 index 00000000..189aa5a0 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signroutetriggercondition/impl/SignRouteTriggerConditionServiceImpl.java @@ -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 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); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientInfoVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientInfoVo.java index 63356a13..713853b7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientInfoVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientrecord/SignPatientInfoVo.java @@ -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 signDevices; diff --git a/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml index 5bfedaf6..d6e9a44b 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/patientvisitrecord/PatientVisitRecordMapper.xml @@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -80,7 +80,7 @@ where id = #{id} - insert into patient_visit_record @@ -173,7 +173,7 @@ - + update patient_visit_record patient_id = diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml new file mode 100644 index 00000000..907848b4 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroute/SignPatientManageRouteMapper.xml @@ -0,0 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into sign_patient_manage_route + + 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, + + + + #{signPatientRecordId}, + + #{patientId}, + + #{patientName}, + + #{departmentId}, + + #{departmentName}, + + #{servicePackageId}, + + #{packageName}, + + #{diseaseTypeId}, + + #{diseaseTypeName}, + + #{routeId}, + + #{routeName}, + + #{taskCreateType}, + + #{version}, + + #{routeClassify}, + + #{suitRange}, + + #{routeSort}, + + #{routeRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update sign_patient_manage_route + + sign_patient_record_id = + #{signPatientRecordId}, + + patient_id = + #{patientId}, + + patient_name = + #{patientName}, + + department_id = + #{departmentId}, + + department_name = + #{departmentName}, + + service_package_id = + #{servicePackageId}, + + package_name = + #{packageName}, + + disease_type_id = + #{diseaseTypeId}, + + disease_type_name = + #{diseaseTypeName}, + + route_id = + #{routeId}, + + route_name = + #{routeName}, + + task_create_type = + #{taskCreateType}, + + version = + #{version}, + + route_classify = + #{routeClassify}, + + suit_range = + #{suitRange}, + + route_sort = + #{routeSort}, + + route_remark = + #{routeRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from sign_patient_manage_route where id = #{id} + + + + delete from sign_patient_manage_route where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml new file mode 100644 index 00000000..d7779776 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientmanageroutenode/SignPatientManageRouteNodeMapper.xml @@ -0,0 +1,708 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + 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, + + + + #{manageRouteId}, + + #{manageRouteName}, + + #{routeNodeName}, + + #{routeNodeDay}, + + #{taskType}, + + #{taskStatus}, + + #{taskSubdivision}, + + #{secondClassifyDescribe}, + + #{executeTime}, + + #{phonePushSign}, + + #{phoneId}, + + #{phoneTemplateId}, + + #{phoneTemplateName}, + + #{phoneNodeContent}, + + #{phoneRedialTimes}, + + #{phoneTimeInterval}, + + #{phoneMessageRemind}, + + #{phoneMessageTemplateId}, + + #{phoneMessageTemplateName}, + + #{questionInfoId}, + + #{questionnaireName}, + + #{questionnaireContent}, + + #{questionExpirationDate}, + + #{propagandaInfoId}, + + #{propagandaTitle}, + + #{propagandaContent}, + + #{messagePushSign}, + + #{messageTemplateId}, + + #{messageTemplateName}, + + #{messagePreview}, + + #{messageNodeContent}, + + #{officialPushSign}, + + #{officialTemplateId}, + + #{officialTemplateName}, + + #{officialRemindContent}, + + #{officialNodeContent}, + + #{appletPushSign}, + + #{appletTemplateId}, + + #{appletTemplateName}, + + #{appletRemindContent}, + + #{appletPromptDescription}, + + #{appletNodeContent}, + + #{followTemplateId}, + + #{followTemplateName}, + + #{followContent}, + + #{routeCheckStatus}, + + #{routeCheckPerson}, + + #{routeCheckDate}, + + #{routeCheckRemark}, + + #{routeNodeRemark}, + + #{nodeExecuteStatus}, + + #{routeHandleRemark}, + + #{routeHandleId}, + + #{routeHandlePerson}, + + #{routeLink}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + 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 + + (#{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}) + + + + update sign_patient_manage_route_node + + manage_route_id = + #{manageRouteId}, + + manage_route_name = + #{manageRouteName}, + + route_node_name = + #{routeNodeName}, + + route_node_day = + #{routeNodeDay}, + + task_type = + #{taskType}, + + task_status = + #{taskStatus}, + + task_subdivision = + #{taskSubdivision}, + + second_classify_describe = + #{secondClassifyDescribe}, + + execute_time = + #{executeTime}, + + phone_push_sign = + #{phonePushSign}, + + phone_id = + #{phoneId}, + + phone_template_id = + #{phoneTemplateId}, + + phone_template_name = + #{phoneTemplateName}, + + phone_node_content = + #{phoneNodeContent}, + + phone_redial_times = + #{phoneRedialTimes}, + + phone_time_interval = + #{phoneTimeInterval}, + + phone_message_remind = + #{phoneMessageRemind}, + + phone_message_template_id = + #{phoneMessageTemplateId}, + + phone_message_template_name = + #{phoneMessageTemplateName}, + + question_info_id = + #{questionInfoId}, + + questionnaire_name = + #{questionnaireName}, + + questionnaire_content = + #{questionnaireContent}, + + question_expiration_date = + #{questionExpirationDate}, + + propaganda_info_id = + #{propagandaInfoId}, + + propaganda_title = + #{propagandaTitle}, + + propaganda_content = + #{propagandaContent}, + + message_push_sign = + #{messagePushSign}, + + message_template__id = + #{messageTemplateId}, + + message_template_name = + #{messageTemplateName}, + + message_preview = + #{messagePreview}, + + message_node_content = + #{messageNodeContent}, + + official_push_sign = + #{officialPushSign}, + + official_template_id = + #{officialTemplateId}, + + official_template_name = + #{officialTemplateName}, + + official_remind_content = + #{officialRemindContent}, + + official_node_content = + #{officialNodeContent}, + + applet_push_sign = + #{appletPushSign}, + + applet_template_id = + #{appletTemplateId}, + + applet_template_name = + #{appletTemplateName}, + + applet_remind_content = + #{appletRemindContent}, + + applet_prompt_description = + #{appletPromptDescription}, + + applet_node_content = + #{appletNodeContent}, + + follow_template_id = + #{followTemplateId}, + + follow_template_name = + #{followTemplateName}, + + follow_content = + #{followContent}, + + route_check_status = + #{routeCheckStatus}, + + route_check_person = + #{routeCheckPerson}, + + route_check_date = + #{routeCheckDate}, + + route_check_remark = + #{routeCheckRemark}, + + route_node_remark = + #{routeNodeRemark}, + + node_execute_status = + #{nodeExecuteStatus}, + + route_handle_remark = + #{routeHandleRemark}, + + route_handle_id = + #{routeHandleId}, + + route_handle_person = + #{routeHandlePerson}, + + route_link = + #{routeLink}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from sign_patient_manage_route_node where id = #{id} + + + + delete from sign_patient_manage_route_node where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml index 12760267..f3b7536d 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml @@ -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 sign.del_flag = 0 and sign.id = #{id} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signroutetriggercondition/SignRouteTriggerConditionMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signroutetriggercondition/SignRouteTriggerConditionMapper.xml new file mode 100644 index 00000000..6f516417 --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/signroutetriggercondition/SignRouteTriggerConditionMapper.xml @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into sign_route_trigger_condition + + 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, + + + + #{patientManageRouteId}, + + #{routeName}, + + #{triggerConditionCode}, + + #{triggerConditionName}, + + #{triggerConditionOperator}, + + #{triggerConditionValue}, + + #{triggerConditionSort}, + + #{triggerConditionRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update sign_route_trigger_condition + + patient_manage_route_id = + #{patientManageRouteId}, + + route_name = + #{routeName}, + + trigger_condition_code = + #{triggerConditionCode}, + + trigger_condition_name = + #{triggerConditionName}, + + trigger_condition_operator = + #{triggerConditionOperator}, + + trigger_condition_value = + #{triggerConditionValue}, + + trigger_condition_sort = + #{triggerConditionSort}, + + trigger_condition_remark = + #{triggerConditionRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from sign_route_trigger_condition where id = #{id} + + + + delete from sign_route_trigger_condition where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-system/src/main/resources/mapper/system/SysUserMapper.xml b/postdischarge-system/src/main/resources/mapper/system/SysUserMapper.xml index f17af4d5..248338df 100644 --- a/postdischarge-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/postdischarge-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -119,6 +119,9 @@ AND u.phonenumber like concat('%', #{phonenumber}, '%') + + and u.post_name = #{userBirthDate} + AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') From 410f5a8b07aec6cd992f9064c401f9b1f5a4b785 Mon Sep 17 00:00:00 2001 From: haown <454902499@qq.com> Date: Tue, 19 Mar 2024 09:17:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PatientVisitRecordServiceImpl.java | 22 +++------------- .../impl/SignPatientRecordServiceImpl.java | 26 ++++++++++++++----- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java index 9646175f..9f538fb8 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/patientvisitrecord/impl/PatientVisitRecordServiceImpl.java @@ -5,7 +5,6 @@ import com.xinelu.common.constant.NodeTypeConstants; import com.xinelu.common.constant.VisitTypeConstants; import com.xinelu.common.core.domain.AjaxResult; 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; @@ -24,6 +23,7 @@ import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.patientvisitrecord.PatientVisitRecordMapper; import com.xinelu.manage.service.patientvisitrecord.IPatientVisitRecordService; import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.ZoneId; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -85,7 +85,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService @Override public int insertPatientVisitRecord(PatientVisitRecord patientVisitRecord) { patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); - patientVisitRecord.setCreateTime(DateUtils.getNowDate()); + patientVisitRecord.setCreateTime(LocalDateTime.now()); return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); } @@ -106,22 +106,6 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); return 0; } - @Override public int saveRecord(PatientVisitRecordSaveDto saveDto) { - PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); - // 查询患者信息 - 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()); - // 住院时间,出院时间-入院时间 - LocalDate admissionTime = saveDto.getAdmissionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - LocalDate dischargeTime = saveDto.getDischargeTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - long daysBetween = ChronoUnit.DAYS.between(admissionTime, dischargeTime); - patientVisitRecord.setHospitalizationDays((int) daysBetween + 1); - return patientVisitRecordMapper.insertPatientVisitRecord(patientVisitRecord); - } /** * 修改患者就诊记录基本信息 @@ -184,7 +168,7 @@ public class PatientVisitRecordServiceImpl implements IPatientVisitRecordService for (PatientVisitRecordImportDto item : importDataList) { PatientVisitRecord patientVisitRecord = new PatientVisitRecord(); BeanUtils.copyProperties(item, patientVisitRecord); - patientVisitRecord.setCreateTime(DateUtils.getNowDate()); + patientVisitRecord.setCreateTime(LocalDateTime.now()); patientVisitRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); switch (patientType) { // 在院患者 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java index 90513ac1..aa0a921b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/signpatientrecord/impl/SignPatientRecordServiceImpl.java @@ -4,7 +4,6 @@ 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; @@ -25,6 +24,8 @@ 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; @@ -34,6 +35,7 @@ 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.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; import javax.annotation.Resource; @@ -65,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 selectList(SignPatientListDto signPatientRecord) { return signPatientRecordMapper.selectList(signPatientRecord); @@ -109,10 +121,10 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService { signPatientRecord.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER); signPatientRecord.setDelFlag(0); signPatientRecord.setPaymentStatus(PaymentStatusConstants.UNPAID_FEES); - signPatientRecord.setSignTime(DateUtils.getNowDate()); + signPatientRecord.setSignTime(LocalDateTime.now()); signPatientRecord.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN); signPatientRecord.setPrice(signPatientPackageDto.getPackagePrice()); - signPatientRecord.setCreateTime(DateUtils.getNowDate()); + signPatientRecord.setCreateTime(LocalDateTime.now()); signPatientRecord.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); // 保存签约记录 int flag = signPatientRecordMapper.insert(signPatientRecord); @@ -121,7 +133,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService { patient.setSignPatientRecordId(signPatientRecord.getId()); patient.setSignStatus(SignRecordServiceStatusConstants.IN_SIGN); patient.setServiceStatus(SignRecordServiceStatusConstants.SERVICE_CENTER); - patient.setSignTime(DateUtils.getNowDate()); + patient.setSignTime(LocalDateTime.now()); patientInfoMapper.updatePatientInfo(patient); if (flag > 0) { // 保存签约服务包信息 @@ -134,7 +146,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService { signPatientPackage.setSignPatientRecordId(signPatientRecord.getId()); signPatientPackage.setPatientId(signPatientRecord.getPatientId()); signPatientPackage.setPackagePaymentStatus(PaymentStatusConstants.UNPAID_FEES); - signPatientPackage.setCreateTime(DateUtils.getNowDate()); + signPatientPackage.setCreateTime(LocalDateTime.now()); signPatientPackage.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); signPatientPackage.setId(null); signPatientPackageMapper.insertSignPatientPackage(signPatientPackage); @@ -147,7 +159,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService { signPatientManageRoute.setSignPatientRecordId(signPatientRecord.getId()); signPatientManageRoute.setRouteId(specialDiseaseRoute.getId()); signPatientManageRoute.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE); - signPatientManageRoute.setCreateTime(DateUtils.getNowDate()); + signPatientManageRoute.setCreateTime(LocalDateTime.now()); signPatientManageRoute.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); signPatientManageRouteMapper.insertSignPatientManageRoute(signPatientManageRoute); // 保存管理节点 @@ -161,7 +173,7 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService { SignPatientManageRouteNode manageRouteNode = new SignPatientManageRouteNode(); BeanUtils.copyBeanProp(manageRouteNode, node); manageRouteNode.setManageRouteId(body.getRouteId()); - manageRouteNode.setCreateTime(DateUtils.getNowDate()); + manageRouteNode.setCreateTime(LocalDateTime.now()); manageRouteNode.setCreateBy(SecurityUtils.getLoginUser().getUser().getNickName()); return manageRouteNode; }).collect(Collectors.toList());