Browse Source

feat:[试验信息][计划表单]新增

master
15881625488@163.com 1 week ago
parent
commit
f5d29ca01f
20 changed files with 1017 additions and 60 deletions
  1. +106
    -22
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java
  2. +50
    -14
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java
  3. +110
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanJcgj.java
  4. +71
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanQmxx.java
  5. +11
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormPlanListDto.java
  6. +61
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPlanBdztEnum.java
  7. +10
    -10
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormPlanSearchForm.java
  8. +14
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanJcgjMapper.java
  9. +19
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanMapper.java
  10. +14
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanQmxxMapper.java
  11. +37
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanJcgjService.java
  12. +35
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanQmxxService.java
  13. +59
    -4
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanService.java
  14. +2
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java
  15. +72
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanJcgjServiceImpl.java
  16. +61
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanQmxxServiceImpl.java
  17. +256
    -8
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java
  18. +6
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanJcgjMapper.xml
  19. +17
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanMapper.xml
  20. +6
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanQmxxMapper.xml

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

@ -1,12 +1,16 @@
package com.hxhq.business.controller; package com.hxhq.business.controller;
import java.util.Arrays;
import java.util.List; import java.util.List;
import com.hxhq.business.domain.StudyFormPlan;
import com.hxhq.business.domain.StudyFormPlanJcgj;
import com.hxhq.business.domain.StudyFormPlanQmxx;
import com.hxhq.business.dto.study.StudyFormPlanListDto;
import com.hxhq.business.form.study.StudyFormPlanSearchForm;
import com.hxhq.business.service.IStudyFormPlanJcgjService;
import com.hxhq.business.service.IStudyFormPlanQmxxService;
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.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.hxhq.business.domain.StudyFormPlan;
import com.hxhq.business.service.IStudyFormPlanService; import com.hxhq.business.service.IStudyFormPlanService;
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;
@ -25,42 +29,122 @@ public class StudyFormPlanController extends BaseController
{ {
@Autowired @Autowired
private IStudyFormPlanService studyFormPlanService; private IStudyFormPlanService studyFormPlanService;
@Autowired
private IStudyFormPlanJcgjService studyFormPlanJcgjService;
@Autowired
private IStudyFormPlanQmxxService studyFormPlanQmxxService;
/** /**
* 查询试验-配置计划列表
* 列表
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(StudyFormPlan studyFormPlan)
{
public TableDataInfo list(StudyFormPlanSearchForm form) {
startPage();
List<StudyFormPlanListDto> list = studyFormPlanService.queryList(form);
return getDataTable(list);
}
/**
* 稽查轨迹列表
*/
@GetMapping("/jcgjList")
@RequiresPermissions("business:studyFormPlan:xq")
public TableDataInfo jcgjList(StudyFormPlanJcgj form) {
startPage();
List<StudyFormPlanJcgj> list = studyFormPlanJcgjService.queryList(form);
return getDataTable(list);
}
/**
* 签名信息列表
*/
@GetMapping("/qmxxList")
@RequiresPermissions("business:studyFormPlan:xq")
public TableDataInfo qmxxList(StudyFormPlanQmxx form) {
startPage(); startPage();
List<StudyFormPlan> list = studyFormPlanService.queryList(studyFormPlan);
List<StudyFormPlanQmxx> list = studyFormPlanQmxxService.queryList(form);
return getDataTable(list); return getDataTable(list);
} }
/** /**
* 获取试验-配置计划详细信息
* 详细
*/ */
@GetMapping(value = "/info") @GetMapping(value = "/info")
public AjaxResult getInfo(Long id)
{
return AjaxResult.success(studyFormPlanService.getById(id));
@RequiresPermissions("business:studyFormPlan:xq")
public AjaxResult getInfo(Long id) {
return AjaxResult.success(studyFormPlanService.queryInfo(id));
}
/**
* 更换归属人
*/
@RequiresPermissions("business:studyFormPlan:ghgsr")
@PostMapping("/ghgsr")
public AjaxResult ghgsr(@RequestBody StudyFormPlan studyFormPlan) {
studyFormPlanService.ghgsr(studyFormPlan);
return AjaxResult.success("操作成功");
}
/**
* 保存
*/
@RequiresPermissions("business:studyFormPlan:bj")
@PostMapping("/bc")
public AjaxResult bc(@RequestBody StudyFormPlan studyFormPlan) {
studyFormPlanService.bc(studyFormPlan);
return AjaxResult.success("操作成功");
}
/**
* 提交
*/
@RequiresPermissions("business:studyFormPlan:bj")
@PostMapping("/tj")
public AjaxResult tj(@RequestBody StudyFormPlan studyFormPlan) {
studyFormPlanService.tj(studyFormPlan);
return AjaxResult.success("操作成功");
}
/**
* 复核通过
*/
@RequiresPermissions("business:studyFormPlan:fh")
@PostMapping("/fhtg")
public AjaxResult fhtg(@RequestBody StudyFormPlan studyFormPlan) {
studyFormPlanService.fhtg(studyFormPlan);
return AjaxResult.success("操作成功");
}
/**
* 复核拒绝
*/
@RequiresPermissions("business:studyFormPlan:fh")
@PostMapping("/fhjj")
public AjaxResult fhjj(@RequestBody StudyFormPlan studyFormPlan) {
studyFormPlanService.fhjj(studyFormPlan);
return AjaxResult.success("操作成功");
} }
/** /**
* 新增试验-配置计划信息
* 通过
*/ */
@PostMapping("/save")
public AjaxResult save(@RequestBody StudyFormPlan studyFormPlan)
{
return toAjax(studyFormPlanService.saveOrUpdate(studyFormPlan));
@RequiresPermissions("business:studyFormPlan:fh")
@PostMapping("/tg")
public AjaxResult tg(@RequestBody StudyFormPlan studyFormPlan) {
studyFormPlanService.tg(studyFormPlan);
return AjaxResult.success("操作成功");
} }
/** /**
* 删除试验-配置计划信息
* 审阅
*/ */
@PostMapping("/delete")
public AjaxResult delete(@RequestBody Long[] ids)
{
return toAjax(studyFormPlanService.removeByIds(Arrays.asList(ids)));
@RequiresPermissions("business:studyFormPlan:sy")
@PostMapping("/sy")
public AjaxResult sy(@RequestBody StudyFormPlan studyFormPlan) {
studyFormPlanService.sy(studyFormPlan);
return AjaxResult.success("操作成功");
} }
} }

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

@ -1,5 +1,6 @@
package com.hxhq.business.domain; package com.hxhq.business.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.hxhq.common.core.annotation.Excel; import com.hxhq.common.core.annotation.Excel;
@ -34,9 +35,6 @@ public class StudyFormPlan extends MpBaseEntity
/** 模板id */ /** 模板id */
private Long templateId; private Long templateId;
/** 模板名称 */
private String templateMc;
/** 表单内容 */ /** 表单内容 */
private String bdnr; private String bdnr;
@ -46,7 +44,7 @@ public class StudyFormPlan extends MpBaseEntity
/** 表单归属人名称 */ /** 表单归属人名称 */
private String userMc; private String userMc;
/** 表单状态:1:填报中;3:已提交;5:已完成(经复核) */
/** 表单状态:1:填报中;3:已提交;5:已完成(经复核);7:已完成 */
private Integer bdzt; private Integer bdzt;
/** 提交时间 */ /** 提交时间 */
@ -54,6 +52,54 @@ public class StudyFormPlan extends MpBaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date tjsj; private Date tjsj;
/** 签名意义 */
@TableField(exist = false)
private String qmyy;
/** 签名人密码 */
@TableField(exist = false)
private String qmrmm;
/** 模板名称 */
@TableField(exist = false)
private String templateMc;
/** 模板编号 */
@TableField(exist = false)
private String templateSn;
public String getQmyy() {
return qmyy;
}
public void setQmyy(String qmyy) {
this.qmyy = qmyy;
}
public String getQmrmm() {
return qmrmm;
}
public void setQmrmm(String qmrmm) {
this.qmrmm = qmrmm;
}
public String getTemplateMc() {
return templateMc;
}
public void setTemplateMc(String templateMc) {
this.templateMc = templateMc;
}
public String getTemplateSn() {
return templateSn;
}
public void setTemplateSn(String templateSn) {
this.templateSn = templateSn;
}
public Date getTjsj() { public Date getTjsj() {
return tjsj; return tjsj;
} }
@ -113,16 +159,6 @@ public class StudyFormPlan extends MpBaseEntity
return templateId; return templateId;
} }
public void setTemplateMc(String templateMc)
{
this.templateMc = templateMc;
}
public String getTemplateMc()
{
return templateMc;
}
public void setBdnr(String bdnr) public void setBdnr(String bdnr)
{ {
this.bdnr = bdnr; this.bdnr = bdnr;

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

@ -0,0 +1,110 @@
package com.hxhq.business.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hxhq.common.core.domain.MpBaseEntity;
/**
* 试验-计划单-稽查轨迹对象 t_study_form_plan_jcgj
*
* @author hxhq
* @date 2026-01-02
*/
@TableName("t_study_form_plan_jcgj")
public class StudyFormPlanJcgj extends MpBaseEntity
{
private static final long serialVersionUID = 1L;
/** 计划表单id */
private Long formId;
/** 稽查轨迹类型:1:流程;3:编辑 */
private Integer jcgjlx;
/** 稽查名称 */
private String jcmc;
/** 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 */
private Integer jcmcys;
/** 稽查内容 */
private String jcnr;
/** 签名人id */
private Long qmrId;
/** 签名人名称 */
private String qmrMc;
public void setFormId(Long formId)
{
this.formId = formId;
}
public Long getFormId()
{
return formId;
}
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 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 setQmrId(Long qmrId)
{
this.qmrId = qmrId;
}
public Long getQmrId()
{
return qmrId;
}
public void setQmrMc(String qmrMc)
{
this.qmrMc = qmrMc;
}
public String getQmrMc()
{
return qmrMc;
}
}

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

@ -0,0 +1,71 @@
package com.hxhq.business.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hxhq.common.core.domain.MpBaseEntity;
/**
* 试验-计划单-签名信息对象 t_study_form_plan_qmxx
*
* @author hxhq
* @date 2026-01-02
*/
@TableName("t_study_form_plan_qmxx")
public class StudyFormPlanQmxx extends MpBaseEntity
{
private static final long serialVersionUID = 1L;
/** 计划表单id */
private Long formId;
/** 签名意义 */
private String qmyy;
/** 签名人id */
private Long qmrId;
/** 签名人名称 */
private String qmrMc;
public void setFormId(Long formId)
{
this.formId = formId;
}
public Long getFormId()
{
return formId;
}
public void setQmyy(String qmyy)
{
this.qmyy = qmyy;
}
public String getQmyy()
{
return qmyy;
}
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;
}
}

+ 11
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormPlanListDto.java View File

@ -0,0 +1,11 @@
package com.hxhq.business.dto.study;
import com.hxhq.business.domain.StudyFormPlan;
/**
* @author tanfei
*/
public class StudyFormPlanListDto extends StudyFormPlan {
}

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

@ -0,0 +1,61 @@
package com.hxhq.business.enums.study;
/**
* 表单状态1填报中3已提交5已完成经复核7已完成
* @author tanfei
*/
public enum StudyFormPlanBdztEnum {
/**
* 填报中
*/
tbz(1, "填报中"),
/**
* 已提交
*/
ytj(3, "已提交"),
/**
* 已完成经复核
*/
ywcfh(5, "已完成(经复核)"),
/**
* 已完成
*/
ywc(7, "已完成");
private int value;
private String text;
StudyFormPlanBdztEnum(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 StudyFormPlanBdztEnum getEnumByValue(int type) {
for (StudyFormPlanBdztEnum bt : values()) {
if (bt.value == type) {
return bt;
}
}
return null;
}
}

+ 10
- 10
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormPlanSearchForm.java View File

@ -17,10 +17,10 @@ public class StudyFormPlanSearchForm {
private Long userId; private Long userId;
/** 创建时间开始 */ /** 创建时间开始 */
private String startDate;
private String cjsjks;
/** 创建时间开始 */ /** 创建时间开始 */
private String endDate;
private String cjsjjs;
public Long getStudyId() { public Long getStudyId() {
return studyId; return studyId;
@ -54,19 +54,19 @@ public class StudyFormPlanSearchForm {
this.userId = userId; this.userId = userId;
} }
public String getStartDate() {
return startDate;
public String getCjsjks() {
return cjsjks;
} }
public void setStartDate(String startDate) {
this.startDate = startDate;
public void setCjsjks(String cjsjks) {
this.cjsjks = cjsjks;
} }
public String getEndDate() {
return endDate;
public String getCjsjjs() {
return cjsjjs;
} }
public void setEndDate(String endDate) {
this.endDate = endDate;
public void setCjsjjs(String cjsjjs) {
this.cjsjjs = cjsjjs;
} }
} }

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

@ -0,0 +1,14 @@
package com.hxhq.business.mapper;
import com.hxhq.business.domain.StudyFormPlanJcgj;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 试验-计划单-稽查轨迹Mapper接口
*
* @author hxhq
* @date 2026-01-02
*/
public interface StudyFormPlanJcgjMapper extends BaseMapper<StudyFormPlanJcgj>
{
}

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

@ -1,7 +1,14 @@
package com.hxhq.business.mapper; package com.hxhq.business.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.hxhq.business.domain.StudyFormPlan;
import com.hxhq.business.domain.StudyFormPlan; import com.hxhq.business.domain.StudyFormPlan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hxhq.business.dto.study.StudyFormPlanListDto;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 试验-配置计划Mapper接口 * 试验-配置计划Mapper接口
* *
@ -10,5 +17,17 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface StudyFormPlanMapper extends BaseMapper<StudyFormPlan> public interface StudyFormPlanMapper extends BaseMapper<StudyFormPlan>
{ {
/**
* 查询列表
* @param queryWrapper
* @return
*/
List<StudyFormPlanListDto> queryList(@Param("ew") Wrapper<StudyFormPlan> queryWrapper);
/**
* 查询详情
* @param id
* @return
*/
StudyFormPlan queryInfo(@Param("id") Long id);
} }

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

@ -0,0 +1,14 @@
package com.hxhq.business.mapper;
import com.hxhq.business.domain.StudyFormPlanQmxx;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 试验-计划单-签名信息Mapper接口
*
* @author hxhq
* @date 2026-01-02
*/
public interface StudyFormPlanQmxxMapper extends BaseMapper<StudyFormPlanQmxx>
{
}

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

@ -0,0 +1,37 @@
package com.hxhq.business.service;
import java.util.List;
import com.hxhq.business.domain.StudyFormFillJcgj;
import com.hxhq.business.domain.StudyFormPlanJcgj;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 试验-计划单-稽查轨迹Service接口
*
* @author hxhq
* @date 2026-01-02
*/
public interface IStudyFormPlanJcgjService extends IService<StudyFormPlanJcgj>
{
/**
* 轨迹列表
* @param studyFormPlanJcgj
* @return
*/
public List<StudyFormPlanJcgj> queryList(StudyFormPlanJcgj studyFormPlanJcgj);
/**
* 新增稽查轨迹
* @param formId 记录id
* @param jcgjlx 稽查轨迹类型:1:流程3编辑
* @param jcmc 稽查名称
* @param jcmcys 稽查名称颜色1蓝色3红色5绿色7橙色
* @param jcnr 稽查内容
* @param jcrId 稽查人id
* @param jcrMc 稽查人名称
*/
public void saveJcgj(Long formId, Integer jcgjlx, String jcmc, Integer jcmcys, String jcnr,Long jcrId,String jcrMc);
}

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

@ -0,0 +1,35 @@
package com.hxhq.business.service;
import java.util.List;
import com.hxhq.business.domain.StudyFormFillQmxx;
import com.hxhq.business.domain.StudyFormPlanQmxx;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 试验-计划单-签名信息Service接口
*
* @author hxhq
* @date 2026-01-02
*/
public interface IStudyFormPlanQmxxService extends IService<StudyFormPlanQmxx>
{
/**
* 查询试验-填报单-签名信息列表
*
* @param studyFormPlanQmxx
* @return 试验-填报单-签名信息集合
*/
public List<StudyFormPlanQmxx> queryList(StudyFormPlanQmxx studyFormPlanQmxx);
/**
* 新增签名信息
* @param formId
* @param qmyy
* @param qmrId
* @param qmrMc
* @param remark
*/
public void saveQmxx(Long formId, String qmyy, Long qmrId, String qmrMc,String remark);
}

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

@ -3,6 +3,8 @@ package com.hxhq.business.service;
import java.util.List; import java.util.List;
import com.hxhq.business.domain.StudyFormPlan; import com.hxhq.business.domain.StudyFormPlan;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hxhq.business.dto.study.StudyFormPlanListDto;
import com.hxhq.business.form.study.StudyFormPlanSearchForm;
/** /**
* 试验-配置计划Service接口 * 试验-配置计划Service接口
@ -13,11 +15,64 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface IStudyFormPlanService extends IService<StudyFormPlan> public interface IStudyFormPlanService extends IService<StudyFormPlan>
{ {
/** /**
* 查询试验-配置计划列表
* 查询试验-填报单列表
* *
* @param studyFormPlan 试验-配置计划
* @return 试验-配置计划集合
* @param form 试验-填报单
* @return 试验-填报单集合
*/ */
public List<StudyFormPlan> queryList(StudyFormPlan studyFormPlan);
public List<StudyFormPlanListDto> queryList(StudyFormPlanSearchForm form);
/**
* 详情
*
* @param id
* @return 详情
*/
public StudyFormPlan queryInfo(Long id);
/**
* 更换归属人
* @param studyFormPlan
*/
public void ghgsr(StudyFormPlan studyFormPlan);
/**
* 保存
* @param studyFormPlan
*/
public void bc(StudyFormPlan studyFormPlan);
/**
* 提交
* @param studyFormPlan
*/
public void tj(StudyFormPlan studyFormPlan);
/**
* 复核通过
* @param studyFormPlan
*/
public void fhtg(StudyFormPlan studyFormPlan);
/**
* 复核拒绝
* @param studyFormPlan
*/
public void fhjj(StudyFormPlan studyFormPlan);
/**
* 通过
* @param studyFormPlan
*/
public void tg(StudyFormPlan studyFormPlan);
/**
* 审阅
* @param studyFormPlan
*/
public void sy(StudyFormPlan studyFormPlan);
} }

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

@ -83,10 +83,10 @@ public class StudyFormFillServiceImpl extends ServiceImpl
queryWrapper.apply("t.tjsj<{0}", form.getTjsjjs()); queryWrapper.apply("t.tjsj<{0}", form.getTjsjjs());
} }
if (StringUtils.isNoneBlank(form.getCjsjks())) { if (StringUtils.isNoneBlank(form.getCjsjks())) {
queryWrapper.apply("t.create_time>={0}", form.getTjsjks());
queryWrapper.apply("t.create_time>={0}", form.getCjsjks());
} }
if (StringUtils.isNoneBlank(form.getCjsjjs())) { if (StringUtils.isNoneBlank(form.getCjsjjs())) {
queryWrapper.apply("t.create_time<{0}", form.getTjsjjs());
queryWrapper.apply("t.create_time<{0}", form.getCjsjjs());
} }
queryWrapper.orderByDesc("t.create_time"); queryWrapper.orderByDesc("t.create_time");
return baseMapper.queryList(queryWrapper); return baseMapper.queryList(queryWrapper);

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

@ -0,0 +1,72 @@
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.StudyFormPlanJcgj;
import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.DateUtils;
import com.hxhq.common.core.utils.StringUtils;
import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.StudyFormPlanJcgjMapper;
import com.hxhq.business.domain.StudyFormPlanJcgj;
import com.hxhq.business.service.IStudyFormPlanJcgjService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 试验-计划单-稽查轨迹Service业务层处理
*
* @author hxhq
* @date 2026-01-02
*/
@Service
public class StudyFormPlanJcgjServiceImpl extends ServiceImpl<StudyFormPlanJcgjMapper, StudyFormPlanJcgj> implements IStudyFormPlanJcgjService
{
/**
* 查询稽查轨迹列表
* @param studyFormPlanJcgj
* @return
*/
@Override
public List<StudyFormPlanJcgj> queryList(StudyFormPlanJcgj studyFormPlanJcgj){
QueryWrapper<StudyFormPlanJcgj> queryWrapper = Wrappers.query();
if(studyFormPlanJcgj.getFormId()==null||studyFormPlanJcgj.getFormId().longValue()<0){
throw new ServiceException("表单id不能为空");
}
queryWrapper.eq("form_id",studyFormPlanJcgj.getFormId());
if(studyFormPlanJcgj.getJcgjlx()!=null&&studyFormPlanJcgj.getJcgjlx().intValue()>0){
queryWrapper.eq("jcgjlx",studyFormPlanJcgj.getJcgjlx());
}
if (StringUtils.isNoneBlank(studyFormPlanJcgj.getJcmc())) {
queryWrapper.and(p -> p.like("`jcmc`", studyFormPlanJcgj.getJcmc())
.or().like("`jcnr`", studyFormPlanJcgj.getJcmc()));
}
queryWrapper.orderByDesc("id");
return this.list(queryWrapper);
}
/**
* 新增稽查轨迹
* @param formId
* @param jcgjlx 稽查轨迹类型:1:流程3编辑
* @param jcmc 稽查名称
* @param jcmcys 稽查名称颜色1蓝色3红色5绿色7橙色
* @param jcnr 稽查内容
* @param jcrId 稽查人id
* @param jcrMc 稽查人名称
*/
@Override
public void saveJcgj(Long formId, Integer jcgjlx, String jcmc, Integer jcmcys, String jcnr,Long jcrId,String jcrMc){
StudyFormPlanJcgj studyFormPlanJcgj = new StudyFormPlanJcgj();
studyFormPlanJcgj.setFormId(formId);
studyFormPlanJcgj.setJcgjlx(jcgjlx);
studyFormPlanJcgj.setJcmc(jcmc);
studyFormPlanJcgj.setJcmcys(jcmcys);
studyFormPlanJcgj.setJcnr(jcnr);
studyFormPlanJcgj.setQmrId(jcrId);
studyFormPlanJcgj.setQmrMc(jcrMc);
this.save(studyFormPlanJcgj);
}
}

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

@ -0,0 +1,61 @@
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.StudyFormPlanQmxx;
import com.hxhq.common.core.exception.ServiceException;
import com.hxhq.common.core.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.hxhq.business.mapper.StudyFormPlanQmxxMapper;
import com.hxhq.business.domain.StudyFormPlanQmxx;
import com.hxhq.business.service.IStudyFormPlanQmxxService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 试验-计划单-签名信息Service业务层处理
*
* @author hxhq
* @date 2026-01-02
*/
@Service
public class StudyFormPlanQmxxServiceImpl extends ServiceImpl<StudyFormPlanQmxxMapper, StudyFormPlanQmxx> implements IStudyFormPlanQmxxService
{
/**
* 查询试验-填报单-签名信息列表
*
* @param studyFormPlanQmxx 试验-填报单-签名信息
* @return 试验-填报单-签名信息
*/
@Override
public List<StudyFormPlanQmxx> queryList(StudyFormPlanQmxx studyFormPlanQmxx)
{
QueryWrapper<StudyFormPlanQmxx> queryWrapper = Wrappers.query();
if(studyFormPlanQmxx.getFormId()==null||studyFormPlanQmxx.getFormId().longValue()<0){
throw new ServiceException("表单id不能为空");
}
queryWrapper.eq("form_id",studyFormPlanQmxx.getFormId());
queryWrapper.orderByDesc("id");
return this.list(queryWrapper);
}
/**
* 新增签名信息
* @param formId
* @param qmyy
* @param qmrId
* @param qmrMc
* @param remark
*/
@Override
public void saveQmxx(Long formId, String qmyy, Long qmrId, String qmrMc,String remark){
StudyFormPlanQmxx studyFormPlanQmxx=new StudyFormPlanQmxx();
studyFormPlanQmxx.setFormId(formId);
studyFormPlanQmxx.setQmyy(qmyy);
studyFormPlanQmxx.setQmrId(qmrId);
studyFormPlanQmxx.setQmrMc(qmrMc);
studyFormPlanQmxx.setRemark(remark);
this.save(studyFormPlanQmxx);
}
}

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

@ -1,11 +1,26 @@
package com.hxhq.business.service.impl; package com.hxhq.business.service.impl;
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.domain.StudyFormPlan;
import com.hxhq.business.dto.study.StudyFormPlanListDto;
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;
import com.hxhq.business.service.IStudyFormPlanJcgjService;
import com.hxhq.business.service.IStudyFormPlanQmxxService;
import com.hxhq.business.utils.JctUtil;
import com.hxhq.common.core.exception.ServiceException;
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 org.springframework.stereotype.Service;
import com.hxhq.business.mapper.StudyFormPlanMapper; import com.hxhq.business.mapper.StudyFormPlanMapper;
import com.hxhq.business.domain.StudyFormPlan;
import com.hxhq.business.service.IStudyFormPlanService; import com.hxhq.business.service.IStudyFormPlanService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -18,17 +33,250 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service @Service
public class StudyFormPlanServiceImpl extends ServiceImpl<StudyFormPlanMapper, StudyFormPlan> implements IStudyFormPlanService public class StudyFormPlanServiceImpl extends ServiceImpl<StudyFormPlanMapper, StudyFormPlan> implements IStudyFormPlanService
{ {
@Autowired
private IStudyFormPlanJcgjService studyFormPlanJcgjService;
@Autowired
private IStudyFormPlanQmxxService studyFormPlanQmxxService;
/** /**
* 查询试验-配置计划列表
* 查询试验-填报单列表
* *
* @param studyFormPlan 试验-配置计划
* @return 试验-配置计划
* @param form 试验-填报单
* @return 试验-填报单
*/ */
@Override @Override
public List<StudyFormPlan> queryList(StudyFormPlan studyFormPlan)
{
public List<StudyFormPlanListDto> queryList(StudyFormPlanSearchForm form) {
QueryWrapper<StudyFormPlan> queryWrapper = Wrappers.query(); QueryWrapper<StudyFormPlan> queryWrapper = Wrappers.query();
return this.list(queryWrapper);
queryWrapper.eq("t.del_flag", "0");
if (form.getUserId() != null && form.getUserId().longValue() > 0) {
queryWrapper.eq("t.user_id", form.getUserId());
}
if (form.getStudyId() != null && form.getStudyId().longValue() > 0) {
queryWrapper.eq("t.study_id", form.getStudyId());
}
if (StringUtils.isNoneBlank(form.getBdbh())) {
queryWrapper.and(p -> p.like("t.`bdbh`", form.getBdbh()));
}
if (StringUtils.isNoneBlank(form.getBdmc())) {
queryWrapper.and(p -> p.like("t.`bdmc`", form.getBdmc()));
}
if (StringUtils.isNoneBlank(form.getCjsjks())) {
queryWrapper.apply("t.create_time>={0}", form.getCjsjks());
}
if (StringUtils.isNoneBlank(form.getCjsjjs())) {
queryWrapper.apply("t.create_time<{0}", form.getCjsjjs());
}
queryWrapper.orderByDesc("t.create_time");
return baseMapper.queryList(queryWrapper);
}
/**
* 详情
*
* @param id
* @return 详情
*/
@Override
public StudyFormPlan queryInfo(Long id) {
if (id == null || id.longValue() < 0) {
throw new ServiceException("参数id不正确");
}
return baseMapper.queryInfo(id);
}
/**
* 更换归属人
*
* @param studyFormPlan
*/
@Override
public void ghgsr(StudyFormPlan studyFormPlan) {
//验证签名人密码 todo
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确");
}
StudyFormPlan studyFormPlanOld = this.getById(studyFormPlan.getId());
if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除");
}
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("新归属人",studyFormPlan.getRemark());
formData.put("原归属人",studyFormPlanOld.getRemark());
formData.put("原因",studyFormPlan.getRemark());
//是否验证新的归属人是否属于该实验 todo
studyFormPlanOld.setUserId(studyFormPlan.getUserId());
studyFormPlanOld.setUserMc(studyFormPlan.getUserMc());
this.updateById(studyFormPlanOld);
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"更换归属人",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
}
/**
* 保存
*
* @param studyFormPlan
*/
@Override
public void bc(StudyFormPlan studyFormPlan) {
if(studyFormPlan.getId()!=null){
StudyFormPlan studyFormPlanOld=this.getById(studyFormPlan.getId());
if(studyFormPlanOld==null){
throw new ServiceException("信息不存在或已删除");
}
if(!SecurityUtils.getUserId().equals(studyFormPlanOld.getUserId())){
throw new ServiceException("只能操作自己的表单");
}
studyFormPlanOld.setBdmc(studyFormPlan.getBdmc());
studyFormPlanOld.setTemplateId(studyFormPlan.getTemplateId());
studyFormPlanOld.setBdnr(studyFormPlan.getBdnr());
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.tbz.getValue());
this.updateById(studyFormPlanOld);
}else{
studyFormPlan.setBdzt(StudyFormPlanBdztEnum.tbz.getValue());
studyFormPlan.setUserId(SecurityUtils.getUserId());
studyFormPlan.setUserMc(SecurityUtils.getNickName());
this.save(studyFormPlan);
}
//稽查轨迹
Map<String, String> formData = new LinkedHashMap<>();
formData.put("备注",studyFormPlan.getRemark());
studyFormPlanJcgjService.saveJcgj(studyFormPlan.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlan.getId(),"填写并保存",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
}
/**
* 提交
*
* @param studyFormPlan
*/
@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不正确");
}
StudyFormPlan studyFormPlanOld = this.getById(studyFormPlan.getId());
if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除");
}
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ytj.getValue()) ) {
throw new ServiceException("表单不是已提交状态,不能复核");
}
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.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
}
/**
* 复核拒绝
*
* @param studyFormPlan
*/
@Override
public void fhjj(StudyFormPlan studyFormPlan) {
//验证签名人密码 todo
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确");
}
StudyFormPlan studyFormPlanOld = this.getById(studyFormPlan.getId());
if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除");
}
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ytj.getValue()) ) {
throw new ServiceException("表单不是已提交状态,不能复核");
}
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.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"复核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
}
/**
* 通过
*
* @param studyFormPlan
*/
@Override
public void tg(StudyFormPlan studyFormPlan) {
//验证签名人密码 todo
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确");
}
StudyFormPlan studyFormPlanOld = this.getById(studyFormPlan.getId());
if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除");
}
if (!studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ytj.getValue()) ) {
throw new ServiceException("表单不是已提交状态,不能复核");
}
studyFormPlanOld.setBdzt(StudyFormPlanBdztEnum.ywc.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());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"免复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
}
/**
* 审阅
*
* @param studyFormPlan
*/
@Override
public void sy(StudyFormPlan studyFormPlan) {
//验证签名人密码 todo
if (studyFormPlan.getId() == null || studyFormPlan.getId().longValue() < 0) {
throw new ServiceException("参数id不正确");
}
StudyFormPlan studyFormPlanOld = this.getById(studyFormPlan.getId());
if (studyFormPlanOld == null) {
throw new ServiceException("表单不存在或已删除");
}
if (!(studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ywcfh.getValue())||studyFormPlanOld.getBdzt().equals(StudyFormPlanBdztEnum.ywc.getValue())) ) {
throw new ServiceException("表单不是已完成状态,不能审阅");
}
//稽查轨迹
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());
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(),"已审阅",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormPlan.getRemark());
} }
}
}

+ 6
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanJcgjMapper.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.StudyFormPlanJcgjMapper">
</mapper>

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

@ -3,4 +3,21 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.StudyFormPlanMapper"> <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
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">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
<select id="queryInfo" resultType="com.hxhq.business.domain.StudyFormPlan">
select t.*,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
where t.id=#{id}
</select>
</mapper> </mapper>

+ 6
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanQmxxMapper.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.StudyFormPlanQmxxMapper">
</mapper>

Loading…
Cancel
Save