Browse Source

feat:[试验管理][试验方法]稽查轨迹

master
HanLong 1 month ago
parent
commit
a916b35d26
6 changed files with 303 additions and 4 deletions
  1. +149
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMethodJcgj.java
  2. +14
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMethodJcgjMapper.java
  3. +39
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyMethodJcgjService.java
  4. +63
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodJcgjServiceImpl.java
  5. +32
    -4
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java
  6. +6
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/StudyMethodJcgjMapper.xml

+ 149
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyMethodJcgj.java View File

@ -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;
}
}

+ 14
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyMethodJcgjMapper.java View File

@ -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<StudyMethodJcgj>
{
}

+ 39
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyMethodJcgjService.java View File

@ -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<StudyMethodJcgj>
{
/**
* 查询试验-试验方法-稽查轨迹列表
*
* @param studMethodJcgj 试验-试验方法-稽查轨迹
* @return 试验-试验方法-稽查轨迹集合
*/
public List<StudyMethodJcgj> 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);
}

+ 63
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodJcgjServiceImpl.java View File

@ -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<StudyMethodJcgjMapper, StudyMethodJcgj> implements IStudyMethodJcgjService
{
@Autowired
private ISystemLogService systemLogService;
/**
* 查询试验-试验方法-稽查轨迹列表
*
* @param studyMethodJcgj 试验-试验方法-稽查轨迹
* @return 试验-试验方法-稽查轨迹
*/
@Override
public List<StudyMethodJcgj> queryList(StudyMethodJcgj studyMethodJcgj)
{
QueryWrapper<StudyMethodJcgj> 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());
}
}

+ 32
- 4
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyMethodServiceImpl.java View File

@ -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
@Autowired
private ISystemLogService systemLogService;
@Autowired
private IStudyMethodJcgjService studyMethodJcgjService;
/**
* 查询试验-试验方法列表
*
@ -137,8 +145,14 @@ public class StudyMethodServiceImpl extends ServiceImpl
//发送消息通知
noticeService.saveStudyMethod(studyMethod.getStudyId(),studyMethod.getStudySubjectId(),studyMethod.getUserId());
systemLogService.saveInfo(studyMethod.getFfmc(),null,"上传方法","Upload Method",null,null,
SecurityUtils.getUserId(),SecurityUtils.getNickName(),SecurityUtils.getUsername(),form.getRemark());
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> 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
studyMethodRead.setStudyMethodId(studyMethod.getId());
studyMethodReadService.save(studyMethodRead);
systemLogService.saveInfo(studyMethod.getFfmc(),null,"阅读方法","Read Method",null,null,
SecurityUtils.getUserId(),SecurityUtils.getNickName(),SecurityUtils.getUsername(),form.getRemark());
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> 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
studyMethod.setStatus(NormalEnum.no.getValue());
updateById(studyMethod);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注", form.getRemark());
Map<String, String> 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);
}
}

+ 6
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/StudyMethodJcgjMapper.xml View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudyMethodJcgjMapper">
</mapper>

Loading…
Cancel
Save