| @ -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<StudyFormApplyListDto> list = studyFormApplyService.queryList(form); | |||
| return getDataTable(list); | |||
| } | |||
| /** | |||
| * 稽查轨迹列表 | |||
| */ | |||
| @GetMapping("/jcgjList") | |||
| @RequiresPermissions("business:studyFormApply:xq") | |||
| public TableDataInfo jcgjList(StudyFormApplyJcgj form) { | |||
| startPage(); | |||
| List<StudyFormApplyJcgj> list = studyFormApplyJcgjService.queryList(form); | |||
| return getDataTable(list); | |||
| } | |||
| /** | |||
| * 签名信息列表 | |||
| */ | |||
| @GetMapping("/qmxxList") | |||
| @RequiresPermissions("business:studyFormApply:xq") | |||
| public TableDataInfo qmxxList(StudyFormApplyQmxx form) { | |||
| startPage(); | |||
| List<StudyFormApplyQmxx> 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("操作成功"); | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -0,0 +1,11 @@ | |||
| package com.hxhq.business.dto.study; | |||
| import com.hxhq.business.domain.StudyFormApply; | |||
| /** | |||
| * @author tanfei | |||
| */ | |||
| public class StudyFormApplyListDto extends StudyFormApply { | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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; | |||
| } | |||
| } | |||
| @ -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<StudyFormApplyJcgj> | |||
| { | |||
| } | |||
| @ -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<StudyFormApply> | |||
| { | |||
| /** | |||
| * 查询列表 | |||
| * @param queryWrapper | |||
| * @return | |||
| */ | |||
| List<StudyFormApplyListDto> queryList(@Param("ew") Wrapper<StudyFormApply> queryWrapper); | |||
| /** | |||
| * 查询详情 | |||
| * @param id | |||
| * @return | |||
| */ | |||
| StudyFormApply queryInfo(@Param("id") Long id); | |||
| } | |||
| @ -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<StudyFormApplyQmxx> | |||
| { | |||
| } | |||
| @ -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<StudyFormApplyJcgj> | |||
| { | |||
| /** | |||
| * 轨迹列表 | |||
| * @param studyFormApplyJcgj | |||
| * @return | |||
| */ | |||
| public List<StudyFormApplyJcgj> 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); | |||
| } | |||
| @ -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<StudyFormApplyQmxx> | |||
| { | |||
| /** | |||
| * 查询试验-填报单-签名信息列表 | |||
| * | |||
| * @param studyFormApplyQmxx | |||
| * @return 试验-填报单-签名信息集合 | |||
| */ | |||
| public List<StudyFormApplyQmxx> 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); | |||
| } | |||
| @ -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<StudyFormApply> | |||
| { | |||
| /** | |||
| * 查询试验-填报单列表 | |||
| * | |||
| * @param form 试验-填报单 | |||
| * @return 试验-填报单集合 | |||
| */ | |||
| public List<StudyFormApplyListDto> 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); | |||
| } | |||
| @ -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<StudyFormApplyJcgjMapper, StudyFormApplyJcgj> implements IStudyFormApplyJcgjService | |||
| { | |||
| /** | |||
| * 查询稽查轨迹列表 | |||
| * @param studyFormApplyJcgj | |||
| * @return | |||
| */ | |||
| @Override | |||
| public List<StudyFormApplyJcgj> queryList(StudyFormApplyJcgj studyFormApplyJcgj){ | |||
| QueryWrapper<StudyFormApplyJcgj> 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); | |||
| } | |||
| } | |||
| @ -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<StudyFormApplyQmxxMapper, StudyFormApplyQmxx> implements IStudyFormApplyQmxxService | |||
| { | |||
| /** | |||
| * 查询试验-填报单-签名信息列表 | |||
| * | |||
| * @param studyFormApplyQmxx 试验-填报单-签名信息 | |||
| * @return 试验-填报单-签名信息 | |||
| */ | |||
| @Override | |||
| public List<StudyFormApplyQmxx> queryList(StudyFormApplyQmxx studyFormApplyQmxx) | |||
| { | |||
| QueryWrapper<StudyFormApplyQmxx> 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); | |||
| } | |||
| } | |||
| @ -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<StudyFormApplyMapper, StudyFormApply> implements IStudyFormApplyService { | |||
| @Autowired | |||
| private IStudyFormApplyJcgjService studyFormApplyJcgjService; | |||
| @Autowired | |||
| private IStudyFormApplyQmxxService studyFormApplyQmxxService; | |||
| /** | |||
| * 查询试验-申请单列表 | |||
| * | |||
| * @param form 试验-申请单 | |||
| * @return 试验-申请单 | |||
| */ | |||
| @Override | |||
| public List<StudyFormApplyListDto> queryList(StudyFormApplySearchForm form) { | |||
| QueryWrapper<StudyFormApply> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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<String, String> 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()); | |||
| } | |||
| } | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.hxhq.business.mapper.StudyFormApplyJcgjMapper"> | |||
| </mapper> | |||
| @ -0,0 +1,23 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.hxhq.business.mapper.StudyFormApplyMapper"> | |||
| <select id="queryList" resultType="com.hxhq.business.dto.study.StudyFormApplyListDto"> | |||
| select t.id,t.bdbh,t.bdmc,t.create_time,t.user_mc,t.bdzt,t.bdzt,t.tjsj,tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId | |||
| FROM `t_study_form_apply` t | |||
| left join t_template tm on tm.id=t.template_id | |||
| <if test="ew.sqlSegment != '' and ew.sqlSegment != null"> | |||
| <where> | |||
| ${ew.sqlSegment} | |||
| </where> | |||
| </if> | |||
| </select> | |||
| <select id="queryInfo" resultType="com.hxhq.business.domain.StudyFormApply"> | |||
| select t.*,tm.name as templateMc,tm.sn as templateSn,tm.dept_id as templateDeptId | |||
| FROM `t_study_form_apply` t | |||
| left join t_template tm on tm.id=t.template_id | |||
| where t.id=#{id} | |||
| </select> | |||
| </mapper> | |||
| @ -0,0 +1,6 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
| <!DOCTYPE mapper | |||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
| <mapper namespace="com.hxhq.business.mapper.StudyFormApplyQmxxMapper"> | |||
| </mapper> | |||