Commit 00afd91a64ea7b1c371dc245f049b0cb9fdbb9d9
Merge branch 'master_after20' into master_cj_zq
# Conflicts: # xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/shipments/delay/DelayedShipmentController.java
Showing
19 changed files
with
180 additions
and
21 deletions
| ... | ... | @@ -96,7 +96,7 @@ |
| 96 | 96 | </if> |
| 97 | 97 | </if> |
| 98 | 98 | </where> |
| 99 | - ORDER BY c.code | |
| 99 | + ORDER BY c.create_time desc | |
| 100 | 100 | </select> |
| 101 | 101 | |
| 102 | 102 | <select id="getByName" resultMap="CustomerDto"> |
| ... | ... | @@ -147,6 +147,6 @@ |
| 147 | 147 | </choose> |
| 148 | 148 | </if> |
| 149 | 149 | </where> |
| 150 | - ORDER BY c.code | |
| 150 | + ORDER BY c.create_time desc | |
| 151 | 151 | </select> |
| 152 | 152 | </mapper> | ... | ... |
| ... | ... | @@ -462,6 +462,12 @@ public class GetCustomerCreditBo extends BaseBo<CustomerCredit> implements BaseD |
| 462 | 462 | @ApiModelProperty(value = "是否展示审核按钮") |
| 463 | 463 | private Boolean showExamine; |
| 464 | 464 | |
| 465 | + /** | |
| 466 | + * 是否展示审核详情按钮(非持久化字段) | |
| 467 | + */ | |
| 468 | + @ApiModelProperty(value = "是否展示审核按钮") | |
| 469 | + private Boolean showExamineDetail; | |
| 470 | + | |
| 465 | 471 | |
| 466 | 472 | /** |
| 467 | 473 | * 企业操作类型 | ... | ... |
| ... | ... | @@ -147,6 +147,12 @@ public class GetPurchaseOrderLineBo extends BaseBo<PurchaseOrderLine> { |
| 147 | 147 | @ApiModelProperty("包装费") |
| 148 | 148 | private BigDecimal packagingFee; |
| 149 | 149 | |
| 150 | + /** | |
| 151 | + * 是否已发货 | |
| 152 | + */ | |
| 153 | + @ApiModelProperty("是否已发货") | |
| 154 | + private Boolean shipment; | |
| 155 | + | |
| 150 | 156 | public GetPurchaseOrderLineBo() { |
| 151 | 157 | |
| 152 | 158 | } | ... | ... |
| ... | ... | @@ -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 | */ | ... | ... |
| ... | ... | @@ -71,6 +71,12 @@ public class GetDelayedShipmentBo extends BaseBo<DelayedShipment> { |
| 71 | 71 | private Boolean showExamine; |
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | + * 是否展示审核详情按钮(非持久化字段) | |
| 75 | + */ | |
| 76 | + @ApiModelProperty("是否展示审核详情按钮") | |
| 77 | + private Boolean showExamineDetail; | |
| 78 | + | |
| 79 | + /** | |
| 74 | 80 | * 是否是创建人(非持久化字段) |
| 75 | 81 | */ |
| 76 | 82 | @ApiModelProperty("是否是创建人") | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/customer/CustomerCreditController.java
| ... | ... | @@ -4,7 +4,9 @@ import com.alibaba.excel.EasyExcel; |
| 4 | 4 | import com.alibaba.excel.ExcelWriter; |
| 5 | 5 | import com.alibaba.excel.write.metadata.WriteSheet; |
| 6 | 6 | import com.lframework.starter.bpm.dto.FlowTaskDto; |
| 7 | +import com.lframework.starter.bpm.entity.FlowInstanceWrapper; | |
| 7 | 8 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 9 | +import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | |
| 8 | 10 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; |
| 9 | 11 | import com.lframework.starter.common.utils.StringUtil; |
| 10 | 12 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| ... | ... | @@ -86,6 +88,8 @@ public class CustomerCreditController extends DefaultBaseController { |
| 86 | 88 | private ContractDistributorStandardService contractDistributorStandardService; |
| 87 | 89 | @Resource |
| 88 | 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 | 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 | 519 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| 505 | 520 | if (CollectionUtils.isNotEmpty(flowTaskList)) { |
| 506 | 521 | List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); |
| 507 | 522 | data.setShowExamine(businessIds.contains(credit.getId())); |
| 523 | + } else { | |
| 524 | + data.setShowExamine(false); | |
| 508 | 525 | } |
| 509 | 526 | // enterpriseOperationType 转中文 |
| 510 | 527 | String opType = data.getEnterpriseOperationType(); | ... | ... |
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/PurchaseOrderInfoController.java
| ... | ... | @@ -415,6 +415,8 @@ public class PurchaseOrderInfoController extends DefaultBaseController { |
| 415 | 415 | dataMap.put("regionName", data.getRegionName() == null ? "" : data.getRegionName()); |
| 416 | 416 | //备货单位名称 |
| 417 | 417 | dataMap.put("stockUpCompanyName", data.getStockUpCompanyName() == null ? "" : data.getStockUpCompanyName()); |
| 418 | + //价格表编号 | |
| 419 | + dataMap.put("priceListNo", data.getPriceListNo()); | |
| 418 | 420 | |
| 419 | 421 | processTemplate(workbook, dataMap); |
| 420 | 422 | ... | ... |
| ... | ... | @@ -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 | 3 | import com.lframework.starter.bpm.dto.FlowTaskDto; |
| 4 | +import com.lframework.starter.bpm.entity.FlowInstanceWrapper; | |
| 4 | 5 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 6 | +import com.lframework.starter.bpm.service.FlowInstanceWrapperService; | |
| 5 | 7 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; |
| 6 | 8 | import com.lframework.starter.web.core.annotations.security.HasPermission; |
| 7 | 9 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| ... | ... | @@ -9,6 +11,7 @@ import com.lframework.starter.web.core.controller.DefaultBaseController; |
| 9 | 11 | import com.lframework.starter.web.core.utils.PageResultUtil; |
| 10 | 12 | import com.lframework.starter.web.core.components.resp.PageResult; |
| 11 | 13 | import com.lframework.starter.web.core.components.resp.InvokeResult; |
| 14 | + | |
| 12 | 15 | import javax.annotation.Resource; |
| 13 | 16 | import javax.validation.constraints.NotBlank; |
| 14 | 17 | import com.lframework.xingyun.sc.bo.shipments.delay.GetDelayedShipmentBo; |
| ... | ... | @@ -32,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 32 | 35 | import org.springframework.validation.annotation.Validated; |
| 33 | 36 | import org.springframework.web.bind.annotation.*; |
| 34 | 37 | import javax.validation.Valid; |
| 38 | +import java.util.ArrayList; | |
| 35 | 39 | import java.util.List; |
| 36 | 40 | import java.util.stream.Collectors; |
| 37 | 41 | |
| ... | ... | @@ -51,6 +55,8 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 51 | 55 | private DelayedShipmentDetailService delayedShipmentDetailService; |
| 52 | 56 | @Resource |
| 53 | 57 | private FlowTaskWrapperMapper flowTaskWrapperMapper; |
| 58 | + @Resource | |
| 59 | + private FlowInstanceWrapperService flowInstanceWrapperService; | |
| 54 | 60 | |
| 55 | 61 | /** |
| 56 | 62 | * 查询列表 |
| ... | ... | @@ -103,24 +109,25 @@ public class DelayedShipmentController extends DefaultBaseController { |
| 103 | 109 | QueryDelayedShipmentDetailVo vo = new QueryDelayedShipmentDetailVo(); |
| 104 | 110 | vo.setDelayedShipmentId(id); |
| 105 | 111 | List<DelayedShipmentDetail> delayedShipmentDetailList = delayedShipmentDetailService.query(vo); |
| 106 | - String currentUserId = SecurityUtil.getCurrentUser().getId(); | |
| 107 | - // 判断 createById 是否等于当前用户 ID | |
| 108 | - boolean isCreateBy = false; | |
| 109 | - if (currentUserId.equals(data.getCreateById())) { | |
| 110 | - isCreateBy = true; | |
| 111 | - } | |
| 112 | - result.setDelayedCreateBy(isCreateBy); | |
| 112 | + result.setDelayedShipmentDetailList(delayedShipmentDetailList); | |
| 113 | 113 | // 获取当前人员的待办任务数据 |
| 114 | 114 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| 115 | 115 | if (CollectionUtils.isNotEmpty(flowTaskList)) { |
| 116 | - List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 117 | - if (ids.contains(data.getId())) { | |
| 118 | - result.setShowExamine(true); | |
| 119 | - } else { | |
| 120 | - result.setShowExamine(false); | |
| 121 | - } | |
| 116 | + List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList()); | |
| 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); | |
| 122 | 130 | } |
| 123 | - result.setDelayedShipmentDetailList(delayedShipmentDetailList); | |
| 124 | 131 | |
| 125 | 132 | return InvokeResultBuilder.success(result); |
| 126 | 133 | } | ... | ... |
| ... | ... | @@ -369,6 +369,12 @@ public class CustomerCredit extends BaseEntity implements BaseDto { |
| 369 | 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 | 380 | @TableField(exist = false) | ... | ... |
| ... | ... | @@ -72,6 +72,12 @@ public class DelayedShipment extends BaseEntity implements BaseDto { |
| 72 | 72 | private Boolean showExamine = false; |
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | + * 是否展示审核按钮详情(非持久化字段) | |
| 76 | + */ | |
| 77 | + @TableField(exist = false) | |
| 78 | + private Boolean showExamineDetail; | |
| 79 | + | |
| 80 | + /** | |
| 75 | 81 | * 创建人ID |
| 76 | 82 | */ |
| 77 | 83 | @TableField(fill = FieldFill.INSERT) | ... | ... |
| ... | ... | @@ -7,6 +7,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; |
| 7 | 7 | import com.fasterxml.jackson.databind.ObjectMapper; |
| 8 | 8 | import com.github.pagehelper.PageInfo; |
| 9 | 9 | import com.lframework.starter.bpm.dto.FlowTaskDto; |
| 10 | +import com.lframework.starter.bpm.entity.FlowInstanceWrapper; | |
| 10 | 11 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 11 | 12 | import com.lframework.starter.bpm.service.FlowDefinitionWrapperService; |
| 12 | 13 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; |
| ... | ... | @@ -111,6 +112,19 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
| 111 | 112 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 112 | 113 | List<CustomerCredit> datas = this.query(vo); |
| 113 | 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 | 129 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| 116 | 130 | if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) { | ... | ... |
| ... | ... | @@ -27,7 +27,10 @@ import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| 27 | 27 | import com.lframework.xingyun.sc.service.order.PurchaseOrderLineService; |
| 28 | 28 | import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanDetailService; |
| 29 | 29 | import com.lframework.xingyun.sc.service.shipments.ShipmentsPlanService; |
| 30 | +import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentDetailService; | |
| 31 | +import com.lframework.xingyun.sc.service.shipments.delay.DelayedShipmentService; | |
| 30 | 32 | import com.lframework.xingyun.sc.utils.CommonUtil; |
| 33 | +import com.lframework.xingyun.sc.vo.shipments.delay.QueryDelayedShipmentVo; | |
| 31 | 34 | import com.lframework.xingyun.sc.vo.shipments.plan.*; |
| 32 | 35 | import org.apache.commons.collections4.CollectionUtils; |
| 33 | 36 | import org.apache.commons.lang3.StringUtils; |
| ... | ... | @@ -61,6 +64,11 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
| 61 | 64 | private SysRoleService sysRoleService; |
| 62 | 65 | @Resource |
| 63 | 66 | private SysUserDeptService sysUserDeptService; |
| 67 | + @Resource | |
| 68 | + private DelayedShipmentService delayedShipmentService; | |
| 69 | + @Resource | |
| 70 | + private DelayedShipmentDetailService delayedShipmentDetailService; | |
| 71 | + | |
| 64 | 72 | |
| 65 | 73 | |
| 66 | 74 | @Override |
| ... | ... | @@ -208,12 +216,36 @@ public class ShipmentsPlanDetailServiceImpl extends BaseMpServiceImpl<ShipmentsP |
| 208 | 216 | existOrderSpecIds.addAll(orderSpecIds); |
| 209 | 217 | } |
| 210 | 218 | } |
| 219 | + //延期发货单中审核中、审核驳回的数据不可被选择 | |
| 220 | + QueryDelayedShipmentVo vo1 = new QueryDelayedShipmentVo(); | |
| 221 | + vo1.setStatus("AUDIT"); | |
| 222 | + List<DelayedShipment> query = delayedShipmentService.query(vo1); | |
| 223 | + List<String> ids = new ArrayList<>(); | |
| 224 | + if (CollectionUtils.isNotEmpty(query)) { | |
| 225 | + ids = query.stream().map(DelayedShipment::getId).collect(Collectors.toList()); | |
| 226 | + } | |
| 227 | + QueryDelayedShipmentVo vo2 = new QueryDelayedShipmentVo(); | |
| 228 | + vo2.setStatus("REFUSE"); | |
| 229 | + List<DelayedShipment> query1 = delayedShipmentService.query(vo2); | |
| 230 | + if (CollectionUtils.isNotEmpty(query1)) { | |
| 231 | + ids.addAll(query.stream().map(DelayedShipment::getId).collect(Collectors.toList())); | |
| 232 | + } | |
| 233 | + List<String> orderSpecIdList = new ArrayList<>(); | |
| 234 | + if (CollectionUtils.isNotEmpty(ids)) { | |
| 235 | + List<DelayedShipmentDetail> delayedShipmentDetails = delayedShipmentDetailService.queryByList(ids); | |
| 236 | + if (CollectionUtils.isNotEmpty(delayedShipmentDetails)) { | |
| 237 | + orderSpecIdList = delayedShipmentDetails.stream().map(DelayedShipmentDetail::getOrderSpecId).collect(Collectors.toList()); | |
| 238 | + } | |
| 239 | + } | |
| 211 | 240 | List<String> orderSpecIds = vo.getOrderSpecIds(); |
| 212 | 241 | if (CollectionUtils.isNotEmpty(orderSpecIds)) { |
| 213 | 242 | orderSpecIds.addAll(existOrderSpecIds); |
| 214 | 243 | } else { |
| 215 | 244 | orderSpecIds = existOrderSpecIds; |
| 216 | 245 | } |
| 246 | + if (CollectionUtils.isNotEmpty(orderSpecIdList)) { | |
| 247 | + orderSpecIds.addAll(orderSpecIdList); | |
| 248 | + } | |
| 217 | 249 | vo.setOrderSpecIds(orderSpecIds); |
| 218 | 250 | // 业务员做权限控制 |
| 219 | 251 | List<String> userIds = new ArrayList<>(); | ... | ... |
| 1 | 1 | package com.lframework.xingyun.sc.impl.shipments.delay; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
| 3 | 4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 6 | import com.github.pagehelper.PageInfo; |
| ... | ... | @@ -48,6 +49,14 @@ public class DelayedShipmentDetailServiceImpl extends BaseMpServiceImpl<DelayedS |
| 48 | 49 | } |
| 49 | 50 | |
| 50 | 51 | @Override |
| 52 | + public List<DelayedShipmentDetail> queryByList(List<String> delayedShipmentIds) { | |
| 53 | + LambdaQueryWrapper<DelayedShipmentDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(DelayedShipmentDetail.class); | |
| 54 | + lambdaQueryWrapper.in(DelayedShipmentDetail::getDelayedShipmentId, delayedShipmentIds); | |
| 55 | + | |
| 56 | + return getBaseMapper().selectList(lambdaQueryWrapper); | |
| 57 | + } | |
| 58 | + | |
| 59 | + @Override | |
| 51 | 60 | public DelayedShipmentDetail findById(String id) { |
| 52 | 61 | |
| 53 | 62 | return getBaseMapper().findById(id); | ... | ... |
| ... | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 5 | import com.github.pagehelper.PageInfo; |
| 6 | 6 | import com.lframework.starter.bpm.dto.FlowTaskDto; |
| 7 | +import com.lframework.starter.bpm.entity.FlowInstanceWrapper; | |
| 7 | 8 | import com.lframework.starter.bpm.mappers.FlowTaskWrapperMapper; |
| 8 | 9 | import com.lframework.starter.bpm.service.FlowInstanceWrapperService; |
| 9 | 10 | import com.lframework.starter.bpm.vo.flow.task.QueryTodoTaskListVo; |
| ... | ... | @@ -29,10 +30,7 @@ import com.lframework.starter.web.inner.dto.message.SysSiteMessageDto; |
| 29 | 30 | import com.lframework.starter.web.inner.dto.system.UserInfoDto; |
| 30 | 31 | import com.lframework.starter.web.inner.service.system.SysUserRoleService; |
| 31 | 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 | 34 | import com.lframework.xingyun.sc.handlers.TransactorHandler; |
| 37 | 35 | import com.lframework.xingyun.sc.mappers.DelayedShipmentMapper; |
| 38 | 36 | import com.lframework.xingyun.sc.service.order.PurchaseOrderInfoService; |
| ... | ... | @@ -93,6 +91,19 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 93 | 91 | PageHelperUtil.startPage(pageIndex, pageSize); |
| 94 | 92 | List<DelayedShipment> datas = this.query(vo); |
| 95 | 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 | 108 | List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId()); |
| 98 | 109 | if (org.apache.commons.collections4.CollectionUtils.isEmpty(flowTaskList)) { |
| ... | ... | @@ -297,7 +308,7 @@ public class DelayedShipmentServiceImpl extends BaseMpServiceImpl<DelayedShipmen |
| 297 | 308 | if (CollectionUtils.isNotEmpty(userIds)) { |
| 298 | 309 | userIdList.addAll(userIds); |
| 299 | 310 | } |
| 300 | - } else if ("sfc".equals(workshopCode)) { | |
| 311 | + } else if ("ztfc".equals(workshopCode)) { | |
| 301 | 312 | //经营办计划员、经营办发货员、经营办主管 |
| 302 | 313 | codeList.add("ztfcjybjhy"); |
| 303 | 314 | codeList.add("ztfcjybfhy"); | ... | ... |
| ... | ... | @@ -27,6 +27,13 @@ public interface DelayedShipmentDetailService extends BaseMpService<DelayedShipm |
| 27 | 27 | List<DelayedShipmentDetail> query(QueryDelayedShipmentDetailVo vo); |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | + * 根据延期发货单ids,查询 | |
| 31 | + * @param delayedShipmentIds | |
| 32 | + * @return | |
| 33 | + */ | |
| 34 | + List<DelayedShipmentDetail> queryByList(List<String> delayedShipmentIds); | |
| 35 | + | |
| 36 | + /** | |
| 30 | 37 | * 根据ID查询 |
| 31 | 38 | * @param id |
| 32 | 39 | * @return | ... | ... |
| ... | ... | @@ -25,6 +25,7 @@ |
| 25 | 25 | <result column="show_order" property="showOrder"/> |
| 26 | 26 | <result column="assessment_exceeds_agreement" property="assessmentExceedsAgreement"/> |
| 27 | 27 | <result column="packaging_fee" property="packagingFee"/> |
| 28 | + <result column="shipment" property="shipment"/> | |
| 28 | 29 | <result column="create_by_id" property="createById"/> |
| 29 | 30 | <result column="create_by" property="createBy"/> |
| 30 | 31 | <result column="update_by_id" property="updateById"/> |
| ... | ... | @@ -57,6 +58,7 @@ |
| 57 | 58 | tb.show_order, |
| 58 | 59 | tb.assessment_exceeds_agreement, |
| 59 | 60 | tb.packaging_fee, |
| 61 | + tb.shipment, | |
| 60 | 62 | tb.create_by_id, |
| 61 | 63 | tb.create_by, |
| 62 | 64 | tb.update_by_id, | ... | ... |
No preview for this file type