Showing
1 changed file
with
13 additions
and
0 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/customer/CustomerCreditController.java
| 1 | 1 | package com.lframework.xingyun.sc.controller.customer; |
| 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.redis.RedisHandler; |
| 9 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 6 | 10 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 7 | 11 | import com.lframework.starter.web.core.utils.ExcelUtil; |
| 8 | 12 | import com.lframework.starter.web.core.utils.JsonUtil; |
| ... | ... | @@ -34,6 +38,7 @@ import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
| 34 | 38 | import io.swagger.annotations.ApiOperation; |
| 35 | 39 | import com.lframework.starter.common.utils.CollectionUtil; |
| 36 | 40 | import io.swagger.annotations.Api; |
| 41 | +import org.apache.commons.collections.CollectionUtils; | |
| 37 | 42 | import org.springframework.beans.factory.annotation.Autowired; |
| 38 | 43 | import org.springframework.beans.factory.annotation.Value; |
| 39 | 44 | import org.springframework.scheduling.annotation.Scheduled; |
| ... | ... | @@ -75,6 +80,8 @@ public class CustomerCreditController extends DefaultBaseController { |
| 75 | 80 | private String exportTemplate; |
| 76 | 81 | @Resource |
| 77 | 82 | private ContractDistributorStandardService contractDistributorStandardService; |
| 83 | + @Resource | |
| 84 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | |
| 78 | 85 | |
| 79 | 86 | /** |
| 80 | 87 | * 查询列表 |
| ... | ... | @@ -450,6 +457,12 @@ public class CustomerCreditController extends DefaultBaseController { |
| 450 | 457 | data.setSupervisorReviewName(sysUser.getName()); |
| 451 | 458 | } |
| 452 | 459 | } |
| 460 | + // 获取当前人员的待办任务数据 | |
| 461 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | |
| 462 | + if (CollectionUtils.isNotEmpty(flowTaskList)) { | |
| 463 | + List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 464 | + data.setShowExamine(businessIds.contains(credit.getId())); | |
| 465 | + } | |
| 453 | 466 | return data; |
| 454 | 467 | } |
| 455 | 468 | ... | ... |