Browse Source

fix:[试验管理][预填表单,填报表单]新增字段

master
15881625488@163.com 1 week ago
parent
commit
616805ab6b
9 changed files with 45 additions and 23 deletions
  1. +1
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java
  2. +3
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java
  3. +3
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java
  4. +31
    -18
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java
  5. +3
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java
  6. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyMapper.xml
  7. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml
  8. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanMapper.xml
  9. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPreMapper.xml

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

@ -85,7 +85,7 @@ public class StudyFormPreController extends BaseController
* 保存
*/
@PostMapping("/bc")
@RequiresPermissions("business:studyFormPre:bj,business:studyFormPre:xz")
@RequiresPermissions({"business:studyFormPre:bj","business:studyFormPre:xz"})
public AjaxResult bc(@RequestBody StudyFormPre studyFormPre)
{
studyFormPreService.bc(studyFormPre);

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

@ -67,6 +67,9 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
if (form.getStudySubjectId() != null && form.getStudySubjectId().longValue() > 0) {
queryWrapper.eq("t.study_subject_id", form.getStudySubjectId());
}
if (form.getSfbl() != null && form.getSfbl().intValue() > 0) {
queryWrapper.eq("t.sfbl", form.getSfbl());
}
if (StringUtils.isNoneBlank(form.getBdbh())) {
queryWrapper.and(p -> p.like("t.`bdbh`", form.getBdbh()));
}

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

@ -67,6 +67,9 @@ public class StudyFormFillServiceImpl extends ServiceImpl
if (form.getStudySubjectId() != null && form.getStudySubjectId().longValue() > 0) {
queryWrapper.eq("t.study_subject_id", form.getStudySubjectId());
}
if (form.getSfbl() != null && form.getSfbl().intValue() > 0) {
queryWrapper.eq("t.sfbl", form.getSfbl());
}
if (StringUtils.isNoneBlank(form.getBdbh())) {
queryWrapper.and(p -> p.like("t.`bdbh`", form.getBdbh()));
}

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

@ -16,9 +16,7 @@ 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.IStudyFormFillService;
import com.hxhq.business.service.IStudyFormPreJcgjService;
import com.hxhq.business.service.IStudyFormPreQmxxService;
import com.hxhq.business.service.*;
import com.hxhq.business.utils.JctUtil;
import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.StringUtils;
@ -27,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.StudyFormPreMapper;
import com.hxhq.business.domain.StudyFormPre;
import com.hxhq.business.service.IStudyFormPreService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.web.bind.annotation.PostMapping;
@ -46,6 +43,10 @@ public class StudyFormPreServiceImpl extends ServiceImpl
private IStudyFormPreQmxxService studyFormPreQmxxService;
@Autowired
private IStudyFormFillService studyFormFillService;
@Autowired
private IStudyFormFillJcgjService studyFormFillJcgjService;
@Autowired
private IStudyFormFillQmxxService studyFormFillQmxxService;
/**
* 查询试验-预填单列表
@ -127,7 +128,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
}
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.bj.getValue(), "制作保存预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.xg.getValue(), "制作保存预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPreQmxxService.saveQmxx(studyFormPre.getId(),"制作保存预制表单",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPre.getRemark());
@ -165,18 +166,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService.saveJcgj(studyFormPre.getId(), JcgjlxEnum.lc.getValue(), "制作提交预制表单", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPreQmxxService.saveQmxx(studyFormPre.getId(),"制作提交预制表单",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPre.getRemark());
//生成填报表单
StudyFormFill studyFormFill=new StudyFormFill();
studyFormFill.setStudyId(studyFormPre.getStudyId());
studyFormFill.setUserId(SecurityUtils.getUserId());
studyFormFill.setUserMc(SecurityUtils.getNickName());
studyFormFill.setStudySubjectId(studyFormPre.getStudySubjectId());
studyFormFill.setBdbh(studyFormPre.getBdbh());
studyFormFill.setBdmc(studyFormPre.getBdmc());
studyFormFill.setBdsm(studyFormPre.getBdsm());
studyFormFill.setBdnr(studyFormPre.getBdnr());
studyFormFill.setTemplateId(studyFormPre.getTemplateId());
studyFormFillService.bc(studyFormFill);
}
/**
@ -185,6 +175,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
*/
@Override
public void tg(StudyFormPreAuditForm form){
//验证密码 todo
StudyFormPre studyFormPreOld=this.getById(form.getId());
if(studyFormPreOld==null){
throw new ServiceException("信息不存在或已删除");
@ -221,6 +212,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
*/
@Override
public void jj(StudyFormPreAuditForm form){
//验证密码 todo
StudyFormPre studyFormPreOld=this.getById(form.getId());
if(studyFormPreOld==null){
throw new ServiceException("信息不存在或已删除");
@ -244,6 +236,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
*/
@Override
public void tb(StudyFormPre studyFormPre){
//验证密码 todo
StudyFormPre studyFormPreOld=this.getById(studyFormPre.getId());
if(studyFormPreOld==null){
throw new ServiceException("信息不存在或已删除");
@ -254,7 +247,7 @@ public class StudyFormPreServiceImpl extends ServiceImpl
if(!studyFormPreOld.getTbzt().equals(NormalEnum.no.getValue())){
throw new ServiceException("已经填报");
}
//新增填报表单 todo
studyFormPreOld.setTbzt(NormalEnum.yes.getValue());
this.updateById(studyFormPreOld);
//稽查轨迹
@ -263,6 +256,26 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "创建记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(),"创建记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPre.getRemark());
//生成填报表单
StudyFormFill studyFormFill=new StudyFormFill();
studyFormFill.setStudyId(studyFormPreOld.getStudyId());
studyFormFill.setUserId(SecurityUtils.getUserId());
studyFormFill.setUserMc(SecurityUtils.getNickName());
studyFormFill.setStudySubjectId(studyFormPreOld.getStudySubjectId());
studyFormFill.setBdbh(studyFormPreOld.getBdbh());
studyFormFill.setBdmc(studyFormPreOld.getBdmc());
studyFormFill.setBdsm(studyFormPreOld.getBdsm());
studyFormFill.setBdnr(studyFormPreOld.getBdnr());
studyFormFill.setTemplateId(studyFormPreOld.getTemplateId());
studyFormFillService.bc(studyFormFill);
//稽查轨迹
Map<String, String> formData1 = new LinkedHashMap<>();
formData1.put("备注",studyFormFill.getRemark());
studyFormFillJcgjService.saveJcgj(studyFormFill.getId(), JcgjlxEnum.bj.getValue(), "创建记录", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData1), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormFillQmxxService.saveQmxx(studyFormFill.getId(),"创建记录",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormFill.getRemark());
}
}

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

@ -39,6 +39,9 @@ public class TemplateServiceImpl extends ServiceImpl i
if(template.getDeptId()!=null && template.getDeptId().longValue()>0){
queryWrapper.eq("t.dept_id",template.getDeptId());
}
if(template.getNeedPre()!=null && template.getNeedPre().intValue()>0){
queryWrapper.eq("t.need_pre",template.getNeedPre());
}
if(template.getStatus()!=null && template.getStatus().intValue()>0){
queryWrapper.eq("t.status",template.getStatus());
}

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

@ -4,7 +4,7 @@
"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.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,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">

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

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudyFormFillMapper">
<select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormFillListDto">
select t.id,t.bdbh,t.bdmc,t.create_time,t.user_mc,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,tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId
FROM `t_study_form_fill` t
left join t_template tm on tm.id=t.template_id
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">

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

@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudyFormPlanMapper">
<select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormPlanListDto">
select t.id,t.bdbh,t.bdmc,t.create_time,t.user_mc,t.bdzt,t.bdzt,t.tjsj,tm.name as templateMc,tm.sn as templateSn
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
FROM `t_study_form_plan` t
left join t_template tm on tm.id=t.template_id
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">

+ 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">
<mapper namespace="com.hxhq.business.mapper.StudyFormPreMapper">
<select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormPreListDto">
select t.id,t.bdbh,t.bdmc,t.create_time,t.user_mc,t.bdzt,t.bdzt,t.fzrsh,t.fzrshzt,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.fzrsh,t.fzrshzt,tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId
FROM `t_study_form_pre` t
left join t_template tm on tm.id=t.template_id
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">

Loading…
Cancel
Save