Showing
8 changed files
with
90 additions
and
6 deletions
| @@ -462,6 +462,12 @@ public class GetCustomerCreditBo extends BaseBo<CustomerCredit> implements BaseD | @@ -462,6 +462,12 @@ public class GetCustomerCreditBo extends BaseBo<CustomerCredit> implements BaseD | ||
| 462 | @ApiModelProperty(value = "是否展示审核按钮") | 462 | @ApiModelProperty(value = "是否展示审核按钮") |
| 463 | private Boolean showExamine; | 463 | private Boolean showExamine; |
| 464 | 464 | ||
| 465 | + /** | ||
| 466 | + * 是否展示审核详情按钮(非持久化字段) | ||
| 467 | + */ | ||
| 468 | + @ApiModelProperty(value = "是否展示审核按钮") | ||
| 469 | + private Boolean showExamineDetail; | ||
| 470 | + | ||
| 465 | 471 | ||
| 466 | /** | 472 | /** |
| 467 | * 企业操作类型 | 473 | * 企业操作类型 |
| @@ -71,9 +71,15 @@ public class GetDelayedShipmentBo extends BaseBo<DelayedShipment> { | @@ -71,9 +71,15 @@ public class GetDelayedShipmentBo extends BaseBo<DelayedShipment> { | ||
| 71 | private Boolean showExamine; | 71 | private Boolean showExamine; |
| 72 | 72 | ||
| 73 | /** | 73 | /** |
| 74 | + * 是否展示审核详情按钮(非持久化字段) | ||
| 75 | + */ | ||
| 76 | + @ApiModelProperty("是否展示审核详情按钮") | ||
| 77 | + private Boolean showExamineDetail; | ||
| 78 | + | ||
| 79 | + /** | ||
| 74 | * 是否是创建人(非持久化字段) | 80 | * 是否是创建人(非持久化字段) |
| 75 | */ | 81 | */ |
| 76 | - @ApiModelProperty("是否展示审核按钮") | 82 | + @ApiModelProperty("是否是创建人") |
| 77 | private Boolean delayedCreateBy; | 83 | private Boolean delayedCreateBy; |
| 78 | 84 | ||
| 79 | 85 |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/customer/CustomerCreditController.java
| @@ -4,7 +4,9 @@ import com.alibaba.excel.EasyExcel; | @@ -4,7 +4,9 @@ import com.alibaba.excel.EasyExcel; | ||
| 4 | import com.alibaba.excel.ExcelWriter; | 4 | import com.alibaba.excel.ExcelWriter; |
| 5 | import com.alibaba.excel.write.metadata.WriteSheet; | 5 | import com.alibaba.excel.write.metadata.WriteSheet; |
| 6 | import com.lframework.starter.bpm.dto.FlowTaskDto; | 6 | import com.lframework.starter.bpm.dto.FlowTaskDto; |
| 7 | +import com.lframework.starter.bpm.entity.FlowInstanceWrapper; | ||
| 7 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | 8 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 9 | +import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | ||
| 8 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | 10 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; |
| 9 | import com.lframework.starter.common.utils.StringUtil; | 11 | import com.lframework.starter.common.utils.StringUtil; |
| 10 | import com.lframework.starter.web.core.annotations.security.HasPermission; | 12 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| @@ -86,6 +88,8 @@ public class CustomerCreditController extends DefaultBaseController { | @@ -86,6 +88,8 @@ public class CustomerCreditController extends DefaultBaseController { | ||
| 86 | private ContractDistributorStandardService contractDistributorStandardService; | 88 | private ContractDistributorStandardService contractDistributorStandardService; |
| 87 | @Resource | 89 | @Resource |
| 88 | private FlowTaskWrapperMapper flowTaskWrapperMapper; | 90 | private FlowTaskWrapperMapper flowTaskWrapperMapper; |
| 91 | + @Resource | ||
| 92 | + private FlowInstanceWrapperService flowInstanceWrapperService; | ||
| 89 | 93 | ||
| 90 | /** | 94 | /** |
| 91 | * 查询列表 | 95 | * 查询列表 |
| @@ -500,11 +504,24 @@ public class CustomerCreditController extends DefaultBaseController { | @@ -500,11 +504,24 @@ public class CustomerCreditController extends DefaultBaseController { | ||
| 500 | data.setSupervisorReviewName(sysUser.getName()); | 504 | data.setSupervisorReviewName(sysUser.getName()); |
| 501 | } | 505 | } |
| 502 | } | 506 | } |
| 507 | + | ||
| 508 | + //流程数据 | ||
| 509 | + List<String> ids = new ArrayList<>(); | ||
| 510 | + ids.add(credit.getId()); | ||
| 511 | + List<FlowInstanceWrapper> flowByBusinessIdList = flowInstanceWrapperService.getFlowByBusinessIdList(ids); | ||
| 512 | + if (CollectionUtils.isNotEmpty(flowByBusinessIdList)) { | ||
| 513 | + List<String> collect = flowByBusinessIdList.stream().map(FlowInstanceWrapper::getBusinessId).collect(Collectors.toList()); | ||
| 514 | + data.setShowExamineDetail(collect.contains(credit.getId())); | ||
| 515 | + } else { | ||
| 516 | + data.setShowExamineDetail(false); | ||
| 517 | + } | ||
| 503 | // 获取当前人员的待办任务数据 | 518 | // 获取当前人员的待办任务数据 |
| 504 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | 519 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| 505 | if (CollectionUtils.isNotEmpty(flowTaskList)) { | 520 | if (CollectionUtils.isNotEmpty(flowTaskList)) { |
| 506 | List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | 521 | List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); |
| 507 | data.setShowExamine(businessIds.contains(credit.getId())); | 522 | data.setShowExamine(businessIds.contains(credit.getId())); |
| 523 | + } else { | ||
| 524 | + data.setShowExamine(false); | ||
| 508 | } | 525 | } |
| 509 | // enterpriseOperationType 转中文 | 526 | // enterpriseOperationType 转中文 |
| 510 | String opType = data.getEnterpriseOperationType(); | 527 | String opType = data.getEnterpriseOperationType(); |
| 1 | package com.lframework.xingyun.sc.controller.shipments.delay; | 1 | package com.lframework.xingyun.sc.controller.shipments.delay; |
| 2 | 2 | ||
| 3 | import com.lframework.starter.bpm.dto.FlowTaskDto; | 3 | import com.lframework.starter.bpm.dto.FlowTaskDto; |
| 4 | +import com.lframework.starter.bpm.entity.FlowInstanceWrapper; | ||
| 4 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | 5 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 6 | +import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | ||
| 5 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | 7 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; |
| 6 | import com.lframework.starter.web.core.annotations.security.HasPermission; | 8 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 7 | import com.lframework.starter.web.core.components.security.SecurityUtil; | 9 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| @@ -27,11 +29,13 @@ import com.lframework.starter.common.exceptions.impl.DefaultClientException; | @@ -27,11 +29,13 @@ import com.lframework.starter.common.exceptions.impl.DefaultClientException; | ||
| 27 | import io.swagger.annotations.ApiOperation; | 29 | import io.swagger.annotations.ApiOperation; |
| 28 | import com.lframework.starter.common.utils.CollectionUtil; | 30 | import com.lframework.starter.common.utils.CollectionUtil; |
| 29 | import io.swagger.annotations.Api; | 31 | import io.swagger.annotations.Api; |
| 32 | +import org.apache.commons.collections.CollectionUtils; | ||
| 30 | import org.springframework.web.bind.annotation.DeleteMapping; | 33 | import org.springframework.web.bind.annotation.DeleteMapping; |
| 31 | import org.springframework.beans.factory.annotation.Autowired; | 34 | import org.springframework.beans.factory.annotation.Autowired; |
| 32 | import org.springframework.validation.annotation.Validated; | 35 | import org.springframework.validation.annotation.Validated; |
| 33 | import org.springframework.web.bind.annotation.*; | 36 | import org.springframework.web.bind.annotation.*; |
| 34 | import javax.validation.Valid; | 37 | import javax.validation.Valid; |
| 38 | +import java.util.ArrayList; | ||
| 35 | import java.util.List; | 39 | import java.util.List; |
| 36 | import java.util.stream.Collectors; | 40 | import java.util.stream.Collectors; |
| 37 | 41 | ||
| @@ -51,6 +55,8 @@ public class DelayedShipmentController extends DefaultBaseController { | @@ -51,6 +55,8 @@ public class DelayedShipmentController extends DefaultBaseController { | ||
| 51 | private DelayedShipmentDetailService delayedShipmentDetailService; | 55 | private DelayedShipmentDetailService delayedShipmentDetailService; |
| 52 | @Resource | 56 | @Resource |
| 53 | private FlowTaskWrapperMapper flowTaskWrapperMapper; | 57 | private FlowTaskWrapperMapper flowTaskWrapperMapper; |
| 58 | + @Resource | ||
| 59 | + private FlowInstanceWrapperService flowInstanceWrapperService; | ||
| 54 | 60 | ||
| 55 | /** | 61 | /** |
| 56 | * 查询列表 | 62 | * 查询列表 |
| @@ -106,9 +112,21 @@ public class DelayedShipmentController extends DefaultBaseController { | @@ -106,9 +112,21 @@ public class DelayedShipmentController extends DefaultBaseController { | ||
| 106 | result.setDelayedShipmentDetailList(delayedShipmentDetailList); | 112 | result.setDelayedShipmentDetailList(delayedShipmentDetailList); |
| 107 | // 获取当前人员的待办任务数据 | 113 | // 获取当前人员的待办任务数据 |
| 108 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | 114 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| 109 | - if (org.apache.commons.collections.CollectionUtils.isNotEmpty(flowTaskList)) { | 115 | + if (CollectionUtils.isNotEmpty(flowTaskList)) { |
| 110 | List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | 116 | List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); |
| 111 | result.setShowExamine(businessIds.contains(result.getId())); | 117 | result.setShowExamine(businessIds.contains(result.getId())); |
| 118 | + } else { | ||
| 119 | + result.setShowExamine(false); | ||
| 120 | + } | ||
| 121 | + //流程数据 | ||
| 122 | + List<String> ids = new ArrayList<>(); | ||
| 123 | + ids.add(result.getId()); | ||
| 124 | + List<FlowInstanceWrapper> flowByBusinessIdList = flowInstanceWrapperService.getFlowByBusinessIdList(ids); | ||
| 125 | + if (CollectionUtils.isNotEmpty(flowByBusinessIdList)) { | ||
| 126 | + List<String> collect = flowByBusinessIdList.stream().map(FlowInstanceWrapper::getBusinessId).collect(Collectors.toList()); | ||
| 127 | + result.setShowExamineDetail(collect.contains(result.getId())); | ||
| 128 | + } else { | ||
| 129 | + result.setShowExamineDetail(false); | ||
| 112 | } | 130 | } |
| 113 | 131 | ||
| 114 | return InvokeResultBuilder.success(result); | 132 | return InvokeResultBuilder.success(result); |
| @@ -369,6 +369,12 @@ public class CustomerCredit extends BaseEntity implements BaseDto { | @@ -369,6 +369,12 @@ public class CustomerCredit extends BaseEntity implements BaseDto { | ||
| 369 | private Boolean showExamine = false; | 369 | private Boolean showExamine = false; |
| 370 | 370 | ||
| 371 | /** | 371 | /** |
| 372 | + * 是否展示审核详情按钮(非持久化字段) | ||
| 373 | + */ | ||
| 374 | + @TableField(exist = false) | ||
| 375 | + private Boolean showExamineDetail; | ||
| 376 | + | ||
| 377 | + /** | ||
| 372 | * 流程发起人(非持久化字段) | 378 | * 流程发起人(非持久化字段) |
| 373 | */ | 379 | */ |
| 374 | @TableField(exist = false) | 380 | @TableField(exist = false) |
| @@ -72,6 +72,12 @@ public class DelayedShipment extends BaseEntity implements BaseDto { | @@ -72,6 +72,12 @@ public class DelayedShipment extends BaseEntity implements BaseDto { | ||
| 72 | private Boolean showExamine = false; | 72 | private Boolean showExamine = false; |
| 73 | 73 | ||
| 74 | /** | 74 | /** |
| 75 | + * 是否展示审核按钮详情(非持久化字段) | ||
| 76 | + */ | ||
| 77 | + @TableField(exist = false) | ||
| 78 | + private Boolean showExamineDetail; | ||
| 79 | + | ||
| 80 | + /** | ||
| 75 | * 创建人ID | 81 | * 创建人ID |
| 76 | */ | 82 | */ |
| 77 | @TableField(fill = FieldFill.INSERT) | 83 | @TableField(fill = FieldFill.INSERT) |
| @@ -7,6 +7,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; | @@ -7,6 +7,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; | ||
| 7 | import com.fasterxml.jackson.databind.ObjectMapper; | 7 | import com.fasterxml.jackson.databind.ObjectMapper; |
| 8 | import com.github.pagehelper.PageInfo; | 8 | import com.github.pagehelper.PageInfo; |
| 9 | import com.lframework.starter.bpm.dto.FlowTaskDto; | 9 | import com.lframework.starter.bpm.dto.FlowTaskDto; |
| 10 | +import com.lframework.starter.bpm.entity.FlowInstanceWrapper; | ||
| 10 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | 11 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 11 | import com.lframework.starter.bpm.service.FlowDefinitionWrapperService; | 12 | import com.lframework.starter.bpm.service.FlowDefinitionWrapperService; |
| 12 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | 13 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; |
| @@ -111,6 +112,19 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | @@ -111,6 +112,19 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM | ||
| 111 | PageHelperUtil.startPage(pageIndex, pageSize); | 112 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 112 | List<CustomerCredit> datas = this.query(vo); | 113 | List<CustomerCredit> datas = this.query(vo); |
| 113 | if (CollectionUtils.isNotEmpty(datas)) { | 114 | if (CollectionUtils.isNotEmpty(datas)) { |
| 115 | + //流程数据 | ||
| 116 | + List<FlowInstanceWrapper> flowByConditionList = flowInstanceWrapperService.getFlowByBusinessIdList( | ||
| 117 | + datas.stream().map(CustomerCredit::getId).collect(Collectors.toList())); | ||
| 118 | + if (CollectionUtils.isNotEmpty(flowByConditionList)) { | ||
| 119 | + List<String> idList = flowByConditionList.stream().map(FlowInstanceWrapper::getBusinessId).collect(Collectors.toList()); | ||
| 120 | + for (CustomerCredit customerCredit : datas) { | ||
| 121 | + if (idList.contains(customerCredit.getId())) { | ||
| 122 | + customerCredit.setShowExamineDetail(true); | ||
| 123 | + } else { | ||
| 124 | + customerCredit.setShowExamineDetail(false); | ||
| 125 | + } | ||
| 126 | + } | ||
| 127 | + } | ||
| 114 | // 获取当前人员的待办任务数据 | 128 | // 获取当前人员的待办任务数据 |
| 115 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | 129 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| 116 | if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) { | 130 | if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) { |
| @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | ||
| 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | import com.github.pagehelper.PageInfo; | 5 | import com.github.pagehelper.PageInfo; |
| 6 | import com.lframework.starter.bpm.dto.FlowTaskDto; | 6 | import com.lframework.starter.bpm.dto.FlowTaskDto; |
| 7 | +import com.lframework.starter.bpm.entity.FlowInstanceWrapper; | ||
| 7 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; | 8 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 8 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | 9 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; |
| 9 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; | 10 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; |
| @@ -29,10 +30,7 @@ import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto; | @@ -29,10 +30,7 @@ import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto; | ||
| 29 | import com.lframework.starter.web.inner.dto.system.UserInfoDto; | 30 | import com.lframework.starter.web.inner.dto.system.UserInfoDto; |
| 30 | import com.lframework.starter.web.inner.service.system.SysUserRoleService; | 31 | import com.lframework.starter.web.inner.service.system.SysUserRoleService; |
| 31 | import com.lframework.starter.web.inner.service.system.SysUserService; | 32 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| 32 | -import com.lframework.xingyun.sc.entity.DelayedShipment; | ||
| 33 | -import com.lframework.xingyun.sc.entity.DelayedShipmentDetail; | ||
| 34 | -import com.lframework.xingyun.sc.entity.PurchaseOrderInfo; | ||
| 35 | -import com.lframework.xingyun.sc.entity.RequestCarTicket; | 33 | +import com.lframework.xingyun.sc.entity.*; |
| 36 | import com.lframework.xingyun.sc.handlers.TransactorHandler; | 34 | import com.lframework.xingyun.sc.handlers.TransactorHandler; |
| 37 | import com.lframework.xingyun.sc.mappers.DelayedShipmentMapper; | 35 | import com.lframework.xingyun.sc.mappers.DelayedShipmentMapper; |
| 38 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; | 36 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| @@ -93,6 +91,19 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen | @@ -93,6 +91,19 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen | ||
| 93 | PageHelperUtil.startPage(pageIndex, pageSize); | 91 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 94 | List<DelayedShipment> datas = this.query(vo); | 92 | List<DelayedShipment> datas = this.query(vo); |
| 95 | if (CollectionUtils.isNotEmpty(datas)) { | 93 | if (CollectionUtils.isNotEmpty(datas)) { |
| 94 | + //流程数据 | ||
| 95 | + List<FlowInstanceWrapper> flowByConditionList = flowInstanceWrapperService.getFlowByBusinessIdList( | ||
| 96 | + datas.stream().map(DelayedShipment::getId).collect(Collectors.toList())); | ||
| 97 | + if (CollectionUtils.isNotEmpty(flowByConditionList)) { | ||
| 98 | + List<String> idList = flowByConditionList.stream().map(FlowInstanceWrapper::getBusinessId).collect(Collectors.toList()); | ||
| 99 | + for (DelayedShipment delayedShipment : datas) { | ||
| 100 | + if (idList.contains(delayedShipment.getId())) { | ||
| 101 | + delayedShipment.setShowExamineDetail(true); | ||
| 102 | + } else { | ||
| 103 | + delayedShipment.setShowExamineDetail(false); | ||
| 104 | + } | ||
| 105 | + } | ||
| 106 | + } | ||
| 96 | // 获取当前人员的待办任务数据 | 107 | // 获取当前人员的待办任务数据 |
| 97 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); | 108 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| 98 | if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) { | 109 | if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) { |