diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java index 9967d02..358e3c0 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java @@ -1,12 +1,16 @@ package com.hxhq.business.controller; -import java.util.Arrays; 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.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import com.hxhq.business.domain.StudyFormPlan; import com.hxhq.business.service.IStudyFormPlanService; import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.domain.AjaxResult; @@ -25,42 +29,122 @@ public class StudyFormPlanController extends BaseController { @Autowired private IStudyFormPlanService studyFormPlanService; + @Autowired + private IStudyFormPlanJcgjService studyFormPlanJcgjService; + @Autowired + private IStudyFormPlanQmxxService studyFormPlanQmxxService; /** - * 查询试验-配置计划列表 + * 列表 */ @GetMapping("/list") - public TableDataInfo list(StudyFormPlan studyFormPlan) - { + public TableDataInfo list(StudyFormPlanSearchForm form) { + startPage(); + List list = studyFormPlanService.queryList(form); + return getDataTable(list); + } + + /** + * 稽查轨迹列表 + */ + @GetMapping("/jcgjList") + @RequiresPermissions("business:studyFormPlan:xq") + public TableDataInfo jcgjList(StudyFormPlanJcgj form) { + startPage(); + List list = studyFormPlanJcgjService.queryList(form); + return getDataTable(list); + } + + /** + * 签名信息列表 + */ + @GetMapping("/qmxxList") + @RequiresPermissions("business:studyFormPlan:xq") + public TableDataInfo qmxxList(StudyFormPlanQmxx form) { startPage(); - List list = studyFormPlanService.queryList(studyFormPlan); + List list = studyFormPlanQmxxService.queryList(form); return getDataTable(list); } /** - * 获取试验-配置计划详细信息 + * 详细 */ @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("操作成功"); } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java index 9de90d2..63f8f45 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java @@ -1,5 +1,6 @@ package com.hxhq.business.domain; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import com.hxhq.common.core.annotation.Excel; @@ -34,9 +35,6 @@ public class StudyFormPlan extends MpBaseEntity /** 模板id */ private Long templateId; - /** 模板名称 */ - private String templateMc; - /** 表单内容 */ private String bdnr; @@ -46,7 +44,7 @@ public class StudyFormPlan extends MpBaseEntity /** 表单归属人名称 */ private String userMc; - /** 表单状态:1:填报中;3:已提交;5:已完成(经复核) */ + /** 表单状态:1:填报中;3:已提交;5:已完成(经复核);7:已完成 */ private Integer bdzt; /** 提交时间 */ @@ -54,6 +52,54 @@ public class StudyFormPlan extends MpBaseEntity @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 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() { return tjsj; } @@ -113,16 +159,6 @@ public class StudyFormPlan extends MpBaseEntity return templateId; } - public void setTemplateMc(String templateMc) - { - this.templateMc = templateMc; - } - - public String getTemplateMc() - { - return templateMc; - } - public void setBdnr(String bdnr) { this.bdnr = bdnr; diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanJcgj.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanJcgj.java new file mode 100644 index 0000000..d7eb817 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanJcgj.java @@ -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; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanQmxx.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanQmxx.java new file mode 100644 index 0000000..38df190 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanQmxx.java @@ -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; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormPlanListDto.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormPlanListDto.java new file mode 100644 index 0000000..473243b --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormPlanListDto.java @@ -0,0 +1,11 @@ +package com.hxhq.business.dto.study; + + +import com.hxhq.business.domain.StudyFormPlan; + +/** + * @author tanfei + */ +public class StudyFormPlanListDto extends StudyFormPlan { + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPlanBdztEnum.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPlanBdztEnum.java new file mode 100644 index 0000000..2daeaee --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormPlanBdztEnum.java @@ -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; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormPlanSearchForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormPlanSearchForm.java index a4380e2..1f5957e 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormPlanSearchForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormPlanSearchForm.java @@ -17,10 +17,10 @@ public class StudyFormPlanSearchForm { private Long userId; /** 创建时间开始 */ - private String startDate; + private String cjsjks; /** 创建时间开始 */ - private String endDate; + private String cjsjjs; public Long getStudyId() { return studyId; @@ -54,19 +54,19 @@ public class StudyFormPlanSearchForm { 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; } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanJcgjMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanJcgjMapper.java new file mode 100644 index 0000000..10b6104 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanJcgjMapper.java @@ -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 +{ + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanMapper.java index 05d6c0e..539935c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanMapper.java @@ -1,7 +1,14 @@ 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.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hxhq.business.dto.study.StudyFormPlanListDto; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + /** * 试验-配置计划Mapper接口 * @@ -10,5 +17,17 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; */ public interface StudyFormPlanMapper extends BaseMapper { + /** + * 查询列表 + * @param queryWrapper + * @return + */ + List queryList(@Param("ew") Wrapper queryWrapper); + /** + * 查询详情 + * @param id + * @return + */ + StudyFormPlan queryInfo(@Param("id") Long id); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanQmxxMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanQmxxMapper.java new file mode 100644 index 0000000..8eb9b77 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormPlanQmxxMapper.java @@ -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 +{ + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanJcgjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanJcgjService.java new file mode 100644 index 0000000..2e6c390 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanJcgjService.java @@ -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 +{ + + /** + * 轨迹列表 + * @param studyFormPlanJcgj + * @return + */ + public List 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); + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanQmxxService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanQmxxService.java new file mode 100644 index 0000000..907f639 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanQmxxService.java @@ -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 +{ + + /** + * 查询试验-填报单-签名信息列表 + * + * @param studyFormPlanQmxx + * @return 试验-填报单-签名信息集合 + */ + public List 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); +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanService.java index ef91fcc..23101d4 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormPlanService.java @@ -3,6 +3,8 @@ package com.hxhq.business.service; import java.util.List; import com.hxhq.business.domain.StudyFormPlan; import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.dto.study.StudyFormPlanListDto; +import com.hxhq.business.form.study.StudyFormPlanSearchForm; /** * 试验-配置计划Service接口 @@ -13,11 +15,64 @@ import com.baomidou.mybatisplus.extension.service.IService; public interface IStudyFormPlanService extends IService { /** - * 查询试验-配置计划列表 + * 查询试验-填报单列表 * - * @param studyFormPlan 试验-配置计划 - * @return 试验-配置计划集合 + * @param form 试验-填报单 + * @return 试验-填报单集合 */ - public List queryList(StudyFormPlan studyFormPlan); + public List 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); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java index 22993d6..8f10b27 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java @@ -83,10 +83,10 @@ public class StudyFormFillServiceImpl extends ServiceImpl={0}", form.getTjsjks()); + queryWrapper.apply("t.create_time>={0}", form.getCjsjks()); } 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"); return baseMapper.queryList(queryWrapper); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanJcgjServiceImpl.java new file mode 100644 index 0000000..72fefb9 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanJcgjServiceImpl.java @@ -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 implements IStudyFormPlanJcgjService +{ + + + /** + * 查询稽查轨迹列表 + * @param studyFormPlanJcgj + * @return + */ + @Override + public List queryList(StudyFormPlanJcgj studyFormPlanJcgj){ + QueryWrapper 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); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanQmxxServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanQmxxServiceImpl.java new file mode 100644 index 0000000..04aeec5 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanQmxxServiceImpl.java @@ -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 implements IStudyFormPlanQmxxService +{ + /** + * 查询试验-填报单-签名信息列表 + * + * @param studyFormPlanQmxx 试验-填报单-签名信息 + * @return 试验-填报单-签名信息 + */ + @Override + public List queryList(StudyFormPlanQmxx studyFormPlanQmxx) + { + QueryWrapper 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); + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java index 135b9ab..7c377c9 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java @@ -1,11 +1,26 @@ package com.hxhq.business.service.impl; +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.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 com.hxhq.business.mapper.StudyFormPlanMapper; -import com.hxhq.business.domain.StudyFormPlan; import com.hxhq.business.service.IStudyFormPlanService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -18,17 +33,250 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service public class StudyFormPlanServiceImpl extends ServiceImpl implements IStudyFormPlanService { + @Autowired + private IStudyFormPlanJcgjService studyFormPlanJcgjService; + @Autowired + private IStudyFormPlanQmxxService studyFormPlanQmxxService; + /** - * 查询试验-配置计划列表 + * 查询试验-填报单列表 * - * @param studyFormPlan 试验-配置计划 - * @return 试验-配置计划 + * @param form 试验-填报单 + * @return 试验-填报单 */ @Override - public List queryList(StudyFormPlan studyFormPlan) - { + public List queryList(StudyFormPlanSearchForm form) { QueryWrapper 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 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 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 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 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 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 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()); + } -} +} \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanJcgjMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanJcgjMapper.xml new file mode 100644 index 0000000..287ebd3 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanJcgjMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanMapper.xml index f1a2370..e4c422d 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanMapper.xml @@ -3,4 +3,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanQmxxMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanQmxxMapper.xml new file mode 100644 index 0000000..b9fdc11 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanQmxxMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file