diff --git a/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java b/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java index c8f4bf78..deaa69e2 100644 --- a/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java +++ b/postdischarge-admin/src/main/java/com/xinelu/web/controller/system/SysUserController.java @@ -141,7 +141,7 @@ public class SysUserController extends BaseController { */ @PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "用户管理", businessType = BusinessType.UPDATE) - @PutMapping + @PutMapping("/edit") public AjaxResult edit(@Validated @RequestBody SysUser user) { userService.checkUserAllowed(user); userService.checkUserDataScope(user.getUserId()); diff --git a/postdischarge-admin/src/main/resources/template/科室信息导入表.xlsx b/postdischarge-admin/src/main/resources/template/科室信息导入表.xlsx index 96e2fb96..5a0c7c8f 100644 Binary files a/postdischarge-admin/src/main/resources/template/科室信息导入表.xlsx and b/postdischarge-admin/src/main/resources/template/科室信息导入表.xlsx differ diff --git a/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java b/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java index e7d20390..e118190c 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/constant/Constants.java @@ -194,6 +194,16 @@ public class Constants { */ public static final String TASK_STATUS_CODE = "TSC"; + /** + * 任务状态编码 + */ + public static final String AGENCY_CODE = "AYC"; + + /** + * 任务状态编码 + */ + public static final String DEPARTMENT_CODE = "DTC"; + /** * 门诊患者 */ @@ -323,9 +333,4 @@ public class Constants { * 资讯编码前缀 */ public static final String INFO_CODE = "IC"; - - /** - * 科室编码前缀 - */ - public static final String DEPARTMENT_CODE = "HDC"; } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/department/Department.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/department/Department.java index 4e2d3884..8879a9f1 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/department/Department.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/department/Department.java @@ -165,7 +165,6 @@ public class Department extends BaseEntity { */ @ApiModelProperty(value = "成立日期") @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "成立日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate establishDate; /** @@ -173,7 +172,6 @@ public class Department extends BaseEntity { */ @ApiModelProperty(value = "撤销日期") @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "撤销日期", width = 30, dateFormat = "yyyy-MM-dd") private LocalDate revokeDate; @Override diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/ImportDepartmentDTO.java b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/ImportDepartmentDTO.java new file mode 100644 index 00000000..b3945091 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/dto/department/ImportDepartmentDTO.java @@ -0,0 +1,131 @@ +package com.xinelu.manage.dto.department; + +import com.xinelu.common.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class ImportDepartmentDTO { + + private static final long serialVersionUID = 1L; + + /** + * 上级科室id + */ + @ApiModelProperty(value = "上级科室编号") + @Excel(name = "上级科室编号") + private String parentDepartmentCode; + + /** + * 所属机构id + */ + @ApiModelProperty(value = "所属机构编码") + @Excel(name = "所属机构编码") + private String agencyCode; + + /** + * 所属机构名称 + */ + @ApiModelProperty(value = "所属机构名称") + @Excel(name = "所属机构名称") + private String agencyName; + + /** + * 科室名称 + */ + @ApiModelProperty(value = "科室名称") + @Excel(name = "科室名称") + private String departmentName; + + /** + * 科室类型 + */ + @ApiModelProperty(value = "科室类型") + @Excel(name = "科室类型") + private String departmentType; + + /** + * 科室简称 + */ + @ApiModelProperty(value = "科室简称") + @Excel(name = "科室简称") + private String departmentAbbreviation; + + /** + * 科室负责人id + */ + @ApiModelProperty(value = "科室负责人id") + @Excel(name = "科室负责人编号") + private String departmentPersonId; + + /** + * 科室负责人姓名 + */ + @ApiModelProperty(value = "科室负责人姓名") + @Excel(name = "科室负责人姓名") + private String departmentPersonName; + + /** + * 节点类型,科室:DEPARTMENT,病区:WARD, + */ + @ApiModelProperty(value = "节点类型,科室:DEPARTMENT,病区:WARD") + @Excel(name = "节点类型,科室:DEPARTMENT,病区:WARD") + private String nodeType; + + /** + * 提供服务类别,门诊:OUTPATIENT_SERVICE,急诊:EMERGENCY_TREATMENT,住院:BE_HOSPITALIZED,病区:WARD,医技:MEDICAL_TECHNOLOGY, + * 药剂:DRUG,财务:FINANCE,行政:ADMINISTRATION,药房:PHARMACY,药库:DRUG_STORAGE,公卫:PUBLIC_HEALTH + */ + @ApiModelProperty(value = "提供服务类别,门诊:OUTPATIENT_SERVICE,急诊:EMERGENCY_TREATMENT,住院:BE_HOSPITALIZED,病区:WARD,医技:MEDICAL_TECHNOLOGY,药剂:DRUG,财务:FINANCE,行政:ADMINISTRATION,药房:PHARMACY,药库:DRUG_STORAGE,公卫:PUBLIC_HEALTH") + @Excel(name = "提供服务类别,门诊:OUTPATIENT_SERVICE,急诊:EMERGENCY_TREATMENT,住院:BE_HOSPITALIZED,病区:WARD,医技:MEDICAL_TECHNOLOGY, 药剂:DRUG,财务:FINANCE,行政:ADMINISTRATION,药房:PHARMACY,药库:DRUG_STORAGE,公卫:PUBLIC_HEALTH") + private String provideServiceCategory; + + /** + * 细分类别id + */ + @ApiModelProperty(value = "细分类别id") + @Excel(name = "细分类别编号") + private String subdivisionCategoryCode; + + /** + * 细分类别名称 + */ + @ApiModelProperty(value = "细分类别名称") + @Excel(name = "细分类别名称") + private String subdivisionCategoryName; + + /** + * 标准科室对照id + */ + @ApiModelProperty(value = "标准科室对照id") + @Excel(name = "标准科室对照编号") + private String normDepartmentCompareCode; + + /** + * 标准科室对照名称 + */ + @ApiModelProperty(value = "标准科室对照名称") + @Excel(name = "标准科室对照名称") + private String normDepartmentCompareName; + + /** + * 编制床位数 + */ + @ApiModelProperty(value = "编制床位数") + @Excel(name = "编制床位数") + private Integer prepareBedsCount; + + /** + * 科室电话 + */ + @ApiModelProperty(value = "科室电话") + @Excel(name = "科室电话") + private String departmentPhone; + + /** + * 科室邮箱 + */ + @ApiModelProperty(value = "科室邮箱") + @Excel(name = "科室邮箱") + private String departmentMail; +} 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 443309c3..b63f026f 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 @@ -1,10 +1,12 @@ package com.xinelu.manage.service.agency.impl; +import com.xinelu.common.constant.Constants; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.enums.NodeTypeEnum; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.common.utils.regex.RegexUtil; import com.xinelu.manage.domain.agency.Agency; import com.xinelu.manage.domain.department.Department; @@ -48,6 +50,8 @@ public class AgencyServiceImpl implements IAgencyService { private SysAreaMapper sysAreaMapper; @Resource private DepartmentMapper departmentMapper; + @Resource + private GenerateSystemCodeUtil generateSystemCodeUtil; /** @@ -114,6 +118,7 @@ public class AgencyServiceImpl implements IAgencyService { } agency.setCreateTime(LocalDateTime.now()); agency.setCreateBy(SecurityUtils.getUsername()); + agency.setAgencyCode(Constants.AGENCY_CODE + generateSystemCodeUtil.generateSystemCode(Constants.AGENCY_CODE)); return AjaxResult.success(agencyMapper.insertAgency(agency)); } 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 da78de81..946f1ea0 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 @@ -1,11 +1,13 @@ package com.xinelu.manage.service.department.impl; +import com.xinelu.common.constant.Constants; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.entity.SysUser; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; import com.xinelu.common.utils.regex.RegexUtil; import com.xinelu.manage.domain.department.Department; import com.xinelu.manage.dto.department.DepartmentDTO; @@ -41,6 +43,8 @@ public class DepartmentServiceImpl implements IDepartmentService { private RegexUtil regexUtil; @Resource private SysUserMapper sysUserMapper; + @Resource + private GenerateSystemCodeUtil generateSystemCodeUtil; /** * 查询科室信息 @@ -108,6 +112,7 @@ public class DepartmentServiceImpl implements IDepartmentService { } department.setCreateTime(LocalDateTime.now()); department.setCreateBy(SecurityUtils.getUsername()); + department.setDepartmentCode(Constants.DEPARTMENT_CODE + generateSystemCodeUtil.generateSystemCode(Constants.DEPARTMENT_CODE)); return departmentMapper.insertDepartment(department); } diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/infocategory/impl/InfoCategoryServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/infocategory/impl/InfoCategoryServiceImpl.java index 27fad338..4504c16c 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/infocategory/impl/InfoCategoryServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/infocategory/impl/InfoCategoryServiceImpl.java @@ -89,7 +89,7 @@ public class InfoCategoryServiceImpl implements IInfoCategoryService { infocategory.setCreateTime(LocalDateTime.now());//设置添加时间 infocategory.setInfoCategoryCreator(SecurityUtils.getUsername());//设置当前的用户 infocategory.setInfoCategoryType(infocategory.getInfoCategoryName());//类型 无用 直接赋值和名称相同 - infocategory.setInfoCategoryCode(Constants.INFO_CATEGORY_CODE + generateSystemCodeUtil.generateSystemCode(Constants.DEPARTMENT_CODE)); + infocategory.setInfoCategoryCode(Constants.INFO_CATEGORY_CODE + generateSystemCodeUtil.generateSystemCode(Constants.INFO_CATEGORY_CODE)); } int insertCount = infoCategoryMapper.insertInfoCategoryList(infoCategoryDTO.getInfoCategoryList()); if (insertCount < 0) { diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/impl/SpecialDiseaseNodeServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/impl/SpecialDiseaseNodeServiceImpl.java index 8abc07c2..2297c3ce 100644 --- a/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/impl/SpecialDiseaseNodeServiceImpl.java +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/specialdiseasenode/impl/SpecialDiseaseNodeServiceImpl.java @@ -12,11 +12,14 @@ import com.xinelu.manage.service.specialdiseasenode.ISpecialDiseaseNodeService; import com.xinelu.manage.vo.specialdiseasenode.SpecialDiseaseNodeVO; import com.xinelu.manage.vo.specialdiseaseroute.SpecialDiseaseRouteVO; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.time.LocalDateTime; +import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -110,13 +113,20 @@ public class SpecialDiseaseNodeServiceImpl implements ISpecialDiseaseNodeService log.info("删除管理节点信息失败"); throw new ServiceException("修改专病路径管理节点信息失败"); } - for (SpecialDiseaseNodeVO diseaseNode : specialDiseaseNode.getSpecialDiseaseNodeList()) { - diseaseNode.setRouteId(specialDiseaseRoute.getId()); - diseaseNode.setRouteName(specialDiseaseNode.getRouteName()); - diseaseNode.setUpdateTime(LocalDateTime.now()); - diseaseNode.setUpdateBy(SecurityUtils.getUsername()); + if (CollectionUtils.isEmpty(specialDiseaseNode.getSpecialDiseaseNodeList())) { + return AjaxResult.success(); } - int insertNodeCount = specialDiseaseNodeMapper.insertSpecialDiseaseNodeList(specialDiseaseNode.getSpecialDiseaseNodeList()); + ArrayList specialDiseaseNodeVOS = new ArrayList<>(); + for (SpecialDiseaseNodeVO diseaseNode : specialDiseaseNode.getSpecialDiseaseNodeList()) { + if (StringUtils.isNotBlank(diseaseNode.getRouteNodeName()) && Objects.nonNull(diseaseNode.getRouteNodeDay()) && StringUtils.isNotBlank(diseaseNode.getTaskType()) && StringUtils.isNotBlank(diseaseNode.getTaskSubdivision()) && StringUtils.isNotBlank(diseaseNode.getTaskStatus())) { + diseaseNode.setRouteId(specialDiseaseRoute.getId()); + diseaseNode.setRouteName(specialDiseaseNode.getRouteName()); + diseaseNode.setUpdateTime(LocalDateTime.now()); + diseaseNode.setUpdateBy(SecurityUtils.getUsername()); + specialDiseaseNodeVOS.add(diseaseNode); + } + } + int insertNodeCount = specialDiseaseNodeMapper.insertSpecialDiseaseNodeList(specialDiseaseNodeVOS); if (insertNodeCount < 0) { log.info("新增管理节点信息失败"); throw new ServiceException("修改专病路径管理节点信息失败"); diff --git a/postdischarge-manage/src/main/resources/mapper/manage/info/InfoMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/info/InfoMapper.xml index 02a0a808..b6d414ca 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/info/InfoMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/info/InfoMapper.xml @@ -50,10 +50,10 @@ and info_category_name = #{infoCategoryName} - and info_title = #{infoTitle} + and info_title like concat('%', #{infoTitle}, '%') - and info_code = #{infoCode} + and info_code like concat('%', #{infoCode}, '%') and info_content = #{infoContent} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/infocategory/InfoCategoryMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/infocategory/InfoCategoryMapper.xml index 47380baf..3b43533c 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/infocategory/InfoCategoryMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/infocategory/InfoCategoryMapper.xml @@ -5,114 +5,123 @@ - - - - - - - + + + + + + + - select id, info_category_code, info_category_name, info_category_type, info_category_sort, info_category_creator, info_category_create_time from info_category + select id, + info_category_code, + info_category_name, + info_category_type, + info_category_sort, + info_category_creator, + info_category_create_time + from info_category - where info_category_name = #{info_category_name} insert into info_category - info_category_code, - - info_category_name, - - info_category_type, - - info_category_sort, - - info_category_creator, - - info_category_create_time, - + info_category_code, + + info_category_name, + + info_category_type, + + info_category_sort, + + info_category_creator, + + info_category_create_time, + - #{infoCategoryCode}, - - #{infoCategoryName}, - - #{infoCategoryType}, - - #{infoCategorySort}, - - #{infoCategoryCreator}, - - #{infoCategoryCreateTime}, - + #{infoCategoryCode}, + + #{infoCategoryName}, + + #{infoCategoryType}, + + #{infoCategorySort}, + + #{infoCategoryCreator}, + + #{infoCategoryCreateTime}, + update info_category - info_category_code = - #{infoCategoryCode}, - - info_category_name = - #{infoCategoryName}, - - info_category_type = - #{infoCategoryType}, - - info_category_sort = - #{infoCategorySort}, - - info_category_creator = - #{infoCategoryCreator}, - - info_category_create_time = - #{infoCategoryCreateTime}, - + info_category_code = + #{infoCategoryCode}, + + info_category_name = + #{infoCategoryName}, + + info_category_type = + #{infoCategoryType}, + + info_category_sort = + #{infoCategorySort}, + + info_category_creator = + #{infoCategoryCreator}, + + info_category_create_time = + #{infoCategoryCreateTime}, + where id = #{id} - delete from info_category where id = #{id} + delete + from info_category + where id = #{id} @@ -130,7 +139,6 @@ - insert into info_category( info_category_code, diff --git a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml index d70a18b7..3409eadb 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/labelfieldcontent/LabelFieldContentMapper.xml @@ -77,7 +77,7 @@ #{fieldMark} - order by create_time DESC + order by content_sort, create_time DESC diff --git a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml index 8410a7fe..c62061c8 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/signpatientrecord/SignPatientRecordMapper.xml @@ -86,7 +86,7 @@ ,#{patientPhone,jdbcType=VARCHAR},#{cardNo,jdbcType=VARCHAR},#{sex,jdbcType=VARCHAR},#{birthDate,jdbcType=DATE},#{signTime,jdbcType=TIMESTAMP} ,#{hospitalAgencyId,jdbcType=BIGINT},#{hospitalAgencyName,jdbcType=VARCHAR},#{campusAgencyId,jdbcType=BIGINT} ,#{campusAgencyName,jdbcType=VARCHAR},#{departmentId,jdbcType=BIGINT},#{departmentName,jdbcType=VARCHAR} - ,#{wardId,jdbcType=BIGINT},#{wardName,jdbcType=VARCHAR},#{visitSerialNumber,jdbcType=VARCHAR} + ,#{wardId,jdbcType=BIGINT},#{wardName,jdbcType=VARCHAR},#{patientVisitRecordId,jdbcType=BIGINT},#{visitSerialNumber,jdbcType=VARCHAR} ,#{visitMethod,jdbcType=VARCHAR},#{inHospitalNumber,jdbcType=VARCHAR},#{signDiagnosis,jdbcType=VARCHAR},#{reviewDiagnosis,jdbcType=VARCHAR} ,#{serviceStatus,jdbcType=VARCHAR},#{signStatus,jdbcType=VARCHAR},#{intentionalSource,jdbcType=VARCHAR} ,#{intentionalTime,jdbcType=TIMESTAMP},#{billingDoctorId,jdbcType=BIGINT},#{billingDoctorName,jdbcType=VARCHAR} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml index 41de00d0..18678f76 100644 --- a/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml +++ b/postdischarge-manage/src/main/resources/mapper/manage/specialdiseaseroute/SpecialDiseaseRouteMapper.xml @@ -199,6 +199,7 @@ and sdrp.service_package_id = #{servicePackageId} + GROUP BY sdr.id order by create_time DESC,route_sort ASC +