Browse Source

fix:[试验管理][计划表单]优化

master
15881625488@163.com 5 days ago
parent
commit
e365f06520
8 changed files with 41 additions and 72 deletions
  1. +0
    -9
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java
  2. +1
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java
  3. +2
    -7
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPlanBdztEnum.java
  4. +0
    -6
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanService.java
  5. +6
    -9
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java
  6. +2
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java
  7. +28
    -37
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java
  8. +2
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyMapper.xml

+ 0
- 9
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java View File

@ -129,15 +129,6 @@ public class StudyFormPlanController extends BaseController
return AjaxResult.success("操作成功");
}
/**
* 通过
*/
@RequiresPermissions("business:studyFormPlan:fh")
@PostMapping("/tg")
public AjaxResult tg(@RequestBody StudyFormPlan studyFormPlan) {
studyFormPlanService.tg(studyFormPlan);
return AjaxResult.success("操作成功");
}
/**
* 审阅

+ 1
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java View File

@ -47,7 +47,7 @@ public class StudyFormPlan extends MpBaseEntity
/** 表单归属人名称 */
private String userMc;
/** 表单状态:1:填报中;3:已提交;5:已完成(经复核);7:已完成 */
/** 表单状态:1:填报中;3:已提交;5:已完成(经复核)*/
private Integer bdzt;
/** 提交时间 */

+ 2
- 7
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPlanBdztEnum.java View File

@ -1,7 +1,7 @@
package com.hxhq.business.enums.study;
/**
* 表单状态1填报中3已提交5已完成经复核7已完成
* 表单状态1填报中3已提交5已完成经复核
* @author tanfei
*/
public enum StudyFormPlanBdztEnum {
@ -19,12 +19,7 @@ public enum StudyFormPlanBdztEnum {
/**
* 已完成经复核
*/
ywcfh(5, "已完成(经复核)"),
/**
* 已完成
*/
ywc(7, "已完成");
ywcfh(5, "已完成(经复核)");
private int value;
private String text;

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

@ -64,12 +64,6 @@ public interface IStudyFormPlanService extends IService
public void fhjj(StudyFormPlan studyFormPlan);
/**
* 通过
* @param studyFormPlan
*/
public void tg(StudyFormPlan studyFormPlan);
/**
* 审阅
* @param studyFormPlan
*/

+ 6
- 9
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java View File

@ -1,9 +1,6 @@
package com.hxhq.business.service.impl;
import java.util.ArrayList;
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;
@ -230,8 +227,8 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
}
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("新归属人",studyFormApply.getRemark());
formData.put("原归属人",studyFormApplyOld.getRemark());
formData.put("新归属人",studyFormApply.getUserMc());
formData.put("原归属人",studyFormApplyOld.getUserMc());
formData.put("原因",studyFormApply.getRemark());
//是否验证新的归属人是否属于该实验 todo
@ -315,13 +312,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if (studyFormApplyOld == null) {
throw new ServiceException("表单不存在或已删除");
}
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.tbz.getValue()) ) {
throw new ServiceException("表单不是填报中状态,不能审核");
}
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.ytj.getValue());
studyFormApplyOld.setBdnr(studyFormApply.getBdnr());
studyFormApplyOld.setBdmc(studyFormApply.getBdmc());
studyFormApplyOld.setBdsm(studyFormApply.getBdsm());
studyFormApplyOld.setTjsj(new Date());
this.updateById(studyFormApplyOld);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
@ -411,6 +406,8 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ywc.getValue())) {
throw new ServiceException("表单不是已完成状态,不能审阅");
}
studyFormApplyOld.setBdnr(studyFormApply.getBdnr());
this.updateById(studyFormApplyOld);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormApply.getRemark());

+ 2
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java View File

@ -230,8 +230,8 @@ public class StudyFormFillServiceImpl extends ServiceImpl
}
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("新归属人",studyFormFill.getRemark());
formData.put("原归属人",studyFormFillOld.getRemark());
formData.put("新归属人",studyFormFill.getUserMc());
formData.put("原归属人",studyFormFillOld.getUserMc());
formData.put("原因",studyFormFill.getRemark());
//是否验证新的归属人是否属于该实验 todo

+ 28
- 37
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java View File

@ -1,17 +1,16 @@
package com.hxhq.business.service.impl;
import java.util.ArrayList;
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.StudyFormPlan;
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.study.StudyFormPlanBdztEnum;
import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum;
import com.hxhq.business.form.study.StudyFormPlanSearchForm;
@ -107,8 +106,8 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
}
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("新归属人",studyFormPlan.getRemark());
formData.put("原归属人",studyFormPlanOld.getRemark());
formData.put("新归属人",studyFormPlan.getUserMc());
formData.put("原归属人",studyFormPlanOld.getUserMc());
formData.put("原因",studyFormPlan.getRemark());
//是否验证新的归属人是否属于该实验 todo
@ -184,17 +183,6 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
*/
@Override
public void tj(StudyFormPlan studyFormPlan) {
//todo
}
/**
* 复核通过
*
* @param studyFormPlan
*/
@Override
public void fhtg(StudyFormPlan studyFormPlan) {
//验证签名人密码 todo
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确");
@ -203,27 +191,29 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除");
}
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ytj.getValue()) ) {
throw new ServiceException("表单不是已提交状态,不能复核");
}
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.ywcfh.getValue());
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.ytj.getValue());
studyFormPlanOld.setBdnr(studyFormPlan.getBdnr());
studyFormPlanOld.setBdmc(studyFormPlan.getBdmc());
studyFormPlanOld.setBdsm(studyFormPlan.getBdsm());
studyFormPlanOld.setTjsj(new Date());
this.updateById(studyFormPlanOld);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormPlan.getRemark());
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"填写并提交记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
}
/**
* 复核拒绝
* 复核通过
*
* @param studyFormPlan
*/
@Override
public void fhjj(StudyFormPlan studyFormPlan) {
public void fhtg(StudyFormPlan studyFormPlan) {
//验证签名人密码 todo
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确");
@ -235,24 +225,24 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ytj.getValue()) ) {
throw new ServiceException("表单不是已提交状态,不能复核");
}
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.tbz.getValue());
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.ywcfh.getValue());
this.updateById(studyFormPlanOld);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("原因",studyFormPlan.getRemark());
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
formData.put("备注",studyFormPlan.getRemark());
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"复核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
}
/**
* 通过
* 复核拒绝
*
* @param studyFormPlan
*/
@Override
public void tg(StudyFormPlan studyFormPlan) {
public void fhjj(StudyFormPlan studyFormPlan) {
//验证签名人密码 todo
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确");
@ -264,17 +254,18 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ytj.getValue()) ) {
throw new ServiceException("表单不是已提交状态,不能复核");
}
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.ywc.getValue());
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.tbz.getValue());
this.updateById(studyFormPlanOld);
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("原因",studyFormPlan.getRemark());
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "免复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"免复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"复核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
}
/**
* 审阅
*
@ -290,8 +281,8 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除");
}
if (!(studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ywcfh.getValue())||studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ywc.getValue())) ) {
throw new ServiceException("表单不是已完成状态,不能审阅");
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ywcfh.getValue())) {
throw new ServiceException("表单不是已完成(经复核)状态,不能审阅");
}
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();

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

@ -4,7 +4,8 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudyFormApplyMapper">
<select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormApplyListDto">
select t.id,t.bdbh,t.bdmc,t.create_time,t.user_mc,t.user_id,t.bdzt,t.bdzt,t.tjsj,tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId
select t.id,t.bdbh,t.bdmc,t.create_time,t.user_mc,t.user_id,t.bdzt,t.bdzt,t.tjsj,t.sfbl,
tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId
FROM `t_study_form_apply` t
left join t_template tm on tm.id=t.template_id
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">

Loading…
Cancel
Save