Showing
1 changed file
with
12 additions
and
0 deletions
| 1 | package com.lframework.xingyun.sc.controller.order; | 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 | import com.lframework.starter.common.utils.StringUtil; | 6 | import com.lframework.starter.common.utils.StringUtil; |
| 4 | import com.lframework.starter.web.core.annotations.security.HasPermission; | 7 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 5 | import com.lframework.starter.web.core.components.security.SecurityUtil; | 8 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| @@ -24,6 +27,7 @@ import com.lframework.starter.common.exceptions.impl.DefaultClientException; | @@ -24,6 +27,7 @@ import com.lframework.starter.common.exceptions.impl.DefaultClientException; | ||
| 24 | import io.swagger.annotations.ApiOperation; | 27 | import io.swagger.annotations.ApiOperation; |
| 25 | import com.lframework.starter.common.utils.CollectionUtil; | 28 | import com.lframework.starter.common.utils.CollectionUtil; |
| 26 | import io.swagger.annotations.Api; | 29 | import io.swagger.annotations.Api; |
| 30 | +import org.apache.commons.collections.CollectionUtils; | ||
| 27 | import org.springframework.web.bind.annotation.DeleteMapping; | 31 | import org.springframework.web.bind.annotation.DeleteMapping; |
| 28 | import org.springframework.beans.factory.annotation.Autowired; | 32 | import org.springframework.beans.factory.annotation.Autowired; |
| 29 | import org.springframework.validation.annotation.Validated; | 33 | import org.springframework.validation.annotation.Validated; |
| @@ -52,6 +56,8 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | @@ -52,6 +56,8 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | ||
| 52 | private PurchaseOrderLineService purchaseOrderLineService; | 56 | private PurchaseOrderLineService purchaseOrderLineService; |
| 53 | @Resource | 57 | @Resource |
| 54 | private PurchaseOrderRevokeLineService purchaseOrderRevokeLineService; | 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,6 +112,12 @@ public class PurchaseOrderRevokeController extends DefaultBaseController { | ||
| 106 | isCreateBy = true; | 112 | isCreateBy = true; |
| 107 | } | 113 | } |
| 108 | result.setRevokeCreateBy(isCreateBy); | 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 | QueryPurchaseOrderRevokeLineVo vo = new QueryPurchaseOrderRevokeLineVo(); | 121 | QueryPurchaseOrderRevokeLineVo vo = new QueryPurchaseOrderRevokeLineVo(); |
| 110 | vo.setPurchaseOrderRevokeId(id); | 122 | vo.setPurchaseOrderRevokeId(id); |
| 111 | List<PurchaseOrderRevokeLine> query = purchaseOrderRevokeLineService.query(vo); | 123 | List<PurchaseOrderRevokeLine> query = purchaseOrderRevokeLineService.query(vo); |