From c25885f0f86b1b4dcf111980b3a910ecc6200f3a Mon Sep 17 00:00:00 2001 From: haown <454902499@qq.com> Date: Mon, 8 Jul 2024 10:22:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=A5=E8=AF=86=E5=BA=93=E5=B7=A6=E4=BE=A7?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../department/DepartmentController.java | 45 +++++---- .../OperationInfoController.java | 19 ++-- .../PropagandaInfoController.java | 8 +- .../questioninfo/QuestionInfoController.java | 22 +++-- .../scriptInfo/ScriptInfoController.java | 5 +- .../ServicePackageController.java | 8 +- .../SpecialDiseaseRouteController.java | 5 +- .../dto/department/DepartmentCount.java | 5 + .../manage/dto/department/DepartmentDTO.java | 5 + .../dto/operationinfo/OperationInfoDto.java | 53 ++++++++++ .../dto/questioninfo/QuestionInfoDto.java | 23 +++++ .../manage/dto/script/ScriptInfoDto.java | 18 ++++ .../dto/servicepackage/ServicePackageDto.java | 22 +++++ .../SpecialDiseaseRouteQueryDto.java | 16 +++ .../dto/textmessage/TextMessageDTO.java | 6 ++ .../dto/wechattemplate/WechatTemplateDTO.java | 10 +- .../operationInfo/OperationInfoMapper.java | 6 +- .../questioninfo/QuestionInfoMapper.java | 4 +- .../mapper/scriptInfo/ScriptInfoMapper.java | 6 +- .../servicepackage/ServicePackageMapper.java | 6 +- .../SpecialDiseaseRouteMapper.java | 5 +- .../department/IDepartmentService.java | 13 ++- .../impl/DepartmentServiceImpl.java | 52 +++++++--- .../operationInfo/IOperationInfoService.java | 4 +- .../impl/OperationInfoServiceImpl.java | 10 +- .../IPropagandaInfoService.java | 4 +- .../impl/PropagandaInfoServiceImpl.java | 12 ++- .../questioninfo/IQuestionInfoService.java | 8 +- .../impl/QuestionInfoServiceImpl.java | 28 ++++-- .../scriptInfo/IScriptInfoService.java | 6 +- .../impl/ScriptInfoServiceImpl.java | 14 +-- .../IServicePackageService.java | 6 +- .../impl/ServicePackageServiceImpl.java | 12 +-- .../SignPatientManageRouteServiceImpl.java | 17 ++++ .../ISignPatientManageRouteNodeService.java | 8 ++ ...SignPatientManageRouteNodeServiceImpl.java | 99 ++++++++++--------- .../ISpecialDiseaseRouteService.java | 5 +- .../impl/SpecialDiseaseRouteServiceImpl.java | 7 +- ...ialDiseaseTriggerConditionServiceImpl.java | 4 +- .../vo/department/DepartmentBaseVo.java | 29 ++++++ .../manage/vo/department/DepartmentVO.java | 12 ++- .../SignPatientManageNodeAuditVo.java | 3 + .../manage/department/DepartmentMapper.xml | 19 ++++ .../operationInfo/OperationInfoMapper.xml | 9 +- .../propagandainfo/PropagandaInfoMapper.xml | 21 ---- .../questioninfo/QuestionInfoMapper.xml | 17 +++- .../manage/scriptInfo/ScriptInfoMapper.xml | 7 +- .../servicepackage/ServicePackageMapper.xml | 8 +- .../SpecialDiseaseRouteMapper.xml | 3 + .../manage/textmessage/TextMessageMapper.xml | 3 + .../wechattemplate/WechatTemplateMapper.xml | 3 + 51 files changed, 524 insertions(+), 216 deletions(-) create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/operationinfo/OperationInfoDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/questioninfo/QuestionInfoDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/script/ScriptInfoDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicepackage/ServicePackageDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/specialdiseaseroute/SpecialDiseaseRouteQueryDto.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/department/DepartmentBaseVo.java diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/department/DepartmentController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/department/DepartmentController.java index 8e28037e..ce9931db 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/department/DepartmentController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/department/DepartmentController.java @@ -10,16 +10,23 @@ import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.dto.department.DepartmentDTO; import com.xinelu.manage.service.department.IDepartmentService; -import com.xinelu.manage.vo.department.DepartmentVO; -import org.apache.commons.lang3.StringUtils; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; +import com.xinelu.manage.service.questioninfo.IQuestionInfoService; +import com.xinelu.manage.vo.department.DepartmentBaseVo; import java.util.List; import java.util.Objects; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.StringUtils; +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; +import org.springframework.web.multipart.MultipartFile; /** * 科室信息Controller @@ -32,6 +39,8 @@ import java.util.Objects; public class DepartmentController extends BaseController { @Resource private IDepartmentService departmentService; + @Resource + private IQuestionInfoService questionInfoService; /** * 查询科室信息列表 @@ -124,8 +133,8 @@ public class DepartmentController extends BaseController { */ @GetMapping("/listScriptNum") public AjaxResult listScriptNum(DepartmentDTO departmentDto) { - List list = departmentService.selectDepartmentListScriptNum(departmentDto); - return AjaxResult.success(list); + DepartmentBaseVo departmentBaseVo = departmentService.selectDepartmentListScriptNum(departmentDto); + return AjaxResult.success(departmentBaseVo); } /** @@ -133,8 +142,8 @@ public class DepartmentController extends BaseController { */ @GetMapping("/listOperationNum") public AjaxResult listOperationNum(DepartmentDTO departmentDto) { - List list = departmentService.selectDepartmentListOperationNum(departmentDto); - return AjaxResult.success(list); + DepartmentBaseVo departmentBaseVo = departmentService.selectDepartmentListOperationNum(departmentDto); + return AjaxResult.success(departmentBaseVo); } /** @@ -142,8 +151,8 @@ public class DepartmentController extends BaseController { */ @GetMapping("/listWechatTemplateNum") public AjaxResult listWechatTemplateNum(DepartmentDTO departmentDto) { - List list = departmentService.selectDepartmentListWechatTemplateNum(departmentDto); - return AjaxResult.success(list); + DepartmentBaseVo departmentBaseVo = departmentService.selectDepartmentListWechatTemplateNum(departmentDto); + return AjaxResult.success(departmentBaseVo); } /** @@ -151,8 +160,8 @@ public class DepartmentController extends BaseController { */ @GetMapping("/listMessageNum") public AjaxResult listMessageNum(DepartmentDTO departmentDto) { - List list = departmentService.selectDepartmentListMessageNum(departmentDto); - return AjaxResult.success(list); + DepartmentBaseVo departmentBaseVo = departmentService.selectDepartmentListMessageNum(departmentDto); + return AjaxResult.success(departmentBaseVo); } /** @@ -185,7 +194,7 @@ public class DepartmentController extends BaseController { */ @GetMapping("/listServicePackageNum") public AjaxResult listServicePackageNum(DepartmentDTO departmentDto) { - List list = departmentService.selectListServicePackageNum(departmentDto); - return AjaxResult.success(list); + DepartmentBaseVo departmentBaseVo = departmentService.selectListServicePackageNum(departmentDto); + return AjaxResult.success(departmentBaseVo); } } \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/operationInfo/OperationInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/operationInfo/OperationInfoController.java index 31e6da59..dcade7c3 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/operationInfo/OperationInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/operationInfo/OperationInfoController.java @@ -7,15 +7,22 @@ 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.operationInfo.OperationInfo; +import com.xinelu.manage.dto.operationinfo.OperationInfoDto; import com.xinelu.manage.service.operationInfo.IOperationInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - +import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; -import java.util.List; +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 @@ -36,7 +43,7 @@ public class OperationInfoController extends BaseController { @ApiOperation("查询手术信息列表") @PreAuthorize("@ss.hasPermi('operationInfo:operationInfo:list')") @GetMapping("/list") - public TableDataInfo list(OperationInfo operationInfo) { + public TableDataInfo list(OperationInfoDto operationInfo) { startPage(); List list = operationInfoService.selectOperationInfoList(operationInfo); return getDataTable(list); @@ -49,7 +56,7 @@ public class OperationInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('operationInfo:operationInfo:export')") @Log(title = "手术信息", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, OperationInfo operationInfo) { + public void export(HttpServletResponse response, OperationInfoDto operationInfo) { List list = operationInfoService.selectOperationInfoList(operationInfo); ExcelUtil util = new ExcelUtil(OperationInfo.class); util.exportExcel(response, list, "手术信息数据"); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/propagandainfo/PropagandaInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/propagandainfo/PropagandaInfoController.java index f62a9430..7fb592f5 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/propagandainfo/PropagandaInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/propagandainfo/PropagandaInfoController.java @@ -12,7 +12,7 @@ import com.xinelu.manage.dto.propagandainfo.PropagandaInfoDto; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoSaveDto; import com.xinelu.manage.dto.propagandainfo.PropagandaUpdateDto; import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService; -import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.manage.vo.department.DepartmentBaseVo; import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -146,8 +146,8 @@ public class PropagandaInfoController extends BaseController { */ @ApiOperation("查询科室信息列表及包含宣教库数量") @GetMapping("/selectNumByDept") - public R> selectNumByDept(PropagandaInfoDto propagandaInfoDto) { - List list = propagandaInfoService.selectNumByDept(propagandaInfoDto); - return R.ok(list); + public R selectNumByDept(PropagandaInfoDto propagandaInfoDto) { + DepartmentBaseVo departmentBaseVo = propagandaInfoService.selectNumByDept(propagandaInfoDto); + return R.ok(departmentBaseVo); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java index a083a3d7..0b748660 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/questioninfo/QuestionInfoController.java @@ -8,16 +8,22 @@ import com.xinelu.common.enums.BusinessType; import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.questioninfo.QuestionInfo; import com.xinelu.manage.dto.department.DepartmentCount; +import com.xinelu.manage.dto.questioninfo.QuestionInfoDto; import com.xinelu.manage.service.questioninfo.IQuestionInfoService; import com.xinelu.manage.vo.questionInfo.QuestionVO; -import org.apache.commons.lang3.StringUtils; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Objects; +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.StringUtils; +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.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * 问卷基本信息Controller @@ -36,7 +42,7 @@ public class QuestionInfoController extends BaseController { */ @PreAuthorize("@ss.hasPermi('system:question:list')") @GetMapping("/list") - public TableDataInfo list(QuestionInfo questionInfo) { + public TableDataInfo list(QuestionInfoDto questionInfo) { startPage(); List list = questionInfoService.selectQuestionInfoList(questionInfo); return getDataTable(list); @@ -48,7 +54,7 @@ public class QuestionInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('system:question:export')") @Log(title = "问卷基本信息", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, QuestionInfo questionInfo) { + public void export(HttpServletResponse response, QuestionInfoDto questionInfo) { List list = questionInfoService.selectQuestionInfoList(questionInfo); ExcelUtil util = new ExcelUtil(QuestionInfo.class); util.exportExcel(response, list, "问卷基本信息数据"); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/scriptInfo/ScriptInfoController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/scriptInfo/ScriptInfoController.java index c6a656a8..acb36701 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/scriptInfo/ScriptInfoController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/scriptInfo/ScriptInfoController.java @@ -8,6 +8,7 @@ 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.scriptInfo.ScriptInfo; +import com.xinelu.manage.dto.script.ScriptInfoDto; import com.xinelu.manage.service.scriptInfo.IScriptInfoService; import com.xinelu.manage.vo.scriptInfo.ScriptVO; import io.swagger.annotations.Api; @@ -41,7 +42,7 @@ public class ScriptInfoController extends BaseController { @ApiOperation("查询话术信息列表") @PreAuthorize("@ss.hasPermi('manage:script:list')") @GetMapping("/list") - public TableDataInfo list(ScriptInfo scriptInfo) { + public TableDataInfo list(ScriptInfoDto scriptInfo) { startPage(); List list = scriptInfoService.selectScriptInfoList(scriptInfo); return getDataTable(list); @@ -54,7 +55,7 @@ public class ScriptInfoController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:script:export')") @Log(title = "话术信息", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, ScriptInfo scriptInfo) { + public void export(HttpServletResponse response, ScriptInfoDto scriptInfo) { List list = scriptInfoService.selectScriptInfoList(scriptInfo); ExcelUtil util = new ExcelUtil(ScriptInfo.class); util.exportExcel(response, list, "话术信息数据"); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java index 7589985b..4cadf98f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java @@ -7,8 +7,8 @@ import com.xinelu.common.core.domain.R; 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.servicepackage.ServicePackage; import com.xinelu.manage.dto.servicepackage.ServicePackageAddDTO; +import com.xinelu.manage.dto.servicepackage.ServicePackageDto; import com.xinelu.manage.service.servicepackage.IServicePackageService; import com.xinelu.manage.vo.servicepackage.ServicePackageVO; import io.swagger.annotations.Api; @@ -45,7 +45,7 @@ public class ServicePackageController extends BaseController { @ApiOperation("分页查询服务包基础信息列表") @PreAuthorize("@ss.hasPermi('manage:servicepackage:list')") @GetMapping("/list") - public TableDataInfo list(ServicePackage servicePackage) { + public TableDataInfo list(ServicePackageDto servicePackage) { return servicePackageService.selectServicePackageList(servicePackage); } @@ -55,7 +55,7 @@ public class ServicePackageController extends BaseController { @ApiOperation("查询服务包基础信息列表") @PreAuthorize("@ss.hasPermi('manage:servicepackage:list')") @GetMapping("/getList") - public R> getList(ServicePackage servicePackage) { + public R> getList(ServicePackageDto servicePackage) { return R.ok(servicePackageService.selectList(servicePackage)); } @@ -66,7 +66,7 @@ public class ServicePackageController extends BaseController { @PreAuthorize("@ss.hasPermi('manage:servicepackage:export')") @Log(title = "服务包基础信息", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, ServicePackage servicePackage) { + public void export(HttpServletResponse response, ServicePackageDto servicePackage) { TableDataInfo tableDataInfo = servicePackageService.selectServicePackageList(servicePackage); ExcelUtil util = new ExcelUtil(ServicePackageVO.class); List voList = (List) tableDataInfo.getRows(); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseaseroute/SpecialDiseaseRouteController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseaseroute/SpecialDiseaseRouteController.java index d1158181..17b5a39d 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseaseroute/SpecialDiseaseRouteController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/specialdiseaseroute/SpecialDiseaseRouteController.java @@ -10,6 +10,7 @@ import com.xinelu.common.custominterface.Update; import com.xinelu.common.enums.BusinessType; import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO; +import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteQueryDto; import com.xinelu.manage.service.specialdiseaseroute.ISpecialDiseaseRouteService; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteInfoVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; @@ -96,8 +97,8 @@ public class SpecialDiseaseRouteController extends BaseController { * 科室路径数量 */ @GetMapping("/departmentRouteCount") - public AjaxResult departmentRouteCount(String departmentName, String releaseStatus, Long servicePackageId) { - return specialDiseaseRouteService.departmentRouteCount(departmentName, releaseStatus, servicePackageId); + public AjaxResult departmentRouteCount(SpecialDiseaseRouteQueryDto specialDiseaseRouteQueryDto) { + return specialDiseaseRouteService.departmentRouteCount(specialDiseaseRouteQueryDto); } /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/DepartmentCount.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/DepartmentCount.java index 2a15d50c..a0df0728 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/DepartmentCount.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/DepartmentCount.java @@ -10,6 +10,11 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data public class DepartmentCount extends BaseEntity { + + /** + * 机构id + */ + private Long hospitalAgencyId; /** * 科室名称 */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/DepartmentDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/DepartmentDTO.java index c2529ef7..5b89a893 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/DepartmentDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/DepartmentDTO.java @@ -22,6 +22,11 @@ import org.apache.commons.lang3.builder.ToStringStyle; public class DepartmentDTO extends BaseEntity { private static final long serialVersionUID = 1L; + /** + * 机构主键 + */ + @ApiModelProperty(value = "机构主键") + private Long hospitalAgencyId; /** * 主键id */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/operationinfo/OperationInfoDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/operationinfo/OperationInfoDto.java new file mode 100644 index 00000000..48fe948e --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/operationinfo/OperationInfoDto.java @@ -0,0 +1,53 @@ +package com.xinelu.manage.dto.operationinfo; + +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @description: 手术名称查询传输对象 + * @author: haown + * @create: 2024-07-05 13:56 + **/ +@Data +@EqualsAndHashCode(callSuper = true) +public class OperationInfoDto extends BaseEntity { + + /** + * 所属机构id + */ + @ApiModelProperty(value = "所属机构id") + private Long hospitalAgencyId; + + + /** + * 所属科室id + */ + @ApiModelProperty(value = "所属科室id") + private Long departmentId; + + /** + * 所属科室名称 + */ + @ApiModelProperty(value = "所属科室名称") + private String departmentName; + + /** + * 手术名称 + */ + @ApiModelProperty(value = "手术名称") + private String operationName; + + /** + * 手术编号 + */ + @ApiModelProperty(value = "手术编号") + private String operationCode; + + /** + * 术式信息 + */ + @ApiModelProperty(value = "术式信息") + private String operationInfo; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/questioninfo/QuestionInfoDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/questioninfo/QuestionInfoDto.java new file mode 100644 index 00000000..c505efcf --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/questioninfo/QuestionInfoDto.java @@ -0,0 +1,23 @@ +package com.xinelu.manage.dto.questioninfo; + +import com.xinelu.manage.domain.questioninfo.QuestionInfo; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 问卷列表查询传输对象 + * + * @author haown + * @date 2024-07-08 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "问卷列表查询传输对象") +public class QuestionInfoDto extends QuestionInfo { + + /** + * 所属机构主键 + */ + private Long hospitalAgencyId; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/script/ScriptInfoDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/script/ScriptInfoDto.java new file mode 100644 index 00000000..d31377f2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/script/ScriptInfoDto.java @@ -0,0 +1,18 @@ +package com.xinelu.manage.dto.script; + +import com.xinelu.manage.domain.scriptInfo.ScriptInfo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @description: 话术查询传输对象 + * @author: haown + * @create: 2024-07-05 16:04 + **/ +@Data +public class ScriptInfoDto extends ScriptInfo { + + @ApiModelProperty("所属机构id") + private Long hospitalAgencyId; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicepackage/ServicePackageDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicepackage/ServicePackageDto.java new file mode 100644 index 00000000..b2b72823 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicepackage/ServicePackageDto.java @@ -0,0 +1,22 @@ +package com.xinelu.manage.dto.servicepackage; + +import com.xinelu.manage.domain.servicepackage.ServicePackage; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @description: 服务包查询传输对象 + * @author: haown + * @create: 2024-07-08 09:24 + **/ +@Data +@EqualsAndHashCode(callSuper = true) +public class ServicePackageDto extends ServicePackage { + + /** + * 机构主键 + */ + @ApiModelProperty("机构主键") + private Long hospitalAgencyId; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/specialdiseaseroute/SpecialDiseaseRouteQueryDto.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/specialdiseaseroute/SpecialDiseaseRouteQueryDto.java new file mode 100644 index 00000000..e66f15f2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/specialdiseaseroute/SpecialDiseaseRouteQueryDto.java @@ -0,0 +1,16 @@ +package com.xinelu.manage.dto.specialdiseaseroute; + +import lombok.Data; + +/** + * @description: 专病路径查询传输对象 + * @author: haown + * @create: 2024-07-08 09:54 + **/ +@Data +public class SpecialDiseaseRouteQueryDto { + private Long hospitalAgencyId; + private String departmentName; + private String releaseStatus; + private Long servicePackageId; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/textmessage/TextMessageDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/textmessage/TextMessageDTO.java index aee51b01..8d047230 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/textmessage/TextMessageDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/textmessage/TextMessageDTO.java @@ -18,6 +18,12 @@ import lombok.NoArgsConstructor; @ApiModel(value = "短信模板信息对象DTO") public class TextMessageDTO extends BaseEntity { + /** + * 机构主键 + */ + @ApiModelProperty(value = "机构主键") + private Long hospitalAgencyId; + /** * 所属科室id */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/wechattemplate/WechatTemplateDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/wechattemplate/WechatTemplateDTO.java index 1b999b11..6e0b21e5 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/wechattemplate/WechatTemplateDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/wechattemplate/WechatTemplateDTO.java @@ -2,8 +2,6 @@ package com.xinelu.manage.dto.wechattemplate; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseEntity; -import com.xinelu.common.custominterface.Insert; -import com.xinelu.common.custominterface.Update; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; @@ -11,8 +9,6 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotBlank; - /** * @author : youxilong * @date : 2024/2/27 15:26 @@ -25,6 +21,12 @@ import javax.validation.constraints.NotBlank; public class WechatTemplateDTO extends BaseEntity { private static final long serialVersionUID = 1L; + /** + * 机构主键 + */ + @ApiModelProperty(value = "机构主键") + private Long hospitalAgencyId; + /** * 所属科室id */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/operationInfo/OperationInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/operationInfo/OperationInfoMapper.java index c09cf31d..3a325c08 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/operationInfo/OperationInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/operationInfo/OperationInfoMapper.java @@ -1,9 +1,9 @@ package com.xinelu.manage.mapper.operationInfo; import com.xinelu.manage.domain.operationInfo.OperationInfo; -import org.apache.ibatis.annotations.Param; - +import com.xinelu.manage.dto.operationinfo.OperationInfoDto; import java.util.List; +import org.apache.ibatis.annotations.Param; /** * 手术信息Mapper接口 @@ -28,7 +28,7 @@ public interface OperationInfoMapper { */ List selectOperationInfoList(OperationInfo operationInfo); - List selectOperationList(OperationInfo operationInfo); + List selectOperationList(OperationInfoDto operationInfo); /** * 新增手术信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/questioninfo/QuestionInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/questioninfo/QuestionInfoMapper.java index 06a22ef1..7b5bcd7b 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/questioninfo/QuestionInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/questioninfo/QuestionInfoMapper.java @@ -2,8 +2,8 @@ package com.xinelu.manage.mapper.questioninfo; import com.xinelu.manage.domain.questioninfo.QuestionInfo; import com.xinelu.manage.dto.department.DepartmentCount; +import com.xinelu.manage.dto.questioninfo.QuestionInfoDto; import com.xinelu.manage.vo.department.DepartmentVO; - import java.util.List; /** @@ -29,7 +29,7 @@ public interface QuestionInfoMapper { */ List selectQuestionInfoList(QuestionInfo questionInfo); - List selectQuestionList(QuestionInfo questionInfo); + List selectQuestionList(QuestionInfoDto questionInfo); /** * 新增问卷基本信息 * diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java index a74aaa04..4cc290f9 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/scriptInfo/ScriptInfoMapper.java @@ -1,10 +1,10 @@ package com.xinelu.manage.mapper.scriptInfo; import com.xinelu.manage.domain.scriptInfo.ScriptInfo; +import com.xinelu.manage.dto.script.ScriptInfoDto; import com.xinelu.manage.vo.scriptInfo.ScriptVO; -import org.apache.ibatis.annotations.Param; - import java.util.List; +import org.apache.ibatis.annotations.Param; /** * 话术信息Mapper接口 @@ -27,7 +27,7 @@ public interface ScriptInfoMapper { * @param scriptInfo 话术信息 * @return 话术信息集合 */ - List selectScriptInfoList(ScriptInfo scriptInfo); + List selectScriptInfoList(ScriptInfoDto scriptInfo); /** * 新增话术信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java index fe9f3206..adcdb281 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java @@ -1,12 +1,12 @@ package com.xinelu.manage.mapper.servicepackage; import com.xinelu.manage.domain.servicepackage.ServicePackage; +import com.xinelu.manage.dto.servicepackage.ServicePackageDto; import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO; import com.xinelu.manage.vo.servicepackage.ServicePackageVO; import com.xinelu.manage.vo.servicepackagecontent.ServicePackageContentVO; -import org.apache.ibatis.annotations.Param; - import java.util.List; +import org.apache.ibatis.annotations.Param; /** * 服务包基础信息Mapper接口 @@ -71,7 +71,7 @@ public interface ServicePackageMapper { /** * 查询服务包列表 */ - List selectServicePackageLists(ServicePackage servicePackage); + List selectServicePackageLists(ServicePackageDto servicePackage); /** * 根据服务包id查询服务包内容 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java index 6f1e8adf..0f40ae73 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/specialdiseaseroute/SpecialDiseaseRouteMapper.java @@ -2,6 +2,7 @@ package com.xinelu.manage.mapper.specialdiseaseroute; import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO; +import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteQueryDto; import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseChildRouteAuditVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo; @@ -85,10 +86,10 @@ public interface SpecialDiseaseRouteMapper { /** * 科室路径数量 * - * @param departmentName 科室名称 + * @param specialDiseaseRouteQueryDto 查询条件 * @return DepartmentVO */ - List departmentRouteByDepartmentName(@Param("departmentName") String departmentName, @Param("releaseStatus") String releaseStatus, @Param("servicePackageId") Long servicePackageId); + List departmentRouteByDepartmentName(SpecialDiseaseRouteQueryDto specialDiseaseRouteQueryDto); /** * 查询专病路径信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/IDepartmentService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/IDepartmentService.java index 0d3f99e6..321906d7 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/IDepartmentService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/IDepartmentService.java @@ -3,9 +3,8 @@ package com.xinelu.manage.service.department; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.dto.department.DepartmentDTO; +import com.xinelu.manage.vo.department.DepartmentBaseVo; import com.xinelu.manage.vo.department.DepartmentListVO; -import com.xinelu.manage.vo.department.DepartmentVO; - import java.util.List; @@ -85,7 +84,7 @@ public interface IDepartmentService { * @param departmentDto * @return */ - List selectDepartmentListScriptNum(DepartmentDTO departmentDto); + DepartmentBaseVo selectDepartmentListScriptNum(DepartmentDTO departmentDto); /** * 查询科室信息列表及包含手术数量 @@ -93,7 +92,7 @@ public interface IDepartmentService { * @param departmentDto * @return */ - List selectDepartmentListOperationNum(DepartmentDTO departmentDto); + DepartmentBaseVo selectDepartmentListOperationNum(DepartmentDTO departmentDto); /** * 查询科室信息列表及包含微信库数量 @@ -101,7 +100,7 @@ public interface IDepartmentService { * @param departmentDto * @return */ - List selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto); + DepartmentBaseVo selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto); /** * 查询科室信息列表及包含短信库数量 @@ -109,7 +108,7 @@ public interface IDepartmentService { * @param departmentDto * @return */ - List selectDepartmentListMessageNum(DepartmentDTO departmentDto); + DepartmentBaseVo selectDepartmentListMessageNum(DepartmentDTO departmentDto); /** * 科室信息导入 @@ -125,5 +124,5 @@ public interface IDepartmentService { * @param departmentDto * @return */ - List selectListServicePackageNum(DepartmentDTO departmentDto); + DepartmentBaseVo selectListServicePackageNum(DepartmentDTO departmentDto); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java index c5c3067e..d99d9e66 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/department/impl/DepartmentServiceImpl.java @@ -9,24 +9,27 @@ import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.common.utils.regex.RegexUtil; +import com.xinelu.manage.domain.agency.Agency; import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.dto.department.DepartmentDTO; +import com.xinelu.manage.mapper.agency.AgencyMapper; import com.xinelu.manage.mapper.department.DepartmentMapper; import com.xinelu.manage.service.department.IDepartmentService; +import com.xinelu.manage.vo.department.DepartmentBaseVo; import com.xinelu.manage.vo.department.DepartmentListVO; import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.system.mapper.SysUserMapper; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.BooleanUtils; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import javax.annotation.Resource; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** @@ -43,6 +46,8 @@ public class DepartmentServiceImpl implements IDepartmentService { private RegexUtil regexUtil; @Resource private SysUserMapper sysUserMapper; + @Resource + private AgencyMapper agencyMapper; @Resource private GenerateSystemCodeUtil generateSystemCodeUtil; @@ -166,8 +171,11 @@ public class DepartmentServiceImpl implements IDepartmentService { */ @DataScope(agencyAlias = "d", deptAlias = "si") @Override - public List selectDepartmentListScriptNum(DepartmentDTO departmentDto) { - return departmentMapper.selectDepartmentListScriptNum(departmentDto); + public DepartmentBaseVo selectDepartmentListScriptNum(DepartmentDTO departmentDto) { + Agency agency = agencyMapper.selectAgencyById(departmentDto.getHospitalAgencyId()); + List departmentVOList = departmentMapper.selectDepartmentListScriptNum(departmentDto); + return DepartmentBaseVo.builder().hospitalAgencyName(ObjectUtils.isEmpty(agency) ? "" : agency.getAgencyName()) + .deptNumList(departmentVOList).build(); } /** @@ -178,8 +186,11 @@ public class DepartmentServiceImpl implements IDepartmentService { */ @DataScope(agencyAlias = "d", deptAlias = "oi") @Override - public List selectDepartmentListOperationNum(DepartmentDTO departmentDto) { - return departmentMapper.selectDepartmentListOperationNum(departmentDto); + public DepartmentBaseVo selectDepartmentListOperationNum(DepartmentDTO departmentDto) { + Agency agency = agencyMapper.selectAgencyById(departmentDto.getHospitalAgencyId()); + List departmentVOList = departmentMapper.selectDepartmentListOperationNum(departmentDto); + return DepartmentBaseVo.builder().hospitalAgencyName(ObjectUtils.isEmpty(agency) ? "" : agency.getAgencyName()) + .deptNumList(departmentVOList).build(); } /** @@ -190,8 +201,11 @@ public class DepartmentServiceImpl implements IDepartmentService { */ @DataScope(agencyAlias = "d", deptAlias = "wt") @Override - public List selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) { - return departmentMapper.selectDepartmentListWechatTemplateNum(departmentDto); + public DepartmentBaseVo selectDepartmentListWechatTemplateNum(DepartmentDTO departmentDto) { + Agency agency = agencyMapper.selectAgencyById(departmentDto.getHospitalAgencyId()); + List departmentVOList = departmentMapper.selectDepartmentListWechatTemplateNum(departmentDto); + return DepartmentBaseVo.builder().hospitalAgencyName(ObjectUtils.isEmpty(agency) ? "" : agency.getAgencyName()) + .deptNumList(departmentVOList).build(); } /** @@ -202,8 +216,11 @@ public class DepartmentServiceImpl implements IDepartmentService { */ @DataScope(agencyAlias = "d", deptAlias = "tm") @Override - public List selectDepartmentListMessageNum(DepartmentDTO departmentDto) { - return departmentMapper.selectDepartmentListMessageNum(departmentDto); + public DepartmentBaseVo selectDepartmentListMessageNum(DepartmentDTO departmentDto) { + Agency agency = agencyMapper.selectAgencyById(departmentDto.getHospitalAgencyId()); + List departmentVOList = departmentMapper.selectDepartmentListMessageNum(departmentDto); + return DepartmentBaseVo.builder().hospitalAgencyName(ObjectUtils.isEmpty(agency) ? "" : agency.getAgencyName()) + .deptNumList(departmentVOList).build(); } /** @@ -261,7 +278,10 @@ public class DepartmentServiceImpl implements IDepartmentService { */ @DataScope(agencyAlias = "d", deptAlias = "sp") @Override - public List selectListServicePackageNum(DepartmentDTO departmentDto) { - return departmentMapper.selectListServicePackageNum(departmentDto); + public DepartmentBaseVo selectListServicePackageNum(DepartmentDTO departmentDto) { + Agency agency = agencyMapper.selectAgencyById(departmentDto.getHospitalAgencyId()); + List departmentVOList = departmentMapper.selectListServicePackageNum(departmentDto); + return DepartmentBaseVo.builder().hospitalAgencyName(ObjectUtils.isEmpty(agency) ? "" : agency.getAgencyName()) + .deptNumList(departmentVOList).build(); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/operationInfo/IOperationInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/operationInfo/IOperationInfoService.java index 1e380567..6b31d675 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/operationInfo/IOperationInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/operationInfo/IOperationInfoService.java @@ -1,7 +1,7 @@ package com.xinelu.manage.service.operationInfo; import com.xinelu.manage.domain.operationInfo.OperationInfo; - +import com.xinelu.manage.dto.operationinfo.OperationInfoDto; import java.util.List; /** @@ -25,7 +25,7 @@ public interface IOperationInfoService { * @param operationInfo 手术信息 * @return 手术信息集合 */ - public List selectOperationInfoList(OperationInfo operationInfo); + public List selectOperationInfoList(OperationInfoDto operationInfo); /** * 新增手术信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/operationInfo/impl/OperationInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/operationInfo/impl/OperationInfoServiceImpl.java index 77f8c592..a7cccf34 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/operationInfo/impl/OperationInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/operationInfo/impl/OperationInfoServiceImpl.java @@ -6,14 +6,14 @@ import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.manage.domain.operationInfo.OperationInfo; +import com.xinelu.manage.dto.operationinfo.OperationInfoDto; import com.xinelu.manage.mapper.operationInfo.OperationInfoMapper; import com.xinelu.manage.service.operationInfo.IOperationInfoService; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.List; +import javax.annotation.Resource; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** * 手术信息Service业务层处理 @@ -48,7 +48,7 @@ public class OperationInfoServiceImpl implements IOperationInfoService { */ @DataScope(agencyAlias = "d", deptAlias = "oi") @Override - public List selectOperationInfoList(OperationInfo operationInfo) { + public List selectOperationInfoList(OperationInfoDto operationInfo) { return operationInfoMapper.selectOperationList(operationInfo); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/IPropagandaInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/IPropagandaInfoService.java index 044d8131..712356a1 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/IPropagandaInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/IPropagandaInfoService.java @@ -4,7 +4,7 @@ import com.xinelu.manage.domain.propagandainfo.PropagandaInfo; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoDto; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoSaveDto; import com.xinelu.manage.dto.propagandainfo.PropagandaUpdateDto; -import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.manage.vo.department.DepartmentBaseVo; import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import java.util.List; @@ -87,5 +87,5 @@ public interface IPropagandaInfoService { * @param propagandaInfoDto 宣教库查询传输对象 * @return */ - List selectNumByDept(PropagandaInfoDto propagandaInfoDto); + DepartmentBaseVo selectNumByDept(PropagandaInfoDto propagandaInfoDto); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java index e06f6bbe..56267ba6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/propagandainfo/impl/PropagandaInfoServiceImpl.java @@ -4,16 +4,19 @@ import com.xinelu.common.annotation.DataScope; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.manage.domain.agency.Agency; import com.xinelu.manage.domain.materialsinfo.MaterialsInfo; import com.xinelu.manage.domain.propagandainfo.PropagandaInfo; import com.xinelu.manage.domain.propagandamaterials.PropagandaMaterials; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoDto; import com.xinelu.manage.dto.propagandainfo.PropagandaInfoSaveDto; import com.xinelu.manage.dto.propagandainfo.PropagandaUpdateDto; +import com.xinelu.manage.mapper.agency.AgencyMapper; import com.xinelu.manage.mapper.materialsinfo.MaterialsInfoMapper; import com.xinelu.manage.mapper.propagandainfo.PropagandaInfoMapper; import com.xinelu.manage.mapper.propagandamaterials.PropagandaMaterialsMapper; import com.xinelu.manage.service.propagandainfo.IPropagandaInfoService; +import com.xinelu.manage.vo.department.DepartmentBaseVo; import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.propagandainfo.PropagandaMaterialsVo; import java.time.LocalDateTime; @@ -39,6 +42,8 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService { private PropagandaMaterialsMapper propagandaMaterialsMapper; @Resource private MaterialsInfoMapper materialsInfoMapper; + @Resource + private AgencyMapper agencyMapper; /** * 查询宣教库管理 @@ -218,7 +223,10 @@ public class PropagandaInfoServiceImpl implements IPropagandaInfoService { @Override @DataScope(agencyAlias = "d", deptAlias = "p") - public List selectNumByDept(PropagandaInfoDto propagandaInfoDto) { - return propagandaInfoMapper.selectNumByDept(propagandaInfoDto); + public DepartmentBaseVo selectNumByDept(PropagandaInfoDto propagandaInfoDto) { + Agency agency = agencyMapper.selectAgencyById(propagandaInfoDto.getHospitalAgencyId()); + List departmentVOList = propagandaInfoMapper.selectNumByDept(propagandaInfoDto); + return DepartmentBaseVo.builder().hospitalAgencyName(ObjectUtils.isEmpty(agency) ? "" : agency.getAgencyName()) + .deptNumList(departmentVOList).build(); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/IQuestionInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/IQuestionInfoService.java index bf170f4f..28d8b7a8 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/IQuestionInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/IQuestionInfoService.java @@ -3,9 +3,9 @@ package com.xinelu.manage.service.questioninfo; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.questioninfo.QuestionInfo; import com.xinelu.manage.dto.department.DepartmentCount; -import com.xinelu.manage.vo.department.DepartmentVO; +import com.xinelu.manage.dto.questioninfo.QuestionInfoDto; +import com.xinelu.manage.vo.department.DepartmentBaseVo; import com.xinelu.manage.vo.questionInfo.QuestionVO; - import java.util.List; /** @@ -29,7 +29,7 @@ public interface IQuestionInfoService { * @param questionInfo 问卷基本信息 * @return 问卷基本信息集合 */ - List selectQuestionInfoList(QuestionInfo questionInfo); + List selectQuestionInfoList(QuestionInfoDto questionInfo); /** * 新增问卷基本信息 @@ -77,5 +77,5 @@ public interface IQuestionInfoService { * @param departmentCount 科室信息 * @return AjaxResult */ - List departmentQuestionCount(DepartmentCount departmentCount); + DepartmentBaseVo departmentQuestionCount(DepartmentCount departmentCount); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/impl/QuestionInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/impl/QuestionInfoServiceImpl.java index 9beaea27..eea4e9e3 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/impl/QuestionInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/questioninfo/impl/QuestionInfoServiceImpl.java @@ -5,30 +5,34 @@ import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.uuid.IdUtils; +import com.xinelu.manage.domain.agency.Agency; import com.xinelu.manage.domain.questioninfo.QuestionInfo; import com.xinelu.manage.domain.questionsubject.QuestionSubject; import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption; import com.xinelu.manage.dto.department.DepartmentCount; +import com.xinelu.manage.dto.questioninfo.QuestionInfoDto; +import com.xinelu.manage.mapper.agency.AgencyMapper; import com.xinelu.manage.mapper.questioninfo.QuestionInfoMapper; import com.xinelu.manage.mapper.questionsubject.QuestionSubjectMapper; import com.xinelu.manage.mapper.questionsubjectoption.QuestionSubjectOptionMapper; import com.xinelu.manage.service.questioninfo.IQuestionInfoService; +import com.xinelu.manage.vo.department.DepartmentBaseVo; import com.xinelu.manage.vo.department.DepartmentVO; import com.xinelu.manage.vo.questionInfo.QuestionVO; import com.xinelu.manage.vo.questionsubject.QuestionSubjectVO; import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; +import javax.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; /** * 问卷基本信息Service业务层处理 @@ -45,6 +49,8 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { private QuestionSubjectMapper questionSubjectMapper; @Resource private QuestionSubjectOptionMapper questionSubjectOptionMapper; + @Resource + private AgencyMapper agencyMapper; @Override @@ -84,7 +90,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { */ @DataScope(agencyAlias = "dt", deptAlias = "qi") @Override - public List selectQuestionInfoList(QuestionInfo questionInfo) { + public List selectQuestionInfoList(QuestionInfoDto questionInfo) { return questionInfoMapper.selectQuestionList(questionInfo); } @@ -318,7 +324,7 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { */ @DataScope(agencyAlias = "dt", deptAlias = "qi") @Override - public List departmentQuestionCount(DepartmentCount departmentCount) { + public DepartmentBaseVo departmentQuestionCount(DepartmentCount departmentCount) { DepartmentVO departmentVO = new DepartmentVO(); List department = new ArrayList<>(); departmentVO.setDepartmentName("全部"); @@ -335,6 +341,8 @@ public class QuestionInfoServiceImpl implements IQuestionInfoService { } else { department.add(departmentVO); } - return department; + Agency agency = agencyMapper.selectAgencyById(departmentCount.getHospitalAgencyId()); + return DepartmentBaseVo.builder().hospitalAgencyName(ObjectUtils.isEmpty(agency) ? "" : agency.getAgencyName()) + .deptNumList(departmentVOS).build(); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java index 4d539c46..d0ef4483 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/IScriptInfoService.java @@ -2,10 +2,10 @@ package com.xinelu.manage.service.scriptInfo; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.scriptInfo.ScriptInfo; +import com.xinelu.manage.dto.script.ScriptInfoDto; import com.xinelu.manage.vo.scriptInfo.ScriptVO; -import org.springframework.web.multipart.MultipartFile; - import java.util.List; +import org.springframework.web.multipart.MultipartFile; /** * 话术信息Service接口 @@ -28,7 +28,7 @@ public interface IScriptInfoService { * @param scriptInfo 话术信息 * @return 话术信息集合 */ - public List selectScriptInfoList(ScriptInfo scriptInfo); + List selectScriptInfoList(ScriptInfoDto scriptInfo); /** * 新增话术信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java index fbdd6776..fa182306 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/scriptInfo/impl/ScriptInfoServiceImpl.java @@ -11,6 +11,7 @@ import com.xinelu.common.utils.file.MimeTypeUtils; import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.scriptInfo.ScriptInfo; import com.xinelu.manage.domain.scriptinfoedge.ScriptInfoEdge; +import com.xinelu.manage.dto.script.ScriptInfoDto; import com.xinelu.manage.mapper.scriptInfo.ScriptInfoMapper; import com.xinelu.manage.mapper.scriptinfoedge.ScriptInfoEdgeMapper; import com.xinelu.manage.mapper.scriptinfonode.ScriptInfoNodeMapper; @@ -18,18 +19,17 @@ import com.xinelu.manage.service.scriptInfo.IScriptInfoService; import com.xinelu.manage.vo.scriptInfo.Edge; import com.xinelu.manage.vo.scriptInfo.Node; import com.xinelu.manage.vo.scriptInfo.ScriptVO; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import javax.annotation.Resource; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import javax.annotation.Resource; -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - /** * 话术信息Service业务层处理 * @@ -70,7 +70,7 @@ public class ScriptInfoServiceImpl implements IScriptInfoService { */ @DataScope(agencyAlias = "d", deptAlias = "si") @Override - public List selectScriptInfoList(ScriptInfo scriptInfo) { + public List selectScriptInfoList(ScriptInfoDto scriptInfo) { return scriptInfoMapper.selectScriptInfoList(scriptInfo); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java index 678d8b55..d2310331 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java @@ -1,8 +1,8 @@ package com.xinelu.manage.service.servicepackage; import com.xinelu.common.core.page.TableDataInfo; -import com.xinelu.manage.domain.servicepackage.ServicePackage; import com.xinelu.manage.dto.servicepackage.ServicePackageAddDTO; +import com.xinelu.manage.dto.servicepackage.ServicePackageDto; import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO; import com.xinelu.manage.vo.servicepackage.ServicePackageVO; import java.util.List; @@ -30,7 +30,7 @@ public interface IServicePackageService { * @param servicePackage 服务包基础信息 * @return 服务包基础信息集合 */ - public TableDataInfo selectServicePackageList(ServicePackage servicePackage); + public TableDataInfo selectServicePackageList(ServicePackageDto servicePackage); /** * 查询服务包基础信息列表 @@ -38,7 +38,7 @@ public interface IServicePackageService { * @param servicePackage 服务包基础信息 * @return 服务包基础信息集合 */ - List selectList(ServicePackage servicePackage); + List selectList(ServicePackageDto servicePackage); /** * 新增服务包基础信息 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java index b3de8863..44132104 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java @@ -11,20 +11,20 @@ import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.manage.domain.servicepackage.ServicePackage; import com.xinelu.manage.domain.servicepackagecontent.ServicePackageContent; import com.xinelu.manage.dto.servicepackage.ServicePackageAddDTO; +import com.xinelu.manage.dto.servicepackage.ServicePackageDto; import com.xinelu.manage.mapper.servicepackage.ServicePackageMapper; import com.xinelu.manage.mapper.servicepackagecontent.ServicePackageContentMapper; import com.xinelu.manage.service.servicepackage.IServicePackageService; import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO; import com.xinelu.manage.vo.servicepackage.ServicePackageVO; import com.xinelu.manage.vo.servicepackagecontent.ServicePackageContentVO; +import java.time.LocalDateTime; +import java.util.List; +import javax.annotation.Resource; import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; -import java.time.LocalDateTime; -import java.util.List; - /** * 服务包基础信息Service业务层处理 * @@ -87,7 +87,7 @@ public class ServicePackageServiceImpl implements IServicePackageService { */ @DataScope(agencyAlias = "d", deptAlias = "sp") @Override - public TableDataInfo selectServicePackageList(ServicePackage servicePackage) { + public TableDataInfo selectServicePackageList(ServicePackageDto servicePackage) { pageServiceUtil.startPage(); List voList = servicePackageMapper.selectServicePackageLists(servicePackage); voList.forEach(vo -> { @@ -99,7 +99,7 @@ public class ServicePackageServiceImpl implements IServicePackageService { } @Override - public List selectList(ServicePackage servicePackage) { + public List selectList(ServicePackageDto servicePackage) { return servicePackageMapper.selectServicePackageLists(servicePackage); } 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 index d41d119d..891f6195 100644 --- 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 @@ -63,7 +63,9 @@ import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseChildRouteAuditVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo; import java.time.LocalDateTime; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; import javax.annotation.Resource; @@ -454,6 +456,20 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout SignPatientManageRoute signPatientManageRoute = manageRouteList.get(0); // 查询主路径及子路径节点 List nodeList = specialDiseaseNodeService.getByParentRouteId(signPatientManageRoute.getRouteId()); + + // 查询子路径的触发条件是否满足 + Map> groupByRouteId = nodeList.stream().collect(Collectors.groupingBy(RouteTaskAuditVo::getRouteId)); + Map routeSatisfyMap = new HashMap<>(); + for (Long routeId : groupByRouteId.keySet()) { + if (Objects.equals(routeId, signPatientManageRoute.getRouteId())) { + // 主路径不做处理 + routeSatisfyMap.put(routeId, null); + } else { + boolean satisfy = signPatientManageRouteNodeService.getTriggerConditon(routeId, signPatientRecord.getId()); + routeSatisfyMap.put(routeId, satisfy); + } + } + // 查询患者画像信息 List labelFieldContentList = labelFieldContentMapper.selectByPatientId(signPatientRecord.getPatientId()); if (CollectionUtils.isEmpty(labelFieldContentList)) { @@ -468,6 +484,7 @@ public class SignPatientManageRouteServiceImpl implements ISignPatientManageRout manageRouteNode.setRouteNodeId(node.getId()); manageRouteNode.setExecuteTime(node.getExecutionTime()); manageRouteNode.setRouteNodeNameCN(RouteNodeNameEnum.getNameByInfo(node.getRouteNodeName()).getName()); + manageRouteNode.setConditionSatisfyStatus(routeSatisfyMap.getOrDefault(node.getRouteId(), null)); JSONObject templateDetail = new JSONObject(); // 根据模板类型,存放模板字段 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 index 4fa9e9f6..09aef512 100644 --- 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 @@ -194,4 +194,12 @@ public interface ISignPatientManageRouteNodeService { * @return 替换标签后的内容 */ String replaceMessageInfo(Long messageTemplateId, List labelFieldContentList); + + /** + * 查询触发条件是否满足 + * @param specialDiseaseRouteId 专病管理路径主键 + * @param patientId 患者主键 + * @return 是否满足触发条件,true:满足,false:不满足 + */ + Boolean getTriggerConditon(Long specialDiseaseRouteId, Long patientId); } 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 index ac0ffe33..53facb3b 100644 --- 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 @@ -691,50 +691,8 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage @Override @Transactional(rollbackFor = Exception.class) public void generateChildRouteTask(Long patientId, Long signPatientRecordId, Long specialDiseaseRouteId) { - boolean generateTask = false; - // 查询患者信息 - PatientAllInfoViewUppercase patientAllInfo = null; - List patientAllInfoViewList = patientAllInfoViewMapper.selectPatientAllInfoListViewByPatientId(patientId); - if (CollectionUtils.isNotEmpty(patientAllInfoViewList)) { - patientAllInfo = patientAllInfoViewList.get(0); - } - - // 查询画像信息 - List labelFieldContentList = labelFieldContentMapper.selectByPatientId(patientId); - - // 查询子路径触发条件 - SpecialDiseaseTriggerCondition triggerConditionQuery = new SpecialDiseaseTriggerCondition(); - triggerConditionQuery.setRouteId(specialDiseaseRouteId); - List triggerConditionList = triggerConditionMapper.selectSpecialDiseaseTriggerConditionList(triggerConditionQuery); - // 判断触发条件是否成立 - if (CollectionUtils.isNotEmpty(triggerConditionList)) { - boolean condition1 = judgeTriggerCondition(triggerConditionList.get(0), patientAllInfo, labelFieldContentList); - if (condition1) { - // 条件1成立,继续判断条件2,3 - if (triggerConditionList.size() > 1) { - boolean condition2 = judgeTriggerCondition(triggerConditionList.get(1), patientAllInfo, labelFieldContentList); - if (triggerConditionList.size() > 2) { // 有3个条件 - boolean condition3 = judgeTriggerCondition(triggerConditionList.get(2), patientAllInfo, labelFieldContentList); - switch (triggerConditionList.get(2).getTriggerLogic()) { - case TriggerLogicConstants.AND: - generateTask = condition2 && condition3; - break; - case TriggerLogicConstants.OR: - generateTask = condition2 || condition3; - break; - default: - generateTask = condition2 && condition3; - break; - } - } else { // 有两个条件 - generateTask = condition2; - } - } else { - // 只有1个条件且成立,生成任务 - generateTask = true; - } - } - } + // 查询是否满足触发条件 + boolean generateTask = getTriggerConditon(specialDiseaseRouteId, patientId); if (generateTask) { // 保存sign_patient_manage_route表 SignPatientManageRoute manageRouteQuery = new SignPatientManageRoute(); @@ -903,6 +861,59 @@ public class SignPatientManageRouteNodeServiceImpl implements ISignPatientManage return manageNodeList; } + /** + * 查询触发条件是否满足 + * @param specialDiseaseRouteId 专病管理路径主键 + * @param patientId 患者主键 + * @return 是否满足触发条件,true:满足,false:不满足 + */ + public Boolean getTriggerConditon(Long specialDiseaseRouteId, Long patientId) { + boolean generateTask = false; + // 查询患者信息 + PatientAllInfoViewUppercase patientAllInfo = null; + List patientAllInfoViewList = patientAllInfoViewMapper.selectPatientAllInfoListViewByPatientId(patientId); + if (CollectionUtils.isNotEmpty(patientAllInfoViewList)) { + patientAllInfo = patientAllInfoViewList.get(0); + } + + // 查询画像信息 + List labelFieldContentList = labelFieldContentMapper.selectByPatientId(patientId); + + SpecialDiseaseTriggerCondition triggerConditionQuery = new SpecialDiseaseTriggerCondition(); + triggerConditionQuery.setRouteId(specialDiseaseRouteId); + List triggerConditionList = triggerConditionMapper.selectSpecialDiseaseTriggerConditionList(triggerConditionQuery); + // 判断触发条件是否成立 + if (CollectionUtils.isNotEmpty(triggerConditionList)) { + boolean condition1 = judgeTriggerCondition(triggerConditionList.get(0), patientAllInfo, labelFieldContentList); + if (condition1) { + // 条件1成立,继续判断条件2,3 + if (triggerConditionList.size() > 1) { + boolean condition2 = judgeTriggerCondition(triggerConditionList.get(1), patientAllInfo, labelFieldContentList); + if (triggerConditionList.size() > 2) { // 有3个条件 + boolean condition3 = judgeTriggerCondition(triggerConditionList.get(2), patientAllInfo, labelFieldContentList); + switch (triggerConditionList.get(2).getTriggerLogic()) { + case TriggerLogicConstants.AND: + generateTask = condition2 && condition3; + break; + case TriggerLogicConstants.OR: + generateTask = condition2 || condition3; + break; + default: + generateTask = condition2 && condition3; + break; + } + } else { // 有两个条件 + generateTask = condition2; + } + } else { + // 只有1个条件且成立,生成任务 + generateTask = true; + } + } + } + return generateTask; + } + /** * 根据管理路径生成任务 * @param signPatientManageRoute 签约管理路径 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/ISpecialDiseaseRouteService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/ISpecialDiseaseRouteService.java index a584f2fd..5820fec0 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/ISpecialDiseaseRouteService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/ISpecialDiseaseRouteService.java @@ -3,6 +3,7 @@ package com.xinelu.manage.service.specialdiseaseroute; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO; +import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteQueryDto; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteAuditVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteInfoVo; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; @@ -73,10 +74,10 @@ public interface ISpecialDiseaseRouteService { /** * 科室路径数量 * - * @param departmentName 科室名称 + * @param specialDiseaseRouteQueryDto 查询条件 * @return AjaxResult */ - AjaxResult departmentRouteCount(String departmentName,String releaseStatus,Long servicePackageId); + AjaxResult departmentRouteCount(SpecialDiseaseRouteQueryDto specialDiseaseRouteQueryDto); /** * 专病路径发布 diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java index 13cef5cf..b0269c31 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseaseroute/impl/SpecialDiseaseRouteServiceImpl.java @@ -12,6 +12,7 @@ import com.xinelu.manage.domain.specialdiseasenode.SpecialDiseaseNode; import com.xinelu.manage.domain.specialdiseaseroute.SpecialDiseaseRoute; import com.xinelu.manage.domain.specialdiseaseroutepackage.SpecialDiseaseRoutePackage; import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteDTO; +import com.xinelu.manage.dto.specialdiseaseroute.SpecialDiseaseRouteQueryDto; import com.xinelu.manage.mapper.specialdiseasenode.SpecialDiseaseNodeMapper; import com.xinelu.manage.mapper.specialdiseaseroute.SpecialDiseaseRouteMapper; import com.xinelu.manage.mapper.specialdiseaseroutepackage.SpecialDiseaseRoutePackageMapper; @@ -198,16 +199,16 @@ public class SpecialDiseaseRouteServiceImpl implements ISpecialDiseaseRouteServi /** * 科室路径数量 * - * @param departmentName 科室名称 + * @param specialDiseaseRouteQueryDto 查询条件 * @return AjaxResult */ @Override - public AjaxResult departmentRouteCount(String departmentName, String releaseStatus, Long servicePackageId) { + public AjaxResult departmentRouteCount(SpecialDiseaseRouteQueryDto specialDiseaseRouteQueryDto) { DepartmentVO departmentVO = new DepartmentVO(); List department = new ArrayList<>(); departmentVO.setDepartmentName("全部"); departmentVO.setCountNum(0); - List departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(departmentName, releaseStatus, servicePackageId); + List departmentVOS = specialDiseaseRouteMapper.departmentRouteByDepartmentName(specialDiseaseRouteQueryDto); if (CollectionUtils.isNotEmpty(departmentVOS)) { Integer result = departmentVOS.stream().mapToInt(DepartmentVO::getCountNum).sum(); departmentVO.setCountNum(result); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/impl/SpecialDiseaseTriggerConditionServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/impl/SpecialDiseaseTriggerConditionServiceImpl.java index 89c86872..6ec538ee 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/impl/SpecialDiseaseTriggerConditionServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasetriggercondition/impl/SpecialDiseaseTriggerConditionServiceImpl.java @@ -91,7 +91,7 @@ public class SpecialDiseaseTriggerConditionServiceImpl implements ISpecialDiseas throw new ServiceException("请选择适用范围"); } triggerConditionSaveDTO.getTriggerConditionList().forEach(item -> { - if (StringUtils.isBlank(item.getTriggerConditionName()) || StringUtils.isBlank(item.getTriggerConditionOperator()) || StringUtils.isBlank(item.getTriggerConditionValue())) { + if (StringUtils.isBlank(item.getTriggerConditionCode()) || StringUtils.isBlank(item.getTriggerConditionOperator()) || StringUtils.isBlank(item.getTriggerConditionValue())) { throw new ServiceException("请选择完整的触发条件"); } item.setTriggerConditionOperator(item.getTriggerConditionOperator().replace(">", ">").replace("<", "<")); @@ -155,7 +155,7 @@ public class SpecialDiseaseTriggerConditionServiceImpl implements ISpecialDiseas throw new ServiceException("请选择适用范围"); } triggerConditionUpdateDto.getTriggerConditionList().forEach(item -> { - if (StringUtils.isBlank(item.getTriggerConditionName()) || StringUtils.isBlank(item.getTriggerConditionOperator()) || StringUtils.isBlank(item.getTriggerConditionValue())) { + if (StringUtils.isBlank(item.getTriggerConditionCode()) || StringUtils.isBlank(item.getTriggerConditionOperator()) || StringUtils.isBlank(item.getTriggerConditionValue())) { throw new ServiceException("请选择完整的触发条件"); } item.setTriggerConditionOperator(item.getTriggerConditionOperator().replace(">", ">").replace("<", "<")); diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/department/DepartmentBaseVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/department/DepartmentBaseVo.java new file mode 100644 index 00000000..d38ed86d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/department/DepartmentBaseVo.java @@ -0,0 +1,29 @@ +package com.xinelu.manage.vo.department; + +import io.swagger.annotations.ApiModelProperty; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @description: 科室知识库统计列表返回视图类 + * @author: haown + * @create: 2024-07-05 15:07 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DepartmentBaseVo { + + /** + * 机构名称 + */ + @ApiModelProperty("机构名称") + private String hospitalAgencyName; + + @ApiModelProperty("科室数量列表") + private List deptNumList; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/department/DepartmentVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/department/DepartmentVO.java index a62566f6..e2d70ec8 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/department/DepartmentVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/department/DepartmentVO.java @@ -1,11 +1,9 @@ package com.xinelu.manage.vo.department; -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; /** @@ -18,6 +16,16 @@ import lombok.NoArgsConstructor; @ApiModel(value = "科室信息VO对象") public class DepartmentVO { + /** + * 机构id + */ + private Long hospitalAgencyId; + + /** + * 机构名称 + */ + private String hospitalAgencyName; + /** * 主键id */ diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/SignPatientManageNodeAuditVo.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/SignPatientManageNodeAuditVo.java index d02da0ee..737fcbd4 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/SignPatientManageNodeAuditVo.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/signpatientmanageroutenode/SignPatientManageNodeAuditVo.java @@ -49,4 +49,7 @@ public class SignPatientManageNodeAuditVo extends SignPatientManageRouteNode { @ApiModelProperty(value = "节点名称-中文") private String routeNodeNameCN; + @ApiModelProperty("触发条件满足情况") + private Boolean conditionSatisfyStatus; + } diff --git a/postdischarge-manage/src/main/resources/mapper/manage/department/DepartmentMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/department/DepartmentMapper.xml index babb5c76..0afaadfc 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/department/DepartmentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/department/DepartmentMapper.xml @@ -166,11 +166,16 @@ select d.id, + d.hospital_agency_id, + d.hospital_agency_name, d.department_name, d.department_code, count(oi.id) AS countNum from department d left join operation_info oi on d.id = oi.department_id + + and d.hospital_agency_id = #{hospitalAgencyId} + and d.department_code = #{departmentCode} @@ -220,6 +230,9 @@ count(wt.id) AS countNum from department d left join wechat_template wt on d.id = wt.department_id + + and d.hospital_agency_id = #{hospitalAgencyId} + and d.department_code =#{departmentCode} @@ -243,6 +256,9 @@ count(tm.id) AS countNum from department d left join text_message tm on d.id = tm.department_id + + and d.hospital_agency_id = #{hospitalAgencyId} + and d.department_code = #{departmentCode} @@ -301,6 +317,9 @@ count(sp.id) AS countNum from department d left join service_package sp on d.id = sp.department_id + + and d.hospital_agency_id = #{hospitalAgencyId} + and d.department_code = #{departmentCode} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/operationInfo/OperationInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/operationInfo/OperationInfoMapper.xml index aa77b5e0..185ccebe 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/operationInfo/OperationInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/operationInfo/OperationInfoMapper.xml @@ -86,6 +86,9 @@ from operation_info oi left join department d on d.id = oi.department_id + + and d.hospital_agency_id = #{hospitalAgencyId} + and oi.department_id = #{departmentId} @@ -101,12 +104,6 @@ and oi.operation_info = #{operationInfo} - - and oi.operation_remark = #{operationRemark} - - - and oi.sort = #{sort} - ${params.dataScope} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml index 8929860b..75699998 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/propagandainfo/PropagandaInfoMapper.xml @@ -255,27 +255,6 @@ (select id, department_id, propaganda_status from propaganda_info del_flag = 0 - - and propaganda_status = #{propagandaStatus} - - - and hospital_agency_id = #{hospitalAgencyId} - - - and department_id = #{departmentId} - - - and propaganda_type = #{propagandaType} - - - and propaganda_status = #{propagandaStatus} - - - and date_format(create_time, '%y%m%d') >= date_format(#{createTimeStart}, '%y%m%d') - - - and date_format(create_time, '%y%m%d') <= date_format(#{createTimeEnd}, '%y%m%d') - ) as p on d.id = p.department_id diff --git a/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml index 932b77a1..17efa51a 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/questioninfo/QuestionInfoMapper.xml @@ -97,7 +97,7 @@ - select qi.id, qi.department_id, qi.department_name, @@ -120,6 +120,9 @@ from question_info qi left join department dt ON qi.department_id = dt.id + + and dt.hospital_agency_id = #{hospitalAgencyId} + and qi.department_id = #{departmentId} @@ -327,10 +330,18 @@ dt.department_name, dt.department_code, count(qi.id) AS countNum, - (select count(1) from question_info qi left join department dt on dt.id = qi.department_id - ${params.dataScope}) totalNumber + (select count(1) from question_info qi left join department dt on dt.id = qi.department_id + + + and dt.hospital_agency_id = #{hospitalAgencyId} + + ${params.dataScope} + ) totalNumber from department dt left join question_info qi on dt.id = qi.department_id + + and dt.hospital_agency_id = #{hospitalAgencyId} + and dt.department_name like concat('%',#{departmentName},'%') diff --git a/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml index 20dbb1e3..01bb3380 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/scriptInfo/ScriptInfoMapper.xml @@ -55,7 +55,7 @@ from script_info - select si.id, si.department_id, si.department_name, @@ -78,8 +78,11 @@ from script_info si left join department d on d.id = si.department_id + + and d.hospital_agency_id = #{hospitalAgencyId} + - and si.department_id =#{departmentId} + and si.department_id = #{departmentId} and si.department_name like concat('%',#{departmentName}, '%' ) diff --git a/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml index 0ff707b1..375b37c4 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml @@ -73,8 +73,7 @@ - and department_id = - #{departmentId} + and department_id = #{departmentId} and department_name like concat('%', @@ -160,7 +159,7 @@