Sfoglia il codice sorgente

工作通知修改

tags/24080901
CMM 1 anno fa
parent
commit
6d1a56eaa6
3 ha cambiato i file con 32 aggiunte e 9 eliminazioni
  1. +14
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/staging/enums/MsgTypeEnum.java
  2. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/constant/WorkNoticeContant.java
  3. +14
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java

+ 14
- 2
pmapi/src/main/java/com/ningdatech/pmapi/staging/enums/MsgTypeEnum.java Vedi File

@@ -20,7 +20,7 @@ public enum MsgTypeEnum {
* 消息类型
*/
/**
* 项目审核
* 项目审核
*/
PROJECT_REVIEW(1,"项目审核"),
/**
@@ -34,7 +34,19 @@ public enum MsgTypeEnum {
/**
* 评审会议
*/
REVIEW_MEETING(4,"评审会议");
REVIEW_MEETING(4,"评审会议"),
/**
* 项目审核被退回
*/
PROJECT_REVIEW_BACK(5,"项目审核"),
/**
* 项目审核通过
*/
PROJECT_REVIEW_PASS(6,"项目审核"),
/**
* 项目审核驳回
*/
PROJECT_REVIEW_REJECT(7,"项目审核");

private Integer code;
private String desc;


+ 4
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/constant/WorkNoticeContant.java Vedi File

@@ -12,5 +12,9 @@ public interface WorkNoticeContant {

public final String AUDIT_WORK_TITLE = "审核任务";

public final String EXPERT_REVIEW_TEMPLATE = "【%s】的【%s】待您评审,请及时处理。";
public final String REVIEW_MEETING_TEMPLATE = "【%s】已完成专家抽取,请及时处理。";
public final String WARNING_ALERT_TEMPLATE = "【%s】的【%s】待您审核,已停留2小时,请及时处理。";


}

+ 14
- 7
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/HandlerManage.java Vedi File

@@ -151,7 +151,9 @@ public class HandlerManage {
String passMsg2 = String.format(PASS_MSG_TEMPLATE2, declaredProject.getProjectName(), instance.getProcessDefinitionName());
passWorkNoticeInfo2.setMsg(passMsg2);
// 放入系统通知表中,保存记录
assemblyAuditNotify(userId, declaredProject, passMsg2);
Notify notify = assemblyAuditNotify(userId, declaredProject, passMsg2);
notify.setType(MsgTypeEnum.PROJECT_REVIEW_PASS.name());
notifyService.save(notify);
// 放入工作通知暂存表中,通过扫表异步发送
workNoticeStagingService.addByWorkNotice(passWorkNoticeInfo2, MsgTypeEnum.PROJECT_REVIEW);
} else {
@@ -165,7 +167,9 @@ public class HandlerManage {
String msg = String.format(PASS_MSG_TEMPLATE, sendWorkNoticeInfo.getOrganizationName(), declaredProject.getProjectName());
sendWorkNoticeInfo.setMsg(msg);
// 放入系统通知表中,保存记录
assemblyAuditNotify(userId, declaredProject, msg);
Notify notify = assemblyAuditNotify(userId, declaredProject, msg);
notify.setType(MsgTypeEnum.PROJECT_REVIEW.name());
notifyService.save(notify);
// 放入工作通知暂存表中,通过扫表异步发送
workNoticeStagingService.addByWorkNotice(sendWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW);
}
@@ -186,7 +190,9 @@ public class HandlerManage {
instance.getProcessDefinitionName());
rejectWorkNoticeInfo.setMsg(rejectMsg);
// 放入系统通知表中,保存记录
assemblyAuditNotify(userId, declaredProject, rejectMsg);
Notify notify = assemblyAuditNotify(userId, declaredProject, rejectMsg);
notify.setType(MsgTypeEnum.PROJECT_REVIEW_REJECT.name());
notifyService.save(notify);
// 放入工作通知暂存表中,通过扫表异步发送
workNoticeStagingService.addByWorkNotice(rejectWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW);
}
@@ -268,7 +274,9 @@ public class HandlerManage {
instance.getProcessDefinitionName());
backWorkNoticeInfo.setMsg(backMsg);
// 放入系统通知表中,保存记录
assemblyAuditNotify(userId, declaredProject, backMsg);
Notify notify = assemblyAuditNotify(userId, declaredProject, backMsg);
notify.setType(MsgTypeEnum.PROJECT_REVIEW_BACK.name());
notifyService.save(notify);
// 放入工作通知暂存表中,通过扫表异步发送
workNoticeStagingService.addByWorkNotice(backWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW);
}
@@ -342,16 +350,15 @@ public class HandlerManage {
* @param project
* @param msg
*/
private void assemblyAuditNotify(Long userId, Project project, String msg) {
private Notify assemblyAuditNotify(Long userId, Project project, String msg) {
Notify notify = new Notify();
notify.setTitle(AUDIT_WORK_TITLE);
notify.setUserId(userId);
notify.setType(MsgTypeEnum.PROJECT_REVIEW.name());
notify.setInstanceId(project.getInstCode());
notify.setContent(msg);
notify.setReaded(Boolean.FALSE);
notify.setCreateTime(LocalDateTime.now());
notifyService.save(notify);
return notify;
}

/**


Loading…
Annulla
Salva