Browse Source

fix: [代码规范]

master
memorylkf 2 months ago
parent
commit
42a4b76974
7 changed files with 9 additions and 13 deletions
  1. +2
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java
  2. +2
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java
  3. +1
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java
  4. +1
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java
  5. +1
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java
  6. +1
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java
  7. +1
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/ObjectCompareUtil.java

+ 2
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java View File

@ -836,7 +836,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG
} }
List<GyzjJcgj> gyzjJcgjList = new ArrayList<>(); List<GyzjJcgj> gyzjJcgjList = new ArrayList<>();
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNULL(gyzjOld, form);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNull(gyzjOld, form);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
throw new ServiceException("你没有修改任何内容"); throw new ServiceException("你没有修改任何内容");
} }
@ -941,7 +941,7 @@ public class GyzjServiceImpl extends ServiceImpl implements IG
if (!(gyzjOld.getZjzt().equals(ZjztEnum.rk.getValue()) || gyzjOld.getZjzt().equals(ZjztEnum.yff.getValue()))) { if (!(gyzjOld.getZjzt().equals(ZjztEnum.rk.getValue()) || gyzjOld.getZjzt().equals(ZjztEnum.yff.getValue()))) {
throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是入库或已发放状态,不能修改库存"); throw new ServiceException("给药制剂【" + gyzjOld.getMc() + "】不是入库或已发放状态,不能修改库存");
} }
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNULL(gyzjOld, form);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNull(gyzjOld, form);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
throw new ServiceException("你没有修改任何内容"); throw new ServiceException("你没有修改任何内容");
} }

+ 2
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java View File

@ -16,7 +16,6 @@ import com.hxhq.business.dto.study.StudyFormFillCz;
import com.hxhq.business.dto.study.StudyFormFillResource; import com.hxhq.business.dto.study.StudyFormFillResource;
import com.hxhq.business.enums.archive.ArchiveLogTypeEnum; import com.hxhq.business.enums.archive.ArchiveLogTypeEnum;
import com.hxhq.business.enums.study.StudyFormFillResourceTypeEnum; import com.hxhq.business.enums.study.StudyFormFillResourceTypeEnum;
import com.hxhq.business.enums.study.StudyTypeEnum;
import com.hxhq.business.enums.zykgl.*; import com.hxhq.business.enums.zykgl.*;
import com.hxhq.business.form.mjy.*; import com.hxhq.business.form.mjy.*;
import com.hxhq.business.service.*; import com.hxhq.business.service.*;
@ -857,7 +856,7 @@ public class MjyServiceImpl extends ServiceImpl implements IMjyS
} }
List<MjyJcgj> mjyJcgjList = new ArrayList<>(); List<MjyJcgj> mjyJcgjList = new ArrayList<>();
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNULL(mjyOld, form);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNull(mjyOld, form);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
throw new ServiceException("你没有修改任何内容"); throw new ServiceException("你没有修改任何内容");
} }
@ -960,7 +959,7 @@ public class MjyServiceImpl extends ServiceImpl implements IMjyS
if (!(mjyOld.getZjzt().equals(ZjztEnum.rk.getValue()) || mjyOld.getZjzt().equals(ZjztEnum.yff.getValue()))) { if (!(mjyOld.getZjzt().equals(ZjztEnum.rk.getValue()) || mjyOld.getZjzt().equals(ZjztEnum.yff.getValue()))) {
throw new ServiceException("麻精药【" + mjyOld.getMc() + "】不是入库或已发放状态,不能修改库存"); throw new ServiceException("麻精药【" + mjyOld.getMc() + "】不是入库或已发放状态,不能修改库存");
} }
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNULL(mjyOld, form);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNull(mjyOld, form);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
throw new ServiceException("你没有修改任何内容"); throw new ServiceException("你没有修改任何内容");
} }

+ 1
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java View File

@ -23,7 +23,6 @@ import com.hxhq.business.utils.lang.StudyFormUtil;
import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.core.utils.StringUtils;
import com.hxhq.common.security.utils.SecurityUtils; import com.hxhq.common.security.utils.SecurityUtils;
import com.hxhq.system.api.domain.SysDept;
import com.hxhq.system.api.domain.SysUser; import com.hxhq.system.api.domain.SysUser;
import com.hxhq.system.service.ISysDeptService; import com.hxhq.system.service.ISysDeptService;
import com.hxhq.system.service.ISysUserService; import com.hxhq.system.service.ISysUserService;
@ -289,7 +288,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyOld.setBdnr(studyFormApply.getBdnr()); studyFormApplyOld.setBdnr(studyFormApply.getBdnr());
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue());
this.updateById(studyFormApplyOld); this.updateById(studyFormApplyOld);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNULL(studyFormApplyOld, studyFormApply);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNull(studyFormApplyOld, studyFormApply);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
//稽查轨迹 //稽查轨迹
List<StudyFormApplyJcgj> studyFormApplyJcgjs = new ArrayList<>(); List<StudyFormApplyJcgj> studyFormApplyJcgjs = new ArrayList<>();

+ 1
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java View File

@ -12,7 +12,6 @@ import com.hxhq.business.enums.NormalEnum;
import com.hxhq.business.enums.SnTypeEnum; import com.hxhq.business.enums.SnTypeEnum;
import com.hxhq.business.enums.study.StudyFormFillBdztEnum; import com.hxhq.business.enums.study.StudyFormFillBdztEnum;
import com.hxhq.business.enums.study.StudyTypeEnum; import com.hxhq.business.enums.study.StudyTypeEnum;
import com.hxhq.business.enums.template.ProductEnum;
import com.hxhq.business.enums.zykgl.JcgjlxEnum; import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum; import com.hxhq.business.enums.zykgl.JcmcysEnum;
import com.hxhq.business.form.study.*; import com.hxhq.business.form.study.*;
@ -404,7 +403,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl
} }
studyFormFillOld.setSftb(NormalEnum.yes.getValue()); studyFormFillOld.setSftb(NormalEnum.yes.getValue());
this.updateById(studyFormFillOld); this.updateById(studyFormFillOld);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNULL(studyFormFillOld, studyFormFill);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNull(studyFormFillOld, studyFormFill);
if (fieldChanges.size() > 0) { if (fieldChanges.size() > 0) {
//稽查轨迹 //稽查轨迹
List<StudyFormFillJcgj> studyFormFillJcgjs = new ArrayList<>(); List<StudyFormFillJcgj> studyFormFillJcgjs = new ArrayList<>();

+ 1
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java View File

@ -23,7 +23,6 @@ import com.hxhq.business.utils.lang.StudyFormUtil;
import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.core.utils.StringUtils;
import com.hxhq.common.security.utils.SecurityUtils; import com.hxhq.common.security.utils.SecurityUtils;
import com.hxhq.system.api.domain.SysDept;
import com.hxhq.system.api.domain.SysUser; import com.hxhq.system.api.domain.SysUser;
import com.hxhq.system.service.ISysDeptService; import com.hxhq.system.service.ISysDeptService;
import com.hxhq.system.service.ISysUserService; import com.hxhq.system.service.ISysUserService;
@ -162,7 +161,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
studyFormPlanOld.setBdnr(studyFormPlan.getBdnr()); studyFormPlanOld.setBdnr(studyFormPlan.getBdnr());
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.tbz.getValue()); studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.tbz.getValue());
this.updateById(studyFormPlanOld); this.updateById(studyFormPlanOld);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNULL(studyFormPlanOld, studyFormPlan);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNull(studyFormPlanOld, studyFormPlan);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
//稽查轨迹 //稽查轨迹
List<StudyFormPlanJcgj> studyFormPlanJcgjs = new ArrayList<>(); List<StudyFormPlanJcgj> studyFormPlanJcgjs = new ArrayList<>();

+ 1
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java View File

@ -140,7 +140,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreOld.setTemplateId(studyFormPre.getTemplateId()); studyFormPreOld.setTemplateId(studyFormPre.getTemplateId());
studyFormPreOld.setBdnr(studyFormPre.getBdnr()); studyFormPreOld.setBdnr(studyFormPre.getBdnr());
this.updateById(studyFormPreOld); this.updateById(studyFormPreOld);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNULL(studyFormPreOld, studyFormPre);
List<ObjectCompareUtil.FieldChange> fieldChanges = ObjectCompareUtil.compareObjectsNotNull(studyFormPreOld, studyFormPre);
if (fieldChanges.size() == 0) { if (fieldChanges.size() == 0) {
//稽查轨迹 //稽查轨迹
List<StudyFormPreJcgj> studyFormPreJcgjs = new ArrayList<>(); List<StudyFormPreJcgj> studyFormPreJcgjs = new ArrayList<>();

+ 1
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/utils/ObjectCompareUtil.java View File

@ -115,7 +115,7 @@ public class ObjectCompareUtil {
* @param newObj 新对象 * @param newObj 新对象
* @return 字段变化列表 * @return 字段变化列表
*/ */
public static List<FieldChange> compareObjectsNotNULL(Object oldObj, Object newObj) {
public static List<FieldChange> compareObjectsNotNull(Object oldObj, Object newObj) {
List<FieldChange> changes = new ArrayList<>(); List<FieldChange> changes = new ArrayList<>();
// if (oldObj == null || newObj == null) { // if (oldObj == null || newObj == null) {

Loading…
Cancel
Save