Browse Source

feat:[试验管理]预填表单填报

master
15881625488@163.com 1 week ago
parent
commit
e0fbe56db3
6 changed files with 252 additions and 9 deletions
  1. +43
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java
  2. +55
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPre.java
  3. +56
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPreFzrshztEnum.java
  4. +6
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPreService.java
  5. +91
    -7
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java
  6. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml

+ 43
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java View File

@ -3,13 +3,16 @@ package com.hxhq.business.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import com.hxhq.business.domain.*;
import com.hxhq.business.dto.study.StudyFormPreListDto; import com.hxhq.business.dto.study.StudyFormPreListDto;
import com.hxhq.business.form.study.StudyFormPreAuditForm; import com.hxhq.business.form.study.StudyFormPreAuditForm;
import com.hxhq.business.form.study.StudyFormPreSearchForm; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.hxhq.business.domain.StudyFormPre;
import com.hxhq.business.service.IStudyFormPreService; import com.hxhq.business.service.IStudyFormPreService;
import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.controller.BaseController;
import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.core.web.domain.AjaxResult;
@ -28,6 +31,10 @@ public class StudyFormPreController extends BaseController
{ {
@Autowired @Autowired
private IStudyFormPreService studyFormPreService; 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<StudyFormPreJcgj> list = studyFormPreJcgjService.queryList(form);
return getDataTable(list);
}
/**
* 签名信息列表
*/
@GetMapping("/qmxxList")
public TableDataInfo qmxxList(StudyFormPreQmxx form)
{
startPage();
List<StudyFormPreQmxx> list = studyFormPreQmxxService.queryList(form);
return getDataTable(list);
}
/**
* 详细 * 详细
*/ */
@GetMapping(value = "/info") @GetMapping(value = "/info")
@ -69,9 +98,21 @@ public class StudyFormPreController extends BaseController
return AjaxResult.success("操作成功"); return AjaxResult.success("操作成功");
} }
/**
* 填报
*/
@PostMapping("/tb")
public AjaxResult tb(@RequestBody StudyFormPreAuditForm form)
{
studyFormPreService.tb(form);
return AjaxResult.success("操作成功");
}
/** /**
* 通过 * 通过
*/ */
@RequiresPermissions("business:studyFormPre:audit")
@PostMapping("/tg") @PostMapping("/tg")
public AjaxResult tg(@RequestBody StudyFormPreAuditForm form) public AjaxResult tg(@RequestBody StudyFormPreAuditForm form)
{ {
@ -82,6 +123,7 @@ public class StudyFormPreController extends BaseController
/** /**
* 拒绝 * 拒绝
*/ */
@RequiresPermissions("business:studyFormPre:audit")
@PostMapping("/jj") @PostMapping("/jj")
public AjaxResult jj(@RequestBody StudyFormPreAuditForm form) public AjaxResult jj(@RequestBody StudyFormPreAuditForm form)
{ {

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

@ -49,11 +49,66 @@ public class StudyFormPre extends MpBaseEntity
/** 表单状态:1:填报中;3:已提交;5:已通过 */ /** 表单状态:1:填报中;3:已提交;5:已通过 */
private Integer bdzt; 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 = "提交时间") @Excel(name = "提交时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date tjsj; 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() { public Date getTjsj() {
return tjsj; return tjsj;
} }

+ 56
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPreFzrshztEnum.java View File

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

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

@ -50,4 +50,10 @@ public interface IStudyFormPreService extends IService
*/ */
public void jj(StudyFormPreAuditForm form); public void jj(StudyFormPreAuditForm form);
/**
* 填报
* @param form
*/
public void tb(StudyFormPreAuditForm form);
} }

+ 91
- 7
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java View File

@ -1,15 +1,26 @@
package com.hxhq.business.service.impl; package com.hxhq.business.service.impl;
import java.util.Date; import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hxhq.business.dto.study.StudyFormPreListDto; 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.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.StudyFormPreAuditForm;
import com.hxhq.business.form.study.StudyFormPreSearchForm; 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.core.utils.StringUtils;
import com.hxhq.common.security.utils.SecurityUtils; import com.hxhq.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.StudyFormPreMapper; import com.hxhq.business.mapper.StudyFormPreMapper;
import com.hxhq.business.domain.StudyFormPre; import com.hxhq.business.domain.StudyFormPre;
@ -26,6 +37,11 @@ import org.springframework.web.bind.annotation.PostMapping;
@Service @Service
public class StudyFormPreServiceImpl extends ServiceImpl<StudyFormPreMapper, StudyFormPre> implements IStudyFormPreService public class StudyFormPreServiceImpl extends ServiceImpl<StudyFormPreMapper, StudyFormPre> implements IStudyFormPreService
{ {
@Autowired
private IStudyFormPreJcgjService studyFormPreJcgjService;
@Autowired
private IStudyFormPreQmxxService studyFormPreQmxxService;
/** /**
* 查询试验-预填单列表 * 查询试验-预填单列表
* *
@ -89,7 +105,14 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPre.setBdzt(StudyFormPreBdztEnum.tbz.getValue()); studyFormPre.setBdzt(StudyFormPreBdztEnum.tbz.getValue());
this.save(studyFormPre); this.save(studyFormPre);
} }
//稽查轨迹 todo
//稽查轨迹
Map<String, String> 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
studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue()); studyFormPre.setBdzt(StudyFormPreBdztEnum.ytj.getValue());
this.save(studyFormPre); this.save(studyFormPre);
} }
//稽查轨迹 todo
//稽查轨迹
Map<String, String> 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
if(!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytj.getValue())){ if(!studyFormPreOld.getBdzt().equals(StudyFormPreBdztEnum.ytj.getValue())){
throw new SecurityException("不是填报状态,不能审核"); throw new SecurityException("不是填报状态,不能审核");
} }
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue());
this.updateById(studyFormPreOld);
//稽查轨迹 todo
//负责人审核
if(studyFormPreOld.getFzrshzt().equals(StudyFormPreFzrshztEnum.shz.getValue())){
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue());
studyFormPreOld.setFzrshzt(StudyFormPreFzrshztEnum.ysh.getValue());
}else{
//权限审核
if(studyFormPreOld.getFzrsh().equals(NormalEnum.yes.getValue())){
//是否需要负责人审核
studyFormPreOld.setFzrshzt(StudyFormPreFzrshztEnum.shz.getValue());
}else{
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue());
}
}
this.updateById(studyFormPreOld);
//稽查轨迹
Map<String, String> 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
} }
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.tbz.getValue()); studyFormPreOld.setBdzt(StudyFormPreBdztEnum.tbz.getValue());
this.updateById(studyFormPreOld); this.updateById(studyFormPreOld);
//稽查轨迹 todo
//稽查轨迹
Map<String, String> 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<String, String> 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());
} }
} }

+ 1
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml View File

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudyFormPreMapper"> <mapper namespace="com.hxhq.business.mapper.StudyFormPreMapper">
<select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormPreListDto"> <select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormPreListDto">
select t.id,t.bdbh,t.bdmc,t.template_mc,t.create_time,t.user_mc,t.bdzt,t.bdzt
select t.id,t.bdbh,t.bdmc,t.template_mc,t.create_time,t.user_mc,t.bdzt,t.bdzt,t.fzrsh,t.fzrshzt
FROM `t_study_form_pre` t FROM `t_study_form_pre` t
<if test="ew.sqlSegment != '' and ew.sqlSegment != null"> <if test="ew.sqlSegment != '' and ew.sqlSegment != null">
<where> <where>

Loading…
Cancel
Save