病种修改

This commit is contained in:
zhangheng 2024-05-09 14:31:21 +08:00
parent 0c4baa7247
commit ad14309baa
8 changed files with 20 additions and 35 deletions

View File

@ -199,6 +199,11 @@ public class Constants {
*/ */
public static final String AGENCY_CODE = "AYC"; public static final String AGENCY_CODE = "AYC";
/**
* 科室病种编码
*/
public static final String DISEASE_TYPE_CODE = "DTC";
/** /**
* 任务状态编码 * 任务状态编码
*/ */

View File

@ -1,6 +1,8 @@
package com.xinelu.manage.service.departmentdiseasetype.impl; package com.xinelu.manage.service.departmentdiseasetype.impl;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType; import com.xinelu.manage.domain.departmentdiseasetype.DepartmentDiseaseType;
import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper; import com.xinelu.manage.mapper.departmentdiseasetype.DepartmentDiseaseTypeMapper;
import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService; import com.xinelu.manage.service.departmentdiseasetype.IDepartmentDiseaseTypeService;
@ -24,6 +26,8 @@ import java.util.List;
public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeService { public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeService {
@Resource @Resource
private DepartmentDiseaseTypeMapper departmentDiseaseTypeMapper; private DepartmentDiseaseTypeMapper departmentDiseaseTypeMapper;
@Resource
private GenerateSystemCodeUtil generateSystemCodeUtil;
/** /**
* 查询科室病种信息 * 查询科室病种信息
@ -56,6 +60,7 @@ public class DepartmentDiseaseTypeServiceImpl implements IDepartmentDiseaseTypeS
@Override @Override
public int insertDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType) { public int insertDepartmentDiseaseType(DepartmentDiseaseType departmentDiseaseType) {
departmentDiseaseType.setCreateTime(LocalDateTime.now()); departmentDiseaseType.setCreateTime(LocalDateTime.now());
departmentDiseaseType.setDiseaseTypeCode(Constants.DISEASE_TYPE_CODE + generateSystemCodeUtil.generateSystemCode(Constants.DISEASE_TYPE_CODE));
return departmentDiseaseTypeMapper.insertDepartmentDiseaseType(departmentDiseaseType); return departmentDiseaseTypeMapper.insertDepartmentDiseaseType(departmentDiseaseType);
} }

View File

@ -93,7 +93,6 @@ public class InfoServiceImpl implements IInfoService {
if (Objects.isNull(infoByID)) { if (Objects.isNull(infoByID)) {
return AjaxResult.error("当前资讯信息不存在,无法修改,请联系管理员!"); return AjaxResult.error("当前资讯信息不存在,无法修改,请联系管理员!");
} }
//添加修改人 修改时间 //添加修改人 修改时间
info.setInfoReviser(SecurityUtils.getUsername()); info.setInfoReviser(SecurityUtils.getUsername());
info.setInfoModifyTime(LocalDateTime.now()); info.setInfoModifyTime(LocalDateTime.now());
@ -101,12 +100,10 @@ public class InfoServiceImpl implements IInfoService {
if (count <= 0) { if (count <= 0) {
throw new ServiceException("修改资讯信息失败,请联系管理员!"); throw new ServiceException("修改资讯信息失败,请联系管理员!");
} }
//如果两个图片不相等删除之前的图片 //如果两个图片不相等删除之前的图片
if (!info.getInfoLargePictureUrl().equals(infoByID.getInfoLargePictureUrl())) { if (!info.getInfoLargePictureUrl().equals(infoByID.getInfoLargePictureUrl())) {
deletePictureUrl(infoByID.getInfoLargePictureUrl()); deletePictureUrl(infoByID.getInfoLargePictureUrl());
} }
//遍历修改前后内容相不相等如果不为空且不相等寻找遍历前后图片的差集然后删除. //遍历修改前后内容相不相等如果不为空且不相等寻找遍历前后图片的差集然后删除.
if (StringUtils.isNotBlank(info.getInfoContent()) && StringUtils.isNotBlank(infoByID.getInfoContent()) if (StringUtils.isNotBlank(info.getInfoContent()) && StringUtils.isNotBlank(infoByID.getInfoContent())
&& !info.getInfoContent().equals(infoByID.getInfoContent())) { && !info.getInfoContent().equals(infoByID.getInfoContent())) {
@ -117,7 +114,6 @@ public class InfoServiceImpl implements IInfoService {
//遍历删除图片 //遍历删除图片
List<String> subList = new ArrayList<>(CollectionUtils.subtract(infoImgSrc, infoByIDImgSrc)); List<String> subList = new ArrayList<>(CollectionUtils.subtract(infoImgSrc, infoByIDImgSrc));
for (String picUrl : subList) { for (String picUrl : subList) {
if (StringUtils.isBlank(picUrl)) { //删除富文本图片 if (StringUtils.isBlank(picUrl)) { //删除富文本图片
continue; continue;
} }
@ -126,7 +122,6 @@ public class InfoServiceImpl implements IInfoService {
//删除富文本图片 //删除富文本图片
deletePictureUrl(substring); deletePictureUrl(substring);
} }
} }
return AjaxResult.success(); return AjaxResult.success();
} }

View File

@ -206,12 +206,8 @@
<if test="voicebroadcast != null">voicebroadcast = <if test="voicebroadcast != null">voicebroadcast =
#{voicebroadcast}, #{voicebroadcast},
</if> </if>
<if test="diseaseTypeId != null">disease_type_id = disease_type_id = #{diseaseTypeId},
#{diseaseTypeId}, disease_type_name = #{diseaseTypeName},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
<if test="propagandaLink != null">propaganda_link = <if test="propagandaLink != null">propaganda_link =
#{propagandaLink}, #{propagandaLink},
</if> </if>

View File

@ -224,12 +224,8 @@
<if test="departmentName != null">department_name = <if test="departmentName != null">department_name =
#{departmentName}, #{departmentName},
</if> </if>
<if test="diseaseTypeId != null">disease_type_id = disease_type_id = #{diseaseTypeId},
#{diseaseTypeId}, disease_type_name = #{diseaseTypeName},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
<if test="commonScriptName != null">common_script_name = <if test="commonScriptName != null">common_script_name =
#{commonScriptName}, #{commonScriptName},
</if> </if>

View File

@ -330,12 +330,8 @@
<if test="departmentName != null">department_name = <if test="departmentName != null">department_name =
#{departmentName}, #{departmentName},
</if> </if>
<if test="diseaseTypeId != null">disease_type_id = disease_type_id = #{diseaseTypeId},
#{diseaseTypeId}, disease_type_name = #{diseaseTypeName},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
<if test="packageName != null">package_name = <if test="packageName != null">package_name =
#{packageName}, #{packageName},
</if> </if>

View File

@ -246,12 +246,8 @@
<if test="departmentName != null">department_name = <if test="departmentName != null">department_name =
#{departmentName}, #{departmentName},
</if> </if>
<if test="diseaseTypeId != null">disease_type_id = disease_type_id = #{diseaseTypeId},
#{diseaseTypeId}, disease_type_name = #{diseaseTypeName},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
<if test="textMessageName != null">text_message_name = <if test="textMessageName != null">text_message_name =
#{textMessageName}, #{textMessageName},
</if> </if>

View File

@ -277,12 +277,8 @@
<if test="departmentName != null">department_name = <if test="departmentName != null">department_name =
#{departmentName}, #{departmentName},
</if> </if>
<if test="diseaseTypeId != null">disease_type_id = disease_type_id = #{diseaseTypeId},
#{diseaseTypeId}, disease_type_name = #{diseaseTypeName},
</if>
<if test="diseaseTypeName != null">disease_type_name =
#{diseaseTypeName},
</if>
<if test="wechatTemplateName != null">wechat_template_name = <if test="wechatTemplateName != null">wechat_template_name =
#{wechatTemplateName}, #{wechatTemplateName},
</if> </if>