移交管理

new
JilingLee 1 year ago
parent d9cab3ddd1
commit c7574db604

@ -4,7 +4,9 @@ import cn.hutool.core.collection.CollUtil;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO; import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.BpmTaskRespVO;
import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService; import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
@ -19,11 +21,13 @@ import java.io.IOException;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.archives.controller.admin.turnover.vo.*; import cn.iocoder.yudao.module.archives.controller.admin.turnover.vo.*;
@ -93,6 +97,7 @@ public class TurnOverController {
List<TurnOverDO> list = pageResult.getList(); List<TurnOverDO> list = pageResult.getList();
if (CollUtil.isNotEmpty(list)) { if (CollUtil.isNotEmpty(list)) {
for (TurnOverDO t : list) { for (TurnOverDO t : list) {
if (t.getProcessInstanceId() != null) {
List<BpmTaskRespVO> taskListByProcessInstanceId = taskService.getTaskListByProcessInstanceId(t.getProcessInstanceId()); List<BpmTaskRespVO> taskListByProcessInstanceId = taskService.getTaskListByProcessInstanceId(t.getProcessInstanceId());
Optional<BpmTaskRespVO> latestTask = taskListByProcessInstanceId.stream() Optional<BpmTaskRespVO> latestTask = taskListByProcessInstanceId.stream()
.filter(task -> task.getEndTime() != null) .filter(task -> task.getEndTime() != null)
@ -108,8 +113,7 @@ public class TurnOverController {
updateReqVO.setStatus(latest.getResult().toString()); updateReqVO.setStatus(latest.getResult().toString());
turnOverService.updateTurnOver(updateReqVO); turnOverService.updateTurnOver(updateReqVO);
} }
} else { }
// 没有找到有endTime的任务
} }
} }
PageResult<TurnOverDO> pageResult2 = turnOverService.getTurnOverPage(pageVO); PageResult<TurnOverDO> pageResult2 = turnOverService.getTurnOverPage(pageVO);

Loading…
Cancel
Save