Showing
4 changed files
with
41 additions
and
0 deletions
| ... | ... | @@ -129,6 +129,9 @@ public class GetReplenishmentOrderBo extends BaseBo<ReplenishmentOrder> { |
| 129 | 129 | @ApiModelProperty("状态名称") |
| 130 | 130 | private String statusName; |
| 131 | 131 | |
| 132 | + @ApiModelProperty("是否展示审核按钮") | |
| 133 | + private Boolean showExamine; | |
| 134 | + | |
| 132 | 135 | /** |
| 133 | 136 | * 补货单物料行 |
| 134 | 137 | */ | ... | ... |
| ... | ... | @@ -2,12 +2,16 @@ package com.lframework.xingyun.sc.controller.shipments; |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | +import com.lframework.starter.bpm.dto.FlowTaskDto; | |
| 6 | +import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | |
| 7 | +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | |
| 5 | 8 | import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
| 6 | 9 | import com.lframework.starter.common.utils.CollectionUtil; |
| 7 | 10 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 8 | 11 | import com.lframework.starter.web.core.components.resp.InvokeResult; |
| 9 | 12 | import com.lframework.starter.web.core.components.resp.InvokeResultBuilder; |
| 10 | 13 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 14 | +import com.lframework.starter.web.core.components.security.SecurityUtil; | |
| 11 | 15 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 12 | 16 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 13 | 17 | import com.lframework.starter.web.inner.entity.SysDataDicItem; |
| ... | ... | @@ -71,6 +75,8 @@ public class ReplenishmentOrderController extends DefaultBaseController { |
| 71 | 75 | private PurchaseOrderInfoService purchaseOrderInfoService; |
| 72 | 76 | @Resource |
| 73 | 77 | private ReplenishmentOrderLineService replenishmentOrderLineService; |
| 78 | + @Resource | |
| 79 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | |
| 74 | 80 | |
| 75 | 81 | |
| 76 | 82 | public static final String AUDIT_STATUS_DIC_CODE = "AUDIT_STATUS"; // 审核状态 |
| ... | ... | @@ -205,6 +211,12 @@ public class ReplenishmentOrderController extends DefaultBaseController { |
| 205 | 211 | }); |
| 206 | 212 | |
| 207 | 213 | result.setReplenishmentOrderLineList(lineBoList); |
| 214 | + // 获取当前人员的待办任务数据 | |
| 215 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | |
| 216 | + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(flowTaskList)) { | |
| 217 | + List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 218 | + result.setShowExamine(businessIds.contains(result.getId())); | |
| 219 | + } | |
| 208 | 220 | return InvokeResultBuilder.success(result); |
| 209 | 221 | } |
| 210 | 222 | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.controller.shipments.car; |
| 2 | 2 | |
| 3 | +import com.github.pagehelper.PageInfo; | |
| 4 | +import com.lframework.starter.bpm.dto.FlowTaskDto; | |
| 5 | +import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | |
| 6 | +import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | |
| 3 | 7 | import com.lframework.starter.common.exceptions.impl.DefaultClientException; |
| 4 | 8 | import com.lframework.starter.common.utils.CollectionUtil; |
| 5 | 9 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| ... | ... | @@ -18,6 +22,7 @@ import com.lframework.xingyun.sc.vo.shipments.car.*; |
| 18 | 22 | import io.swagger.annotations.Api; |
| 19 | 23 | import io.swagger.annotations.ApiImplicitParam; |
| 20 | 24 | import io.swagger.annotations.ApiOperation; |
| 25 | +import org.apache.commons.collections.CollectionUtils; | |
| 21 | 26 | import org.apache.commons.lang3.StringUtils; |
| 22 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
| 23 | 28 | import org.springframework.validation.annotation.Validated; |
| ... | ... | @@ -43,6 +48,8 @@ public class DraftRequestCarTicketController extends DefaultBaseController { |
| 43 | 48 | private DraftRequestCarTicketService draftRequestCarTicketService; |
| 44 | 49 | @Resource |
| 45 | 50 | private PurchaseOrderInfoService purchaseOrderInfoService; |
| 51 | + @Resource | |
| 52 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | |
| 46 | 53 | /** |
| 47 | 54 | * 查询列表 |
| 48 | 55 | */ |
| ... | ... | @@ -104,6 +111,12 @@ public class DraftRequestCarTicketController extends DefaultBaseController { |
| 104 | 111 | result.setDraftCreateBy(true); |
| 105 | 112 | } |
| 106 | 113 | } |
| 114 | + // 获取当前人员的待办任务数据 | |
| 115 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | |
| 116 | + if (CollectionUtils.isNotEmpty(flowTaskList)) { | |
| 117 | + List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 118 | + result.setShowExamine(businessIds.contains(result.getId())); | |
| 119 | + } | |
| 107 | 120 | |
| 108 | 121 | return InvokeResultBuilder.success(result); |
| 109 | 122 | } | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.controller.shipments.delay; |
| 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.web.core.annotations.security.HasPermission; |
| 4 | 7 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 5 | 8 | import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 6 | 9 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 7 | 10 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 8 | 11 | import com.lframework.starter.web.core.components.resp.InvokeResult; |
| 12 | + | |
| 13 | +import javax.annotation.Resource; | |
| 9 | 14 | import javax.validation.constraints.NotBlank; |
| 10 | 15 | import com.lframework.xingyun.sc.bo.shipments.delay.GetDelayedShipmentBo; |
| 11 | 16 | import com.lframework.xingyun.sc.entity.DelayedShipment; |
| ... | ... | @@ -44,6 +49,8 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 44 | 49 | private DelayedShipmentService delayedShipmentService; |
| 45 | 50 | @Autowired |
| 46 | 51 | private DelayedShipmentDetailService delayedShipmentDetailService; |
| 52 | + @Resource | |
| 53 | + private FlowTaskWrapperMapper flowTaskWrapperMapper; | |
| 47 | 54 | |
| 48 | 55 | /** |
| 49 | 56 | * 查询列表 |
| ... | ... | @@ -97,6 +104,12 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 97 | 104 | vo.setDelayedShipmentId(id); |
| 98 | 105 | List<DelayedShipmentDetail> delayedShipmentDetailList = delayedShipmentDetailService.query(vo); |
| 99 | 106 | result.setDelayedShipmentDetailList(delayedShipmentDetailList); |
| 107 | + // 获取当前人员的待办任务数据 | |
| 108 | + List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | |
| 109 | + if (org.apache.commons.collections.CollectionUtils.isNotEmpty(flowTaskList)) { | |
| 110 | + List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 111 | + result.setShowExamine(businessIds.contains(result.getId())); | |
| 112 | + } | |
| 100 | 113 | |
| 101 | 114 | return InvokeResultBuilder.success(result); |
| 102 | 115 | } | ... | ... |