|
@@ -51,6 +51,8 @@ import com.ningdatech.pmapi.signature.service.ICompanySignatureService; |
|
|
import com.ningdatech.pmapi.staging.enums.MsgTypeEnum; |
|
|
import com.ningdatech.pmapi.staging.enums.MsgTypeEnum; |
|
|
import com.ningdatech.pmapi.staging.service.INdWorkNoticeStagingService; |
|
|
import com.ningdatech.pmapi.staging.service.INdWorkNoticeStagingService; |
|
|
import com.ningdatech.pmapi.staging.service.IProjectStagingService; |
|
|
import com.ningdatech.pmapi.staging.service.IProjectStagingService; |
|
|
|
|
|
import com.ningdatech.pmapi.sys.model.entity.Notify; |
|
|
|
|
|
import com.ningdatech.pmapi.sys.service.INotifyService; |
|
|
import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; |
|
|
import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; |
|
|
import com.ningdatech.pmapi.todocenter.enumeration.IsOrNotEnum; |
|
|
import com.ningdatech.pmapi.todocenter.enumeration.IsOrNotEnum; |
|
|
import com.ningdatech.pmapi.todocenter.model.dto.AdjustHandleDTO; |
|
|
import com.ningdatech.pmapi.todocenter.model.dto.AdjustHandleDTO; |
|
@@ -144,8 +146,8 @@ public class TodoCenterManage { |
|
|
private final PdfUtils pdfUtils; |
|
|
private final PdfUtils pdfUtils; |
|
|
private final FileService fileService; |
|
|
private final FileService fileService; |
|
|
private final ICompanySignatureService companySignatureService; |
|
|
private final ICompanySignatureService companySignatureService; |
|
|
|
|
|
|
|
|
private final StatisticsService statisticsService; |
|
|
private final StatisticsService statisticsService; |
|
|
|
|
|
private final INotifyService notifyService; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 待办中心待我处理项目列表查询 |
|
|
* 待办中心待我处理项目列表查询 |
|
@@ -370,6 +372,8 @@ public class TodoCenterManage { |
|
|
WorkNoticeInfo passWorkNoticeInfo2 = getSendWorkNoticeInfo(startUserInfo); |
|
|
WorkNoticeInfo passWorkNoticeInfo2 = getSendWorkNoticeInfo(startUserInfo); |
|
|
String passMsg2 = String.format(PASS_MSG_TEMPLATE2, projectName, processDefinitionName); |
|
|
String passMsg2 = String.format(PASS_MSG_TEMPLATE2, projectName, processDefinitionName); |
|
|
passWorkNoticeInfo2.setMsg(passMsg2); |
|
|
passWorkNoticeInfo2.setMsg(passMsg2); |
|
|
|
|
|
// 放入系统通知表中,保存记录 |
|
|
|
|
|
assemblyAuditNotify(userId, declaredProject, passMsg2); |
|
|
// 放入工作通知暂存表中,通过扫表异步发送 |
|
|
// 放入工作通知暂存表中,通过扫表异步发送 |
|
|
workNoticeStagingService.addByWorkNotice(passWorkNoticeInfo2, MsgTypeEnum.PROJECT_REVIEW); |
|
|
workNoticeStagingService.addByWorkNotice(passWorkNoticeInfo2, MsgTypeEnum.PROJECT_REVIEW); |
|
|
} else { |
|
|
} else { |
|
@@ -382,6 +386,8 @@ public class TodoCenterManage { |
|
|
WorkNoticeInfo sendWorkNoticeInfo = getSendWorkNoticeInfo(auditUserInfo); |
|
|
WorkNoticeInfo sendWorkNoticeInfo = getSendWorkNoticeInfo(auditUserInfo); |
|
|
String msg = String.format(PASS_MSG_TEMPLATE, sendWorkNoticeInfo.getOrganizationName(), projectName); |
|
|
String msg = String.format(PASS_MSG_TEMPLATE, sendWorkNoticeInfo.getOrganizationName(), projectName); |
|
|
sendWorkNoticeInfo.setMsg(msg); |
|
|
sendWorkNoticeInfo.setMsg(msg); |
|
|
|
|
|
// 放入系统通知表中,保存记录 |
|
|
|
|
|
assemblyAuditNotify(userId, declaredProject, msg); |
|
|
// 放入工作通知暂存表中,通过扫表异步发送 |
|
|
// 放入工作通知暂存表中,通过扫表异步发送 |
|
|
workNoticeStagingService.addByWorkNotice(sendWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW); |
|
|
workNoticeStagingService.addByWorkNotice(sendWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW); |
|
|
} |
|
|
} |
|
@@ -397,6 +403,8 @@ public class TodoCenterManage { |
|
|
WorkNoticeInfo rejectWorkNoticeInfo = getSendWorkNoticeInfo(startUserInfo); |
|
|
WorkNoticeInfo rejectWorkNoticeInfo = getSendWorkNoticeInfo(startUserInfo); |
|
|
String rejectMsg = String.format(REJECT_MSG_TEMPLATE, projectName, processDefinitionName); |
|
|
String rejectMsg = String.format(REJECT_MSG_TEMPLATE, projectName, processDefinitionName); |
|
|
rejectWorkNoticeInfo.setMsg(rejectMsg); |
|
|
rejectWorkNoticeInfo.setMsg(rejectMsg); |
|
|
|
|
|
// 放入系统通知表中,保存记录 |
|
|
|
|
|
assemblyAuditNotify(userId, declaredProject, rejectMsg); |
|
|
// 放入工作通知暂存表中,通过扫表异步发送 |
|
|
// 放入工作通知暂存表中,通过扫表异步发送 |
|
|
workNoticeStagingService.addByWorkNotice(rejectWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW); |
|
|
workNoticeStagingService.addByWorkNotice(rejectWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW); |
|
|
break; |
|
|
break; |
|
@@ -409,6 +417,8 @@ public class TodoCenterManage { |
|
|
WorkNoticeInfo backWorkNoticeInfo = getSendWorkNoticeInfo(startUserInfo); |
|
|
WorkNoticeInfo backWorkNoticeInfo = getSendWorkNoticeInfo(startUserInfo); |
|
|
String backMsg = String.format(BACK_MSG_TEMPLATE, projectName, processDefinitionName); |
|
|
String backMsg = String.format(BACK_MSG_TEMPLATE, projectName, processDefinitionName); |
|
|
backWorkNoticeInfo.setMsg(backMsg); |
|
|
backWorkNoticeInfo.setMsg(backMsg); |
|
|
|
|
|
// 放入系统通知表中,保存记录 |
|
|
|
|
|
assemblyAuditNotify(userId, declaredProject, backMsg); |
|
|
// 放入工作通知暂存表中,通过扫表异步发送 |
|
|
// 放入工作通知暂存表中,通过扫表异步发送 |
|
|
workNoticeStagingService.addByWorkNotice(backWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW); |
|
|
workNoticeStagingService.addByWorkNotice(backWorkNoticeInfo, MsgTypeEnum.PROJECT_REVIEW); |
|
|
break; |
|
|
break; |
|
@@ -474,6 +484,24 @@ public class TodoCenterManage { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|
|
|
* 装配项目审核工作通知 |
|
|
|
|
|
* @param userId |
|
|
|
|
|
* @param project |
|
|
|
|
|
* @param msg |
|
|
|
|
|
*/ |
|
|
|
|
|
private void assemblyAuditNotify(Long userId, Project project, String msg) { |
|
|
|
|
|
Notify notify = new Notify(); |
|
|
|
|
|
notify.setTitle(msg); |
|
|
|
|
|
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); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
* 调用IRS接口,获取盖章后的pdf文件,上传到OSS,并保存文件ID到项目库中 |
|
|
* 调用IRS接口,获取盖章后的pdf文件,上传到OSS,并保存文件ID到项目库中 |
|
|
* @param req |
|
|
* @param req |
|
|
* @param declaredProject |
|
|
* @param declaredProject |
|
|