6-26 - bug修复
parent
897cfd777e
commit
2302cbd81a
|
|
@ -54,7 +54,7 @@ public class FeedbackAddExe {
|
||||||
if (detailE == null) {
|
if (detailE == null) {
|
||||||
throw new BizException("任务模板不存在");
|
throw new BizException("任务模板不存在");
|
||||||
}
|
}
|
||||||
if (detailE.getTaskStatus().equals(TaskStatusEnum.IN_PROGRESS.getCode())) {
|
if (!detailE.getTaskStatus().equals(TaskStatusEnum.IN_PROGRESS.getCode())) {
|
||||||
throw new BizException("任务已完成或已关闭,反馈已截止");
|
throw new BizException("任务已完成或已关闭,反馈已截止");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ public class FeedbackAddExe {
|
||||||
if (issueE == null) {
|
if (issueE == null) {
|
||||||
throw new BizException("清单下发记录不存在");
|
throw new BizException("清单下发记录不存在");
|
||||||
}
|
}
|
||||||
if (issueE.getStatus().equals(TaskStatusEnum.IN_PROGRESS.getCode())) {
|
if (!issueE.getStatus().equals(TaskStatusEnum.IN_PROGRESS.getCode())) {
|
||||||
throw new BizException("清单已完成或已关闭,反馈已截止");
|
throw new BizException("清单已完成或已关闭,反馈已截止");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -97,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(detailE.getId());
|
messageNoticeExe.sendMessageCompleteEvent(executionE.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
FeedbackCO co = new FeedbackCO();
|
FeedbackCO co = new FeedbackCO();
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ public class SendTodoMessageExe {
|
||||||
taskListName = taskListE.getTaskListName();
|
taskListName = taskListE.getTaskListName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Boolean isSendMessage = false;
|
||||||
for (TaskExecutionE executionE : executionList) {
|
for (TaskExecutionE executionE : executionList) {
|
||||||
|
|
||||||
// 不是进行中就返回
|
// 不是进行中就返回
|
||||||
|
|
@ -76,11 +77,6 @@ public class SendTodoMessageExe {
|
||||||
// 反馈周期枚举: 1(每月) 2(每季度) 3(每半年) 4(年)
|
// 反馈周期枚举: 1(每月) 2(每季度) 3(每半年) 4(年)
|
||||||
Integer feedbackCycleType = detailE.getFeedbackCycleType();
|
Integer feedbackCycleType = detailE.getFeedbackCycleType();
|
||||||
|
|
||||||
// 首周期判断:如果当前仍处于清单的首个反馈周期内,跳过检测
|
|
||||||
if (!FeedbackCycleUtil.isFirstCycle(feedbackCycleType, issueE.getPeriodStartTime())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 当前周期标识
|
// 当前周期标识
|
||||||
String currentCycleFlag = FeedbackCycleUtil.generatePeriodFlag(feedbackCycleType, LocalDateTime.now());
|
String currentCycleFlag = FeedbackCycleUtil.generatePeriodFlag(feedbackCycleType, LocalDateTime.now());
|
||||||
|
|
||||||
|
|
@ -92,11 +88,6 @@ public class SendTodoMessageExe {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送消息提醒
|
|
||||||
Map<String, Object> sendParams = new HashMap <>();
|
|
||||||
sendParams.put("listName", taskListName);
|
|
||||||
messageNoticeExe.messageNotice(issueE.getExecuteUserId(), messageTemplateConfig.getFirstDayOfCycleSendMsgTodo(), sendParams);
|
|
||||||
|
|
||||||
// 发送待办消息
|
// 发送待办消息
|
||||||
messageNoticeExe.sendMessageAddEvent(
|
messageNoticeExe.sendMessageAddEvent(
|
||||||
issueE.getExecuteUserId(),
|
issueE.getExecuteUserId(),
|
||||||
|
|
@ -104,6 +95,14 @@ public class SendTodoMessageExe {
|
||||||
"待反馈",
|
"待反馈",
|
||||||
issueE.getId(),
|
issueE.getId(),
|
||||||
executionE.getId());
|
executionE.getId());
|
||||||
|
isSendMessage = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isSendMessage) {
|
||||||
|
// 发送消息提醒
|
||||||
|
Map<String, Object> sendParams = new HashMap <>();
|
||||||
|
sendParams.put("listName", taskListName);
|
||||||
|
messageNoticeExe.messageNotice(issueE.getExecuteUserId(), messageTemplateConfig.getFirstDayOfCycleSendMsgTodo(), sendParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.info("【定时任务3】待办消息发送完成");
|
log.info("【定时任务3】待办消息发送完成");
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ public class TaskListIssuePageQry extends PageQuery {
|
||||||
private Integer scoreStatus;
|
private Integer scoreStatus;
|
||||||
@ApiModelProperty(value = "多状态筛选")
|
@ApiModelProperty(value = "多状态筛选")
|
||||||
private List<Integer> statusList;
|
private List<Integer> statusList;
|
||||||
|
@ApiModelProperty(value = "当前时间是否在周期内 0否 1是")
|
||||||
|
private Integer inPeriod;
|
||||||
|
|
||||||
private String menuPath;
|
private String menuPath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,14 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.jjb.saas.framework.repository.common.PageHelper;
|
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||||
import com.zcloud.gbscommon.utils.Query;
|
import com.zcloud.gbscommon.utils.Query;
|
||||||
|
import com.zcloud.safetyDutyList.domain.enums.TaskStatusEnum;
|
||||||
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.TaskListIssueDO;
|
import com.zcloud.safetyDutyList.persistence.dataobject.tasklist.TaskListIssueDO;
|
||||||
import com.zcloud.safetyDutyList.persistence.mapper.tasklist.TaskListIssueMapper;
|
import com.zcloud.safetyDutyList.persistence.mapper.tasklist.TaskListIssueMapper;
|
||||||
import com.zcloud.safetyDutyList.persistence.repository.tasklist.TaskListIssueRepository;
|
import com.zcloud.safetyDutyList.persistence.repository.tasklist.TaskListIssueRepository;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
@ -64,9 +66,14 @@ public class TaskListIssueRepositoryImpl extends BaseRepositoryImpl<TaskListIssu
|
||||||
@Override
|
@Override
|
||||||
public long countByExecuteUserId(Long executeUserId) {
|
public long countByExecuteUserId(Long executeUserId) {
|
||||||
|
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
|
||||||
QueryWrapper<TaskListIssueDO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<TaskListIssueDO> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("execute_user_id", executeUserId);
|
queryWrapper.eq("execute_user_id", executeUserId);
|
||||||
|
queryWrapper.eq("status", TaskStatusEnum.IN_PROGRESS.getCode());
|
||||||
queryWrapper.eq("delete_enum", "FALSE");
|
queryWrapper.eq("delete_enum", "FALSE");
|
||||||
|
queryWrapper.le("period_start_time", now);
|
||||||
|
queryWrapper.ge("period_end_time", now);
|
||||||
return taskListIssueMapper.selectCount(queryWrapper);
|
return taskListIssueMapper.selectCount(queryWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,10 @@
|
||||||
#{status}
|
#{status}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.inPeriod != null and params.inPeriod == 1">
|
||||||
|
AND NOW() >= tli.period_start_time
|
||||||
|
AND NOW() <= tli.period_end_time
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY tli.create_time DESC
|
ORDER BY tli.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -181,6 +185,7 @@
|
||||||
AND execute_user_id = #{executeUserId}
|
AND execute_user_id = #{executeUserId}
|
||||||
AND period_start_time < #{periodEndTime}
|
AND period_start_time < #{periodEndTime}
|
||||||
AND period_end_time > #{periodStartTime}
|
AND period_end_time > #{periodStartTime}
|
||||||
|
AND status = 1
|
||||||
ORDER BY create_time DESC
|
ORDER BY create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -191,8 +196,14 @@
|
||||||
|
|
||||||
<select id="listIssuedWithPeriod" resultType="com.zcloud.safetyDutyList.persistence.dataobject.tasklist.TaskListIssueDO">
|
<select id="listIssuedWithPeriod" resultType="com.zcloud.safetyDutyList.persistence.dataobject.tasklist.TaskListIssueDO">
|
||||||
SELECT * FROM safety_accountability_task_list_issue
|
SELECT * FROM safety_accountability_task_list_issue
|
||||||
WHERE issue_status = 1 AND status = 1 AND period_start_time IS NOT NULL AND period_end_time IS NOT NULL
|
WHERE
|
||||||
AND period_end_time > DATE_SUB(NOW(), INTERVAL 1 MONTH) AND delete_enum = 'FALSE'
|
issue_status = 1
|
||||||
|
AND status = 1
|
||||||
|
AND period_start_time IS NOT NULL
|
||||||
|
AND period_end_time IS NOT NULL
|
||||||
|
AND NOW() >= period_start_time
|
||||||
|
AND NOW() <= period_end_time
|
||||||
|
AND delete_enum = 'FALSE'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue