From a916b35d26688206781a1451c092b22186ba7fc1 Mon Sep 17 00:00:00 2001 From: HanLong <404402223@qq.com> Date: Mon, 2 Mar 2026 13:40:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E8=AF=95=E9=AA=8C=E7=AE=A1=E7=90=86][?= =?UTF-8?q?=E8=AF=95=E9=AA=8C=E6=96=B9=E6=B3=95]=E7=A8=BD=E6=9F=A5?= =?UTF-8?q?=E8=BD=A8=E8=BF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hxhq/business/domain/StudyMethodJcgj.java | 149 +++++++++++++++++++++ .../business/mapper/StudyMethodJcgjMapper.java | 14 ++ .../business/service/IStudyMethodJcgjService.java | 39 ++++++ .../service/impl/StudyMethodJcgjServiceImpl.java | 63 +++++++++ .../service/impl/StudyMethodServiceImpl.java | 36 ++++- .../resources/mapper/StudyMethodJcgjMapper.xml | 6 + 6 files changed, 303 insertions(+), 4 deletions(-) create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMethodJcgj.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMethodJcgjMapper.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyMethodJcgjService.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodJcgjServiceImpl.java create mode 100644 hxhq-modules/hxhq-system/src/main/resources/mapper/StudyMethodJcgjMapper.xml diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMethodJcgj.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMethodJcgj.java new file mode 100644 index 0000000..92d1304 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMethodJcgj.java @@ -0,0 +1,149 @@ +package com.hxhq.business.domain; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.hxhq.common.core.domain.MpBaseEntity; + + +/** + * 试验-试验方法-稽查轨迹对象 t_study_method_jcgj + * + * @author hxhq + * @date 2026-03-02 + */ +@TableName("t_study_method_jcgj") +public class StudyMethodJcgj extends MpBaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 试验方法id */ + private Long studyMethodId; + + /** 稽查轨迹类型:1:流程;3:编辑 */ + private Integer jcgjlx; + + /** 稽查名称 */ + private String jcmc; + + /** 稽查名称-英文 */ + private String jcmcEn; + + /** 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 */ + private Integer jcmcys; + + /** 稽查内容 */ + private String jcnr; + + /** 稽查内容-英文 */ + private String jcnrEn; + + /** 签名人id */ + private Long qmrId; + + /** 签名人名称 */ + private String qmrMc; + + /** 签名人名称-英文 */ + private String qmrMcEn; + + + public void setStudyMethodId(Long studyMethodId) + { + this.studyMethodId = studyMethodId; + } + + public Long getStudyMethodId() + { + return studyMethodId; + } + + public void setJcgjlx(Integer jcgjlx) + { + this.jcgjlx = jcgjlx; + } + + public Integer getJcgjlx() + { + return jcgjlx; + } + + public void setJcmc(String jcmc) + { + this.jcmc = jcmc; + } + + public String getJcmc() + { + return jcmc; + } + + public void setJcmcEn(String jcmcEn) + { + this.jcmcEn = jcmcEn; + } + + public String getJcmcEn() + { + return jcmcEn; + } + + public void setJcmcys(Integer jcmcys) + { + this.jcmcys = jcmcys; + } + + public Integer getJcmcys() + { + return jcmcys; + } + + public void setJcnr(String jcnr) + { + this.jcnr = jcnr; + } + + public String getJcnr() + { + return jcnr; + } + + public void setJcnrEn(String jcnrEn) + { + this.jcnrEn = jcnrEn; + } + + public String getJcnrEn() + { + return jcnrEn; + } + + public void setQmrId(Long qmrId) + { + this.qmrId = qmrId; + } + + public Long getQmrId() + { + return qmrId; + } + + public void setQmrMc(String qmrMc) + { + this.qmrMc = qmrMc; + } + + public String getQmrMc() + { + return qmrMc; + } + + public void setQmrMcEn(String qmrMcEn) + { + this.qmrMcEn = qmrMcEn; + } + + public String getQmrMcEn() + { + return qmrMcEn; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMethodJcgjMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMethodJcgjMapper.java new file mode 100644 index 0000000..598b47d --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMethodJcgjMapper.java @@ -0,0 +1,14 @@ +package com.hxhq.business.mapper; + +import com.hxhq.business.domain.StudyMethodJcgj; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +/** + * 试验-试验方法-稽查轨迹Mapper接口 + * + * @author hxhq + * @date 2026-03-02 + */ +public interface StudyMethodJcgjMapper extends BaseMapper +{ + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyMethodJcgjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyMethodJcgjService.java new file mode 100644 index 0000000..5c80532 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyMethodJcgjService.java @@ -0,0 +1,39 @@ +package com.hxhq.business.service; + +import java.util.List; + +import com.hxhq.business.domain.Sj; +import com.hxhq.business.domain.StudyMethod; +import com.hxhq.business.domain.StudyMethodJcgj; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.system.api.domain.SysUser; + +/** + * 试验-试验方法-稽查轨迹Service接口 + * + * @author hxhq + * @date 2026-03-02 + */ +public interface IStudyMethodJcgjService extends IService +{ + /** + * 查询试验-试验方法-稽查轨迹列表 + * + * @param studMethodJcgj 试验-试验方法-稽查轨迹 + * @return 试验-试验方法-稽查轨迹集合 + */ + public List queryList(StudyMethodJcgj studMethodJcgj); + + /** + * 保存稽查轨迹 + * @param studyMethod 试验方法 + * @param jcgjlx 稽查轨迹类型:1:流程;3:编辑 + * @param jcmc 稽查名称 + * @param jcmcEn 稽查名称-英文 + * @param jcmcys 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 + * @param jcnr 稽查内容 + * @param jcnrEn 稽查内容-英文 + * @param qmr 签名人信息 + */ + void saveJcgj(StudyMethod studyMethod, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr); +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodJcgjServiceImpl.java new file mode 100644 index 0000000..ed0d947 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodJcgjServiceImpl.java @@ -0,0 +1,63 @@ +package com.hxhq.business.service.impl; + +import java.util.List; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hxhq.business.domain.StudyMethod; +import com.hxhq.business.service.ISystemLogService; +import com.hxhq.common.core.utils.DateUtils; +import com.hxhq.system.api.domain.SysUser; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.hxhq.business.mapper.StudyMethodJcgjMapper; +import com.hxhq.business.domain.StudyMethodJcgj; +import com.hxhq.business.service.IStudyMethodJcgjService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * 试验-试验方法-稽查轨迹Service业务层处理 + * + * @author hxhq + * @date 2026-03-02 + */ +@Service +public class StudyMethodJcgjServiceImpl extends ServiceImpl implements IStudyMethodJcgjService +{ + + @Autowired + private ISystemLogService systemLogService; + + /** + * 查询试验-试验方法-稽查轨迹列表 + * + * @param studyMethodJcgj 试验-试验方法-稽查轨迹 + * @return 试验-试验方法-稽查轨迹 + */ + @Override + public List queryList(StudyMethodJcgj studyMethodJcgj) + { + QueryWrapper queryWrapper = Wrappers.query(); + return this.list(queryWrapper); + } + + @Override + public void saveJcgj(StudyMethod studyMethod, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn, SysUser qmr) { + StudyMethodJcgj studyMethodJcgj = new StudyMethodJcgj(); + studyMethodJcgj.setStudyMethodId(studyMethod.getId()); + studyMethodJcgj.setJcgjlx(jcgjlx); + studyMethodJcgj.setJcmc(jcmc); + studyMethodJcgj.setJcmcEn(jcmcEn); + studyMethodJcgj.setJcmcys(jcmcys); + studyMethodJcgj.setJcnr(jcnr); + studyMethodJcgj.setJcnrEn(jcnrEn); + studyMethodJcgj.setQmrId(qmr.getUserId()); + studyMethodJcgj.setQmrMc(qmr.getNickName()); + studyMethodJcgj.setQmrMcEn(qmr.getUserName()); + this.save(studyMethodJcgj); + + systemLogService.saveInfo(studyMethod.getFfmc(), studyMethod.getFfmc(), studyMethodJcgj.getJcmc(), studyMethodJcgj.getJcmcEn(), + studyMethodJcgj.getJcnr(), studyMethodJcgj.getJcnrEn(), studyMethodJcgj.getQmrId(), studyMethodJcgj.getQmrMc(), studyMethodJcgj.getQmrMcEn(), studyMethodJcgj.getRemark()); + } + + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java index ef89e5f..382a87e 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java @@ -1,7 +1,9 @@ package com.hxhq.business.service.impl; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; import com.alibaba.fastjson2.JSONObject; @@ -15,10 +17,13 @@ import com.hxhq.business.dto.select.DeptUserTreeDto; import com.hxhq.business.enums.NormalEnum; import com.hxhq.business.enums.study.StudyMethodStatusEnum; import com.hxhq.business.enums.study.StudyTypeEnum; +import com.hxhq.business.enums.zykgl.JcgjlxEnum; +import com.hxhq.business.enums.zykgl.JcmcysEnum; import com.hxhq.business.form.study.StudyMethodForm; import com.hxhq.business.form.study.StudyMethodReadForm; import com.hxhq.business.form.study.StudyMethodSearchForm; import com.hxhq.business.service.*; +import com.hxhq.business.utils.JctUtil; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.security.utils.SecurityUtils; @@ -54,6 +59,9 @@ public class StudyMethodServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("备注", form.getRemark()); + + Map formDataEn = new LinkedHashMap<>(); + formDataEn.put("Comment", form.getRemark()); + studyMethodJcgjService.saveJcgj(studyMethod, JcgjlxEnum.lc.getValue(), "上传方法", "Upload Method", JcmcysEnum.blue.getValue(), + JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); } @@ -170,8 +184,14 @@ public class StudyMethodServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("备注", form.getRemark()); + + Map formDataEn = new LinkedHashMap<>(); + formDataEn.put("Comment", form.getRemark()); + studyMethodJcgjService.saveJcgj(studyMethod, JcgjlxEnum.lc.getValue(), "阅读方法", "Read Method", JcmcysEnum.blue.getValue(), + JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); } @Override @@ -224,6 +244,14 @@ public class StudyMethodServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("备注", form.getRemark()); + + Map formDataEn = new LinkedHashMap<>(); + formDataEn.put("Comment", form.getRemark()); + studyMethodJcgjService.saveJcgj(studyMethod, JcgjlxEnum.lc.getValue(), "关闭方法", "Close Method", JcmcysEnum.blue.getValue(), + JctUtil.formatStr(formData), JctUtil.formatStr(formDataEn), qmr); } } diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/StudyMethodJcgjMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/StudyMethodJcgjMapper.xml new file mode 100644 index 0000000..5bee43c --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/StudyMethodJcgjMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file