From a2e8ef54943bc49094f2290ecaeaa393bf53036a Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Sat, 10 Jan 2026 21:44:26 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86][=E5=A1=AB=E6=8A=A5=E8=A1=A8=E5=8D=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StudyFormPreController.java | 3 +- .../com/hxhq/business/domain/StudyFormFill.java | 12 +- .../java/com/hxhq/business/domain/StudyGyzj.java | 11 -- .../java/com/hxhq/business/domain/StudyMjy.java | 11 -- .../business/service/IStudyFormPreService.java | 2 +- .../service/impl/StudyFormApplyServiceImpl.java | 128 +++++++++-------- .../service/impl/StudyFormFillServiceImpl.java | 60 ++++---- .../service/impl/StudyFormPlanServiceImpl.java | 99 +++++++------- .../service/impl/StudyFormPreServiceImpl.java | 151 +++++++++++---------- 9 files changed, 228 insertions(+), 249 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java index a168e63..9fb867d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java @@ -114,8 +114,7 @@ public class StudyFormPreController extends BaseController @RequiresPermissions({"business:studyFormPre:bj","business:nonTrialFormPre:bj","business:drugFormPre:bj"}) public AjaxResult tb(@RequestBody StudyFormPre studyFormPre) { - studyFormPreService.tb(studyFormPre); - return AjaxResult.success("操作成功"); + return AjaxResult.success(studyFormPreService.tb(studyFormPre)); } /** diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java index 3659d2f..c1eaf87 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java @@ -61,8 +61,8 @@ public class StudyFormFill extends MpBaseEntity @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date tjsj; - /** 用量信息 */ - private String ylxx; + /** 物资信息 */ + private String resource; /** 填报开始时间 */ @Excel(name = "填报开始时间") @@ -103,12 +103,12 @@ public class StudyFormFill extends MpBaseEntity @TableField(exist = false) private String studyMc; - public String getYlxx() { - return ylxx; + public String getResource() { + return resource; } - public void setYlxx(String ylxx) { - this.ylxx = ylxx; + public void setResource(String resource) { + this.resource = resource; } public Date getTbkssj() { diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyGyzj.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyGyzj.java index 4a2c401..0ab8b31 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyGyzj.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyGyzj.java @@ -24,17 +24,6 @@ public class StudyGyzj extends MpBaseEntity /** 试验归还状态:1:未归还;10:已归还*/ private Integer syghzt; - /** 来源:1:资源库;3:产生*/ - private Integer ly; - - public Integer getLy() { - return ly; - } - - public void setLy(Integer ly) { - this.ly = ly; - } - public Integer getSyghzt() { return syghzt; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMjy.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMjy.java index e0b7f38..17a93a1 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMjy.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMjy.java @@ -24,17 +24,6 @@ public class StudyMjy extends MpBaseEntity /** 试验归还状态:1:未归还;10:已归还*/ private Integer syghzt; - /** 来源:1:资源库;3:产生*/ - private Integer ly; - - public Integer getLy() { - return ly; - } - - public void setLy(Integer ly) { - this.ly = ly; - } - public Integer getSyghzt() { return syghzt; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPreService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPreService.java index 27bab5b..3afa708 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPreService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPreService.java @@ -64,6 +64,6 @@ public interface IStudyFormPreService extends IService * 填报 * @param studyFormPre */ - public void tb(StudyFormPre studyFormPre); + public StudyFormFill tb(StudyFormPre studyFormPre); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java index c3b3815..e51f31a 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java @@ -118,7 +118,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("新归属人",studyFormApply.getUserMc()); - formData.put("原归属人",studyFormApplyOld.getUserMc()); - formData.put("原因",studyFormApply.getRemark()); + formData.put("新归属人", studyFormApply.getUserMc()); + formData.put("原归属人", studyFormApplyOld.getUserMc()); + formData.put("原因", studyFormApply.getRemark()); //是否验证新的归属人,是否属于该实验? todo studyFormApplyOld.setUserId(studyFormApply.getUserId()); @@ -245,7 +245,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl fieldChanges = ObjectCompareUtil.compareObjects(studyFormApplyOld, studyFormApply); if (fieldChanges.size() == 0) { - throw new ServiceException("你没有修改任何内容"); + //稽查轨迹 + List studyFormApplyJcgjs = new ArrayList<>(); + for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { + StudyFormApplyJcgj studyFormApplyJcgj = new StudyFormApplyJcgj(); + studyFormApplyJcgj.setFormId(studyFormApply.getId()); + studyFormApplyJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); + studyFormApplyJcgj.setJcmc("修改"); + studyFormApplyJcgj.setJcmcys(JcmcysEnum.orange.getValue()); + studyFormApplyJcgj.setJcnr(fieldChange.toString()); + studyFormApplyJcgj.setQmrId(SecurityUtils.getUserId()); + studyFormApplyJcgj.setQmrMc(SecurityUtils.getNickName()); + studyFormApplyJcgjs.add(studyFormApplyJcgj); + } + studyFormApplyJcgjService.saveBatch(studyFormApplyJcgjs); } - //稽查轨迹 - List studyFormApplyJcgjs = new ArrayList<>(); - for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { - StudyFormApplyJcgj studyFormApplyJcgj = new StudyFormApplyJcgj(); - studyFormApplyJcgj.setFormId(studyFormApply.getId()); - studyFormApplyJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); - studyFormApplyJcgj.setJcmc("修改"); - studyFormApplyJcgj.setJcmcys(JcmcysEnum.orange.getValue()); - studyFormApplyJcgj.setJcnr(fieldChange.toString()); - studyFormApplyJcgj.setQmrId(SecurityUtils.getUserId()); - studyFormApplyJcgj.setQmrMc( SecurityUtils.getNickName()); - studyFormApplyJcgjs.add(studyFormApplyJcgj); - } - studyFormApplyJcgjService.saveBatch(studyFormApplyJcgjs); - }else{ + } else { studyFormApply.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); studyFormApply.setUserId(SecurityUtils.getUserId()); studyFormApply.setUserMc(SecurityUtils.getNickName()); this.save(studyFormApply); //稽查轨迹 Map formData = new LinkedHashMap<>(); - formData.put("备注",studyFormApply.getRemark()); + formData.put("备注", studyFormApply.getRemark()); studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.lc.getValue(), "填写并保存记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); } - //签名信息 - studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"填写并保存记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(), "填写并保存记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark()); } @@ -312,8 +311,8 @@ public class StudyFormApplyServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("备注",studyFormApply.getRemark()); + formData.put("备注", studyFormApply.getRemark()); studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"填写并提交记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(), "填写并提交记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark()); } - - /** * 复核通过 * @@ -339,7 +336,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("备注",studyFormApply.getRemark()); + formData.put("备注", studyFormApply.getRemark()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "复核通过", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark()); } @@ -369,7 +366,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("原因",studyFormApply.getRemark()); + formData.put("原因", studyFormApply.getRemark()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"复核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "复核拒绝", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark()); } @@ -399,7 +396,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("备注",studyFormApply.getRemark()); + formData.put("备注", studyFormApply.getRemark()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "已审阅", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"已审阅",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "已审阅", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark()); } @@ -430,7 +427,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("备注",studyFormApply.getRemark()); + formData.put("备注", studyFormApply.getRemark()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "审核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"审核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "审核通过", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark()); } @@ -460,7 +457,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("原因",studyFormApply.getRemark()); + formData.put("原因", studyFormApply.getRemark()); studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "审核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"审核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "审核拒绝", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormApply.getRemark()); } /** * 验证密码 + * * @param user * @param qmrmm */ - public void checkPassword(SysUser user, String qmrmm){ - if(StringUtils.isBlank(qmrmm)){ + public void checkPassword(SysUser user, String qmrmm) { + if (StringUtils.isBlank(qmrmm)) { throw new ServiceException("签名密码不能为空"); } - sysUserService.checkPassword(user,qmrmm,false); + sysUserService.checkPassword(user, qmrmm, false); } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java index 300b7c3..d16e495 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java @@ -119,7 +119,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl fieldChanges = ObjectCompareUtil.compareObjects(studyFormFillOld, studyFormFill); - if (fieldChanges.size() == 0) { - throw new ServiceException("你没有修改任何内容"); - } - //稽查轨迹 - List studyFormFillJcgjs = new ArrayList<>(); - for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { - StudyFormFillJcgj studyFormFillJcgj = new StudyFormFillJcgj(); - studyFormFillJcgj.setFormId(studyFormFill.getId()); - studyFormFillJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); - studyFormFillJcgj.setJcmc("修改"); - studyFormFillJcgj.setJcmcys(JcmcysEnum.orange.getValue()); - studyFormFillJcgj.setJcnr(fieldChange.toString()); - studyFormFillJcgj.setQmrId(SecurityUtils.getUserId()); - studyFormFillJcgj.setQmrMc(SecurityUtils.getNickName()); - studyFormFillJcgjs.add(studyFormFillJcgj); + if (fieldChanges.size() > 0) { + //稽查轨迹 + List studyFormFillJcgjs = new ArrayList<>(); + for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { + StudyFormFillJcgj studyFormFillJcgj = new StudyFormFillJcgj(); + studyFormFillJcgj.setFormId(studyFormFill.getId()); + studyFormFillJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); + studyFormFillJcgj.setJcmc("修改"); + studyFormFillJcgj.setJcmcys(JcmcysEnum.orange.getValue()); + studyFormFillJcgj.setJcnr(fieldChange.toString()); + studyFormFillJcgj.setQmrId(SecurityUtils.getUserId()); + studyFormFillJcgj.setQmrMc(SecurityUtils.getNickName()); + studyFormFillJcgjs.add(studyFormFillJcgj); + } + studyFormFillJcgjService.saveBatch(studyFormFillJcgjs); } - studyFormFillJcgjService.saveBatch(studyFormFillJcgjs); + //稽查轨迹 Map formData = new LinkedHashMap<>(); formData.put("备注", studyFormFill.getRemark()); @@ -317,7 +317,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl implements IStudyFormPlanService -{ +public class StudyFormPlanServiceImpl extends ServiceImpl implements IStudyFormPlanService { @Autowired private IStudyFormPlanJcgjService studyFormPlanJcgjService; @Autowired @@ -101,7 +100,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("新归属人",studyFormPlan.getUserMc()); - formData.put("原归属人",studyFormPlanOld.getUserMc()); - formData.put("原因",studyFormPlan.getRemark()); + formData.put("新归属人", studyFormPlan.getUserMc()); + formData.put("原归属人", studyFormPlanOld.getUserMc()); + formData.put("原因", studyFormPlan.getRemark()); //是否验证新的归属人,是否属于该实验? todo studyFormPlanOld.setUserId(studyFormPlan.getUserId()); @@ -122,7 +121,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl fieldChanges = ObjectCompareUtil.compareObjects(studyFormPlanOld, studyFormPlan); if (fieldChanges.size() == 0) { - throw new ServiceException("你没有修改任何内容"); + //稽查轨迹 + List studyFormPlanJcgjs = new ArrayList<>(); + for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { + StudyFormPlanJcgj studyFormPlanJcgj = new StudyFormPlanJcgj(); + studyFormPlanJcgj.setFormId(studyFormPlan.getId()); + studyFormPlanJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); + studyFormPlanJcgj.setJcmc("修改"); + studyFormPlanJcgj.setJcmcys(JcmcysEnum.orange.getValue()); + studyFormPlanJcgj.setJcnr(fieldChange.toString()); + studyFormPlanJcgj.setQmrId(SecurityUtils.getUserId()); + studyFormPlanJcgj.setQmrMc(SecurityUtils.getNickName()); + studyFormPlanJcgjs.add(studyFormPlanJcgj); + } + studyFormPlanJcgjService.saveBatch(studyFormPlanJcgjs); } - //稽查轨迹 - List studyFormPlanJcgjs = new ArrayList<>(); - for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { - StudyFormPlanJcgj studyFormPlanJcgj = new StudyFormPlanJcgj(); - studyFormPlanJcgj.setFormId(studyFormPlan.getId()); - studyFormPlanJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); - studyFormPlanJcgj.setJcmc("修改"); - studyFormPlanJcgj.setJcmcys(JcmcysEnum.orange.getValue()); - studyFormPlanJcgj.setJcnr(fieldChange.toString()); - studyFormPlanJcgj.setQmrId(SecurityUtils.getUserId()); - studyFormPlanJcgj.setQmrMc( SecurityUtils.getNickName()); - studyFormPlanJcgjs.add(studyFormPlanJcgj); - } - studyFormPlanJcgjService.saveBatch(studyFormPlanJcgjs); - }else{ + } else { studyFormPlan.setBdzt(StudyFormPlanBdztEnum.tbz.getValue()); studyFormPlan.setUserId(SecurityUtils.getUserId()); studyFormPlan.setUserMc(SecurityUtils.getNickName()); this.save(studyFormPlan); //稽查轨迹 Map formData = new LinkedHashMap<>(); - formData.put("备注",studyFormPlan.getRemark()); + formData.put("备注", studyFormPlan.getRemark()); studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.lc.getValue(), "填写并保存记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); } - //签名信息 - studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(),"填写并保存记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark()); + //签名信息 + studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(), "填写并保存记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPlan.getRemark()); } @@ -189,8 +187,8 @@ public class StudyFormPlanServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("备注",studyFormPlan.getRemark()); + formData.put("备注", studyFormPlan.getRemark()); studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(),"填写并提交记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark()); + studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(), "填写并提交记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPlan.getRemark()); } @@ -216,7 +214,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("备注",studyFormPlan.getRemark()); + formData.put("备注", studyFormPlan.getRemark()); studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark()); + studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(), "复核通过", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPlan.getRemark()); } @@ -246,7 +244,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("原因",studyFormPlan.getRemark()); + formData.put("原因", studyFormPlan.getRemark()); studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"复核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark()); + studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(), "复核拒绝", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPlan.getRemark()); } @@ -277,7 +275,7 @@ public class StudyFormPlanServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); - formData.put("备注",studyFormPlan.getRemark()); + formData.put("备注", studyFormPlan.getRemark()); studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "已审阅", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"已审阅",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark()); + studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(), "已审阅", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPlan.getRemark()); } /** * 验证密码 + * * @param user * @param qmrmm */ - public void checkPassword(SysUser user, String qmrmm){ - if(StringUtils.isBlank(qmrmm)){ + public void checkPassword(SysUser user, String qmrmm) { + if (StringUtils.isBlank(qmrmm)) { throw new ServiceException("签名密码不能为空"); } - sysUserService.checkPassword(user,qmrmm,false); + sysUserService.checkPassword(user, qmrmm, false); } } \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java index 9b9f6f2..8d7663a 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java @@ -38,8 +38,7 @@ import org.springframework.web.bind.annotation.PostMapping; * @date 2025-12-29 */ @Service -public class StudyFormPreServiceImpl extends ServiceImpl implements IStudyFormPreService -{ +public class StudyFormPreServiceImpl extends ServiceImpl implements IStudyFormPreService { @Autowired private IStudyFormPreJcgjService studyFormPreJcgjService; @Autowired @@ -60,8 +59,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl queryList(StudyFormPreSearchForm form) - { + public List queryList(StudyFormPreSearchForm form) { QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("t.del_flag", "0"); if (form.getUserId() != null && form.getUserId().longValue() > 0) { @@ -108,17 +106,18 @@ public class StudyFormPreServiceImpl extends ServiceImpl fieldChanges = ObjectCompareUtil.compareObjects(studyFormPreOld, studyFormPre); if (fieldChanges.size() == 0) { - throw new ServiceException("你没有修改任何内容"); - } - //稽查轨迹 - List studyFormPreJcgjs = new ArrayList<>(); - for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { - StudyFormPreJcgj studyFormPreJcgj = new StudyFormPreJcgj(); - studyFormPreJcgj.setFormId(studyFormPre.getId()); - studyFormPreJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); - studyFormPreJcgj.setJcmc("修改"); - studyFormPreJcgj.setJcmcys(JcmcysEnum.orange.getValue()); - studyFormPreJcgj.setJcnr(fieldChange.toString()); - studyFormPreJcgj.setQmrId(SecurityUtils.getUserId()); - studyFormPreJcgj.setQmrMc( SecurityUtils.getNickName()); - studyFormPreJcgjs.add(studyFormPreJcgj); + //稽查轨迹 + List studyFormPreJcgjs = new ArrayList<>(); + for (ObjectCompareUtil.FieldChange fieldChange : fieldChanges) { + StudyFormPreJcgj studyFormPreJcgj = new StudyFormPreJcgj(); + studyFormPreJcgj.setFormId(studyFormPre.getId()); + studyFormPreJcgj.setJcgjlx(JcgjlxEnum.xg.getValue()); + studyFormPreJcgj.setJcmc("修改"); + studyFormPreJcgj.setJcmcys(JcmcysEnum.orange.getValue()); + studyFormPreJcgj.setJcnr(fieldChange.toString()); + studyFormPreJcgj.setQmrId(SecurityUtils.getUserId()); + studyFormPreJcgj.setQmrMc(SecurityUtils.getNickName()); + studyFormPreJcgjs.add(studyFormPreJcgj); + } + studyFormPreJcgjService.saveBatch(studyFormPreJcgjs); } - studyFormPreJcgjService.saveBatch(studyFormPreJcgjs); - }else{ + } else { studyFormPre.setBdbh("todo"); studyFormPre.setUserId(SecurityUtils.getUserId()); studyFormPre.setUserMc(SecurityUtils.getNickName()); @@ -153,31 +151,32 @@ public class StudyFormPreServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); formData.put("备注", studyFormPre.getRemark()); studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "创建记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(),"创建记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPre.getRemark()); + studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(), "创建记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormPre.getRemark()); //生成填报表单 - StudyFormFill studyFormFill=new StudyFormFill(); + StudyFormFill studyFormFill = new StudyFormFill(); studyFormFill.setStudyId(studyFormPreOld.getStudyId()); studyFormFill.setUserId(SecurityUtils.getUserId()); studyFormFill.setUserMc(SecurityUtils.getNickName()); @@ -292,23 +294,24 @@ public class StudyFormPreServiceImpl extends ServiceImpl formData1 = new LinkedHashMap<>(); - formData1.put("备注",studyFormFill.getRemark()); + formData1.put("备注", studyFormFill.getRemark()); studyFormFillJcgjService.saveJcgj(studyFormFill.getId(), JcgjlxEnum.lc.getValue(), "创建记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData1), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 - studyFormFillQmxxService.saveQmxx(studyFormFill.getId(),"创建记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormFill.getRemark()); - + studyFormFillQmxxService.saveQmxx(studyFormFill.getId(), "创建记录", SecurityUtils.getUserId(), SecurityUtils.getNickName(), studyFormFill.getRemark()); + return studyFormFill; } /** * 验证密码 + * * @param user * @param qmrmm */ - public void checkPassword(SysUser user,String qmrmm){ - if(StringUtils.isBlank(qmrmm)){ + public void checkPassword(SysUser user, String qmrmm) { + if (StringUtils.isBlank(qmrmm)) { throw new ServiceException("签名密码不能为空"); } - sysUserService.checkPassword(user,qmrmm,false); + sysUserService.checkPassword(user, qmrmm, false); } }