From e62f44a7655da8f561f03df67edcaa97afbd1af1 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Fri, 6 Feb 2026 18:03:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/service/impl/GyzjServiceImpl.java | 10 +-- .../hxhq/business/service/impl/MjyServiceImpl.java | 10 +-- .../hxhq/business/service/impl/SjServiceImpl.java | 80 +++++++++++----------- 3 files changed, 51 insertions(+), 49 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java index 0a4cb30..deddf36 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GyzjServiceImpl.java @@ -1529,11 +1529,11 @@ public class GyzjServiceImpl extends ServiceImpl implements IG //更新 Resource studyFormFill.setResource(JSONObject.toJSONString(studyFormFillResourceList)); } - if(studyFormFill.getSftb().equals(NormalEnum.no.getValue())) { - // 存储、处置 - cc(studyFormFill, gyzjMap, jcgjList, tzList, remark, qmr); - cz(studyFormFill, gyzjMap, jcgjList, tzList, remark, qmr); - } + } + if(gyzjMap.size() > 0&&studyFormFill.getSftb().equals(NormalEnum.no.getValue())) { + // 存储、处置 + cc(studyFormFill, gyzjMap, jcgjList, tzList, remark, qmr); + cz(studyFormFill, gyzjMap, jcgjList, tzList, remark, qmr); } if (jcgjList.size() > 0) { gyzjJcgjService.saveBatch(jcgjList); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java index 6878ef6..2e749ae 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/MjyServiceImpl.java @@ -1315,11 +1315,11 @@ public class MjyServiceImpl extends ServiceImpl implements IMjyS //更新 Resource studyFormFill.setResource(JSONObject.toJSONString(studyFormFillResourceList)); } - if(studyFormFill.getSftb().equals(NormalEnum.no.getValue())){ - // 处置、存储 - cc(studyFormFill, mjyMap, jcgjList, tzList, remark, qmr); - cz(studyFormFill, mjyMap, jcgjList, tzList, remark, qmr); - } + } + if(mjyMap.size() > 0&&studyFormFill.getSftb().equals(NormalEnum.no.getValue())){ + // 处置、存储 + cc(studyFormFill, mjyMap, jcgjList, tzList, remark, qmr); + cz(studyFormFill, mjyMap, jcgjList, tzList, remark, qmr); } if (jcgjList.size() > 0) { mjyJcgjService.saveBatch(jcgjList); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java index dd4b4ac..9d2f822 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/SjServiceImpl.java @@ -14,6 +14,7 @@ import com.hxhq.business.dto.sj.SjListDto; import com.hxhq.business.dto.study.StudyFormFillCc; import com.hxhq.business.dto.study.StudyFormFillCz; import com.hxhq.business.dto.study.StudyFormFillResource; +import com.hxhq.business.enums.NormalEnum; import com.hxhq.business.enums.archive.ArchiveLogTypeEnum; import com.hxhq.business.enums.study.StudyFormFillResourceTypeEnum; import com.hxhq.business.enums.zykgl.*; @@ -673,44 +674,46 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi Sj sj = sjMap.get(studyFormFillResource.getBh()); //配置的才保存,或更新 if (studyFormFillResource.getType() == null) { - if (sj == null) { - sj = new Sj(); + if(studyFormFill.getSftb().equals(NormalEnum.no.getValue())) { + if (sj == null) { + sj = new Sj(); + } + sj.setStudyId(studyId); + sj.setStudyFormId(studyFormId); + sj.setDeptId(deptId); + sj.setZjzt(ZjztEnum.rk.getValue()); + sj.setJyzt(JyztEnum.wjy.getValue()); + sj.setDeptId(template.getDeptId()); + + sj.setMc(studyFormFillResource.getMc()); + sj.setBh(studyFormFillResource.getBh()); + sj.setNd(String.valueOf(studyFormFillResource.getNd())); + sj.setNddw(studyFormFillResource.getNddw()); + sj.setKc(studyFormFillResource.getKc()); + sj.setKcdw(studyFormFillResource.getKcdw()); + sj.setLy(studyFormFillResource.getLy()); + sj.setSxr(DateUtils.parseDate(studyFormFillResource.getSxrq())); + sj.setPzrq(studyFormFill.getStartDate()); + sj.setYxzq(studyFormFillResource.getYxzq()); + sj.setYxzqdw(studyFormFillResource.getYxzqdw()); + + if (sj.getId() == null) { + this.save(sj); + // 稽查轨迹 + SjJcgj sjJcgj = sjJcgjService.genJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "配制完成", "Formulation Completed", + JcmcysEnum.green.getValue(), null, null, qmr); + jcgjList.add(sjJcgj); + + // 台账 + SjTz sjTz = sjTzService.genTz(sj.getId(), "配制完成", "Formulation Completed", sj.getKc(), sj.getKcdw(), null, qmr); + tzList.add(sjTz); + } else { + this.updateById(sj); + } + sjMap.put(sj.getBh(), sj); + sjList.add(sj); + studyFormFillResource.setType(StudyFormFillResourceTypeEnum.sj.getValue()); } - sj.setStudyId(studyId); - sj.setStudyFormId(studyFormId); - sj.setDeptId(deptId); - sj.setZjzt(ZjztEnum.rk.getValue()); - sj.setJyzt(JyztEnum.wjy.getValue()); - sj.setDeptId(template.getDeptId()); - - sj.setMc(studyFormFillResource.getMc()); - sj.setBh(studyFormFillResource.getBh()); - sj.setNd(String.valueOf(studyFormFillResource.getNd())); - sj.setNddw(studyFormFillResource.getNddw()); - sj.setKc(studyFormFillResource.getKc()); - sj.setKcdw(studyFormFillResource.getKcdw()); - sj.setLy(studyFormFillResource.getLy()); - sj.setSxr(DateUtils.parseDate(studyFormFillResource.getSxrq())); - sj.setPzrq(studyFormFill.getStartDate()); - sj.setYxzq(studyFormFillResource.getYxzq()); - sj.setYxzqdw(studyFormFillResource.getYxzqdw()); - - if (sj.getId() == null) { - this.save(sj); - // 稽查轨迹 - SjJcgj sjJcgj = sjJcgjService.genJcgj(sj.getId(), JcgjlxEnum.lc.getValue(), "配制完成", "Formulation Completed", - JcmcysEnum.green.getValue(), null, null, qmr); - jcgjList.add(sjJcgj); - - // 台账 - SjTz sjTz = sjTzService.genTz(sj.getId(), "配制完成", "Formulation Completed", sj.getKc(), sj.getKcdw(), null, qmr); - tzList.add(sjTz); - } else { - this.updateById(sj); - } - sjMap.put(sj.getBh(), sj); - sjList.add(sj); - studyFormFillResource.setType(StudyFormFillResourceTypeEnum.sj.getValue()); }else{ //使用的才更新 Resource studyFormFillResource.setMc(sj.getMc()); @@ -732,8 +735,7 @@ public class SjServiceImpl extends ServiceImpl implements ISjServi //更新 Resource studyFormFill.setResource(JSONObject.toJSONString(studyFormFillResourceList)); } - - if (sjMap.size() > 0) { + if(sjMap.size() > 0&&studyFormFill.getSftb().equals(NormalEnum.no.getValue())) { // 存储 cc(studyFormFill, sjMap, jcgjList, tzList, qmr); // 处置,库存全变为0