diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/agencycategory/AgencyCategoryController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/agencycategory/AgencyCategoryController.java index abd1c708..5ab43fad 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/agencycategory/AgencyCategoryController.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/agencycategory/AgencyCategoryController.java @@ -92,4 +92,12 @@ public class AgencyCategoryController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(agencyCategoryService.deleteAgencyCategoryByIds(ids)); } + + /** + * 查询机构类别信息列表 - 树图 + */ + @GetMapping("/agencyCategoryList") + public AjaxResult agencyCategoryList() { + return AjaxResult.success(agencyCategoryService.agencyCategoryList()); + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/departmentdiseasetype/DepartmentDiseaseTypeController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/departmentdiseasetype/DepartmentDiseaseTypeController.java new file mode 100644 index 00000000..513d1c6a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/departmentdiseasetype/DepartmentDiseaseTypeController.java @@ -0,0 +1,91 @@ +package com.xinelu.manage.controller.departmentdiseasetype; + +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.departmentdiseasetype.DepartmentDiseaseType; +import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService; +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-02-26 + */ +@RestController +@RequestMapping("/system/departmentDisease") +public class DepartmentDiseaseTypeController extends BaseController { + @Resource + private IDepartmentDiseaseTypeService departmentDiseaseTypeService; + + /** + * 查询科室病种信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:departmentDisease:list')") + @GetMapping("/list") + public TableDataInfo list(DepartmentDiseaseType departmentDiseaseType) { + startPage(); + List list = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType); + return getDataTable(list); + } + + /** + * 导出科室病种信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:departmentDisease:export')") + @Log(title = "科室病种信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DepartmentDiseaseType departmentDiseaseType) { + List list = departmentDiseaseTypeService.selectDepartmentDiseaseTypeList(departmentDiseaseType); + ExcelUtil util = new ExcelUtil(DepartmentDiseaseType.class); + util.exportExcel(response, list, "科室病种信息数据"); + } + + /** + * 获取科室病种信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:departmentDisease:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(departmentDiseaseTypeService.selectDepartmentDiseaseTypeById(id)); + } + + /** + * 新增科室病种信息 + */ + @PreAuthorize("@ss.hasPermi('system:departmentDisease:add')") + @Log(title = "科室病种信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DepartmentDiseaseType departmentDiseaseType) { + return toAjax(departmentDiseaseTypeService.insertDepartmentDiseaseType(departmentDiseaseType)); + } + + /** + * 修改科室病种信息 + */ + @PreAuthorize("@ss.hasPermi('system:departmentDisease:edit')") + @Log(title = "科室病种信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DepartmentDiseaseType departmentDiseaseType) { + return toAjax(departmentDiseaseTypeService.updateDepartmentDiseaseType(departmentDiseaseType)); + } + + /** + * 删除科室病种信息 + */ + @PreAuthorize("@ss.hasPermi('system:departmentDisease:remove')") + @Log(title = "科室病种信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(departmentDiseaseTypeService.deleteDepartmentDiseaseTypeByIds(ids)); + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/agencycategory/AgencyCategory.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/agencycategory/AgencyCategory.java index 1f65b527..86e53c8f 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/agencycategory/AgencyCategory.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/agencycategory/AgencyCategory.java @@ -11,6 +11,9 @@ import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import java.util.ArrayList; +import java.util.List; + /** * 机构类别对象 agency_category * @@ -73,6 +76,17 @@ public class AgencyCategory extends BaseEntity { private String categoryRemark; + private List children = new ArrayList(); + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } + + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/departmentdiseasetype/DepartmentDiseaseType.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/departmentdiseasetype/DepartmentDiseaseType.java new file mode 100644 index 00000000..15f913fa --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/departmentdiseasetype/DepartmentDiseaseType.java @@ -0,0 +1,92 @@ +package com.xinelu.manage.domain.departmentdiseasetype; + +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; + +/** + * 科室病种信息对象 department_disease_type + * + * @author xinelu + * @date 2024-02-26 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "科室病种信息对象", description = "department_disease_type") +public class DepartmentDiseaseType 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; + + /** + * 病种名称 + */ + @ApiModelProperty(value = "病种名称") + @Excel(name = "病种名称") + private String diseaseTypeName; + + /** + * 病种代码 + */ + @ApiModelProperty(value = "病种代码") + @Excel(name = "病种代码") + private String diseaseTypeCode; + + /** + * 对应诊断信息 + */ + @ApiModelProperty(value = "对应诊断信息") + @Excel(name = "对应诊断信息") + private String diagnosisInfo; + + /** + * 病种概述 + */ + @ApiModelProperty(value = "病种概述") + @Excel(name = "病种概述") + private String diseaseTypeRemark; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("departmentId", getDepartmentId()) + .append("departmentName", getDepartmentName()) + .append("diseaseTypeName", getDiseaseTypeName()) + .append("diseaseTypeCode", getDiseaseTypeCode()) + .append("diagnosisInfo", getDiagnosisInfo()) + .append("diseaseTypeRemark", getDiseaseTypeRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/departmentdiseasetype/DepartmentDiseaseTypeMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/departmentdiseasetype/DepartmentDiseaseTypeMapper.java new file mode 100644 index 00000000..f022bbcb --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/departmentdiseasetype/DepartmentDiseaseTypeMapper.java @@ -0,0 +1,62 @@ +package com.xinelu.manage.mapper.departmentdiseasetype; + +import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType; + +import java.util.List; + + +/** + * 科室病种信息Mapper接口 + * + * @author xinelu + * @date 2024-02-26 + */ +public interface DepartmentDiseaseTypeMapper { + /** + * 查询科室病种信息 + * + * @param id 科室病种信息主键 + * @return 科室病种信息 + */ + DepartmentDiseaseType selectDepartmentDiseaseTypeById(Long id); + + /** + * 查询科室病种信息列表 + * + * @param departmentDiseaseType 科室病种信息 + * @return 科室病种信息集合 + */ + List selectDepartmentDiseaseTypeList(DepartmentDiseaseType departmentDiseaseType); + + /** + * 新增科室病种信息 + * + * @param departmentDiseaseType 科室病种信息 + * @return 结果 + */ + int insertDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType); + + /** + * 修改科室病种信息 + * + * @param departmentDiseaseType 科室病种信息 + * @return 结果 + */ + int updateDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType); + + /** + * 删除科室病种信息 + * + * @param id 科室病种信息主键 + * @return 结果 + */ + int deleteDepartmentDiseaseTypeById(Long id); + + /** + * 批量删除科室病种信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteDepartmentDiseaseTypeByIds(Long[] ids); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/impl/AgencyServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/impl/AgencyServiceImpl.java index e2b748d9..81ddf7a3 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/impl/AgencyServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agency/impl/AgencyServiceImpl.java @@ -102,8 +102,8 @@ public class AgencyServiceImpl implements IAgencyService { @Override public List agencyList() { List agencies = agencyMapper.selectAgencyList(null); - List agencies1 = buildDeptTree(agencies); - return agencies1.stream().map(AgencyVO::new).collect(Collectors.toList()); + List agenciesTree = buildDeptTree(agencies); + return agenciesTree.stream().map(AgencyVO::new).collect(Collectors.toList()); } public List buildDeptTree(List agencies) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agencycategory/IAgencyCategoryService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agencycategory/IAgencyCategoryService.java index de5c259c..6433b6b6 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agencycategory/IAgencyCategoryService.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agencycategory/IAgencyCategoryService.java @@ -2,6 +2,7 @@ package com.xinelu.manage.service.agencycategory; import com.xinelu.manage.domain.agencycategory.AgencyCategory; +import com.xinelu.manage.vo.agencycategory.AgencyCategoryVO; import java.util.List; @@ -59,4 +60,11 @@ public interface IAgencyCategoryService { * @return 结果 */ int deleteAgencyCategoryById(Long id); + + /** + * 查询机构类别信息列表 - 树图 + * + * @return AgencyVO + */ + List agencyCategoryList(); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agencycategory/impl/AgencyCategoryServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agencycategory/impl/AgencyCategoryServiceImpl.java index 837d9159..988b47ac 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/agencycategory/impl/AgencyCategoryServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/agencycategory/impl/AgencyCategoryServiceImpl.java @@ -3,14 +3,19 @@ package com.xinelu.manage.service.agencycategory.impl; import com.xinelu.common.constant.Constants; import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.manage.domain.agencycategory.AgencyCategory; import com.xinelu.manage.mapper.agencycategory.AgencyCategoryMapper; import com.xinelu.manage.service.agencycategory.IAgencyCategoryService; +import com.xinelu.manage.vo.agencycategory.AgencyCategoryVO; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Iterator; import java.util.List; +import java.util.stream.Collectors; /** @@ -99,4 +104,65 @@ public class AgencyCategoryServiceImpl implements IAgencyCategoryService { public int deleteAgencyCategoryById(Long id) { return agencyCategoryMapper.deleteAgencyCategoryById(id); } + + /** + * 查询机构类别信息列表 - 树图 + * + * @return AgencyCategoryVO + */ + @Override + public List agencyCategoryList() { + List agencyCategoryList = agencyCategoryMapper.selectAgencyCategoryList(null); + List agencyTree = buildDeptTree(agencyCategoryList); + return agencyTree.stream().map(AgencyCategoryVO::new).collect(Collectors.toList()); + } + + public List buildDeptTree(List agencyCategoryList) { + List returnList = new ArrayList(); + List tempList = new ArrayList(); + for (AgencyCategory agencyCategory : agencyCategoryList) { + tempList.add(agencyCategory.getId()); + } + for (AgencyCategory agencyCategory : agencyCategoryList) { + // 如果是顶级节点, 遍历该父节点的所有子节点 + if (!tempList.contains(agencyCategory.getParentCategoryId())) { + recursionFn(agencyCategoryList, agencyCategory); + returnList.add(agencyCategory); + } + } + if (returnList.isEmpty()) { + returnList = agencyCategoryList; + } + return returnList; + } + + private void recursionFn(List list, AgencyCategory t) { + // 得到子节点列表 + List childList = getChildList(list, t); + t.setChildren(childList); + for (AgencyCategory tChild : childList) { + if (hasChild(list, tChild)) { + recursionFn(list, tChild); + } + } + } + + private List getChildList(List list, AgencyCategory t) { + List tlist = new ArrayList(); + Iterator it = list.iterator(); + while (it.hasNext()) { + AgencyCategory n = (AgencyCategory) it.next(); + if (StringUtils.isNotNull(n.getParentCategoryId()) && n.getParentCategoryId().longValue() == t.getId().longValue()) { + tlist.add(n); + } + } + return tlist; + } + + /** + * 判断是否有子节点 + */ + private boolean hasChild(List list, AgencyCategory t) { + return getChildList(list, t).size() > 0; + } } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/departmentdiseasetype/IDepartmentDiseaseTypeService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/departmentdiseasetype/IDepartmentDiseaseTypeService.java new file mode 100644 index 00000000..302dbb88 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/departmentdiseasetype/IDepartmentDiseaseTypeService.java @@ -0,0 +1,62 @@ +package com.xinelu.manage.service.departmentdiseasetype; + +import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType; + +import java.util.List; + + +/** + * 科室病种信息Service接口 + * + * @author xinelu + * @date 2024-02-26 + */ +public interface IDepartmentDiseaseTypeService { + /** + * 查询科室病种信息 + * + * @param id 科室病种信息主键 + * @return 科室病种信息 + */ + DepartmentDiseaseType selectDepartmentDiseaseTypeById(Long id); + + /** + * 查询科室病种信息列表 + * + * @param departmentDiseaseType 科室病种信息 + * @return 科室病种信息集合 + */ + List selectDepartmentDiseaseTypeList(DepartmentDiseaseType departmentDiseaseType); + + /** + * 新增科室病种信息 + * + * @param departmentDiseaseType 科室病种信息 + * @return 结果 + */ + int insertDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType); + + /** + * 修改科室病种信息 + * + * @param departmentDiseaseType 科室病种信息 + * @return 结果 + */ + int updateDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType); + + /** + * 批量删除科室病种信息 + * + * @param ids 需要删除的科室病种信息主键集合 + * @return 结果 + */ + int deleteDepartmentDiseaseTypeByIds(Long[] ids); + + /** + * 删除科室病种信息信息 + * + * @param id 科室病种信息主键 + * @return 结果 + */ + int deleteDepartmentDiseaseTypeById(Long id); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/departmentdiseasetype/impl/DepartmentDiseaseTypeServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/departmentdiseasetype/impl/DepartmentDiseaseTypeServiceImpl.java new file mode 100644 index 00000000..abba1ed7 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/departmentdiseasetype/impl/DepartmentDiseaseTypeServiceImpl.java @@ -0,0 +1,91 @@ +package com.xinelu.manage.service.departmentdiseasetype.impl; + +import com.xinelu.common.utils.DateUtils; +import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType; +import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper; +import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + + +/** + * 科室病种信息Service业务层处理 + * + * @author xinelu + * @date 2024-02-26 + */ +@Service +public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeService { + @Resource + private DepartmentDiseaseTypeMapper departmentDiseaseTypeMapper; + + /** + * 查询科室病种信息 + * + * @param id 科室病种信息主键 + * @return 科室病种信息 + */ + @Override + public DepartmentDiseaseType selectDepartmentDiseaseTypeById(Long id) { + return departmentDiseaseTypeMapper.selectDepartmentDiseaseTypeById(id); + } + + /** + * 查询科室病种信息列表 + * + * @param departmentDiseaseType 科室病种信息 + * @return 科室病种信息 + */ + @Override + public List selectDepartmentDiseaseTypeList(DepartmentDiseaseType departmentDiseaseType) { + return departmentDiseaseTypeMapper.selectDepartmentDiseaseTypeList(departmentDiseaseType); + } + + /** + * 新增科室病种信息 + * + * @param departmentDiseaseType 科室病种信息 + * @return 结果 + */ + @Override + public int insertDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType) { + departmentDiseaseType.setCreateTime(DateUtils.getNowDate()); + return departmentDiseaseTypeMapper.insertDepartmentDiseaseType(departmentDiseaseType); + } + + /** + * 修改科室病种信息 + * + * @param departmentDiseaseType 科室病种信息 + * @return 结果 + */ + @Override + public int updateDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType) { + departmentDiseaseType.setUpdateTime(DateUtils.getNowDate()); + return departmentDiseaseTypeMapper.updateDepartmentDiseaseType(departmentDiseaseType); + } + + /** + * 批量删除科室病种信息 + * + * @param ids 需要删除的科室病种信息主键 + * @return 结果 + */ + @Override + public int deleteDepartmentDiseaseTypeByIds(Long[] ids) { + return departmentDiseaseTypeMapper.deleteDepartmentDiseaseTypeByIds(ids); + } + + /** + * 删除科室病种信息信息 + * + * @param id 科室病种信息主键 + * @return 结果 + */ + @Override + public int deleteDepartmentDiseaseTypeById(Long id) { + return departmentDiseaseTypeMapper.deleteDepartmentDiseaseTypeById(id); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/ManageTestServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/ManageTestServiceImpl.java deleted file mode 100644 index 7024499f..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/impl/ManageTestServiceImpl.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xinelu.manage.service.impl; - -import org.springframework.stereotype.Service; - -/** - * @Description 测试service实现类 - * @Author 纪寒 - * @Date 2024-02-18 16:37:41 - * @Version 1.0 - */ -@Service -public class ManageTestServiceImpl { -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/ManageTestVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/ManageTestVO.java deleted file mode 100644 index 522b117c..00000000 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/ManageTestVO.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xinelu.manage.vo; - -import lombok.Data; - -/** - * @Description 测试VO类 - * @Author 纪寒 - * @Date 2024-02-18 16:33:23 - * @Version 1.0 - */ -@Data -public class ManageTestVO { - private Long id; -} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/vo/agencycategory/AgencyCategoryVO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/agencycategory/AgencyCategoryVO.java new file mode 100644 index 00000000..19a21e37 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/vo/agencycategory/AgencyCategoryVO.java @@ -0,0 +1,43 @@ +package com.xinelu.manage.vo.agencycategory; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.xinelu.manage.domain.agencycategory.AgencyCategory; + +import java.io.Serializable; +import java.util.List; +import java.util.stream.Collectors; + +public class AgencyCategoryVO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 节点ID + */ + private Long id; + + /** + * 节点名称 + */ + private String label; + + /** + * 子节点 + */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List children; + + public AgencyCategoryVO(AgencyCategory agencyCategory) { + this.id = agencyCategory.getId(); + this.label = agencyCategory.getCategoryName(); + this.children = agencyCategory.getChildren().stream().map(AgencyCategoryVO::new).collect(Collectors.toList()); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } +} \ No newline at end of file diff --git a/postdischarge-manage/src/main/resources/mapper/manage/departmentdiseasetype/DepartmentDiseaseTypeMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/departmentdiseasetype/DepartmentDiseaseTypeMapper.xml new file mode 100644 index 00000000..a2612cfd --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/departmentdiseasetype/DepartmentDiseaseTypeMapper.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + select id, department_id, department_name, disease_type_name, disease_type_code, diagnosis_info, disease_type_remark, create_by, create_time, update_by, update_time from department_disease_type + + + + + + + + insert into department_disease_type + + department_id, + + department_name, + + disease_type_name, + + disease_type_code, + + diagnosis_info, + + disease_type_remark, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{departmentId}, + + #{departmentName}, + + #{diseaseTypeName}, + + #{diseaseTypeCode}, + + #{diagnosisInfo}, + + #{diseaseTypeRemark}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update department_disease_type + + department_id = + #{departmentId}, + + department_name = + #{departmentName}, + + disease_type_name = + #{diseaseTypeName}, + + disease_type_code = + #{diseaseTypeCode}, + + diagnosis_info = + #{diagnosisInfo}, + + disease_type_remark = + #{diseaseTypeRemark}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from department_disease_type where id = #{id} + + + + delete from department_disease_type where id in + + #{id} + + + \ No newline at end of file