From 19e10ea37628c1b170b9ea788533561cbe877274 Mon Sep 17 00:00:00 2001 From: youxilong Date: Sun, 3 Mar 2024 22:16:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=A7=91=E5=AE=A4=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=92=8C=E6=9C=8D=E5=8A=A1=E5=8C=85=E6=95=B0=E9=87=8F?= =?UTF-8?q?=EF=BC=8C=E6=9F=A5=E8=AF=A2=E6=9C=8D=E5=8A=A1=E5=8C=85=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../department/DepartmentController.java | 9 + .../ServicePackageController.java | 92 +++++ .../ServiceWayContentController.java | 20 +- .../domain/servicepackage/ServicePackage.java | 150 ++++++++ .../servicefrequency/ServiceFrequencyDTO.java | 53 +++ .../ServiceWayContentAddDTO.java | 2 +- .../ServiceWayContentRemoveDTO.java | 31 -- .../mapper/department/DepartmentMapper.java | 7 + .../servicepackage/ServicePackageMapper.java | 70 ++++ .../ServiceWayContentMapper.java | 40 ++- .../department/IDepartmentService.java | 7 + .../impl/DepartmentServiceImpl.java | 11 + .../IServicePackageService.java | 63 ++++ .../impl/ServicePackageServiceImpl.java | 98 ++++++ .../IServiceWayContentService.java | 25 +- .../impl/ServiceWayContentServiceImpl.java | 166 ++++++--- .../manage/vo/department/DepartmentVO.java | 3 +- .../servicefrequency/ServiceFrequencyVO.java | 51 +++ .../ServicePackageDetailVO.java | 91 +++++ .../vo/servicepackage/ServicePackageVO.java | 91 +++++ .../manage/vo/serviceway/ServiceWayVO.java | 41 +++ .../ServiceWayContentAndFrequencyVO.java | 64 ++++ .../ServiceWayContentVO.java | 38 +- .../manage/department/DepartmentMapper.xml | 20 ++ .../servicepackage/ServicePackageMapper.xml | 324 ++++++++++++++++++ .../ServiceWayContentMapper.xml | 70 +++- 26 files changed, 1482 insertions(+), 155 deletions(-) create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/domain/servicepackage/ServicePackage.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicefrequency/ServiceFrequencyDTO.java delete mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentRemoveDTO.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicefrequency/ServiceFrequencyVO.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicepackage/ServicePackageDetailVO.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicepackage/ServicePackageVO.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/serviceway/ServiceWayVO.java create mode 100644 postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentAndFrequencyVO.java create mode 100644 postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml 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 6dc4d1a3..a2844373 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 @@ -171,4 +171,13 @@ public class DepartmentController extends BaseController { List list = util.importExcel(file.getInputStream()); return departmentService.insertDepartmentList(list); } + + /** + * 查询科室信息列表及包含服务包数量 + */ + @GetMapping("/listServicePackageNum") + public AjaxResult listServicePackageNum(DepartmentDTO departmentDto) { + List list = departmentService.selectListServicePackageNum(departmentDto); + return AjaxResult.success(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 new file mode 100644 index 00000000..7fdec169 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicepackage/ServicePackageController.java @@ -0,0 +1,92 @@ +package com.xinelu.manage.controller.servicepackage; + +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.servicepackage.ServicePackage; +import com.xinelu.manage.service.servicepackage.IServicePackageService; +import com.xinelu.manage.vo.servicepackage.ServicePackageVO; +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; + +/** + * 服务包基础信息Controller + * + * @author xinelu + * @date 2024-03-03 + */ +@RestController +@RequestMapping("/manage/servicepackage") +public class ServicePackageController extends BaseController { + @Resource + private IServicePackageService servicePackageService; + + /** + * 查询服务包基础信息列表 + */ + @PreAuthorize("@ss.hasPermi('manage:servicepackage:list')") + @GetMapping("/list") + public TableDataInfo list(ServicePackage servicePackage) { + startPage(); + List list = servicePackageService.selectServicePackageList(servicePackage); + return getDataTable(list); + } + + /** + * 导出服务包基础信息列表 + */ + @PreAuthorize("@ss.hasPermi('manage:servicepackage:export')") + @Log(title = "服务包基础信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ServicePackage servicePackage) { + List list = servicePackageService.selectServicePackageList(servicePackage); + ExcelUtil util = new ExcelUtil(ServicePackageVO.class); + util.exportExcel(response, list, "服务包基础信息数据"); + } + + /** + * 获取服务包基础信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('manage:servicepackage:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(servicePackageService.selectServicePackageById(id)); + } + + /** + * 新增服务包基础信息 + */ + @PreAuthorize("@ss.hasPermi('manage:servicepackage:add')") + @Log(title = "服务包基础信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ServicePackage servicePackage) { + return toAjax(servicePackageService.insertServicePackage(servicePackage)); + } + + /** + * 修改服务包基础信息 + */ + @PreAuthorize("@ss.hasPermi('manage:servicepackage:edit')") + @Log(title = "服务包基础信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ServicePackage servicePackage) { + return toAjax(servicePackageService.updateServicePackage(servicePackage)); + } + + /** + * 删除服务包基础信息 + */ + @PreAuthorize("@ss.hasPermi('manage:servicepackage:remove')") + @Log(title = "服务包基础信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(servicePackageService.deleteServicePackageByIds(ids)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicewaycontent/ServiceWayContentController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicewaycontent/ServiceWayContentController.java index 157a1e4d..ad5b2bf0 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicewaycontent/ServiceWayContentController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/servicewaycontent/ServiceWayContentController.java @@ -10,7 +10,6 @@ import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentAddDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentEditDTO; -import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentRemoveDTO; import com.xinelu.manage.service.servicewaycontent.IServiceWayContentService; import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO; import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO; @@ -64,6 +63,7 @@ public class ServiceWayContentController extends BaseController { /** * 根据服务方式id获取服务方式 + * * @param id * @return */ @@ -124,9 +124,9 @@ public class ServiceWayContentController extends BaseController { } /** - * 根据服务频次id获取服务方式内容详细信息 + * 根据服务频次id查询服务内容详细信息 */ - @ApiOperation("根据服务频次id获取服务方式内容详细信息") + @ApiOperation("根据服务频次id查询服务内容详细信息") @PreAuthorize("@ss.hasPermi('manage:servicewaycontent:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { @@ -138,7 +138,7 @@ public class ServiceWayContentController extends BaseController { */ @PreAuthorize("@ss.hasPermi('manage:servicewaycontent:add')") @Log(title = "服务方式内容", businessType = BusinessType.INSERT) - @PostMapping + @PostMapping("/add") public AjaxResult add(@RequestBody ServiceWayContentAddDTO serviceWayContentAddDTO) { return toAjax(serviceWayContentService.insertServiceWayContent(serviceWayContentAddDTO)); } @@ -148,19 +148,19 @@ public class ServiceWayContentController extends BaseController { */ @PreAuthorize("@ss.hasPermi('manage:servicewaycontent:edit')") @Log(title = "服务方式内容", businessType = BusinessType.UPDATE) - @PutMapping + @PutMapping("/edit") public AjaxResult edit(@RequestBody ServiceWayContentEditDTO serviceWayContentEditDTO) { return toAjax(serviceWayContentService.updateServiceWayContent(serviceWayContentEditDTO)); } /** - * 根据服务频次id和服务内容id删除服务内容 + * 根据服务频次id删除服务内容 */ - @ApiOperation("根据服务频次id和服务内容id删除服务内容") + @ApiOperation("根据服务频次id删除服务内容") @PreAuthorize("@ss.hasPermi('manage:servicewaycontent:remove')") @Log(title = "服务方式内容", businessType = BusinessType.DELETE) - @DeleteMapping("/remove") - public AjaxResult remove(ServiceWayContentRemoveDTO serviceWayContentRemoveDTO) { - return toAjax(serviceWayContentService.deleteByFrequencyIdAndContentId(serviceWayContentRemoveDTO)); + @DeleteMapping("/remove/{id}") + public AjaxResult remove(@PathVariable Long id) { + return toAjax(serviceWayContentService.deleteByFrequencyId(id)); } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/servicepackage/ServicePackage.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/servicepackage/ServicePackage.java new file mode 100644 index 00000000..19f32ac2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/servicepackage/ServicePackage.java @@ -0,0 +1,150 @@ +package com.xinelu.manage.domain.servicepackage; + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.math.BigDecimal; + +/** + * 服务包基础信息对象 service_package + * + * @author xinelu + * @date 2024-03-03 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "服务包基础信息对象", description = "service_package") +public class ServicePackage extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + private Long id; + + /** + * 所属科室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 diseaseTypeId; + + /** + * 病种名称 + */ + @ApiModelProperty(value = "病种名称") + @Excel(name = "病种名称") + private String diseaseTypeName; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称") + @Excel(name = "服务包名称") + private String packageName; + + /** + * 服务包简介 + */ + @ApiModelProperty(value = "服务包简介") + @Excel(name = "服务包简介") + private String packageIntroduction; + + /** + * 服务包版本号 + */ + @ApiModelProperty(value = "服务包版本号") + @Excel(name = "服务包版本号") + private String packageVersion; + + /** + * 服务包期限 + */ + @ApiModelProperty(value = "服务包期限") + @Excel(name = "服务包期限") + private Integer packageTerm; + + /** + * 服务包期限单位,年,月,日 + */ + @ApiModelProperty(value = "服务包期限单位,年,月,日") + @Excel(name = "服务包期限单位,年,月,日") + private String packageTermUnit; + + /** + * 服务包价格,单位为:元 + */ + @ApiModelProperty(value = "服务包价格,单位为:元") + @Excel(name = "服务包价格,单位为:元") + private BigDecimal packagePrice; + + /** + * 服务包备注 + */ + @ApiModelProperty(value = "服务包备注") + @Excel(name = "服务包备注") + private String packageRemark; + + /** + * 硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA + */ + @ApiModelProperty(value = "硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA") + @Excel(name = "硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA") + private String hardwareType; + + /** + * 是否发布,0:否,1:是 + */ + @ApiModelProperty(value = "是否发布,0:否,1:是") + @Excel(name = "是否发布,0:否,1:是") + private Integer whetherRelease; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("departmentId", getDepartmentId()) + .append("departmentName", getDepartmentName()) + .append("diseaseTypeId", getDiseaseTypeId()) + .append("diseaseTypeName", getDiseaseTypeName()) + .append("packageName", getPackageName()) + .append("packageIntroduction", getPackageIntroduction()) + .append("packageVersion", getPackageVersion()) + .append("packageTerm", getPackageTerm()) + .append("packageTermUnit", getPackageTermUnit()) + .append("packagePrice", getPackagePrice()) + .append("packageRemark", getPackageRemark()) + .append("hardwareType", getHardwareType()) + .append("whetherRelease", getWhetherRelease()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicefrequency/ServiceFrequencyDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicefrequency/ServiceFrequencyDTO.java new file mode 100644 index 00000000..31719763 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicefrequency/ServiceFrequencyDTO.java @@ -0,0 +1,53 @@ +package com.xinelu.manage.dto.servicefrequency; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author : youxilong + * @date : 2024/3/3 19:24 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "服务频次对象DTO") +public class ServiceFrequencyDTO { + + /** + * 服务频次id + */ + @ApiModelProperty(value = "服务频次id") + private Long id; + + /** + * 服务内容id + */ + private Long serviceContentId; + + /** + * 服务频次类型,数字:DIGIT,文本:TEXT + */ + @ApiModelProperty(value = "服务频次类型,数字:DIGIT,文本:TEXT") + private String serviceFrequencyType; + + /** + * 服务频次文本 + */ + @ApiModelProperty(value = "服务频次文本") + private String serviceFrequencyText; + + /** + * 服务频次数字起始值 + */ + @ApiModelProperty(value = "服务频次数字起始值") + private Integer serviceFrequencyStart; + + /** + * 服务频次数字结束值 + */ + @ApiModelProperty(value = "服务频次数字结束值") + private Integer serviceFrequencyEnd; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentAddDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentAddDTO.java index 9f49c0da..dceb02e6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentAddDTO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentAddDTO.java @@ -19,7 +19,7 @@ public class ServiceWayContentAddDTO { /** * 服务方式id */ - private Long id; + private Long serviceWayId; /** diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentRemoveDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentRemoveDTO.java deleted file mode 100644 index ec0b2d1f..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/servicewaycontent/ServiceWayContentRemoveDTO.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xinelu.manage.dto.servicewaycontent; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * @author : youxilong - * @date : 2024/3/1 10:48 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@ApiModel(value = "删除服务方式内容对象DTO") -public class ServiceWayContentRemoveDTO { - - /** - * 服务频次id - */ - @ApiModelProperty(value = "服务频次id") - private Long id; - - /** - * 服务内容id - */ - @ApiModelProperty(value = "服务内容id") - private String serviceContentId; - -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/department/DepartmentMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/department/DepartmentMapper.java index eabffd63..e71e38a6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/department/DepartmentMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/department/DepartmentMapper.java @@ -120,4 +120,11 @@ public interface DepartmentMapper { * @return int **/ int insertDepartmentList(List departmentList); + + /** + * 查询科室信息列表及包含服务包数量 + * @param departmentDto + * @return + */ + List selectListServicePackageNum(DepartmentDTO departmentDto); } 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 new file mode 100644 index 00000000..e43a439c --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicepackage/ServicePackageMapper.java @@ -0,0 +1,70 @@ +package com.xinelu.manage.mapper.servicepackage; + +import com.xinelu.manage.domain.servicepackage.ServicePackage; +import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO; +import com.xinelu.manage.vo.servicepackage.ServicePackageVO; + +import java.util.List; + +/** + * 服务包基础信息Mapper接口 + * + * @author xinelu + * @date 2024-03-03 + */ +public interface ServicePackageMapper { + /** + * 查询服务包基础信息 + * + * @param id 服务包基础信息主键 + * @return 服务包基础信息 + */ + public ServicePackage selectServicePackageById(Long id); + + /** + * 查询服务包基础信息列表 + * + * @param servicePackage 服务包基础信息 + * @return 服务包基础信息集合 + */ + public List selectServicePackageList(ServicePackage servicePackage); + + /** + * 新增服务包基础信息 + * + * @param servicePackage 服务包基础信息 + * @return 结果 + */ + public int insertServicePackage(ServicePackage servicePackage); + + /** + * 修改服务包基础信息 + * + * @param servicePackage 服务包基础信息 + * @return 结果 + */ + public int updateServicePackage(ServicePackage servicePackage); + + /** + * 删除服务包基础信息 + * + * @param id 服务包基础信息主键 + * @return 结果 + */ + public int deleteServicePackageById(Long id); + + /** + * 批量删除服务包基础信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteServicePackageByIds(Long[] ids); + + /** + * 根据服务包id查询服务包详情信息 + * @param id + * @return + */ + ServicePackageDetailVO selectServicePackagesById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicewaycontent/ServiceWayContentMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicewaycontent/ServiceWayContentMapper.java index 4b837c84..275c394e 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicewaycontent/ServiceWayContentMapper.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/servicewaycontent/ServiceWayContentMapper.java @@ -1,10 +1,11 @@ package com.xinelu.manage.mapper.servicewaycontent; import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent; +import com.xinelu.manage.dto.servicefrequency.ServiceFrequencyDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentAddDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentEditDTO; -import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentRemoveDTO; +import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndFrequencyVO; import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO; import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO; import org.apache.ibatis.annotations.Param; @@ -89,15 +90,7 @@ public interface ServiceWayContentMapper { * @param id * @return */ - ServiceWayContentVO selectServiceWayContentDetailByFrequencyId(Long id); - - /** - * 根据服务频次id和服务内容id删除服务内容 - * - * @param serviceWayContentRemoveDTO - * @return - */ - int deleteByFrequencyIdAndContentId(ServiceWayContentRemoveDTO serviceWayContentRemoveDTO); + ServiceWayContentAndFrequencyVO selectServiceWayContentDetailByFrequencyId(Long id); /** * 查询服务方式是否存在 @@ -132,6 +125,7 @@ public interface ServiceWayContentMapper { /** * 修改服务方式 + * * @param serviceWayContent * @return */ @@ -139,8 +133,34 @@ public interface ServiceWayContentMapper { /** * 判断同一服务内容下服务频次是否存在 + * * @param serviceWayContentEditDTO * @return */ int countByEditDTO(ServiceWayContentEditDTO serviceWayContentEditDTO); + + /** + * 根据服务频次id删除服务内容 + * + * @param id + * @return + */ + int deleteByFrequencyId(Long id); + + /** + * 判断服务内容在服务内容表中是否存在 + * + * @param serviceWayId + * @param serviceContent + * @return + */ + ServiceWayContentVO countByWayIdAndContent(@Param("serviceWayId") Long serviceWayId, @Param("serviceContent") String serviceContent); + + /** + * 判断服务频次在服务频次表中是否存在 + * + * @param serviceFrequencyDTO + * @return + */ + int countByServiceFrequencyDTO(ServiceFrequencyDTO serviceFrequencyDTO); } 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 fbc3fdfb..8d9fb247 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 @@ -111,4 +111,11 @@ public interface IDepartmentService { * @return int **/ AjaxResult insertDepartmentList(List departmentList); + + /** + * 查询科室信息列表及包含服务包数量 + * @param departmentDto + * @return + */ + List 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 067919c7..46fe130a 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 @@ -215,4 +215,15 @@ public class DepartmentServiceImpl implements IDepartmentService { } return AjaxResult.success(); } + + /** + * 查询科室信息列表及包含服务包数量 + * + * @param departmentDto + * @return + */ + @Override + public List selectListServicePackageNum(DepartmentDTO departmentDto) { + return departmentMapper.selectListServicePackageNum(departmentDto); + } } 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 new file mode 100644 index 00000000..b0ca612d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/IServicePackageService.java @@ -0,0 +1,63 @@ +package com.xinelu.manage.service.servicepackage; + +import com.xinelu.manage.domain.servicepackage.ServicePackage; +import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO; +import com.xinelu.manage.vo.servicepackage.ServicePackageVO; + +import java.util.List; + +/** + * 服务包基础信息Service接口 + * + * @author xinelu + * @date 2024-03-03 + */ +public interface IServicePackageService { + /** + * 查询服务包基础信息 + * + * @param id 服务包基础信息主键 + * @return 服务包基础信息 + */ + public ServicePackageDetailVO selectServicePackageById(Long id); + + /** + * 查询服务包基础信息列表 + * + * @param servicePackage 服务包基础信息 + * @return 服务包基础信息集合 + */ + public List selectServicePackageList(ServicePackage servicePackage); + + /** + * 新增服务包基础信息 + * + * @param servicePackage 服务包基础信息 + * @return 结果 + */ + public int insertServicePackage(ServicePackage servicePackage); + + /** + * 修改服务包基础信息 + * + * @param servicePackage 服务包基础信息 + * @return 结果 + */ + public int updateServicePackage(ServicePackage servicePackage); + + /** + * 批量删除服务包基础信息 + * + * @param ids 需要删除的服务包基础信息主键集合 + * @return 结果 + */ + public int deleteServicePackageByIds(Long[] ids); + + /** + * 删除服务包基础信息信息 + * + * @param id 服务包基础信息主键 + * @return 结果 + */ + public int deleteServicePackageById(Long id); +} 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 new file mode 100644 index 00000000..74aea6f2 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicepackage/impl/ServicePackageServiceImpl.java @@ -0,0 +1,98 @@ +package com.xinelu.manage.service.servicepackage.impl; + +import com.xinelu.common.utils.DateUtils; +import com.xinelu.manage.domain.servicepackage.ServicePackage; +import com.xinelu.manage.mapper.servicepackage.ServicePackageMapper; +import com.xinelu.manage.service.servicepackage.IServicePackageService; +import com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO; +import com.xinelu.manage.vo.servicepackage.ServicePackageVO; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 服务包基础信息Service业务层处理 + * + * @author xinelu + * @date 2024-03-03 + */ +@Service +public class ServicePackageServiceImpl implements IServicePackageService { + @Resource + private ServicePackageMapper servicePackageMapper; + + /** + * 查询服务包基础信息 + * + * @param id 服务包基础信息主键 + * @return 服务包基础信息 + */ + @Override + public ServicePackageDetailVO selectServicePackageById(Long id) { + return servicePackageMapper.selectServicePackagesById(id); + } + + /** + * 查询服务包基础信息列表 + * + * @param servicePackage 服务包基础信息 + * @return 服务包基础信息 + */ + @Override + public List selectServicePackageList(ServicePackage servicePackage) { + List voList = servicePackageMapper.selectServicePackageList(servicePackage); + return voList.stream().map(vo -> { + String packageTermAndUnit = vo.getPackageTerm() + vo.getPackageTermUnit(); + vo.setPackageTermAndUnit(packageTermAndUnit); + return vo; + }).collect(Collectors.toList()); + } + + /** + * 新增服务包基础信息 + * + * @param servicePackage 服务包基础信息 + * @return 结果 + */ + @Override + public int insertServicePackage(ServicePackage servicePackage) { + servicePackage.setCreateTime(DateUtils.getNowDate()); + return servicePackageMapper.insertServicePackage(servicePackage); + } + + /** + * 修改服务包基础信息 + * + * @param servicePackage 服务包基础信息 + * @return 结果 + */ + @Override + public int updateServicePackage(ServicePackage servicePackage) { + servicePackage.setUpdateTime(DateUtils.getNowDate()); + return servicePackageMapper.updateServicePackage(servicePackage); + } + + /** + * 批量删除服务包基础信息 + * + * @param ids 需要删除的服务包基础信息主键 + * @return 结果 + */ + @Override + public int deleteServicePackageByIds(Long[] ids) { + return servicePackageMapper.deleteServicePackageByIds(ids); + } + + /** + * 删除服务包基础信息信息 + * + * @param id 服务包基础信息主键 + * @return 结果 + */ + @Override + public int deleteServicePackageById(Long id) { + return servicePackageMapper.deleteServicePackageById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/IServiceWayContentService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/IServiceWayContentService.java index 01ec36ff..d37f9443 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/IServiceWayContentService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/IServiceWayContentService.java @@ -4,7 +4,7 @@ import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentAddDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentEditDTO; -import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentRemoveDTO; +import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndFrequencyVO; import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO; import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO; @@ -23,7 +23,7 @@ public interface IServiceWayContentService { * @param id 服务方式内容主键 * @return 服务方式内容 */ - public ServiceWayContentVO selectServiceWayContentById(Long id); + public ServiceWayContentAndFrequencyVO selectServiceWayContentById(Long id); /** * 查询服务方式内容列表 @@ -67,22 +67,16 @@ public interface IServiceWayContentService { /** * 查询服务方式列表 + * * @param serviceWayName * @param id * @return */ List selectListNum(String serviceWayName, Long id); - /** - * 根据服务频次id和服务内容id删除服务内容 - * - * @param serviceWayContentRemoveDTO - * @return - */ - int deleteByFrequencyIdAndContentId(ServiceWayContentRemoveDTO serviceWayContentRemoveDTO); - /** * 新增服务方式 + * * @param serviceWayContent * @return */ @@ -90,6 +84,7 @@ public interface IServiceWayContentService { /** * 修改服务方式 + * * @param serviceWayContent * @return */ @@ -97,6 +92,7 @@ public interface IServiceWayContentService { /** * 根据id删除服务方式 + * * @param id * @return */ @@ -104,8 +100,17 @@ public interface IServiceWayContentService { /** * 根据id查询服务方式 + * * @param id * @return */ String selectServiceWayById(Long id); + + /** + * 根据服务频次id删除服务内容 + * + * @param id + * @return + */ + int deleteByFrequencyId(Long id); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/impl/ServiceWayContentServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/impl/ServiceWayContentServiceImpl.java index c2542e6d..f98827ff 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/impl/ServiceWayContentServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/servicewaycontent/impl/ServiceWayContentServiceImpl.java @@ -4,19 +4,23 @@ import com.xinelu.common.enums.ServiceWayContentServiceType; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.manage.domain.servicewaycontent.ServiceWayContent; +import com.xinelu.manage.dto.servicefrequency.ServiceFrequencyDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentAddDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentDTO; import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentEditDTO; -import com.xinelu.manage.dto.servicewaycontent.ServiceWayContentRemoveDTO; import com.xinelu.manage.mapper.servicewaycontent.ServiceWayContentMapper; import com.xinelu.manage.service.servicewaycontent.IServiceWayContentService; +import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndFrequencyVO; import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndNumVO; import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO; import com.xinelu.system.mapper.SysDictDataMapper; +import org.apache.commons.lang3.ObjectUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.Date; import java.util.List; /** @@ -40,7 +44,7 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { * @return 服务方式内容 */ @Override - public ServiceWayContentVO selectServiceWayContentById(Long id) { + public ServiceWayContentAndFrequencyVO selectServiceWayContentById(Long id) { return serviceWayContentMapper.selectServiceWayContentDetailByFrequencyId(id); } @@ -63,33 +67,57 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { */ @Override public int insertServiceWayContent(ServiceWayContentAddDTO serviceWayContentAddDTO) { - // 新增服务内容 - ServiceWayContent serviceWayContent = new ServiceWayContent(); - serviceWayContent.setServiceType(ServiceWayContentServiceType.SERVICE_CONTENT.toString()); - serviceWayContent.setServiceWayId(serviceWayContentAddDTO.getId()); - serviceWayContent.setServiceContent(serviceWayContentAddDTO.getServiceContent()); - serviceWayContent.setCreateBy(SecurityUtils.getUsername()); - serviceWayContent.setCreateTime(DateUtils.getNowDate()); - if (serviceWayContentMapper.insertServiceWayContent(serviceWayContent) <= 0) { - throw new ServiceException("新增服务内容失败"); - - } - // 判断同一方式下同一服务内容下服务频次是否存在 - // 如果存在,则提示该服务内容下服务频次已存在 - if (serviceWayContentMapper.countByDTOAndContentId(serviceWayContentAddDTO, serviceWayContent.getId()) > 0) { - throw new ServiceException("当前服务方式服务内容下服务频次已存在"); - } - // 如果不存在,新增服务频次 + // 判断服务内容在服务内容表中是否存在 + ServiceWayContentVO serviceWayContentVO = serviceWayContentMapper.countByWayIdAndContent(serviceWayContentAddDTO.getServiceWayId(), serviceWayContentAddDTO.getServiceContent()); + String username = SecurityUtils.getUsername(); + Date date = DateUtils.getNowDate(); ServiceWayContent serviceFrequency = new ServiceWayContent(); - serviceFrequency.setServiceType(ServiceWayContentServiceType.SERVICE_FREQUENCY.toString()); - serviceFrequency.setServiceContentId(serviceWayContent.getId()); - serviceFrequency.setServiceFrequencyType(serviceWayContentAddDTO.getServiceFrequencyType()); - serviceFrequency.setServiceFrequencyStart(serviceWayContentAddDTO.getServiceFrequencyStart()); - serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd()); - serviceFrequency.setCreateBy(SecurityUtils.getUsername()); - serviceFrequency.setCreateTime(DateUtils.getNowDate()); - if (serviceWayContentMapper.insertServiceWayContent(serviceWayContent) <= 0) { - throw new ServiceException("新增服务频次失败"); + // 如果服务内容在服务内容表中存在 + if (ObjectUtils.isNotEmpty(serviceWayContentVO)) { + // 判断服务频次是否在服务频次表中是否存在 + ServiceFrequencyDTO serviceFrequencyDTO = new ServiceFrequencyDTO(); + BeanUtils.copyProperties(serviceWayContentAddDTO, serviceFrequencyDTO); + serviceFrequencyDTO.setServiceContentId(serviceWayContentVO.getId()); + // 如果当前服务内容下服务频次已存在 + if (serviceWayContentMapper.countByServiceFrequencyDTO(serviceFrequencyDTO) > 0) { + throw new ServiceException("当前服务内容下服务频次已存在"); + } + // 如果当前服务内容下服务频次不存在,新增服务频次 + serviceFrequency.setServiceType(ServiceWayContentServiceType.SERVICE_FREQUENCY.toString()); + serviceFrequency.setServiceContentId(serviceWayContentVO.getId()); + serviceFrequency.setServiceFrequencyType(serviceWayContentAddDTO.getServiceFrequencyType()); + serviceFrequency.setServiceFrequencyText(serviceWayContentAddDTO.getServiceFrequencyText()); + serviceFrequency.setServiceFrequencyStart(serviceWayContentAddDTO.getServiceFrequencyStart()); + serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd()); + serviceFrequency.setCreateBy(username); + serviceFrequency.setCreateTime(date); + if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) { + throw new ServiceException("新增服务频次失败"); + } + } else { + // 如果服务内容在服务内容表不存在,新增服务内容,新增服务频次 + // 新增服务内容 + ServiceWayContent serviceContent = new ServiceWayContent(); + serviceContent.setServiceType(ServiceWayContentServiceType.SERVICE_CONTENT.toString()); + serviceContent.setServiceWayId(serviceWayContentAddDTO.getServiceWayId()); + serviceContent.setServiceContent(serviceWayContentAddDTO.getServiceContent()); + serviceContent.setCreateBy(username); + serviceContent.setCreateTime(date); + if (serviceWayContentMapper.insertServiceWayContent(serviceContent) <= 0) { + throw new ServiceException("新增服务内容失败"); + } + // 新增服务频次 + serviceFrequency.setServiceType(ServiceWayContentServiceType.SERVICE_FREQUENCY.toString()); + serviceFrequency.setServiceContentId(serviceContent.getId()); + serviceFrequency.setServiceFrequencyType(serviceWayContentAddDTO.getServiceFrequencyType()); + serviceFrequency.setServiceFrequencyText(serviceWayContentAddDTO.getServiceFrequencyText()); + serviceFrequency.setServiceFrequencyStart(serviceWayContentAddDTO.getServiceFrequencyStart()); + serviceFrequency.setServiceFrequencyEnd(serviceWayContentAddDTO.getServiceFrequencyEnd()); + serviceFrequency.setCreateBy(username); + serviceFrequency.setCreateTime(date); + if (serviceWayContentMapper.insertServiceWayContent(serviceFrequency) <= 0) { + throw new ServiceException("新增服务频次失败"); + } } return 1; } @@ -102,16 +130,58 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { */ @Override public int updateServiceWayContent(ServiceWayContentEditDTO serviceWayContentEditDTO) { - // 判断同一服务内容下服务频次是否存在 - if (serviceWayContentMapper.countByEditDTO(serviceWayContentEditDTO) <= 0) { - throw new ServiceException("当前服务内容下服务频次已存在"); + // 判断服务内容在服务内容表中是否存在 + ServiceWayContentVO serviceWayContentVO = serviceWayContentMapper.countByWayIdAndContent(serviceWayContentEditDTO.getServiceWayId(), serviceWayContentEditDTO.getServiceContent()); + String username = SecurityUtils.getUsername(); + Date date = DateUtils.getNowDate(); + ServiceWayContent serviceFrequency = new ServiceWayContent(); + // 如果服务内容在服务内容表中存在 + if (ObjectUtils.isNotEmpty(serviceWayContentVO)) { + // 判断服务频次是否在服务频次表中是否存在 + ServiceFrequencyDTO serviceFrequencyDTO = new ServiceFrequencyDTO(); + BeanUtils.copyProperties(serviceWayContentEditDTO, serviceFrequencyDTO); + serviceFrequencyDTO.setServiceContentId(serviceWayContentVO.getId()); + // 如果当前服务内容下服务频次已存在 + if (serviceWayContentMapper.countByServiceFrequencyDTO(serviceFrequencyDTO) > 0) { + throw new ServiceException("当前服务内容下服务频次已存在"); + } + // 如果当前服务内容下服务频次不存在,更新服务频次 + serviceFrequency.setId(serviceWayContentEditDTO.getId()); + serviceFrequency.setServiceContentId(serviceWayContentVO.getId()); + serviceFrequency.setServiceFrequencyType(serviceWayContentEditDTO.getServiceFrequencyType()); + serviceFrequency.setServiceFrequencyText(serviceWayContentEditDTO.getServiceFrequencyText()); + serviceFrequency.setServiceFrequencyStart(serviceWayContentEditDTO.getServiceFrequencyStart()); + serviceFrequency.setServiceFrequencyEnd(serviceWayContentEditDTO.getServiceFrequencyEnd()); + serviceFrequency.setUpdateBy(username); + serviceFrequency.setUpdateTime(date); + if (serviceWayContentMapper.updateServiceWayContent(serviceFrequency) <= 0) { + throw new ServiceException("更新服务频次失败"); + } + } else { + // 如果服务内容在服务内容表不存在,新增服务内容,更新服务频次 + // 新增服务内容 + ServiceWayContent serviceContent = new ServiceWayContent(); + serviceContent.setServiceType(ServiceWayContentServiceType.SERVICE_CONTENT.toString()); + serviceContent.setServiceWayId(serviceWayContentEditDTO.getServiceWayId()); + serviceContent.setServiceContent(serviceWayContentEditDTO.getServiceContent()); + serviceContent.setCreateBy(username); + serviceContent.setCreateTime(date); + if (serviceWayContentMapper.insertServiceWayContent(serviceContent) <= 0) { + throw new ServiceException("新增服务内容失败"); + } + // 修改服务频次 + serviceFrequency.setId(serviceWayContentEditDTO.getId()); + serviceFrequency.setServiceContentId(serviceContent.getId()); + serviceFrequency.setServiceFrequencyType(serviceWayContentEditDTO.getServiceFrequencyType()); + serviceFrequency.setServiceFrequencyText(serviceWayContentEditDTO.getServiceFrequencyText()); + serviceFrequency.setServiceFrequencyStart(serviceWayContentEditDTO.getServiceFrequencyStart()); + serviceFrequency.setServiceFrequencyEnd(serviceWayContentEditDTO.getServiceFrequencyEnd()); + serviceFrequency.setUpdateBy(username); + serviceFrequency.setUpdateTime(date); + if (serviceWayContentMapper.updateServiceWayContent(serviceFrequency) <= 0) { + throw new ServiceException("更新服务频次失败"); + } } - // TODO - // 如果存在,则提示该服务内容下服务频次已存在 - - // 如果不存在,修改服务频次 - - return 1; } @@ -149,17 +219,6 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { return serviceWayContentMapper.selectListNum(serviceWayName, id); } - /** - * 根据服务频次id和服务内容id删除服务内容 - * - * @param serviceWayContentRemoveDTO - * @return - */ - @Override - public int deleteByFrequencyIdAndContentId(ServiceWayContentRemoveDTO serviceWayContentRemoveDTO) { - return serviceWayContentMapper.deleteByFrequencyIdAndContentId(serviceWayContentRemoveDTO); - } - /** * 新增服务方式 * @@ -227,4 +286,15 @@ public class ServiceWayContentServiceImpl implements IServiceWayContentService { public String selectServiceWayById(Long id) { return serviceWayContentMapper.selectServiceWayById(id); } + + /** + * 根据服务频次id删除服务内容 + * + * @param id + * @return + */ + @Override + public int deleteByFrequencyId(Long id) { + return serviceWayContentMapper.deleteByFrequencyId(id); + } } 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 c3c8ed7a..a40a6b57 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 @@ -15,9 +15,8 @@ import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor -@EqualsAndHashCode(callSuper = true) @ApiModel(value = "科室信息VO对象") -public class DepartmentVO extends BaseEntity { +public class DepartmentVO { /** * 主键id diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicefrequency/ServiceFrequencyVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicefrequency/ServiceFrequencyVO.java new file mode 100644 index 00000000..2a33f507 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicefrequency/ServiceFrequencyVO.java @@ -0,0 +1,51 @@ +package com.xinelu.manage.vo.servicefrequency; + +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author : youxilong + * @date : 2024/3/3 18:25 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "服务频次VO") +public class ServiceFrequencyVO { + /** + * 服务频次id + */ + @ApiModelProperty(value = "服务频次id") + private Long id; + + /** + * 服务频次类型 + */ + @ApiModelProperty(value = "服务频次类型") + private String serviceFrequencyType; + + /** + * 服务频次文本 + */ + @ApiModelProperty(value = "服务频次文本") + @Excel(name = "服务频次文本") + private String serviceFrequencyText; + + /** + * 服务频次数字起始值 + */ + @ApiModelProperty(value = "服务频次数字起始值") + @Excel(name = "服务频次数字起始值") + private Integer serviceFrequencyStart; + + /** + * 服务频次数字结束值 + */ + @ApiModelProperty(value = "服务频次数字结束值") + @Excel(name = "服务频次数字结束值") + private Integer serviceFrequencyEnd; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicepackage/ServicePackageDetailVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicepackage/ServicePackageDetailVO.java new file mode 100644 index 00000000..46f20745 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicepackage/ServicePackageDetailVO.java @@ -0,0 +1,91 @@ +package com.xinelu.manage.vo.servicepackage; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.manage.vo.serviceway.ServiceWayVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author : youxilong + * @date : 2024/3/3 21:48 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "服务包详情VO") +public class ServicePackageDetailVO { + + /** + * 主键id + */ + private Long id; + + /** + * 科室病种信息表id + */ + @ApiModelProperty(value = "科室病种信息表id") + @Excel(name = "科室病种信息表id") + private Long diseaseTypeId; + + /** + * 病种名称 + */ + @ApiModelProperty(value = "病种名称") + @Excel(name = "病种名称") + private String diseaseTypeName; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称") + @Excel(name = "服务包名称") + private String packageName; + + /** + * 服务包期限 + */ + @ApiModelProperty(value = "服务包期限") + @Excel(name = "服务包期限") + private Integer packageTerm; + + /** + * 服务包期限单位,年,月,日 + */ + @ApiModelProperty(value = "服务包期限单位,年,月,日") + @Excel(name = "服务包期限单位,年,月,日") + private String packageTermUnit; + + /** + * 服务包期限 + 单位 + */ + @ApiModelProperty(value = "服务期限") + @Excel(name = "服务期限") + private String packageTermAndUnit; + + /** + * 服务包价格,单位为:元 + */ + @ApiModelProperty(value = "服务包价格,单位为:元") + @Excel(name = "服务包价格,单位为:元") + private BigDecimal packagePrice; + + + /** + * 硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA + */ + @ApiModelProperty(value = "硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA") + @Excel(name = "硬件类型,血压仪:BLOOD_PRESSURE,血糖仪:GLUCOSE_METER,心电仪:ELECTROCARDIOGRA") + private String hardwareType; + + /** + * 服务方式列表 + */ + @ApiModelProperty(value = "服务方式列表") + private List serviceWayList; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicepackage/ServicePackageVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicepackage/ServicePackageVO.java new file mode 100644 index 00000000..54c4086a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicepackage/ServicePackageVO.java @@ -0,0 +1,91 @@ +package com.xinelu.manage.vo.servicepackage; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.manage.vo.serviceway.ServiceWayVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author : youxilong + * @date : 2024/3/3 21:02 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "服务包VO") +public class ServicePackageVO { + /** + * 主键id + */ + private Long id; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称") + @Excel(name = "服务包名称") + private String packageName; + + /** + * 服务包简介 + */ + @ApiModelProperty(value = "服务包简介") + @Excel(name = "服务包简介") + private String packageIntroduction; + + /** + * 服务包版本号 + */ + @ApiModelProperty(value = "服务包版本号") + @Excel(name = "服务包版本号") + private String packageVersion; + + /** + * 服务包期限 + */ + @ApiModelProperty(value = "服务包期限") + @Excel(name = "服务包期限") + private Integer packageTerm; + + /** + * 服务包期限单位,年,月,日 + */ + @ApiModelProperty(value = "服务包期限单位,年,月,日") + @Excel(name = "服务包期限单位,年,月,日") + private String packageTermUnit; + + /** + * 服务包期限 + 单位 + */ + @ApiModelProperty(value = "服务期限") + @Excel(name = "服务期限") + private String packageTermAndUnit; + + /** + * 服务包价格,单位为:元 + */ + @ApiModelProperty(value = "服务包价格,单位为:元") + @Excel(name = "服务包价格,单位为:元") + private BigDecimal packagePrice; + + /** + * 服务包备注 + */ + @ApiModelProperty(value = "服务包备注") + @Excel(name = "服务包备注") + private String packageRemark; + + /** + * 是否发布,0:否,1:是 + */ + @ApiModelProperty(value = "是否发布,0:否,1:是") + @Excel(name = "是否发布,0:否,1:是") + private Integer whetherRelease; + +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/serviceway/ServiceWayVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/serviceway/ServiceWayVO.java new file mode 100644 index 00000000..f114ad0a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/serviceway/ServiceWayVO.java @@ -0,0 +1,41 @@ +package com.xinelu.manage.vo.serviceway; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.manage.vo.servicefrequency.ServiceFrequencyVO; +import com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @author : youxilong + * @date : 2024/3/3 21:24 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "服务方式VO") +public class ServiceWayVO { + /** + * 服务方式id + */ + @ApiModelProperty(value = "服务方式id") + private Long id; + + /** + * 服务方式名称 + */ + @ApiModelProperty(value = "服务方式名称") + @Excel(name = "服务方式名称") + private String serviceWayName; + + /** + * 服务内容列表 + */ + @ApiModelProperty(value = "服务内容列表") + private List serviceWayContentList; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentAndFrequencyVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentAndFrequencyVO.java new file mode 100644 index 00000000..cc1b5fba --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentAndFrequencyVO.java @@ -0,0 +1,64 @@ +package com.xinelu.manage.vo.servicewaycontent; + +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author : youxilong + * @date : 2024/3/3 18:41 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "服务方式内容和服务频次VO") +public class ServiceWayContentAndFrequencyVO { + /** + * 服务内容id + */ + @ApiModelProperty(value = "服务内容id") + private Long serviceContentId; + + /** + * 服务内容 + */ + @ApiModelProperty(value = "服务内容") + @Excel(name = "服务内容") + private String serviceContent; + + /** + * 服务频次id + */ + @ApiModelProperty(value = "服务频次id") + private Long serviceFrequencyId; + + /** + * 服务频次类型 + */ + @ApiModelProperty(value = "服务频次类型") + private String serviceFrequencyType; + + /** + * 服务频次文本 + */ + @ApiModelProperty(value = "服务频次文本") + @Excel(name = "服务频次文本") + private String serviceFrequencyText; + + /** + * 服务频次数字起始值 + */ + @ApiModelProperty(value = "服务频次数字起始值") + @Excel(name = "服务频次数字起始值") + private Integer serviceFrequencyStart; + + /** + * 服务频次数字结束值 + */ + @ApiModelProperty(value = "服务频次数字结束值") + @Excel(name = "服务频次数字结束值") + private Integer serviceFrequencyEnd; +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentVO.java index 1a6e969a..1d22f3ca 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentVO.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/servicewaycontent/ServiceWayContentVO.java @@ -1,12 +1,15 @@ package com.xinelu.manage.vo.servicewaycontent; import com.xinelu.common.annotation.Excel; +import com.xinelu.manage.vo.servicefrequency.ServiceFrequencyVO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; +import java.util.List; + /** * @author : youxilong * @date : 2024/2/29 22:05 @@ -20,7 +23,7 @@ public class ServiceWayContentVO { * 服务内容id */ @ApiModelProperty(value = "服务内容id") - private Long serviceContentId; + private Long id; /** * 服务内容 @@ -30,35 +33,8 @@ public class ServiceWayContentVO { private String serviceContent; /** - * 服务频次id + * 服务频次列表 */ - @ApiModelProperty(value = "服务频次id") - private Long serviceFrequencyId; - - /** - * 服务频次类型 - */ - @ApiModelProperty(value = "服务频次类型") - private String serviceFrequencyType; - - /** - * 服务频次文本 - */ - @ApiModelProperty(value = "服务频次文本") - @Excel(name = "服务频次文本") - private String serviceFrequencyText; - - /** - * 服务频次数字起始值 - */ - @ApiModelProperty(value = "服务频次数字起始值") - @Excel(name = "服务频次数字起始值") - private Integer serviceFrequencyStart; - - /** - * 服务频次数字结束值 - */ - @ApiModelProperty(value = "服务频次数字结束值") - @Excel(name = "服务频次数字结束值") - private Integer serviceFrequencyEnd; + @ApiModelProperty(value = "服务频次") + private List serviceWayFrequencyList; } 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 83fafcab..439f0aef 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/department/DepartmentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/department/DepartmentMapper.xml @@ -284,6 +284,26 @@ + + insert into department diff --git a/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml new file mode 100644 index 00000000..cda72bdc --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/servicepackage/ServicePackageMapper.xml @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + department_id, + department_name, + disease_type_id, + disease_type_name, + package_name, + package_introduction, + package_version, + package_term, + package_term_unit, + package_price, + package_remark, + hardware_type, + whether_release, + create_by, + create_time, + update_by, + update_time + from service_package + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into service_package + + department_id, + + department_name, + + disease_type_id, + + disease_type_name, + + package_name, + + package_introduction, + + package_version, + + package_term, + + package_term_unit, + + package_price, + + package_remark, + + hardware_type, + + whether_release, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{departmentId}, + + #{departmentName}, + + #{diseaseTypeId}, + + #{diseaseTypeName}, + + #{packageName}, + + #{packageIntroduction}, + + #{packageVersion}, + + #{packageTerm}, + + #{packageTermUnit}, + + #{packagePrice}, + + #{packageRemark}, + + #{hardwareType}, + + #{whetherRelease}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update service_package + + department_id = + #{departmentId}, + + department_name = + #{departmentName}, + + disease_type_id = + #{diseaseTypeId}, + + disease_type_name = + #{diseaseTypeName}, + + package_name = + #{packageName}, + + package_introduction = + #{packageIntroduction}, + + package_version = + #{packageVersion}, + + package_term = + #{packageTerm}, + + package_term_unit = + #{packageTermUnit}, + + package_price = + #{packagePrice}, + + package_remark = + #{packageRemark}, + + hardware_type = + #{hardwareType}, + + whether_release = + #{whetherRelease}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from service_package + where id = #{id} + + + + delete from service_package where id in + + #{id} + + + \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/servicewaycontent/ServiceWayContentMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/servicewaycontent/ServiceWayContentMapper.xml index d19c2e35..e2130f1e 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/servicewaycontent/ServiceWayContentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/servicewaycontent/ServiceWayContentMapper.xml @@ -24,6 +24,19 @@ + + + + + + + + + + + + select id, service_way_name, @@ -132,9 +145,10 @@ Group By swc1.id + + + + + insert into service_way_content @@ -459,18 +506,17 @@ #{id} - - DELETE - FROM service_way_content - WHERE id = #{id} - and service_content_id = #{serviceContentId} - and service_type = 'SERVICE_FREQUENCY' - + delete from service_way_content - where service_type = 'SERVICE_CONTENT' + where service_type = 'SERVICE_WRY' and id = #{id} + + delete + from service_way_content + where id = #{id} + and service_type = 'SERVICE_FREQUENCY' + \ No newline at end of file