From 452f2c441c2b7b3a447bfdaa31181badd38fc33f Mon Sep 17 00:00:00 2001 From: haown <454902499@qq.com> Date: Wed, 15 Nov 2023 14:52:52 +0800 Subject: [PATCH] =?UTF-8?q?update=3D=3D=3D>:=E5=A2=9E=E5=8A=A0=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=94=A8=E6=88=B7=E5=90=8D=E5=AF=86=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/hospitalpersoninfo/HospitalPersonInfo.java | 1 - .../impl/HospitalPersonInfoServiceImpl.java | 8 ++++---- .../src/main/resources/mapper/system/SysUserMapper.xml | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalpersoninfo/HospitalPersonInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalpersoninfo/HospitalPersonInfo.java index c4d7b0b..2cf0bfe 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalpersoninfo/HospitalPersonInfo.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalpersoninfo/HospitalPersonInfo.java @@ -108,7 +108,6 @@ public class HospitalPersonInfo extends BaseDomain implements Serializable { */ @ApiModelProperty(value = "咨询费用") @Excel(name = "咨询费用") - @NotNull(message = "咨询费用不能为空", groups = {Insert.class, Update.class}) private BigDecimal consultingFee; /** diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java index 4608c0c..c0e0e04 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java @@ -110,7 +110,7 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService return AjaxResult.error("您输入的身份证号" + hospitalPersonInfo.getCardNo() + "重复,请重新添加!"); } } - if (Objects.nonNull(hospitalPersonInfo.getConsultingFee()) && hospitalPersonInfo.getConsultingFee().compareTo(BigDecimal.ZERO) <= 0) { + if (StringUtils.equals("2", hospitalPersonInfo.getStatus()) && (Objects.isNull(hospitalPersonInfo.getConsultingFee()) || hospitalPersonInfo.getConsultingFee().compareTo(BigDecimal.ZERO) <= 0)) { return AjaxResult.error("咨询费用不能为0或者负数,请重新输入"); } //创建人 创建时间 科室人员编码 @@ -165,9 +165,9 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService if (Objects.nonNull(ajaxResult)) { return ajaxResult; } - if (Objects.nonNull(hospitalPersonInfo.getConsultingFee()) && hospitalPersonInfo.getConsultingFee().compareTo(BigDecimal.ZERO) <= 0) { - return AjaxResult.error("咨询费用不能为0或者负数,请重新输入"); - } + if (StringUtils.equals("2", hospitalPersonInfo.getStatus()) && (Objects.isNull(hospitalPersonInfo.getConsultingFee()) || hospitalPersonInfo.getConsultingFee().compareTo(BigDecimal.ZERO) <= 0)) { + return AjaxResult.error("咨询费用不能为0或者负数,请重新输入"); + } //修改人 修改时间 hospitalPersonInfo.setUpdateTime(LocalDateTime.now()); hospitalPersonInfo.setUpdateBy(SecurityUtils.getUsername()); diff --git a/xinelu-system/src/main/resources/mapper/system/SysUserMapper.xml b/xinelu-system/src/main/resources/mapper/system/SysUserMapper.xml index f2b0969..94282d1 100644 --- a/xinelu-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/xinelu-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -87,6 +87,9 @@ AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) )) + + AND u.hospital_person_id = #{hospitalPersonId} + ${params.dataScope}