From 0b216fa10b345fe8a0ca013e906b0f4e5f38b8ec Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Sun, 4 Jan 2026 14:21:28 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A[=E8=AF=95=E9=AA=8C=E7=AE=A1?= =?UTF-8?q?=E7=90=86][=E7=94=B3=E8=AF=B7=E8=A1=A8=E5=8D=95]=E6=96=B0?= =?UTF-8?q?=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hxhq/business/controller/PublicController.java | 35 ++ .../controller/StudyFormApplyController.java | 193 +++++++++ .../com/hxhq/business/domain/StudyFormApply.java | 239 ++++++++++++ .../hxhq/business/domain/StudyFormApplyJcgj.java | 110 ++++++ .../hxhq/business/domain/StudyFormApplyQmxx.java | 71 ++++ .../business/dto/study/StudyFormApplyListDto.java | 11 + .../enums/study/StudyFormApplyBdztEnum.java | 71 ++++ .../business/form/study/StudyFormApplyGcForm.java | 50 +++ .../form/study/StudyFormApplySearchForm.java | 127 ++++++ .../form/study/StudyFormApplyShfzForm.java | 50 +++ .../business/mapper/StudyFormApplyJcgjMapper.java | 14 + .../hxhq/business/mapper/StudyFormApplyMapper.java | 35 ++ .../business/mapper/StudyFormApplyQmxxMapper.java | 14 + .../service/IStudyFormApplyJcgjService.java | 35 ++ .../service/IStudyFormApplyQmxxService.java | 34 ++ .../business/service/IStudyFormApplyService.java | 107 +++++ .../impl/StudyFormApplyJcgjServiceImpl.java | 72 ++++ .../impl/StudyFormApplyQmxxServiceImpl.java | 62 +++ .../service/impl/StudyFormApplyServiceImpl.java | 434 +++++++++++++++++++++ .../mapper/business/StudyFormApplyJcgjMapper.xml | 6 + .../mapper/business/StudyFormApplyMapper.xml | 23 ++ .../mapper/business/StudyFormApplyQmxxMapper.xml | 6 + 22 files changed, 1799 insertions(+) create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormApplyController.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyJcgj.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyQmxx.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormApplyListDto.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormApplyBdztEnum.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplyGcForm.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplySearchForm.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplyShfzForm.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyJcgjMapper.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyMapper.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyQmxxMapper.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyJcgjService.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyQmxxService.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyService.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyJcgjServiceImpl.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyQmxxServiceImpl.java create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java create mode 100644 hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyJcgjMapper.xml create mode 100644 hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyMapper.xml create mode 100644 hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyQmxxMapper.xml diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java index 563ece6..433d998 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java @@ -1,11 +1,21 @@ package com.hxhq.business.controller; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hxhq.business.domain.Study; +import com.hxhq.business.domain.StudyFormPre; import com.hxhq.business.domain.Template; +import com.hxhq.business.dto.study.StudyListDto; +import com.hxhq.business.enums.study.StudyStatusEnum; +import com.hxhq.business.form.study.StudySearchForm; +import com.hxhq.business.service.IStudyFormPreService; +import com.hxhq.business.service.IStudyService; import com.hxhq.business.service.ITemplateService; import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.core.web.page.TableDataInfo; import com.hxhq.common.security.annotation.RequiresPermissions; +import org.aspectj.weaver.loadtime.Aj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -24,6 +34,10 @@ public class PublicController extends BaseController { @Autowired private ITemplateService templateService; + @Autowired + private IStudyService studyService; + @Autowired + private IStudyFormPreService studyFormPreService; /** * 查询模板列表 @@ -36,4 +50,25 @@ public class PublicController extends BaseController return getDataTable(list); } + /** + * 查询试验列表 + */ + @GetMapping("/studyList") + public AjaxResult studyList() + { + QueryWrapper queryWrapper = Wrappers.query(); + queryWrapper.eq("status", StudyStatusEnum.dgd.getValue()); + return AjaxResult.success(studyService.list(queryWrapper)); + } + + /** + * 查询试验预填表单列表 + */ + @GetMapping("/studyFormPreList") + public AjaxResult studyFormPreList(StudyFormPre studyFormPre) + { + QueryWrapper queryWrapper = Wrappers.query(); + queryWrapper.eq("study_id", studyFormPre.getStudyId()); + return AjaxResult.success(studyFormPreService.list(queryWrapper)); + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormApplyController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormApplyController.java new file mode 100644 index 0000000..11dbeb7 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormApplyController.java @@ -0,0 +1,193 @@ +package com.hxhq.business.controller; + +import java.util.List; + +import com.hxhq.business.domain.StudyFormApplyJcgj; +import com.hxhq.business.domain.StudyFormApplyQmxx; +import com.hxhq.business.dto.study.StudyFormApplyListDto; +import com.hxhq.business.form.study.StudyFormApplyGcForm; +import com.hxhq.business.form.study.StudyFormApplyShfzForm; +import com.hxhq.business.form.study.StudyFormApplySearchForm; +import com.hxhq.business.service.*; +import com.hxhq.common.security.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import com.hxhq.business.domain.StudyFormApply; +import com.hxhq.common.core.web.controller.BaseController; +import com.hxhq.common.core.web.domain.AjaxResult; +import com.hxhq.common.core.web.page.TableDataInfo; + + +/** + * 试验-申请单Controller + * + * @author hxhq + * @date 2025-12-29 + */ +@RestController +@RequestMapping("/business/studyFormApply") +public class StudyFormApplyController extends BaseController { + @Autowired + private IStudyFormApplyService studyFormApplyService; + @Autowired + private IStudyFormApplyJcgjService studyFormApplyJcgjService; + @Autowired + private IStudyFormApplyQmxxService studyFormApplyQmxxService; + + /** + * 列表 + */ + @GetMapping("/list") + public TableDataInfo list(StudyFormApplySearchForm form) { + startPage(); + List list = studyFormApplyService.queryList(form); + return getDataTable(list); + } + + /** + * 稽查轨迹列表 + */ + @GetMapping("/jcgjList") + @RequiresPermissions("business:studyFormApply:xq") + public TableDataInfo jcgjList(StudyFormApplyJcgj form) { + startPage(); + List list = studyFormApplyJcgjService.queryList(form); + return getDataTable(list); + } + + /** + * 签名信息列表 + */ + @GetMapping("/qmxxList") + @RequiresPermissions("business:studyFormApply:xq") + public TableDataInfo qmxxList(StudyFormApplyQmxx form) { + startPage(); + List list = studyFormApplyQmxxService.queryList(form); + return getDataTable(list); + } + + /** + * 详细 + */ + @GetMapping(value = "/info") + @RequiresPermissions("business:studyFormApply:xq") + public AjaxResult getInfo(Long id) { + return AjaxResult.success(studyFormApplyService.queryInfo(id)); + } + + /** + * 加签 + */ + @RequiresPermissions("business:studyFormApply:jq") + @PostMapping("/jq") + public AjaxResult jq(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.jq(studyFormApply); + return AjaxResult.success("操作成功"); + } + + /** + * 废止 + */ + @RequiresPermissions("business:studyFormApply:fz") + @PostMapping("/fz") + public AjaxResult fz(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.fz(studyFormApply); + return AjaxResult.success("操作成功"); + } + + + /** + * 确认废止 + */ + @RequiresPermissions("business:studyFormApply:qrfz") + @PostMapping("/qrfz") + public AjaxResult qrfz(@RequestBody StudyFormApplyShfzForm form) { + studyFormApplyService.qrfz(form); + return AjaxResult.success("操作成功"); + } + + + /** + * 更换归属人 + */ + @RequiresPermissions("business:studyFormApply:ghgsr") + @PostMapping("/ghgsr") + public AjaxResult ghgsr(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.ghgsr(studyFormApply); + return AjaxResult.success("操作成功"); + } + + /** + * 保存 + */ + @RequiresPermissions("business:studyFormApply:bj") + @PostMapping("/bc") + public AjaxResult bc(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.bc(studyFormApply); + return AjaxResult.success("操作成功"); + } + + + /** + * 提交 + */ + @RequiresPermissions("business:studyFormApply:bj") + @PostMapping("/tj") + public AjaxResult tj(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.tj(studyFormApply); + return AjaxResult.success("操作成功"); + } + + + /** + * 观察 + */ + @RequiresPermissions("business:studyFormApply:gc") + @PostMapping("/gc") + public AjaxResult gc(@RequestBody StudyFormApplyGcForm form) { + studyFormApplyService.gc(form); + return AjaxResult.success("操作成功"); + } + + + /** + * 复核通过 + */ + @RequiresPermissions("business:studyFormApply:fh") + @PostMapping("/fhtg") + public AjaxResult fhtg(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.fhtg(studyFormApply); + return AjaxResult.success("操作成功"); + } + + + /** + * 复核拒绝 + */ + @RequiresPermissions("business:studyFormApply:fh") + @PostMapping("/fhjj") + public AjaxResult fhjj(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.fhjj(studyFormApply); + return AjaxResult.success("操作成功"); + } + + /** + * 通过 + */ + @RequiresPermissions("business:studyFormApply:fh") + @PostMapping("/tg") + public AjaxResult tg(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.tg(studyFormApply); + return AjaxResult.success("操作成功"); + } + + /** + * 审阅 + */ + @RequiresPermissions("business:studyFormApply:sy") + @PostMapping("/sy") + public AjaxResult sy(@RequestBody StudyFormApply studyFormApply) { + studyFormApplyService.sy(studyFormApply); + return AjaxResult.success("操作成功"); + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java new file mode 100644 index 0000000..3451273 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApply.java @@ -0,0 +1,239 @@ +package com.hxhq.business.domain; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.baomidou.mybatisplus.annotation.TableName; +import com.hxhq.common.core.domain.MpBaseEntity; + + +/** + * 试验-申请单对象 t_study_form_apply + * + * @author hxhq + * @date 2026-01-04 + */ +@TableName("t_study_form_apply") +public class StudyFormApply extends MpBaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 所属试验id */ + private Long studyId; + + /** 所属试验学科id */ + private Long studySubjectId; + + /** 表单编号 */ + private String bdbh; + + /** 表单名称 */ + private String bdmc; + + /** 表单说明 */ + private String bdsm; + + /** 模板id */ + private Long templateId; + + /** 表单内容 */ + private String bdnr; + + /** 表单归属人id */ + private Long userId; + + /** 表单归属人名称 */ + private String userMc; + + /** 是否补录:1:否;10:是 */ + private Integer sfbl; + + /** 表单状态:1:填报中;3:已提交;5:已完成(经复核);7:已完成;9:待废止;11:已废止 */ + private Integer bdzt; + + /** 提交时间 */ + @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; + + /** 模板所属部门/学科 */ + @TableField(exist = false) + private Long templateDeptId; + + 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 Long getTemplateDeptId() { + return templateDeptId; + } + + public void setTemplateDeptId(Long templateDeptId) { + this.templateDeptId = templateDeptId; + } + + public void setStudyId(Long studyId) + { + this.studyId = studyId; + } + + public Long getStudyId() + { + return studyId; + } + + public void setStudySubjectId(Long studySubjectId) + { + this.studySubjectId = studySubjectId; + } + + public Long getStudySubjectId() + { + return studySubjectId; + } + + public void setBdbh(String bdbh) + { + this.bdbh = bdbh; + } + + public String getBdbh() + { + return bdbh; + } + + public void setBdmc(String bdmc) + { + this.bdmc = bdmc; + } + + public String getBdmc() + { + return bdmc; + } + + public void setBdsm(String bdsm) + { + this.bdsm = bdsm; + } + + public String getBdsm() + { + return bdsm; + } + + public void setTemplateId(Long templateId) + { + this.templateId = templateId; + } + + public Long getTemplateId() + { + return templateId; + } + + public void setBdnr(String bdnr) + { + this.bdnr = bdnr; + } + + public String getBdnr() + { + return bdnr; + } + + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + public void setUserMc(String userMc) + { + this.userMc = userMc; + } + + public String getUserMc() + { + return userMc; + } + + public void setSfbl(Integer sfbl) + { + this.sfbl = sfbl; + } + + public Integer getSfbl() + { + return sfbl; + } + + public void setBdzt(Integer bdzt) + { + this.bdzt = bdzt; + } + + public Integer getBdzt() + { + return bdzt; + } + + public void setTjsj(Date tjsj) + { + this.tjsj = tjsj; + } + + public Date getTjsj() + { + return tjsj; + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyJcgj.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyJcgj.java new file mode 100644 index 0000000..861f829 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyJcgj.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_apply_jcgj + * + * @author hxhq + * @date 2026-01-04 + */ +@TableName("t_study_form_apply_jcgj") +public class StudyFormApplyJcgj 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/StudyFormApplyQmxx.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyQmxx.java new file mode 100644 index 0000000..1366b9b --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormApplyQmxx.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_apply_qmxx + * + * @author hxhq + * @date 2026-01-04 + */ +@TableName("t_study_form_apply_qmxx") +public class StudyFormApplyQmxx 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/StudyFormApplyListDto.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormApplyListDto.java new file mode 100644 index 0000000..13c5370 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormApplyListDto.java @@ -0,0 +1,11 @@ +package com.hxhq.business.dto.study; + + +import com.hxhq.business.domain.StudyFormApply; + +/** + * @author tanfei + */ +public class StudyFormApplyListDto extends StudyFormApply { + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormApplyBdztEnum.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormApplyBdztEnum.java new file mode 100644 index 0000000..1cc062a --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormApplyBdztEnum.java @@ -0,0 +1,71 @@ +package com.hxhq.business.enums.study; + +/** + * 表单状态:1:填报中;3:已提交;5:已完成(经复核);7:已完成;9:待废止;11:已废止 + * @author tanfei + */ +public enum StudyFormApplyBdztEnum { + + /** + * 填报中 + */ + tbz(1, "填报中"), + + /** + * 已提交 + */ + ytj(3, "已提交"), + + /** + * 已完成(经复核) + */ + ywcfh(5, "已完成(经复核)"), + + /** + * 已完成 + */ + ywc(7, "已完成"), + + /** + * 待废止 + */ + dfz(9, "待废止"), + + /** + * 已废止 + */ + yfz(11, "已废止"); + + private int value; + private String text; + + StudyFormApplyBdztEnum(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 StudyFormApplyBdztEnum getEnumByValue(int type) { + for (StudyFormApplyBdztEnum 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/StudyFormApplyGcForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplyGcForm.java new file mode 100644 index 0000000..de5fed8 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplyGcForm.java @@ -0,0 +1,50 @@ +package com.hxhq.business.form.study; + +/** + * @author tanfei + */ +public class StudyFormApplyGcForm { + /** 表单id */ + private Long id; + + /** 生长情况 */ + private String qmyy; + + /** 原因,备注 */ + private String remark; + + /** 签名人密码 */ + private String qmrmm; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getQmyy() { + return qmyy; + } + + public void setQmyy(String qmyy) { + this.qmyy = qmyy; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getQmrmm() { + return qmrmm; + } + + public void setQmrmm(String qmrmm) { + this.qmrmm = qmrmm; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplySearchForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplySearchForm.java new file mode 100644 index 0000000..ed34b04 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplySearchForm.java @@ -0,0 +1,127 @@ +package com.hxhq.business.form.study; + +/** + * @author tanfei + */ +public class StudyFormApplySearchForm { + /** 所属试验id */ + private Long studyId; + + /** 所属试验学科id */ + private Long studySubjectId; + + /** 表单编号 */ + private String bdbh; + + /** 表单名称 */ + private String bdmc; + + /** 表单归属人id */ + private Long userId; + + /** 模板名称 */ + private String templateMc; + + /** 是否补录:1:否;10:是 */ + private Integer sfbl; + + /** 提交时间开始 */ + private String tjsjks; + + /** 提交时间开始 */ + private String tjsjjs; + + /** 创建时间开始 */ + private String cjsjks; + + /** 创建时间开始 */ + private String cjsjjs; + + public Long getStudySubjectId() { + return studySubjectId; + } + + public void setStudySubjectId(Long studySubjectId) { + this.studySubjectId = studySubjectId; + } + + public Long getStudyId() { + return studyId; + } + + public void setStudyId(Long studyId) { + this.studyId = studyId; + } + + public String getBdbh() { + return bdbh; + } + + public void setBdbh(String bdbh) { + this.bdbh = bdbh; + } + + public String getBdmc() { + return bdmc; + } + + public void setBdmc(String bdmc) { + this.bdmc = bdmc; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getTemplateMc() { + return templateMc; + } + + public void setTemplateMc(String templateMc) { + this.templateMc = templateMc; + } + + public Integer getSfbl() { + return sfbl; + } + + public void setSfbl(Integer sfbl) { + this.sfbl = sfbl; + } + + public String getTjsjks() { + return tjsjks; + } + + public void setTjsjks(String tjsjks) { + this.tjsjks = tjsjks; + } + + public String getTjsjjs() { + return tjsjjs; + } + + public void setTjsjjs(String tjsjjs) { + this.tjsjjs = tjsjjs; + } + + public String getCjsjks() { + return cjsjks; + } + + public void setCjsjks(String cjsjks) { + this.cjsjks = cjsjks; + } + + public String getCjsjjs() { + return cjsjjs; + } + + public void setCjsjjs(String cjsjjs) { + this.cjsjjs = cjsjjs; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplyShfzForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplyShfzForm.java new file mode 100644 index 0000000..092e068 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/study/StudyFormApplyShfzForm.java @@ -0,0 +1,50 @@ +package com.hxhq.business.form.study; + +/** + * @author tanfei + */ +public class StudyFormApplyShfzForm { + /** 表单id */ + private Long id; + + /** 签名意义:1:废止拒绝;10:废止通过 */ + private Integer qmyy; + + /** 原因,备注 */ + private String remark; + + /** 签名人密码 */ + private String qmrmm; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getQmyy() { + return qmyy; + } + + public void setQmyy(Integer qmyy) { + this.qmyy = qmyy; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getQmrmm() { + return qmrmm; + } + + public void setQmrmm(String qmrmm) { + this.qmrmm = qmrmm; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyJcgjMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyJcgjMapper.java new file mode 100644 index 0000000..b9154f2 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyJcgjMapper.java @@ -0,0 +1,14 @@ +package com.hxhq.business.mapper; + +import com.hxhq.business.domain.StudyFormApplyJcgj; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +/** + * 试验-申请单-稽查轨迹Mapper接口 + * + * @author hxhq + * @date 2026-01-04 + */ +public interface StudyFormApplyJcgjMapper extends BaseMapper +{ + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyMapper.java new file mode 100644 index 0000000..648f9ad --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyMapper.java @@ -0,0 +1,35 @@ +package com.hxhq.business.mapper; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.hxhq.business.domain.StudyFormApply; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hxhq.business.domain.StudyFormPre; +import com.hxhq.business.dto.mjy.DetailDto; +import com.hxhq.business.dto.study.StudyFormApplyListDto; +import com.hxhq.business.dto.study.StudyFormPreListDto; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 试验-申请单Mapper接口 + * + * @author hxhq + * @date 2025-12-29 + */ +public interface StudyFormApplyMapper extends BaseMapper +{ + /** + * 查询列表 + * @param queryWrapper + * @return + */ + List queryList(@Param("ew") Wrapper queryWrapper); + + /** + * 查询详情 + * @param id + * @return + */ + StudyFormApply queryInfo(@Param("id") Long id); +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyQmxxMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyQmxxMapper.java new file mode 100644 index 0000000..a0a2997 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/StudyFormApplyQmxxMapper.java @@ -0,0 +1,14 @@ +package com.hxhq.business.mapper; + +import com.hxhq.business.domain.StudyFormApplyQmxx; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +/** + * 试验-申请单-签名信息Mapper接口 + * + * @author hxhq + * @date 2026-01-04 + */ +public interface StudyFormApplyQmxxMapper extends BaseMapper +{ + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyJcgjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyJcgjService.java new file mode 100644 index 0000000..57d8dfd --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyJcgjService.java @@ -0,0 +1,35 @@ +package com.hxhq.business.service; + +import java.util.List; +import com.hxhq.business.domain.StudyFormApplyJcgj; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.domain.StudyFormPreJcgj; + +/** + * 试验-申请单-稽查轨迹Service接口 + * + * @author hxhq + * @date 2025-12-31 + */ +public interface IStudyFormApplyJcgjService extends IService +{ + + /** + * 轨迹列表 + * @param studyFormApplyJcgj + * @return + */ + public List queryList(StudyFormApplyJcgj studyFormApplyJcgj); + + /** + * 新增稽查轨迹 + * @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/IStudyFormApplyQmxxService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyQmxxService.java new file mode 100644 index 0000000..a98dd4e --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyQmxxService.java @@ -0,0 +1,34 @@ +package com.hxhq.business.service; + +import java.util.List; +import com.hxhq.business.domain.StudyFormApplyQmxx; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.domain.StudyFormPreQmxx; + +/** + * 试验-申请单-签名信息Service接口 + * + * @author hxhq + * @date 2025-12-31 + */ +public interface IStudyFormApplyQmxxService extends IService +{ + + /** + * 查询试验-填报单-签名信息列表 + * + * @param studyFormApplyQmxx + * @return 试验-填报单-签名信息集合 + */ + public List queryList(StudyFormApplyQmxx studyFormApplyQmxx); + + /** + * 新增签名信息 + * @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/IStudyFormApplyService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyService.java new file mode 100644 index 0000000..550e34e --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormApplyService.java @@ -0,0 +1,107 @@ +package com.hxhq.business.service; + +import java.util.List; +import com.hxhq.business.domain.StudyFormApply; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.dto.mjy.DetailDto; +import com.hxhq.business.dto.study.StudyFormApplyListDto; +import com.hxhq.business.form.study.StudyFormApplyGcForm; +import com.hxhq.business.form.study.StudyFormApplySearchForm; +import com.hxhq.business.form.study.StudyFormApplyShfzForm; + +/** + * 试验-填报单Service接口 + * + * @author hxhq + * @date 2025-12-29 + */ +public interface IStudyFormApplyService extends IService +{ + /** + * 查询试验-填报单列表 + * + * @param form 试验-填报单 + * @return 试验-填报单集合 + */ + public List queryList(StudyFormApplySearchForm form); + + /** + * 详情 + * + * @param id + * @return 详情 + */ + public StudyFormApply queryInfo(Long id); + + /** + * 加签 + * @param studyFormApply + */ + public void jq(StudyFormApply studyFormApply); + + /** + * 废止 + * @param studyFormApply + */ + public void fz(StudyFormApply studyFormApply); + + + /** + * 确认废止 + * @param form + */ + public void qrfz(StudyFormApplyShfzForm form); + + + /** + * 更换归属人 + * @param studyFormApply + */ + public void ghgsr(StudyFormApply studyFormApply); + + /** + * 保存 + * @param studyFormApply + */ + public void bc(StudyFormApply studyFormApply); + + + /** + * 提交 + * @param studyFormApply + */ + public void tj(StudyFormApply studyFormApply); + + + /** + * 观察 + * @param form + */ + public void gc(StudyFormApplyGcForm form); + + + /** + * 复核通过 + * @param studyFormApply + */ + public void fhtg(StudyFormApply studyFormApply); + + + /** + * 复核拒绝 + * @param studyFormApply + */ + public void fhjj(StudyFormApply studyFormApply); + + /** + * 通过 + * @param studyFormApply + */ + public void tg(StudyFormApply studyFormApply); + + /** + * 审阅 + * @param studyFormApply + */ + public void sy(StudyFormApply studyFormApply); +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyJcgjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyJcgjServiceImpl.java new file mode 100644 index 0000000..069d8be --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyJcgjServiceImpl.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.StudyFormPreJcgj; +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.StudyFormApplyJcgjMapper; +import com.hxhq.business.domain.StudyFormApplyJcgj; +import com.hxhq.business.service.IStudyFormApplyJcgjService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * 试验-填报单-稽查轨迹Service业务层处理 + * + * @author hxhq + * @date 2025-12-31 + */ +@Service +public class StudyFormApplyJcgjServiceImpl extends ServiceImpl implements IStudyFormApplyJcgjService +{ + + /** + * 查询稽查轨迹列表 + * @param studyFormApplyJcgj + * @return + */ + @Override + public List queryList(StudyFormApplyJcgj studyFormApplyJcgj){ + QueryWrapper queryWrapper = Wrappers.query(); + if(studyFormApplyJcgj.getFormId()==null||studyFormApplyJcgj.getFormId().longValue()<0){ + throw new ServiceException("表单id不能为空"); + } + queryWrapper.eq("form_id",studyFormApplyJcgj.getFormId()); + if(studyFormApplyJcgj.getJcgjlx()!=null&&studyFormApplyJcgj.getJcgjlx().intValue()>0){ + queryWrapper.eq("jcgjlx",studyFormApplyJcgj.getJcgjlx()); + } + if (StringUtils.isNoneBlank(studyFormApplyJcgj.getJcmc())) { + queryWrapper.and(p -> p.like("`jcmc`", studyFormApplyJcgj.getJcmc()) + .or().like("`jcnr`", studyFormApplyJcgj.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){ + StudyFormApplyJcgj studyFormApplyJcgj = new StudyFormApplyJcgj(); + studyFormApplyJcgj.setFormId(formId); + studyFormApplyJcgj.setJcgjlx(jcgjlx); + studyFormApplyJcgj.setJcmc(jcmc); + studyFormApplyJcgj.setJcmcys(jcmcys); + studyFormApplyJcgj.setJcnr(jcnr); + studyFormApplyJcgj.setQmrId(jcrId); + studyFormApplyJcgj.setQmrMc(jcrMc); + this.save(studyFormApplyJcgj); + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyQmxxServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyQmxxServiceImpl.java new file mode 100644 index 0000000..14a768a --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyQmxxServiceImpl.java @@ -0,0 +1,62 @@ +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.StudyFormPreQmxx; +import com.hxhq.common.core.exception.ServiceException; +import com.hxhq.common.core.utils.DateUtils; +import org.springframework.stereotype.Service; +import com.hxhq.business.mapper.StudyFormApplyQmxxMapper; +import com.hxhq.business.domain.StudyFormApplyQmxx; +import com.hxhq.business.service.IStudyFormApplyQmxxService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * 试验-填报单-签名信息Service业务层处理 + * + * @author hxhq + * @date 2025-12-31 + */ +@Service +public class StudyFormApplyQmxxServiceImpl extends ServiceImpl implements IStudyFormApplyQmxxService +{ + + /** + * 查询试验-填报单-签名信息列表 + * + * @param studyFormApplyQmxx 试验-填报单-签名信息 + * @return 试验-填报单-签名信息 + */ + @Override + public List queryList(StudyFormApplyQmxx studyFormApplyQmxx) + { + QueryWrapper queryWrapper = Wrappers.query(); + if(studyFormApplyQmxx.getFormId()==null||studyFormApplyQmxx.getFormId().longValue()<0){ + throw new ServiceException("表单id不能为空"); + } + queryWrapper.eq("form_id",studyFormApplyQmxx.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){ + StudyFormApplyQmxx studyFormApplyQmxx=new StudyFormApplyQmxx(); + studyFormApplyQmxx.setFormId(formId); + studyFormApplyQmxx.setQmyy(qmyy); + studyFormApplyQmxx.setQmrId(qmrId); + studyFormApplyQmxx.setQmrMc(qmrMc); + studyFormApplyQmxx.setRemark(remark); + this.save(studyFormApplyQmxx); + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java new file mode 100644 index 0000000..37f1746 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java @@ -0,0 +1,434 @@ +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.MjyFfjl; +import com.hxhq.business.domain.StudyFormApply; +import com.hxhq.business.dto.mjy.DetailDto; +import com.hxhq.business.dto.study.StudyFormApplyListDto; +import com.hxhq.business.enums.NormalEnum; +import com.hxhq.business.enums.study.StudyFormApplyBdztEnum; +import com.hxhq.business.enums.study.StudyFormApplyBdztEnum; +import com.hxhq.business.enums.zykgl.JcgjlxEnum; +import com.hxhq.business.enums.zykgl.JcmcysEnum; +import com.hxhq.business.enums.zykgl.JlztEnum; +import com.hxhq.business.form.study.StudyFormApplyGcForm; +import com.hxhq.business.form.study.StudyFormApplySearchForm; +import com.hxhq.business.form.study.StudyFormApplyShfzForm; +import com.hxhq.business.form.study.StudyFormApplySearchForm; +import com.hxhq.business.service.IStudyFormApplyJcgjService; +import com.hxhq.business.service.IStudyFormApplyQmxxService; +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 com.hxhq.system.api.domain.SysUser; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.hxhq.business.mapper.StudyFormApplyMapper; +import com.hxhq.business.domain.StudyFormApply; +import com.hxhq.business.service.IStudyFormApplyService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * 试验-申请单Service业务层处理 + * + * @author hxhq + * @date 2025-12-29 + */ +@Service +public class StudyFormApplyServiceImpl extends ServiceImpl implements IStudyFormApplyService { + + @Autowired + private IStudyFormApplyJcgjService studyFormApplyJcgjService; + @Autowired + private IStudyFormApplyQmxxService studyFormApplyQmxxService; + + /** + * 查询试验-申请单列表 + * + * @param form 试验-申请单 + * @return 试验-申请单 + */ + @Override + public List queryList(StudyFormApplySearchForm form) { + QueryWrapper queryWrapper = Wrappers.query(); + 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 (form.getStudySubjectId() != null && form.getStudySubjectId().longValue() > 0) { + queryWrapper.eq("t.study_subject_id", form.getStudySubjectId()); + } + 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.getTemplateMc())) { + queryWrapper.and(p -> p.like("tm.`name`", form.getTemplateMc())); + } + if (StringUtils.isNoneBlank(form.getTjsjks())) { + queryWrapper.apply("t.tjsj>={0}", form.getTjsjks()); + } + if (StringUtils.isNoneBlank(form.getTjsjjs())) { + queryWrapper.apply("t.tjsj<{0}", form.getTjsjjs()); + } + 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 StudyFormApply queryInfo(Long id) { + if (id == null || id.longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + return baseMapper.queryInfo(id); + } + + /** + * 加签 ok + * + * @param studyFormApply + */ + @Override + public void jq(StudyFormApply studyFormApply) { + //验证签名人密码 todo + if (studyFormApply.getId() == null || studyFormApply.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(studyFormApply.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.tbz.getValue())) { + throw new ServiceException("表单不是申请状态,不能加签"); + } + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("备注", studyFormApply.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), studyFormApply.getQmyy(), JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),studyFormApply.getQmyy(),SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + + } + + /** + * 废止 + * + * @param studyFormApply + */ + @Override + public void fz(StudyFormApply studyFormApply) { + //验证签名人密码 todo + if (studyFormApply.getId() == null || studyFormApply.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(studyFormApply.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.tbz.getValue())) { + throw new ServiceException("表单不是申请状态,不能废止"); + } + studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.dfz.getValue()); + this.updateById(studyFormApplyOld); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("备注", studyFormApply.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "申请废止", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"申请废止",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + + } + + + /** + * 审核废止 + * + * @param form + */ + @Override + public void qrfz(StudyFormApplyShfzForm form) { + //验证签名人密码 todo 是否验证是不是sd? + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(form.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.dfz.getValue())) { + throw new ServiceException("表单不是申请状态,不能废止"); + } + if (form.getQmyy().equals(NormalEnum.yes.getValue())) { + studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.yfz.getValue()); + this.updateById(studyFormApplyOld); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("原因", form.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "废止通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"废止通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),form.getRemark()); + + } else { + studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); + this.updateById(studyFormApplyOld); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("原因", form.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "废止拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"废止拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),form.getRemark()); + + } + + } + + + /** + * 更换归属人 + * + * @param studyFormApply + */ + @Override + public void ghgsr(StudyFormApply studyFormApply) { + //验证签名人密码 todo + if (studyFormApply.getId() == null || studyFormApply.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(studyFormApply.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.dfz.getValue()) || studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.yfz.getValue())) { + throw new ServiceException("表单已废止或待废止,不能更换归属人"); + } + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("新归属人",studyFormApply.getRemark()); + formData.put("原归属人",studyFormApplyOld.getRemark()); + formData.put("原因",studyFormApply.getRemark()); + + //是否验证新的归属人,是否属于该实验? todo + studyFormApplyOld.setUserId(studyFormApply.getUserId()); + studyFormApplyOld.setUserMc(studyFormApply.getUserMc()); + this.updateById(studyFormApplyOld); + + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"更换归属人",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + + } + + /** + * 保存 + * + * @param studyFormApply + */ + @Override + public void bc(StudyFormApply studyFormApply) { + if(studyFormApply.getId()!=null){ + StudyFormApply studyFormApplyOld=this.getById(studyFormApply.getId()); + if(studyFormApplyOld==null){ + throw new ServiceException("信息不存在或已删除"); + } + if(!SecurityUtils.getUserId().equals(studyFormApplyOld.getUserId())){ + throw new ServiceException("只能操作自己的表单"); + } + studyFormApplyOld.setBdmc(studyFormApply.getBdmc()); + studyFormApplyOld.setTemplateId(studyFormApply.getTemplateId()); + studyFormApplyOld.setBdnr(studyFormApply.getBdnr()); + studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); + this.updateById(studyFormApplyOld); + }else{ + studyFormApply.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); + studyFormApply.setUserId(SecurityUtils.getUserId()); + studyFormApply.setUserMc(SecurityUtils.getNickName()); + this.save(studyFormApply); + } + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("备注",studyFormApply.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApply.getId(), JcgjlxEnum.bj.getValue(), "填写并保存", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApply.getId(),"填写并保存",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + + } + + + /** + * 提交 + * + * @param studyFormApply + */ + @Override + public void tj(StudyFormApply studyFormApply) { + //todo + } + + + /** + * 观察 + * + * @param form + */ + @Override + public void gc(StudyFormApplyGcForm form) { + //验证签名人密码 todo + if (form.getId() == null || form.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(form.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.tbz.getValue())) { + throw new ServiceException("表单不是申请状态,不能观察"); + } + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("生长情况",form.getQmyy()); + formData.put("备注",form.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), form.getQmyy(), JcmcysEnum.orange.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),form.getQmyy(),SecurityUtils.getUserId(),SecurityUtils.getNickName(),form.getRemark()); + + } + + + /** + * 复核通过 + * + * @param studyFormApply + */ + @Override + public void fhtg(StudyFormApply studyFormApply) { + //验证签名人密码 todo + if (studyFormApply.getId() == null || studyFormApply.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(studyFormApply.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ytj.getValue()) ) { + throw new ServiceException("表单不是已提交状态,不能复核"); + } + studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.ywcfh.getValue()); + this.updateById(studyFormApplyOld); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("备注",studyFormApply.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + } + + + /** + * 复核拒绝 + * + * @param studyFormApply + */ + @Override + public void fhjj(StudyFormApply studyFormApply) { + //验证签名人密码 todo + if (studyFormApply.getId() == null || studyFormApply.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(studyFormApply.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ytj.getValue()) ) { + throw new ServiceException("表单不是已提交状态,不能复核"); + } + studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue()); + this.updateById(studyFormApplyOld); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("原因",studyFormApply.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"复核拒绝",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + + } + + /** + * 通过 + * + * @param studyFormApply + */ + @Override + public void tg(StudyFormApply studyFormApply) { + //验证签名人密码 todo + if (studyFormApply.getId() == null || studyFormApply.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(studyFormApply.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ytj.getValue()) ) { + throw new ServiceException("表单不是已提交状态,不能复核"); + } + studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.ywc.getValue()); + this.updateById(studyFormApplyOld); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("原因",studyFormApply.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "免复核通过", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"免复核通过",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + + } + + /** + * 审阅 + * + * @param studyFormApply + */ + @Override + public void sy(StudyFormApply studyFormApply) { + //验证签名人密码 todo + if (studyFormApply.getId() == null || studyFormApply.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormApply studyFormApplyOld = this.getById(studyFormApply.getId()); + if (studyFormApplyOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!(studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ywcfh.getValue())||studyFormApplyOld.getBdzt().equals(StudyFormApplyBdztEnum.ywc.getValue())) ) { + throw new ServiceException("表单不是已完成状态,不能审阅"); + } + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("备注",studyFormApply.getRemark()); + studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "已审阅", JcmcysEnum.green.getValue(), JctUtil.formatStr(formData), SecurityUtils.getUserId(), SecurityUtils.getNickName()); + //签名信息 + studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(),"已审阅",SecurityUtils.getUserId(),SecurityUtils.getNickName(),studyFormApply.getRemark()); + + } + +} diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyJcgjMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyJcgjMapper.xml new file mode 100644 index 0000000..52a7bfd --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyJcgjMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyMapper.xml new file mode 100644 index 0000000..8859a7d --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyMapper.xml @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyQmxxMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyQmxxMapper.xml new file mode 100644 index 0000000..bf2237a --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormApplyQmxxMapper.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file