Browse Source

feat:[试验管理][非实验]表单通知

master
15881625488@163.com 2 months ago
parent
commit
b4855d42c6
4 changed files with 185 additions and 21 deletions
  1. +55
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java
  2. +49
    -5
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormFillServiceImpl.java
  3. +34
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPlanServiceImpl.java
  4. +47
    -11
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java

+ 55
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormApplyServiceImpl.java View File

@ -10,6 +10,7 @@ import com.hxhq.business.dto.study.StudyFormApplyListDto;
import com.hxhq.business.enums.NormalEnum;
import com.hxhq.business.enums.SnTypeEnum;
import com.hxhq.business.enums.study.StudyFormApplyBdztEnum;
import com.hxhq.business.enums.study.StudyTypeEnum;
import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum;
import com.hxhq.business.form.study.*;
@ -54,6 +55,8 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
private IStudyService studyService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private INoticeService noticeService;
/**
* 查询试验-申请单列表
@ -200,6 +203,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "废止通过", JcmcysEnum.green.getValue(), null, qmr, form.getRemark(), null);
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "废止通过", qmr, form.getRemark());
//发送通知
Study study = studyService.getById(studyFormApplyOld.getStudyId());
String url = getUrlQz(study,"sqbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下领取申请单【"+studyFormApplyOld.getBdmc()+"】废止拒绝";
noticeService.save(title,studyFormApplyOld.getUserId(),url);
} else {
studyFormApplyOld.setBdzt(StudyFormApplyBdztEnum.tbz.getValue());
this.updateById(studyFormApplyOld);
@ -207,6 +215,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "废止拒绝", JcmcysEnum.red.getValue(), null, qmr, form.getRemark(), null);
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "废止拒绝", qmr, form.getRemark());
//发送通知
Study study = studyService.getById(studyFormApplyOld.getStudyId());
String url = getUrlQz(study,"sqbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下领取申请单【"+studyFormApplyOld.getBdmc()+"】废止拒绝";
noticeService.save(title,studyFormApplyOld.getUserId(),url);
}
@ -246,7 +259,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.getValue(), formData, qmr, null, null);
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "更换归属人", qmr, studyFormApply.getRemark());
//发送通知
Study study = studyService.getById(studyFormApplyOld.getStudyId());
String url = getUrlQz(study,"sqbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下领取申请单【"+studyFormApplyOld.getBdmc()+"】已更换您为归属人";
noticeService.save(title,studyFormApplyOld.getUserId(),url);
}
/**
@ -388,6 +405,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), null, qmr, studyFormApply.getRemark(), null);
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "复核通过", qmr, studyFormApply.getRemark());
//发送通知
Study study = studyService.getById(studyFormApplyOld.getStudyId());
String url = getUrlQz(study,"sqbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下领取申请单【"+studyFormApplyOld.getBdmc()+"】复核通过";
noticeService.save(title,studyFormApplyOld.getUserId(),url);
}
@ -419,7 +441,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), formData, qmr, null, null);
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "复核拒绝", qmr, studyFormApply.getRemark());
//发送通知
Study study = studyService.getById(studyFormApplyOld.getStudyId());
String url = getUrlQz(study,"sqbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下领取申请单【"+studyFormApplyOld.getBdmc()+"】复核拒绝";
noticeService.save(title,studyFormApplyOld.getUserId(),url);
}
/**
@ -450,7 +476,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "已审阅", JcmcysEnum.green.getValue(), null, qmr, studyFormApply.getRemark(), null);
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "已审阅", qmr, studyFormApply.getRemark());
//发送通知
Study study = studyService.getById(studyFormApplyOld.getStudyId());
String url = getUrlQz(study,"sqbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下领取申请单【"+studyFormApplyOld.getBdmc()+"】已审阅";
noticeService.save(title,studyFormApplyOld.getUserId(),url);
}
@ -480,6 +510,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "审核通过", JcmcysEnum.green.getValue(), null, qmr, studyFormApply.getRemark(), null);
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "审核通过", qmr, studyFormApply.getRemark());
//发送通知
Study study = studyService.getById(studyFormApplyOld.getStudyId());
String url = getUrlQz(study,"sqbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下领取申请单【"+studyFormApplyOld.getBdmc()+"】审核通过";
noticeService.save(title,studyFormApplyOld.getUserId(),url);
}
@ -511,6 +546,11 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
studyFormApplyJcgjService.saveJcgj(studyFormApplyOld.getId(), JcgjlxEnum.lc.getValue(), "审核拒绝", JcmcysEnum.red.getValue(), formData, qmr, studyFormApply.getRemark(), null);
//签名信息
studyFormApplyQmxxService.saveQmxx(studyFormApplyOld.getId(), "审核拒绝", qmr, studyFormApply.getRemark());
//发送通知
Study study = studyService.getById(studyFormApplyOld.getStudyId());
String url = getUrlQz(study,"sqbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下领取申请单【"+studyFormApplyOld.getBdmc()+"】审核拒绝";
noticeService.save(title,studyFormApplyOld.getUserId(),url);
}
@ -664,4 +704,16 @@ public class StudyFormApplyServiceImpl extends ServiceImpl
// MB+表单名缩写(底层模板名称)+版本号+试验编号+学科缩写+流水号
return "MB" + template.getShowSn() + study.getSn() + dep.getAbbr() + snGenService.getNewSn(SnTypeEnum.ybbd.getValue());
}
/**
* 获取通知的跳转url
* @param study
* @param tab
* @return
*/
private String getUrlQz(Study study,String tab){
return study.getType().equals(StudyTypeEnum.sy.getValue())?("/study/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.fsy.getValue())?("/nonTrial/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.mjy.getValue())?("/drug/enter/"+study.getId()+"/"+tab):"";
}
}

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

@ -10,6 +10,7 @@ import com.hxhq.business.dto.study.StudyFormFillListDto;
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.StudyTypeEnum;
import com.hxhq.business.enums.template.ProductEnum;
import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum;
@ -57,6 +58,8 @@ public class StudyFormFillServiceImpl extends ServiceImpl
private IStudyService studyService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private INoticeService noticeService;
/**
* 查询试验-填报单列表
@ -206,7 +209,11 @@ public class StudyFormFillServiceImpl extends ServiceImpl
studyFormFillJcgjService.saveJcgj(studyFormFillOld.getId(), JcgjlxEnum.lc.getValue(), "废止通过", JcmcysEnum.green.getValue(), formData, SecurityUtils.getLoginUser().getSysUser(), null, null);
//签名信息
studyFormFillQmxxService.saveQmxx(studyFormFillOld.getId(), "废止通过", qmr, form.getRemark());
//发送通知
Study study = studyService.getById(studyFormFillOld.getStudyId());
String url = getUrlQz(study,"tbbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下填报表单【"+studyFormFillOld.getBdmc()+"】废止通过";
noticeService.save(title,studyFormFillOld.getUserId(),url);
} else {
studyFormFillOld.setBdzt(StudyFormFillBdztEnum.tbz.getValue());
this.updateById(studyFormFillOld);
@ -216,7 +223,11 @@ public class StudyFormFillServiceImpl extends ServiceImpl
studyFormFillJcgjService.saveJcgj(studyFormFillOld.getId(), JcgjlxEnum.lc.getValue(), "废止拒绝", JcmcysEnum.red.getValue(), formData, SecurityUtils.getLoginUser().getSysUser(), null, null);
//签名信息
studyFormFillQmxxService.saveQmxx(studyFormFillOld.getId(), "废止拒绝", qmr, form.getRemark());
//发送通知
Study study = studyService.getById(studyFormFillOld.getStudyId());
String url = getUrlQz(study,"tbbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下填报表单【"+studyFormFillOld.getBdmc()+"】废止拒绝";
noticeService.save(title,studyFormFillOld.getUserId(),url);
}
}
@ -255,7 +266,11 @@ public class StudyFormFillServiceImpl extends ServiceImpl
studyFormFillJcgjService.saveJcgj(studyFormFillOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.getValue(), null, SecurityUtils.getLoginUser().getSysUser(), null, null);
//签名信息
studyFormFillQmxxService.saveQmxx(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()+"】下填报表单【"+studyFormFillOld.getBdmc()+"】已更换您为归属人";
noticeService.save(title,studyFormFillOld.getUserId(),url);
}
/**
@ -486,6 +501,11 @@ public class StudyFormFillServiceImpl extends ServiceImpl
studyFormFillJcgjService.saveJcgj(studyFormFillOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), null, SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getRemark(), null);
//签名信息
studyFormFillQmxxService.saveQmxx(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()+"】下填报表单【"+studyFormFillOld.getBdmc()+"】复核通过";
noticeService.save(title,studyFormFillOld.getUserId(),url);
}
@ -519,6 +539,11 @@ public class StudyFormFillServiceImpl extends ServiceImpl
//签名信息
studyFormFillQmxxService.saveQmxx(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()+"】下填报表单【"+studyFormFillOld.getBdmc()+"】复核拒绝";
noticeService.save(title,studyFormFillOld.getUserId(),url);
}
@ -552,7 +577,11 @@ public class StudyFormFillServiceImpl extends ServiceImpl
//签名信息
studyFormFillQmxxService.saveQmxx(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()+"】下填报表单【"+studyFormFillOld.getBdmc()+"】免复核通过";
noticeService.save(title,studyFormFillOld.getUserId(),url);
}
/**
@ -581,7 +610,11 @@ public class StudyFormFillServiceImpl extends ServiceImpl
studyFormFillJcgjService.saveJcgj(studyFormFillOld.getId(), JcgjlxEnum.lc.getValue(), "已审阅", JcmcysEnum.green.getValue(), null, SecurityUtils.getLoginUser().getSysUser(), studyFormFill.getRemark(), null);
//签名信息
studyFormFillQmxxService.saveQmxx(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()+"】下填报表单【"+studyFormFillOld.getBdmc()+"】已审阅";
noticeService.save(title,studyFormFillOld.getUserId(),url);
}
/**
@ -716,4 +749,15 @@ public class StudyFormFillServiceImpl extends ServiceImpl
return "MB"+template.getShowSn()+study.getSn()+dep.getAbbr()+snGenService.getNewSn(SnTypeEnum.ybbd.getValue())+snGenService.getNewSn(SnTypeEnum.ybbd.getValue());
}
/**
* 获取通知的跳转url
* @param study
* @param tab
* @return
*/
private String getUrlQz(Study study,String tab){
return study.getType().equals(StudyTypeEnum.sy.getValue())?("/study/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.fsy.getValue())?("/nonTrial/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.mjy.getValue())?("/drug/enter/"+study.getId()+"/"+tab):"";
}
}

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

@ -10,6 +10,7 @@ import com.hxhq.business.domain.StudyFormPlan;
import com.hxhq.business.dto.study.StudyFormPlanListDto;
import com.hxhq.business.enums.SnTypeEnum;
import com.hxhq.business.enums.study.StudyFormPlanBdztEnum;
import com.hxhq.business.enums.study.StudyTypeEnum;
import com.hxhq.business.enums.zykgl.JcgjlxEnum;
import com.hxhq.business.enums.zykgl.JcmcysEnum;
import com.hxhq.business.form.study.StudyFormPlanSearchForm;
@ -52,6 +53,8 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
private IStudyService studyService;
@Autowired
private ISysDeptService sysDeptService;
@Autowired
private INoticeService noticeService;
/**
* 查询试验-填报单列表
@ -131,6 +134,11 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "更换归属人", JcmcysEnum.orange.getValue(), formData, qmr, null, null);
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(), "更换归属人", qmr, studyFormPlan.getRemark());
//发送通知
Study study = studyService.getById(studyFormPlanOld.getStudyId());
String url = getUrlQz(study,"syxx");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下配置计划表【"+studyFormPlanOld.getBdmc()+"】已更换您为归属人";
noticeService.save(title,studyFormPlanOld.getUserId(),url);
}
@ -276,6 +284,11 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "复核通过", JcmcysEnum.green.getValue(), null, qmr, studyFormPlan.getRemark(), null);
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(), "复核通过", qmr, studyFormPlan.getRemark());
//发送通知
Study study = studyService.getById(studyFormPlanOld.getStudyId());
String url = getUrlQz(study,"syxx");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下配置计划表【"+studyFormPlanOld.getBdmc()+"】复核通过";
noticeService.save(title,studyFormPlanOld.getUserId(),url);
}
@ -307,7 +320,11 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "复核拒绝", JcmcysEnum.red.getValue(), formData, qmr, null, null);
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(), "复核拒绝", qmr, studyFormPlan.getRemark());
//发送通知
Study study = studyService.getById(studyFormPlanOld.getStudyId());
String url = getUrlQz(study,"syxx");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下配置计划表【"+studyFormPlanOld.getBdmc()+"】复核拒绝";
noticeService.save(title,studyFormPlanOld.getUserId(),url);
}
@ -337,7 +354,11 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
studyFormPlanJcgjService.saveJcgj(studyFormPlanOld.getId(), JcgjlxEnum.lc.getValue(), "已审阅", JcmcysEnum.green.getValue(), null, qmr, studyFormPlan.getRemark(), null);
//签名信息
studyFormPlanQmxxService.saveQmxx(studyFormPlanOld.getId(), "已审阅", qmr, studyFormPlan.getRemark());
//发送通知
Study study = studyService.getById(studyFormPlanOld.getStudyId());
String url = getUrlQz(study,"syxx");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下配置计划表【"+studyFormPlanOld.getBdmc()+"】已审阅";
noticeService.save(title,studyFormPlanOld.getUserId(),url);
}
@ -474,4 +495,15 @@ public class StudyFormPlanServiceImpl extends ServiceImpl
return "MB"+template.getShowSn()+study.getSn()+dep.getAbbr()+snGenService.getNewSn(SnTypeEnum.ybbd.getValue());
}
/**
* 获取通知的跳转url
* @param study
* @param tab
* @return
*/
private String getUrlQz(Study study,String tab){
return study.getType().equals(StudyTypeEnum.sy.getValue())?("/study/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.fsy.getValue())?("/nonTrial/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.mjy.getValue())?("/drug/enter/"+study.getId()+"/"+tab):"";
}
}

+ 47
- 11
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/StudyFormPreServiceImpl.java View File

@ -235,20 +235,10 @@ public class StudyFormPreServiceImpl extends ServiceImpl
//发送通知
Study study = studyService.getById(studyFormPre.getStudyId());
String url = getUrlQz(study,"ytbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下有预填表单【"+studyFormPre.getTemplateMc()+"】待审核,请及时处理";
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下有预填表单【"+studyFormPre.getBdmc()+"】待审核,请及时处理";
noticeService.save(title,studyFormPre.getShryId(),url);
}
/**
* 获取通知的跳转url
* @param study
* @param tab
* @return
*/
private String getUrlQz(Study study,String tab){
return
study.getType().equals(StudyTypeEnum.sy.getValue())?("/study/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.fsy.getValue())?("/nonTrial/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.mjy.getValue())?("/drug/enter/"+study.getId()+"/"+tab):"";
}
/**
* 通过
@ -272,14 +262,29 @@ public class StudyFormPreServiceImpl extends ServiceImpl
if (studyFormPreOld.getFzrshzt().equals(StudyFormPreFzrshztEnum.shz.getValue())) {
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue());
studyFormPreOld.setFzrshzt(StudyFormPreFzrshztEnum.ysh.getValue());
//发送通知
Study study = studyService.getById(studyFormPreOld.getStudyId());
String url = getUrlQz(study,"ytbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下预填表单【"+studyFormPreOld.getBdmc()+"】已审核通过";
noticeService.save(title,studyFormPreOld.getUserId(),url);
} else {
//权限审核
String yes = "是";
if (studyFormPreOld.getFzrsh().equals(yes)) {
//是否需要负责人审核
studyFormPreOld.setFzrshzt(StudyFormPreFzrshztEnum.shz.getValue());
//发送通知
Study study = studyService.getById(studyFormPreOld.getStudyId());
String url = getUrlQz(study,"ytbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下有预填表单【"+studyFormPreOld.getBdmc()+"】待审核,请及时处理";
noticeService.save(title,study.getLeader(),url);
} else {
studyFormPreOld.setBdzt(StudyFormPreBdztEnum.ytg.getValue());
//发送通知
Study study = studyService.getById(studyFormPreOld.getStudyId());
String url = getUrlQz(study,"ytbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下预填表单【"+studyFormPreOld.getBdmc()+"】已审核通过";
noticeService.save(title,studyFormPreOld.getUserId(),url);
}
}
studyFormPreOld.setSjshryId(qmr.getUserId());
@ -317,6 +322,11 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "审核拒绝", JcmcysEnum.red.getValue(), formData, qmr, null, null);
//签名信息
studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(), "审核拒绝", qmr, form.getRemark());
//发送通知
Study study = studyService.getById(studyFormPreOld.getStudyId());
String url = getUrlQz(study,"ytbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下预填表单【"+studyFormPreOld.getBdmc()+"】审核未通过";
noticeService.save(title,studyFormPreOld.getUserId(),url);
}
/**
@ -389,6 +399,11 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "申请关闭", JcmcysEnum.green.getValue(), formData, qmr, null, null);
//签名信息
studyFormFillQmxxService.saveQmxx(studyFormPreOld.getId(), "申请关闭", qmr, studyFormPre.getRemark());
//发送通知
Study study = studyService.getById(studyFormPreOld.getStudyId());
String url = getUrlQz(study,"ytbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下预填表单【"+studyFormPreOld.getBdmc()+"】申请关闭";
noticeService.save(title,studyFormPreOld.getSjshryId(),url);
}
@ -420,6 +435,11 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "关闭拒绝", JcmcysEnum.red.getValue(), formData, qmr, null, null);
//签名信息
studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(), "关闭拒绝", qmr, form.getRemark());
//发送通知
Study study = studyService.getById(studyFormPreOld.getStudyId());
String url = getUrlQz(study,"ytbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下预填表单【"+studyFormPreOld.getBdmc()+"】关闭拒绝";
noticeService.save(title,studyFormPreOld.getUserId(),url);
}
/**
@ -450,6 +470,11 @@ public class StudyFormPreServiceImpl extends ServiceImpl
studyFormPreJcgjService.saveJcgj(studyFormPreOld.getId(), JcgjlxEnum.lc.getValue(), "关闭同意", JcmcysEnum.green.getValue(), formData, qmr, null, null);
//签名信息
studyFormPreQmxxService.saveQmxx(studyFormPreOld.getId(), "关闭同意", qmr, form.getRemark());
//发送通知
Study study = studyService.getById(studyFormPreOld.getStudyId());
String url = getUrlQz(study,"ytbd");
String title = StudyTypeEnum.getEnumByValue(study.getType()).getText()+"【"+study.getName()+"】下预填表单【"+studyFormPreOld.getBdmc()+"】关闭同意";
noticeService.save(title,studyFormPreOld.getUserId(),url);
}
/**
@ -584,4 +609,15 @@ public class StudyFormPreServiceImpl extends ServiceImpl
// MB+表单名缩写(底层模板名称)+版本号+试验编号+学科缩写+流水号
return "MB"+template.getShowSn()+study.getSn()+dep.getAbbr()+snGenService.getNewSn(SnTypeEnum.ybbd.getValue());
}
/**
* 获取通知的跳转url
* @param study
* @param tab
* @return
*/
private String getUrlQz(Study study,String tab){
return
study.getType().equals(StudyTypeEnum.sy.getValue())?("/study/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.fsy.getValue())?("/nonTrial/enter/"+study.getId()+"/"+tab):study.getType().equals(StudyTypeEnum.mjy.getValue())?("/drug/enter/"+study.getId()+"/"+tab):"";
}
}

Loading…
Cancel
Save