diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormFillController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormFillController.java index 2524bc8..328fb86 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormFillController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormFillController.java @@ -305,6 +305,17 @@ public class StudyFormFillController extends BaseController { return AjaxResult.success("操作成功"); } + + /** + * 提交病理学家审核 + */ + @PostMapping("/tjblxjsh") + @RequiresPermissions(value = {"business:studyFormFill:bj", "business:nonTrialFormFill:bj", "business:drugFormFill:bj"}, logical = Logical.OR) + public AjaxResult tjblxjsh(@RequestBody StudyFormFill studyFormFill) { + studyFormFillService.tjblxjsh(studyFormFill); + return AjaxResult.success("操作成功"); + } + /** * 药剂存储过滤 */ @@ -335,6 +346,27 @@ public class StudyFormFillController extends BaseController { return AjaxResult.success("操作成功"); } + /** + * 病理学家审核通过 + */ + @PostMapping("/blxjshtg") + @RequiresPermissions(value = {"business:studyFormFill:blxjsh", "business:nonTrialFormFill:blxjsh", "business:drugFormFill:blxjsh"}, logical = Logical.OR) + public AjaxResult blxjshtg(@RequestBody StudyFormFill studyFormFill) { + studyFormFillService.blxjshtg(studyFormFill); + return AjaxResult.success("操作成功"); + } + + + /** + * 病理学家审核拒绝 + */ + @PostMapping("/blxjshjj") + @RequiresPermissions(value = {"business:studyFormFill:blxjsh", "business:nonTrialFormFill:blxjsh", "business:drugFormFill:blxjsh"}, logical = Logical.OR) + public AjaxResult blxjshjj(@RequestBody StudyFormFill studyFormFill) { + studyFormFillService.blxjshjj(studyFormFill); + return AjaxResult.success("操作成功"); + } + /** * 复核通过 diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java index c25f5f1..48d3c7e 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormFill.java @@ -175,6 +175,18 @@ public class StudyFormFill extends MpBaseEntity @TableField(exist = false) private Integer studyType; + /** 填报显示病理学家审核:1:否;10:是 */ + @TableField(exist = false) + private Integer showBlxjsh; + + public Integer getShowBlxjsh() { + return showBlxjsh; + } + + public void setShowBlxjsh(Integer showBlxjsh) { + this.showBlxjsh = showBlxjsh; + } + public String getSubmittedCodes() { return submittedCodes; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java index 57895f9..a7888ab 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java @@ -55,7 +55,7 @@ public class Template extends MpBaseEntity /** 填报显示药剂存储按钮:1:否;10:显示 */ private Integer showYjcc; - /** 是否需要病例学家审核:1:否;10:是 */ + /** 是否需要病理学家审核:1:否;10:是 */ private Integer showBlxjsh; /** 所属试验类型:1试验,5非试验表单,10麻精药表单 */ diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillListDto.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillListDto.java index 0a3eb5e..cd34da6 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillListDto.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/study/StudyFormFillListDto.java @@ -16,6 +16,8 @@ public class StudyFormFillListDto extends StudyFormFill { /** 填报显示观察按钮:1:否;10:显示 */ private Integer showGc; + + public Integer getShowGc() { return showGc; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormFillBlxjshztEnum.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormFillBlxjshztEnum.java new file mode 100644 index 0000000..c7b9d27 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/study/StudyFormFillBlxjshztEnum.java @@ -0,0 +1,61 @@ +package com.hxhq.business.enums.study; + +/** + * 病例学家审核状态:1:无需审核;3:待审核;5:审核拒绝;7:审核通过 + * @author tanfei + */ +public enum StudyFormFillBlxjshztEnum { + + /** + * 无需审核 + */ + wxsh(1, "无需审核"), + + /** + * 待审核 + */ + dsh(3, "待审核"), + + /** + * 审核拒绝 + */ + shjj(5, "审核拒绝"), + + /** + * 审核通过 + */ + shtg(7, "审核通过"); + + private int value; + private String text; + + StudyFormFillBlxjshztEnum(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 StudyFormFillBlxjshztEnum getEnumByValue(int type) { + for (StudyFormFillBlxjshztEnum bt : values()) { + if (bt.value == type) { + return bt; + } + } + return null; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormFillService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormFillService.java index f87b040..8214636 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormFillService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IStudyFormFillService.java @@ -120,6 +120,13 @@ public interface IStudyFormFillService extends IService public void tj(StudyFormFill studyFormFill); /** + * 提交病理学家审核 + * @param studyFormFill + * @return + */ + public void tjblxjsh(StudyFormFill studyFormFill); + + /** * 药剂存储 * @param studyFormFill * @return @@ -143,6 +150,21 @@ public interface IStudyFormFillService extends IService /** + * 病理学家审核通过 + * @param studyFormFill + * @return + */ + public void blxjshtg(StudyFormFill studyFormFill); + + + /** + * 病理学家审核拒绝 + * @param studyFormFill + */ + public void blxjshjj(StudyFormFill studyFormFill); + + + /** * 复核通过 * @param studyFormFill * @return diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java index e99f0ae..45a4997 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java @@ -16,6 +16,7 @@ import com.hxhq.business.dto.study.StudyFormFillResource; import com.hxhq.business.enums.NormalEnum; import com.hxhq.business.enums.SnTypeEnum; import com.hxhq.business.enums.study.StudyFormFillBdztEnum; +import com.hxhq.business.enums.study.StudyFormFillBlxjshztEnum; import com.hxhq.business.enums.study.StudyFormFillResourceTypeEnum; import com.hxhq.business.enums.study.StudyTypeEnum; import com.hxhq.business.enums.template.ProductEnum; @@ -679,6 +680,43 @@ public class StudyFormFillServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("备注", studyFormFill.getRemark()); + studyFormFillJcgjService.saveJcgj(studyFormFillOld, JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), formData, qmr, null, now); + } else { + studyFormFill.setBlxjshzt(StudyFormFillBlxjshztEnum.dsh.getValue()); + studyFormFill.setUserId(SecurityUtils.getUserId()); + studyFormFill.setUserMc(SecurityUtils.getNickName()); + studyFormFill.setBdbh(getSn(studyFormFill)); + this.save(studyFormFill); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("备注", studyFormFill.getRemark()); + studyFormFillJcgjService.saveJcgj(studyFormFill, JcgjlxEnum.lc.getValue(), "填写并提交记录", JcmcysEnum.green.getValue(), formData, qmr, null, now); + } + //签名信息 + studyFormFillQmxxService.saveQmxx(now,studyFormFill.getId(), "填写并提交记录", qmr, studyFormFill.getRemark()); + + } + /** * 生成检测板 * @@ -758,6 +796,84 @@ public class StudyFormFillServiceImpl extends ServiceImpl formData = new LinkedHashMap<>(); + formData.put("原因", studyFormFill.getRemark()); + studyFormFillJcgjService.saveJcgj(studyFormFillOld, JcgjlxEnum.lc.getValue(), "病理学家审核通过", JcmcysEnum.green.getValue(), formData, SecurityUtils.getLoginUser().getSysUser(), null, now); + //签名信息 + studyFormFillQmxxService.saveQmxx(now,studyFormFillOld.getId(), "病理学家审核通过", qmr, studyFormFill.getRemark()); + //发送通知 + Study study = studyService.getById(studyFormFillOld.getStudyId()); + String url = getUrlQz(study, "tbbd"); + String title = StudyTypeEnum.getEnumByValue(study.getType()).getText() + "【" + study.getName()+"("+study.getSn()+")" + "】"+getSubjectName(studyFormFillOld.getStudySubjectId())+"下填报表单【" + studyFormFillOld.getBdmc() + "】病理学家审核通过"; + noticeService.save(title, studyFormFillOld.getUserId(), url); + } + + + /** + * 病理学家审核拒绝 + * + * @param studyFormFill + */ + @Override + public void blxjshjj(StudyFormFill studyFormFill) { + SysUser qmr = SecurityUtils.getLoginUser().getSysUser(); + //验证签名人密码 + Date now =new Date(); + checkPassword(qmr, studyFormFill.getQmrmm()); + if (studyFormFill.getId() == null || studyFormFill.getId().longValue() < 0) { + throw new ServiceException("参数id不正确"); + } + StudyFormFill studyFormFillOld = this.getById(studyFormFill.getId()); + if (studyFormFillOld == null) { + throw new ServiceException("表单不存在或已删除"); + } + if (!studyFormFillOld.getBlxjshzt().equals(StudyFormFillBlxjshztEnum.dsh.getValue())) { + throw new ServiceException("表单不用病理学家审核"); + } + studyFormFillOld.setBlxjshzt(StudyFormFillBlxjshztEnum.shjj.getValue()); + studyFormFillOld.setBdnr(studyFormFill.getBdnr()); + this.updateById(studyFormFillOld); + //稽查轨迹 + Map formData = new LinkedHashMap<>(); + formData.put("原因", studyFormFill.getRemark()); + studyFormFillJcgjService.saveJcgj(studyFormFillOld, JcgjlxEnum.lc.getValue(), "病理学家审核拒绝", JcmcysEnum.red.getValue(), formData, SecurityUtils.getLoginUser().getSysUser(), null, now); + + //签名信息 + studyFormFillQmxxService.saveQmxx(now,studyFormFillOld.getId(), "病理学家审核拒绝", qmr, studyFormFill.getRemark()); + //发送通知 + Study study = studyService.getById(studyFormFillOld.getStudyId()); + String url = getUrlQz(study, "tbbd"); + String title = StudyTypeEnum.getEnumByValue(study.getType()).getText() + "【" + study.getName()+"("+study.getSn()+")" + "】"+getSubjectName(studyFormFillOld.getStudySubjectId())+"下填报表单【" + studyFormFillOld.getBdmc() + "】病理学家审核拒绝"; + noticeService.save(title, studyFormFillOld.getUserId(), url); + + } + /** * 复核通过 diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml index 94ce359..3d47b05 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormFillMapper.xml @@ -5,7 +5,7 @@ select t.*,tm.name as templateMc,tm.name_en as templateMcEn,tm.sn as templateSn,tm.show_sn as templateShowSn,tm.dept_id as templateDeptId ,ts.sn as studySn,ts.name as studyMc,tm.export_class as templateExportClass,tm.export_method as templateExportMethod,tm.product, - tm.pdf_size as templatePdfSize,tm.show_yjcc as templateShowYjcc,ts.type as studyType + tm.pdf_size as templatePdfSize,tm.show_yjcc as templateShowYjcc,ts.type as studyType,tm.show_blxjsh FROM `t_study_form_fill` t join t_template tm on tm.id=t.template_id join t_study ts on ts.id=t.study_id