查询科室列表和服务包数量,查询服务包列表
This commit is contained in:
parent
70733b7d71
commit
19e10ea376
@ -171,4 +171,13 @@ public class DepartmentController extends BaseController {
|
||||
List<Department> list = util.importExcel(file.getInputStream());
|
||||
return departmentService.insertDepartmentList(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含服务包数量
|
||||
*/
|
||||
@GetMapping("/listServicePackageNum")
|
||||
public AjaxResult listServicePackageNum(DepartmentDTO departmentDto) {
|
||||
List<DepartmentVO> list = departmentService.selectListServicePackageNum(departmentDto);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<ServicePackageVO> 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<ServicePackageVO> list = servicePackageService.selectServicePackageList(servicePackage);
|
||||
ExcelUtil<ServicePackageVO> util = new ExcelUtil<ServicePackageVO>(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));
|
||||
}
|
||||
}
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -19,7 +19,7 @@ public class ServiceWayContentAddDTO {
|
||||
/**
|
||||
* 服务方式id
|
||||
*/
|
||||
private Long id;
|
||||
private Long serviceWayId;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -120,4 +120,11 @@ public interface DepartmentMapper {
|
||||
* @return int
|
||||
**/
|
||||
int insertDepartmentList(List<Department> departmentList);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含服务包数量
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto);
|
||||
}
|
||||
|
||||
@ -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<ServicePackageVO> 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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -111,4 +111,11 @@ public interface IDepartmentService {
|
||||
* @return int
|
||||
**/
|
||||
AjaxResult insertDepartmentList(List<Department> departmentList);
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含服务包数量
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto);
|
||||
}
|
||||
|
||||
@ -215,4 +215,15 @@ public class DepartmentServiceImpl implements IDepartmentService {
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询科室信息列表及包含服务包数量
|
||||
*
|
||||
* @param departmentDto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<DepartmentVO> selectListServicePackageNum(DepartmentDTO departmentDto) {
|
||||
return departmentMapper.selectListServicePackageNum(departmentDto);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<ServicePackageVO> 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);
|
||||
}
|
||||
@ -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<ServicePackageVO> selectServicePackageList(ServicePackage servicePackage) {
|
||||
List<ServicePackageVO> 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);
|
||||
}
|
||||
}
|
||||
@ -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<ServiceWayContentAndNumVO> 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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -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<ServiceWayVO> serviceWayList;
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<ServiceWayContentVO> serviceWayContentList;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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<ServiceFrequencyVO> serviceWayFrequencyList;
|
||||
}
|
||||
|
||||
@ -284,6 +284,26 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectListServicePackageNum" resultType="com.xinelu.manage.vo.department.DepartmentVO"
|
||||
parameterType="com.xinelu.manage.dto.department.DepartmentDTO">
|
||||
select d.id,
|
||||
d.department_name,
|
||||
d.department_code,
|
||||
count(sp.id) AS countNum
|
||||
from department d left join service_package sp on d.id = sp.department_id
|
||||
<where>
|
||||
<if test="departmentCode != null and departmentCode != ''">
|
||||
and d.department_code = #{departmentCode}
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and d.department_name like concat('%',#{departmentName},'%')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY d.id,
|
||||
d.department_name,
|
||||
d.department_code
|
||||
</select>
|
||||
|
||||
<insert id="insertDepartment" parameterType="Department" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into department
|
||||
|
||||
@ -0,0 +1,324 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.manage.mapper.servicepackage.ServicePackageMapper">
|
||||
|
||||
<resultMap type="ServicePackage" id="ServicePackageResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="departmentId" column="department_id"/>
|
||||
<result property="departmentName" column="department_name"/>
|
||||
<result property="diseaseTypeId" column="disease_type_id"/>
|
||||
<result property="diseaseTypeName" column="disease_type_name"/>
|
||||
<result property="packageName" column="package_name"/>
|
||||
<result property="packageIntroduction" column="package_introduction"/>
|
||||
<result property="packageVersion" column="package_version"/>
|
||||
<result property="packageTerm" column="package_term"/>
|
||||
<result property="packageTermUnit" column="package_term_unit"/>
|
||||
<result property="packagePrice" column="package_price"/>
|
||||
<result property="packageRemark" column="package_remark"/>
|
||||
<result property="hardwareType" column="hardware_type"/>
|
||||
<result property="whetherRelease" column="whether_release"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectServicePackageVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectServicePackageList" parameterType="com.xinelu.manage.mapper.servicepackage.ServicePackageMapper"
|
||||
resultMap="ServicePackageResult">
|
||||
<include refid="selectServicePackageVo"/>
|
||||
<where>
|
||||
<if test="departmentId != null ">
|
||||
and department_id =
|
||||
#{departmentId}
|
||||
</if>
|
||||
<if test="departmentName != null and departmentName != ''">
|
||||
and department_name like concat('%',
|
||||
#{departmentName},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
<if test="diseaseTypeId != null ">
|
||||
and disease_type_id =
|
||||
#{diseaseTypeId}
|
||||
</if>
|
||||
<if test="diseaseTypeName != null and diseaseTypeName != ''">
|
||||
and disease_type_name like concat('%',
|
||||
#{diseaseTypeName},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
<if test="packageName != null and packageName != ''">
|
||||
and package_name like concat('%',
|
||||
#{packageName},
|
||||
'%'
|
||||
)
|
||||
</if>
|
||||
<if test="packageIntroduction != null and packageIntroduction != ''">
|
||||
and package_introduction =
|
||||
#{packageIntroduction}
|
||||
</if>
|
||||
<if test="packageVersion != null and packageVersion != ''">
|
||||
and package_version =
|
||||
#{packageVersion}
|
||||
</if>
|
||||
<if test="packageTerm != null ">
|
||||
and package_term =
|
||||
#{packageTerm}
|
||||
</if>
|
||||
<if test="packageTermUnit != null and packageTermUnit != ''">
|
||||
and package_term_unit =
|
||||
#{packageTermUnit}
|
||||
</if>
|
||||
<if test="packagePrice != null ">
|
||||
and package_price =
|
||||
#{packagePrice}
|
||||
</if>
|
||||
<if test="packageRemark != null and packageRemark != ''">
|
||||
and package_remark =
|
||||
#{packageRemark}
|
||||
</if>
|
||||
<if test="hardwareType != null and hardwareType != ''">
|
||||
and hardware_type =
|
||||
#{hardwareType}
|
||||
</if>
|
||||
<if test="whetherRelease != null ">
|
||||
and whether_release =
|
||||
#{whetherRelease}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectServicePackageById" parameterType="Long"
|
||||
resultMap="ServicePackageResult">
|
||||
<include refid="selectServicePackageVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<resultMap id="ServicePackageVOMap" type="com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO">
|
||||
<id property="id" column="id"/>
|
||||
<result column="disease_type_id" property="diseaseTypeId"/>
|
||||
<result column="disease_type_name" property="diseaseTypeName"/>
|
||||
<result column="package_name" property="packageName"/>
|
||||
<result column="package_term" property="packageTerm"/>
|
||||
<result column="package_term_unit" property="packageTermUnit"/>
|
||||
<result column="package_price" property="packagePrice"/>
|
||||
<result column="hardware_type" property="hardwareType"/>
|
||||
<collection property="serviceWayList"
|
||||
ofType="com.xinelu.manage.vo.serviceway.ServiceWayVO">
|
||||
<id column="spc1Id" property="id"/>
|
||||
<result column="service_way_name" property="serviceWayName"/>
|
||||
<collection property="serviceWayContentList"
|
||||
ofType="com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO">
|
||||
<id column="spc2Id" property="id"/>
|
||||
<result column="service_content" property="serviceContent"/>
|
||||
<collection property="serviceWayFrequencyList"
|
||||
ofType="com.xinelu.manage.vo.servicefrequency.ServiceFrequencyVO">
|
||||
<id column="spc3Id" property="id"/>
|
||||
<result column="service_frequency_text" property="serviceFrequencyText"/>
|
||||
<result column="service_frequency_start" property="serviceFrequencyStart"/>
|
||||
<result column="service_frequency_end" property="serviceFrequencyEnd"/>
|
||||
</collection>
|
||||
</collection>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectServicePackagesById" resultMap="ServicePackageVOMap"
|
||||
resultType="com.xinelu.manage.vo.servicepackage.ServicePackageDetailVO">
|
||||
select sp.id,
|
||||
sp.disease_type_id,
|
||||
sp.disease_type_name,
|
||||
sp.package_name,
|
||||
sp.package_term,
|
||||
sp.package_term_unit,
|
||||
sp.package_price,
|
||||
sp.hardware_type,
|
||||
spc1.id AS spc1Id,
|
||||
spc1.service_way_name,
|
||||
spc2.id AS spc2Id,
|
||||
spc2.service_content,
|
||||
spc3.id AS spc3Id,
|
||||
spc3.service_frequency_text,
|
||||
spc3.service_frequency_start,
|
||||
spc3.service_frequency_end
|
||||
from service_package sp
|
||||
left join service_package_content spc1
|
||||
on sp.id = #{spc1.service_package_id} and spc1.service_type = 'SERVICE_WRY'
|
||||
left join service_package_content spc2
|
||||
on spc1.id = spc2.service_way_id and spc2.service_type = 'SERVICE_CONTENT'
|
||||
left join service_package_content spc3
|
||||
on spc2.id = spc3.service_content_id and spc3.service_type = 'SERVICE_FREQUENCY'
|
||||
where sp.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertServicePackage" parameterType="ServicePackage" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into service_package
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="departmentId != null">department_id,
|
||||
</if>
|
||||
<if test="departmentName != null">department_name,
|
||||
</if>
|
||||
<if test="diseaseTypeId != null">disease_type_id,
|
||||
</if>
|
||||
<if test="diseaseTypeName != null">disease_type_name,
|
||||
</if>
|
||||
<if test="packageName != null">package_name,
|
||||
</if>
|
||||
<if test="packageIntroduction != null">package_introduction,
|
||||
</if>
|
||||
<if test="packageVersion != null">package_version,
|
||||
</if>
|
||||
<if test="packageTerm != null">package_term,
|
||||
</if>
|
||||
<if test="packageTermUnit != null">package_term_unit,
|
||||
</if>
|
||||
<if test="packagePrice != null">package_price,
|
||||
</if>
|
||||
<if test="packageRemark != null">package_remark,
|
||||
</if>
|
||||
<if test="hardwareType != null">hardware_type,
|
||||
</if>
|
||||
<if test="whetherRelease != null">whether_release,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="departmentId != null">#{departmentId},
|
||||
</if>
|
||||
<if test="departmentName != null">#{departmentName},
|
||||
</if>
|
||||
<if test="diseaseTypeId != null">#{diseaseTypeId},
|
||||
</if>
|
||||
<if test="diseaseTypeName != null">#{diseaseTypeName},
|
||||
</if>
|
||||
<if test="packageName != null">#{packageName},
|
||||
</if>
|
||||
<if test="packageIntroduction != null">#{packageIntroduction},
|
||||
</if>
|
||||
<if test="packageVersion != null">#{packageVersion},
|
||||
</if>
|
||||
<if test="packageTerm != null">#{packageTerm},
|
||||
</if>
|
||||
<if test="packageTermUnit != null">#{packageTermUnit},
|
||||
</if>
|
||||
<if test="packagePrice != null">#{packagePrice},
|
||||
</if>
|
||||
<if test="packageRemark != null">#{packageRemark},
|
||||
</if>
|
||||
<if test="hardwareType != null">#{hardwareType},
|
||||
</if>
|
||||
<if test="whetherRelease != null">#{whetherRelease},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateServicePackage" parameterType="ServicePackage">
|
||||
update service_package
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="departmentId != null">department_id =
|
||||
#{departmentId},
|
||||
</if>
|
||||
<if test="departmentName != null">department_name =
|
||||
#{departmentName},
|
||||
</if>
|
||||
<if test="diseaseTypeId != null">disease_type_id =
|
||||
#{diseaseTypeId},
|
||||
</if>
|
||||
<if test="diseaseTypeName != null">disease_type_name =
|
||||
#{diseaseTypeName},
|
||||
</if>
|
||||
<if test="packageName != null">package_name =
|
||||
#{packageName},
|
||||
</if>
|
||||
<if test="packageIntroduction != null">package_introduction =
|
||||
#{packageIntroduction},
|
||||
</if>
|
||||
<if test="packageVersion != null">package_version =
|
||||
#{packageVersion},
|
||||
</if>
|
||||
<if test="packageTerm != null">package_term =
|
||||
#{packageTerm},
|
||||
</if>
|
||||
<if test="packageTermUnit != null">package_term_unit =
|
||||
#{packageTermUnit},
|
||||
</if>
|
||||
<if test="packagePrice != null">package_price =
|
||||
#{packagePrice},
|
||||
</if>
|
||||
<if test="packageRemark != null">package_remark =
|
||||
#{packageRemark},
|
||||
</if>
|
||||
<if test="hardwareType != null">hardware_type =
|
||||
#{hardwareType},
|
||||
</if>
|
||||
<if test="whetherRelease != null">whether_release =
|
||||
#{whetherRelease},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteServicePackageById" parameterType="Long">
|
||||
delete
|
||||
from service_package
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteServicePackageByIds" parameterType="String">
|
||||
delete from service_package where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -24,6 +24,19 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ServiceContentAndFrequencyVOMap" type="com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO">
|
||||
<id property="id" column="id"/>
|
||||
<result column="service_content" property="serviceContent"/>
|
||||
<collection property="serviceWayFrequencyList"
|
||||
ofType="com.xinelu.manage.vo.servicefrequency.ServiceFrequencyVO">
|
||||
<id column="serviceFrequencyId" property="id"/>
|
||||
<result column="service_frequency_type" property="serviceFrequencyType"/>
|
||||
<result column="service_frequency_text" property="serviceFrequencyText"/>
|
||||
<result column="service_frequency_start" property="serviceFrequencyStart"/>
|
||||
<result column="service_frequency_end" property="serviceFrequencyEnd"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectServiceWayContentVo">
|
||||
select id,
|
||||
service_way_name,
|
||||
@ -132,9 +145,10 @@
|
||||
</where>
|
||||
Group By swc1.id
|
||||
</select>
|
||||
|
||||
<select id="selectServiceWayContentListV1"
|
||||
resultType="com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO">
|
||||
SELECT swc1.id AS serviceContentId,swc1.service_content,
|
||||
resultMap="ServiceContentAndFrequencyVOMap">
|
||||
SELECT swc1.id,swc1.service_content,
|
||||
swc2.id AS serviceFrequencyId,
|
||||
swc2.service_frequency_type,
|
||||
swc2.service_frequency_text,
|
||||
@ -159,7 +173,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectServiceWayContentDetailByFrequencyId"
|
||||
resultType="com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO"
|
||||
resultType="com.xinelu.manage.vo.servicewaycontent.ServiceWayContentAndFrequencyVO"
|
||||
parameterType="java.lang.Long">
|
||||
SELECT swc2.id AS serviceContentId,
|
||||
swc2.service_content,
|
||||
@ -265,6 +279,39 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="countByWayIdAndContent" resultType="com.xinelu.manage.vo.servicewaycontent.ServiceWayContentVO">
|
||||
select swc.id, swc.service_content
|
||||
from service_way_content swc
|
||||
where swc.service_type = 'SERVICE_CONTENT'
|
||||
and swc.service_way_id = #{serviceWayId}
|
||||
and swc.service_content = #{serviceContent}
|
||||
</select>
|
||||
|
||||
<select id="countByServiceFrequencyDTO" resultType="java.lang.Integer"
|
||||
parameterType="com.xinelu.manage.dto.servicefrequency.ServiceFrequencyDTO">
|
||||
select count(*) from service_way_content
|
||||
<where>
|
||||
service_type = 'SERVICE_FREQUENCY'
|
||||
and service_content_id = #{serviceContentId}
|
||||
<if test="serviceFrequencyType != null and serviceFrequencyType != ''">
|
||||
and service_frequency_type =
|
||||
#{serviceFrequencyType}
|
||||
</if>
|
||||
<if test="serviceFrequencyText != null and serviceFrequencyText != ''">
|
||||
and service_frequency_text =
|
||||
#{serviceFrequencyText}
|
||||
</if>
|
||||
<if test="serviceFrequencyStart != null ">
|
||||
and service_frequency_start =
|
||||
#{serviceFrequencyStart}
|
||||
</if>
|
||||
<if test="serviceFrequencyEnd != null ">
|
||||
and service_frequency_end =
|
||||
#{serviceFrequencyEnd}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertServiceWayContent" parameterType="ServiceWayContent" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into service_way_content
|
||||
@ -459,18 +506,17 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteByFrequencyIdAndContentId"
|
||||
parameterType="com.xinelu.manage.dto.servicewaycontent.ServiceWayContentRemoveDTO">
|
||||
DELETE
|
||||
FROM service_way_content
|
||||
WHERE id = #{id}
|
||||
and service_content_id = #{serviceContentId}
|
||||
and service_type = 'SERVICE_FREQUENCY'
|
||||
</delete>
|
||||
|
||||
<delete id="deleteServiceWayById" parameterType="java.lang.Long">
|
||||
delete
|
||||
from service_way_content
|
||||
where service_type = 'SERVICE_CONTENT'
|
||||
where service_type = 'SERVICE_WRY'
|
||||
and id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteByFrequencyId" parameterType="java.lang.Long">
|
||||
delete
|
||||
from service_way_content
|
||||
where id = #{id}
|
||||
and service_type = 'SERVICE_FREQUENCY'
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user