6-26 - bug修复
parent
3eb365e299
commit
e64c548487
|
|
@ -4,6 +4,7 @@ import com.alibaba.cola.exception.BizException;
|
||||||
import com.jjb.saas.framework.auth.model.SSOUser;
|
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||||
import com.jjb.saas.framework.auth.utils.AuthContext;
|
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||||
import com.zcloud.safetyDutyList.command.query.tasklist.MessageNoticeExe;
|
import com.zcloud.safetyDutyList.command.query.tasklist.MessageNoticeExe;
|
||||||
|
import com.zcloud.safetyDutyList.domain.enums.TaskStatusEnum;
|
||||||
import com.zcloud.safetyDutyList.domain.gateway.tasklist.*;
|
import com.zcloud.safetyDutyList.domain.gateway.tasklist.*;
|
||||||
import com.zcloud.safetyDutyList.domain.model.tasklist.FeedbackE;
|
import com.zcloud.safetyDutyList.domain.model.tasklist.FeedbackE;
|
||||||
import com.zcloud.safetyDutyList.domain.model.tasklist.TaskDetailE;
|
import com.zcloud.safetyDutyList.domain.model.tasklist.TaskDetailE;
|
||||||
|
|
@ -53,11 +54,17 @@ public class FeedbackAddExe {
|
||||||
if (detailE == null) {
|
if (detailE == null) {
|
||||||
throw new BizException("任务模板不存在");
|
throw new BizException("任务模板不存在");
|
||||||
}
|
}
|
||||||
|
if (detailE.getTaskStatus().equals(TaskStatusEnum.IN_PROGRESS.getCode())) {
|
||||||
|
throw new BizException("任务已完成或已关闭,反馈已截止");
|
||||||
|
}
|
||||||
|
|
||||||
TaskListIssueE issueE = taskListIssueGateway.getByTaskIssueId(executionE.getTaskIssueId());
|
TaskListIssueE issueE = taskListIssueGateway.getByTaskIssueId(executionE.getTaskIssueId());
|
||||||
if (issueE == null) {
|
if (issueE == null) {
|
||||||
throw new BizException("清单下发记录不存在");
|
throw new BizException("清单下发记录不存在");
|
||||||
}
|
}
|
||||||
|
if (issueE.getStatus().equals(TaskStatusEnum.IN_PROGRESS.getCode())) {
|
||||||
|
throw new BizException("清单已完成或已关闭,反馈已截止");
|
||||||
|
}
|
||||||
|
|
||||||
FeedbackE feedbackE = new FeedbackE();
|
FeedbackE feedbackE = new FeedbackE();
|
||||||
if (StringUtil.isNotBlank(cmd.getFeedbackId())) {
|
if (StringUtil.isNotBlank(cmd.getFeedbackId())) {
|
||||||
|
|
@ -90,7 +97,7 @@ public class FeedbackAddExe {
|
||||||
List<FeedbackE> existingFeedbacks = feedbackGateway.listByTaskExecutionIdAndPeriodFlag(
|
List<FeedbackE> existingFeedbacks = feedbackGateway.listByTaskExecutionIdAndPeriodFlag(
|
||||||
executionE.getTaskExecutionId(), periodFlag);
|
executionE.getTaskExecutionId(), periodFlag);
|
||||||
if (existingFeedbacks != null && existingFeedbacks.size() == 1) {
|
if (existingFeedbacks != null && existingFeedbacks.size() == 1) {
|
||||||
messageNoticeExe.sendMessageCompleteEvent(issueE.getId());
|
messageNoticeExe.sendMessageCompleteEvent(detailE.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
FeedbackCO co = new FeedbackCO();
|
FeedbackCO co = new FeedbackCO();
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ public class SendTodoMessageExe {
|
||||||
taskListName = taskListE.getTaskListName();
|
taskListName = taskListE.getTaskListName();
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean isSendMessage = false;
|
|
||||||
for (TaskExecutionE executionE : executionList) {
|
for (TaskExecutionE executionE : executionList) {
|
||||||
|
|
||||||
// 不是进行中就返回
|
// 不是进行中就返回
|
||||||
|
|
@ -93,11 +92,6 @@ public class SendTodoMessageExe {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
isSendMessage = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isSendMessage) {
|
|
||||||
// 发送消息提醒
|
// 发送消息提醒
|
||||||
Map<String, Object> sendParams = new HashMap <>();
|
Map<String, Object> sendParams = new HashMap <>();
|
||||||
sendParams.put("listName", taskListName);
|
sendParams.put("listName", taskListName);
|
||||||
|
|
@ -109,7 +103,7 @@ public class SendTodoMessageExe {
|
||||||
"您有一条任务清单待反馈,清单名称:【" + taskListName + "】",
|
"您有一条任务清单待反馈,清单名称:【" + taskListName + "】",
|
||||||
"待反馈",
|
"待反馈",
|
||||||
issueE.getId(),
|
issueE.getId(),
|
||||||
issueE.getId());
|
executionE.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info("【定时任务3】待办消息发送完成");
|
log.info("【定时任务3】待办消息发送完成");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue