From 619460b9ccce46b8003ff796fbec0f84d1b986df Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Wed, 7 Jan 2026 14:55:09 +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][=E9=A2=84=E5=A1=AB=EF=BC=8C=E5=A1=AB=E6=8A=A5?= =?UTF-8?q?=EF=BC=8C=E8=AE=A1=E5=88=92=EF=BC=8C=E7=94=B3=E8=AF=B7]bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hxhq/business/domain/StudyFormApply.java | 5 +++ .../com/hxhq/business/domain/StudyFormFill.java | 4 +++ .../com/hxhq/business/domain/StudyFormPlan.java | 4 +++ .../com/hxhq/business/domain/StudyFormPre.java | 4 +++ .../com/hxhq/business/enums/zykgl/JcmcysEnum.java | 1 + .../service/impl/StudyFormApplyServiceImpl.java | 38 +++++++++++++++++----- .../service/impl/StudyFormFillServiceImpl.java | 37 ++++++++++++++++----- .../service/impl/StudyFormPlanServiceImpl.java | 35 ++++++++++++++++---- .../service/impl/StudyFormPreServiceImpl.java | 35 +++++++++++++++----- 9 files changed, 132 insertions(+), 31 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java index 6ce5e6b..c2b0cb0 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java @@ -5,6 +5,7 @@ import java.util.Date; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import com.baomidou.mybatisplus.annotation.TableName; +import com.hxhq.common.core.annotation.Compare; import com.hxhq.common.core.domain.MpBaseEntity; @@ -29,9 +30,11 @@ public class StudyFormApply extends MpBaseEntity private String bdbh; /** 表单名称 */ + @Compare(name = "表单名称") private String bdmc; /** 表单说明 */ + @Compare(name = "表单说明") private String bdsm; /** 模板id */ @@ -47,6 +50,7 @@ public class StudyFormApply extends MpBaseEntity private String userMc; /** 是否补录:1:否;10:是 */ + @Compare(name = "是否补录") private Integer sfbl; /** 表单状态:1:填报中;3:已提交;5:已完成(经复核);7:已完成;9:待废止;11:已废止 */ @@ -66,6 +70,7 @@ public class StudyFormApply extends MpBaseEntity /** 模板名称 */ @TableField(exist = false) + @Compare(name = "模板名称") private String templateMc; /** 模板编号 */ 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 388f7d2..d0b4f56 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 @@ -3,6 +3,7 @@ package com.hxhq.business.domain; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; +import com.hxhq.common.core.annotation.Compare; import com.hxhq.common.core.annotation.Excel; import com.hxhq.common.core.domain.MpBaseEntity; @@ -30,9 +31,11 @@ public class StudyFormFill extends MpBaseEntity private String bdbh; /** 表单名称 */ + @Compare(name = "表单名称") private String bdmc; /** 表单说明 */ + @Compare(name = "表单说明") private String bdsm; /** 模板id */ @@ -68,6 +71,7 @@ public class StudyFormFill extends MpBaseEntity /** 模板名称 */ @TableField(exist = false) + @Compare(name = "模板名称") private String templateMc; /** 模板编号 */ diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java index 783da4b..772db37 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java @@ -3,6 +3,7 @@ package com.hxhq.business.domain; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; +import com.hxhq.common.core.annotation.Compare; import com.hxhq.common.core.annotation.Excel; import com.hxhq.common.core.domain.MpBaseEntity; @@ -27,9 +28,11 @@ public class StudyFormPlan extends MpBaseEntity private String bdbh; /** 表单名称 */ + @Compare(name = "表单名称") private String bdmc; /** 表单说明 */ + @Compare(name = "表单说明") private String bdsm; /** 模板id */ @@ -62,6 +65,7 @@ public class StudyFormPlan extends MpBaseEntity /** 模板名称 */ @TableField(exist = false) + @Compare(name = "模板名称") private String templateMc; /** 模板编号 */ diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPre.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPre.java index 16c933b..9ac8933 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPre.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPre.java @@ -3,6 +3,7 @@ package com.hxhq.business.domain; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; +import com.hxhq.common.core.annotation.Compare; import com.hxhq.common.core.annotation.Excel; import com.hxhq.common.core.domain.MpBaseEntity; @@ -30,9 +31,11 @@ public class StudyFormPre extends MpBaseEntity private String bdbh; /** 表单名称 */ + @Compare(name = "表单名称") private String bdmc; /** 表单说明 */ + @Compare(name = "表单说明") private String bdsm; /** 模板id */ @@ -76,6 +79,7 @@ public class StudyFormPre extends MpBaseEntity /** 模板名称 */ @TableField(exist = false) + @Compare(name = "模板名称") private String templateMc; /** 模板编号 */ diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/JcmcysEnum.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/JcmcysEnum.java index e2e08cd..b3a8eaa 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/JcmcysEnum.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/JcmcysEnum.java @@ -2,6 +2,7 @@ package com.hxhq.business.enums.zykgl; /** * 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 + * 修改橙色,通过绿色,拒绝红色,其他都是蓝色 * @author tanfei */ public enum JcmcysEnum { 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 7c16a12..b7433ea 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 @@ -1,13 +1,13 @@ package com.hxhq.business.service.impl; +import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.domain.MjyFfjl; -import com.hxhq.business.domain.StudyFormApply; +import com.hxhq.business.domain.*; import com.hxhq.business.dto.mjy.DetailDto; import com.hxhq.business.dto.study.StudyFormApplyListDto; import com.hxhq.business.enums.NormalEnum; @@ -23,6 +23,7 @@ import com.hxhq.business.form.study.StudyFormApplySearchForm; import com.hxhq.business.service.IStudyFormApplyJcgjService; import com.hxhq.business.service.IStudyFormApplyQmxxService; import com.hxhq.business.utils.JctUtil; +import com.hxhq.business.utils.ObjectCompareUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; @@ -130,7 +131,7 @@ public class StudyFormApplyServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); formData.put("备注", studyFormApply.getRemark()); - studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), studyFormApply.getQmyy(), JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.bj.getValue(), studyFormApply.getQmyy(), JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),studyFormApply.getQmyy(),SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); @@ -252,7 +253,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); }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()); + studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + } - //稽查轨迹 - Map formData = new LinkedHashMap<>(); - formData.put("备注",studyFormApply.getRemark()); - studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); - //签名信息 + //签名信息 studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"填写并保存",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); } 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 84e3cff..df0dc0a 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 @@ -1,13 +1,13 @@ package com.hxhq.business.service.impl; +import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.hxhq.business.domain.MjyFfjl; -import com.hxhq.business.domain.StudyFormFill; +import com.hxhq.business.domain.*; import com.hxhq.business.dto.mjy.DetailDto; import com.hxhq.business.dto.study.StudyFormFillListDto; import com.hxhq.business.enums.NormalEnum; @@ -23,6 +23,7 @@ import com.hxhq.business.form.study.StudyFormFillSearchForm; import com.hxhq.business.service.IStudyFormFillJcgjService; import com.hxhq.business.service.IStudyFormFillQmxxService; import com.hxhq.business.utils.JctUtil; +import com.hxhq.business.utils.ObjectCompareUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; @@ -130,7 +131,7 @@ public class StudyFormFillServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); formData.put("备注", studyFormFill.getRemark()); - studyFormFillJcgjService.saveJcgj(studyFormFillOld.getId(), JcgjlxEnum.lc.getValue(), studyFormFill.getQmyy(), JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + studyFormFillJcgjService.saveJcgj(studyFormFillOld.getId(), JcgjlxEnum.bj.getValue(), studyFormFill.getQmyy(), JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); //签名信息 studyFormFillQmxxService.saveQmxx(studyFormFill.getId(),studyFormFill.getQmyy(),SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormFill.getRemark()); @@ -252,7 +253,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); + } + studyFormFillJcgjService.saveBatch(studyFormFillJcgjs); }else{ studyFormFill.setBdzt(StudyFormFillBdztEnum.tbz.getValue()); studyFormFill.setUserId(SecurityUtils.getUserId()); studyFormFill.setUserMc(SecurityUtils.getNickName()); this.save(studyFormFill); + + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("备注",studyFormFill.getRemark()); + studyFormFillJcgjService.saveJcgj(studyFormFill.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); } - //稽查轨迹 - Map formData = new LinkedHashMap<>(); - formData.put("备注",studyFormFill.getRemark()); - studyFormFillJcgjService.saveJcgj(studyFormFill.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 studyFormFillQmxxService.saveQmxx(studyFormFill.getId(),"填写并保存",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormFill.getRemark()); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java index 7c377c9..7f9953d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java @@ -1,12 +1,15 @@ package com.hxhq.business.service.impl; +import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hxhq.business.domain.StudyFormFillJcgj; import com.hxhq.business.domain.StudyFormPlan; +import com.hxhq.business.domain.StudyFormPlanJcgj; import com.hxhq.business.dto.study.StudyFormPlanListDto; import com.hxhq.business.enums.study.StudyFormPlanBdztEnum; import com.hxhq.business.enums.zykgl.JcgjlxEnum; @@ -15,6 +18,7 @@ import com.hxhq.business.form.study.StudyFormPlanSearchForm; import com.hxhq.business.service.IStudyFormPlanJcgjService; import com.hxhq.business.service.IStudyFormPlanQmxxService; import com.hxhq.business.utils.JctUtil; +import com.hxhq.business.utils.ObjectCompareUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; @@ -126,7 +130,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); }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()); + studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + } - //稽查轨迹 - Map formData = new LinkedHashMap<>(); - formData.put("备注",studyFormPlan.getRemark()); - studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); - //签名信息 + //签名信息 studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(),"填写并保存",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark()); } 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 6167a07..878b370 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 @@ -1,13 +1,12 @@ package com.hxhq.business.service.impl; -import java.util.Date; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.StudyFormFill; +import com.hxhq.business.domain.StudyFormPlanJcgj; +import com.hxhq.business.domain.StudyFormPreJcgj; import com.hxhq.business.dto.study.StudyFormPreListDto; import com.hxhq.business.enums.NormalEnum; import com.hxhq.business.enums.study.StudyFormPreBdztEnum; @@ -18,6 +17,7 @@ import com.hxhq.business.form.study.StudyFormPreAuditForm; import com.hxhq.business.form.study.StudyFormPreSearchForm; import com.hxhq.business.service.*; import com.hxhq.business.utils.JctUtil; +import com.hxhq.business.utils.ObjectCompareUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; @@ -119,17 +119,36 @@ 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); + } + studyFormPreJcgjService.saveBatch(studyFormPreJcgjs); }else{ studyFormPre.setBdbh("todo"); studyFormPre.setUserId(SecurityUtils.getUserId()); studyFormPre.setUserMc(SecurityUtils.getNickName()); studyFormPre.setBdzt(StudyFormPreBdztEnum.tbz.getValue()); this.save(studyFormPre); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.xg.getValue(), "制作保存预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + } - //稽查轨迹 - Map formData = new LinkedHashMap<>(); - studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.xg.getValue(), "制作保存预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); - //签名信息 + //签名信息 studyFormPreQmxxService.saveQmxx(studyFormPre.getId(),"制作保存预制表单",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPre.getRemark()); }