Showing
1 changed file
with
12 additions
and
0 deletions
| 1 | 1 | package com.lframework.xingyun.sc.controller.order; |
| 2 | 2 | |
| 3 | +import com.lframework.starter.bpm.dto.FlowTaskDto; | |
| 4 | +import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | |
| 5 | +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | |
| 3 | 6 | import com.lframework.starter.common.utils.StringUtil; |
| 4 | 7 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 5 | 8 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| ... | ... | @@ -24,6 +27,7 @@ import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
| 24 | 27 | import io.swagger.annotations.ApiOperation; |
| 25 | 28 | import com.lframework.starter.common.utils.CollectionUtil; |
| 26 | 29 | import io.swagger.annotations.Api; |
| 30 | +import org.apache.commons.collections.CollectionUtils; | |
| 27 | 31 | import org.springframework.web.bind.annotation.DeleteMapping; |
| 28 | 32 | import org.springframework.beans.factory.annotation.Autowired; |
| 29 | 33 | import org.springframework.validation.annotation.Validated; |
| ... | ... | @@ -52,6 +56,8 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { |
| 52 | 56 | private PurchaseOrderLineService purchaseOrderLineService; |
| 53 | 57 | @Resource |
| 54 | 58 | private PurchaseOrderRevokeLineService purchaseOrderRevokeLineService; |
| 59 | + @Resource | |
| 60 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | |
| 55 | 61 | |
| 56 | 62 | /** |
| 57 | 63 | * 查询列表 |
| ... | ... | @@ -106,6 +112,12 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { |
| 106 | 112 | isCreateBy = true; |
| 107 | 113 | } |
| 108 | 114 | result.setRevokeCreateBy(isCreateBy); |
| 115 | + // 获取当前人员的待办任务数据 | |
| 116 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | |
| 117 | + if (CollectionUtils.isNotEmpty(flowTaskList)) { | |
| 118 | + List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 119 | + result.setShowExamine(businessIds.contains(result.getId())); | |
| 120 | + } | |
| 109 | 121 | QueryPurchaseOrderRevokeLineVo vo = new QueryPurchaseOrderRevokeLineVo(); |
| 110 | 122 | vo.setPurchaseOrderRevokeId(id); |
| 111 | 123 | List<PurchaseOrderRevokeLine> query = purchaseOrderRevokeLineService.query(vo); | ... | ... |