From e0fbe56db33e467680a4207269f3c729423e6ce3 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Wed, 31 Dec 2025 11:02:49 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86]=E9=A2=84=E5=A1=AB=E8=A1=A8=E5=8D=95=E5=A1=AB?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/StudyFormPreController.java | 44 +++++++++- .../com/hxhq/business/domain/StudyFormPre.java | 55 ++++++++++++ .../enums/study/StudyFormPreFzrshztEnum.java | 56 +++++++++++++ .../business/service/IStudyFormPreService.java | 6 ++ .../service/impl/StudyFormPreServiceImpl.java | 98 ++++++++++++++++++++-- .../mapper/business/StudyFormPreMapper.xml | 2 +- 6 files changed, 252 insertions(+), 9 deletions(-) create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPreFzrshztEnum.java 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 bc11552..76bc1ff 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 @@ -3,13 +3,16 @@ package com.hxhq.business.controller; import java.util.Arrays; import java.util.List; +import com.hxhq.business.domain.*; import com.hxhq.business.dto.study.StudyFormPreListDto; import com.hxhq.business.form.study.StudyFormPreAuditForm; import com.hxhq.business.form.study.StudyFormPreSearchForm; +import com.hxhq.business.service.IStudyFormPreJcgjService; +import com.hxhq.business.service.IStudyFormPreQmxxService; +import com.hxhq.common.security.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import com.hxhq.business.domain.StudyFormPre; import com.hxhq.business.service.IStudyFormPreService; import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.domain.AjaxResult; @@ -28,6 +31,10 @@ public class StudyFormPreController extends BaseController { @Autowired private IStudyFormPreService studyFormPreService; + @Autowired + private IStudyFormPreJcgjService studyFormPreJcgjService; + @Autowired + private IStudyFormPreQmxxService studyFormPreQmxxService; /** * 列表 @@ -41,6 +48,28 @@ public class StudyFormPreController extends BaseController } /** + * 稽查轨迹列表 + */ + @GetMapping("/jcgjList") + public TableDataInfo jcgjList(StudyFormPreJcgj form) + { + startPage(); + List list = studyFormPreJcgjService.queryList(form); + return getDataTable(list); + } + + /** + * 签名信息列表 + */ + @GetMapping("/qmxxList") + public TableDataInfo qmxxList(StudyFormPreQmxx form) + { + startPage(); + List list = studyFormPreQmxxService.queryList(form); + return getDataTable(list); + } + + /** * 详细 */ @GetMapping(value = "/info") @@ -69,9 +98,21 @@ public class StudyFormPreController extends BaseController return AjaxResult.success("操作成功"); } + + /** + * 填报 + */ + @PostMapping("/tb") + public AjaxResult tb(@RequestBody StudyFormPreAuditForm form) + { + studyFormPreService.tb(form); + return AjaxResult.success("操作成功"); + } + /** * 通过 */ + @RequiresPermissions("business:studyFormPre:audit") @PostMapping("/tg") public AjaxResult tg(@RequestBody StudyFormPreAuditForm form) { @@ -82,6 +123,7 @@ public class StudyFormPreController extends BaseController /** * 拒绝 */ + @RequiresPermissions("business:studyFormPre:audit") @PostMapping("/jj") public AjaxResult jj(@RequestBody StudyFormPreAuditForm form) { 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 1474ef2..85b4b17 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 @@ -49,11 +49,66 @@ public class StudyFormPre extends MpBaseEntity /** 表单状态:1:填报中;3:已提交;5:已通过 */ private Integer bdzt; + /** 是否需要负责人审核:1:否;10:是 */ + private Integer fzrsh; + + /** 负责人审核状态:1:未审核;5:审核中;10:已审核 */ + private Integer fzrshzt; + + /** 填报状态:1:未填报;10:已填报 */ + private Integer tbzt; + + /** 审核人员id(通知用) */ + private Long shryId; + + /** 审核人员名称(通知用) */ + private Integer shryMc; + /** 提交时间 */ @Excel(name = "提交时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date tjsj; + public Integer getTbzt() { + return tbzt; + } + + public void setTbzt(Integer tbzt) { + this.tbzt = tbzt; + } + + public Integer getFzrsh() { + return fzrsh; + } + + public void setFzrsh(Integer fzrsh) { + this.fzrsh = fzrsh; + } + + public Integer getFzrshzt() { + return fzrshzt; + } + + public void setFzrshzt(Integer fzrshzt) { + this.fzrshzt = fzrshzt; + } + + public Long getShryId() { + return shryId; + } + + public void setShryId(Long shryId) { + this.shryId = shryId; + } + + public Integer getShryMc() { + return shryMc; + } + + public void setShryMc(Integer shryMc) { + this.shryMc = shryMc; + } + public Date getTjsj() { return tjsj; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPreFzrshztEnum.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPreFzrshztEnum.java new file mode 100644 index 0000000..f81e0e5 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPreFzrshztEnum.java @@ -0,0 +1,56 @@ +package com.hxhq.business.enums.study; + +/** + * 负责人审核状态:1:未审核;5:审核中;10:已审核 + * @author tanfei + */ +public enum StudyFormPreFzrshztEnum { + + /** + * 填报中 + */ + wsh(1, "未审核"), + + /** + * 审核中 + */ + shz(5, "审核中"), + + /** + * 已审核 + */ + ysh(10, "已审核"); + + private int value; + private String text; + + StudyFormPreFzrshztEnum(int value, String text) { + this.value = value; + this.text = text; + } + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public static StudyFormPreFzrshztEnum getEnumByValue(int type) { + for (StudyFormPreFzrshztEnum bt : values()) { + if (bt.value == type) { + return bt; + } + } + return null; + } +} 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 fcf6e83..697748a 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 @@ -50,4 +50,10 @@ public interface IStudyFormPreService extends IService */ public void jj(StudyFormPreAuditForm form); + /** + * 填报 + * @param form + */ + public void tb(StudyFormPreAuditForm form); + } 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 c6105d3..5e3c3af 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,15 +1,26 @@ package com.hxhq.business.service.impl; import java.util.Date; +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.dto.study.StudyFormPreListDto; +import com.hxhq.business.enums.NormalEnum; import com.hxhq.business.enums.study.StudyFormPreBdztEnum; +import com.hxhq.business.enums.study.StudyFormPreFzrshztEnum; +import com.hxhq.business.enums.zykgl.JcgjlxEnum; +import com.hxhq.business.enums.zykgl.JcmcysEnum; import com.hxhq.business.form.study.StudyFormPreAuditForm; import com.hxhq.business.form.study.StudyFormPreSearchForm; +import com.hxhq.business.service.IStudyFormPreJcgjService; +import com.hxhq.business.service.IStudyFormPreQmxxService; +import com.hxhq.business.utils.JctUtil; import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.security.utils.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.StudyFormPreMapper; import com.hxhq.business.domain.StudyFormPre; @@ -26,6 +37,11 @@ import org.springframework.web.bind.annotation.PostMapping; @Service public class StudyFormPreServiceImpl extends ServiceImpl implements IStudyFormPreService { + @Autowired + private IStudyFormPreJcgjService studyFormPreJcgjService; + @Autowired + private IStudyFormPreQmxxService studyFormPreQmxxService; + /** * 查询试验-预填单列表 * @@ -89,7 +105,14 @@ public class StudyFormPreServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("签名意义", "制作保存预制表单"); + formData.put("签名人", SecurityUtils.getLoginUser().getSysUser().getNickName()); + studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.bj.getValue(), "制作保存预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getLoginUser().getSysUser().getNickName()); + //签名信息 + studyFormPreQmxxService.saveQmxx(studyFormPre.getId(),"制作保存预制表单",SecurityUtils.getUserId(),SecurityUtils.getLoginUser().getSysUser().getNickName()); + } /** @@ -116,8 +139,14 @@ public class StudyFormPreServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("备注", studyFormPre.getRemark()); + formData.put("签名意义", "制作提交预制表单"); + formData.put("签名人", SecurityUtils.getLoginUser().getSysUser().getNickName()); + studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.lc.getValue(), "制作提交预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getLoginUser().getSysUser().getNickName()); + //签名信息 + studyFormPreQmxxService.saveQmxx(studyFormPre.getId(),"制作提交预制表单",SecurityUtils.getUserId(),SecurityUtils.getLoginUser().getSysUser().getNickName()); } /** @@ -133,10 +162,29 @@ public class StudyFormPreServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("备注", form.getReason()); + formData.put("签名意义", "审核通过"); + formData.put("签名人", SecurityUtils.getLoginUser().getSysUser().getNickName()); + studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "审核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getLoginUser().getSysUser().getNickName()); + //签名信息 + studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(),"审核通过",SecurityUtils.getUserId(),SecurityUtils.getLoginUser().getSysUser().getNickName()); } /** @@ -154,7 +202,43 @@ public class StudyFormPreServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("备注", form.getReason()); + formData.put("签名意义", "审核拒绝"); + formData.put("签名人", SecurityUtils.getLoginUser().getSysUser().getNickName()); + studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "审核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getLoginUser().getSysUser().getNickName()); + //签名信息 + studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(),"审核拒绝",SecurityUtils.getUserId(),SecurityUtils.getLoginUser().getSysUser().getNickName()); + } + + /** + * 填报 + * @param form + */ + @Override + public void tb(StudyFormPreAuditForm form){ + StudyFormPre studyFormPreOld=this.getById(form.getId()); + if(studyFormPreOld==null){ + throw new SecurityException("信息不存在或已删除"); + } + if(!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytg.getValue())){ + throw new SecurityException("不是已通过状态,不能填报"); + } + if(!studyFormPreOld.getTbzt().equals(NormalEnum.no.getValue())){ + throw new SecurityException("已经填报"); + } + //新增填报表单 todo + studyFormPreOld.setTbzt(NormalEnum.yes.getValue()); + this.updateById(studyFormPreOld); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("备注", form.getReason()); + formData.put("签名意义", "创建记录"); + formData.put("签名人", SecurityUtils.getLoginUser().getSysUser().getNickName()); + studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "创建记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getLoginUser().getSysUser().getNickName()); + //签名信息 + studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(),"创建记录",SecurityUtils.getUserId(),SecurityUtils.getLoginUser().getSysUser().getNickName()); } } diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml index 70f0380..058147f 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml @@ -4,7 +4,7 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">