From 2bb567df8d20199a98bc1b21281e25f1df97c3a6 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Sat, 18 Jan 2025 10:45:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BF=90=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/LogpmDataSearchServiceImpl.java | 60 +++++++++++-------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java index 96afda9b4..6de6a265c 100644 --- a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java +++ b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java @@ -351,45 +351,53 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { int signNum = signListByWaybillNumber.stream().filter(t-> t.getSignNum()!=null).mapToInt(QualityDeliverEntity::getSignNum).sum(); // 配送装车 - QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.get(0); +// QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.get(0); if (loadNum != 0) { - nodeInfoVO = new NodeInfoVO(); - nodeInfoVO.setOperateName("配送装车"); - nodeInfoVO.setOperateNumber(loadNum + ""); - nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName()); - nodeInfoVO.setOperateTime(qualityDeliverEntity.getCreateTime()); - // 增加网点电话 - BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId()); - if (entityWarehouseId != null) { - nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber()); + QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.stream().filter(e -> e.getLoadTime() != null).findFirst().orElse(null); + + if(qualityDeliverEntity != null){ + nodeInfoVO = new NodeInfoVO(); + nodeInfoVO.setOperateName("配送装车"); + nodeInfoVO.setOperateNumber(loadNum + ""); + nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName()); + nodeInfoVO.setOperateTime(qualityDeliverEntity.getLoadTime()); + // 增加网点电话 + BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId()); + if (entityWarehouseId != null) { + nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber()); + } + + nodeInfoVOList.add(nodeInfoVO); } - nodeInfoVOList.add(nodeInfoVO); + } - if (planNum != 0) { - nodeInfoVO = new NodeInfoVO(); - nodeInfoVO.setOperateName("配送签收"); - nodeInfoVO.setOperateNumber(signNum + "/" + loadNum); - nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName()); - nodeInfoVO.setOperateTime(qualityDeliverEntity.getCreateTime()); - // 增加网点电话 - BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId()); - if (entityWarehouseId != null) { - nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber()); + if (signNum != 0) { + + QualityDeliverEntity qualityDeliverEntity = signListByWaybillNumber.stream().filter(e -> e.getSignTime() != null).findFirst().orElse(null); + + if(qualityDeliverEntity != null){ + nodeInfoVO = new NodeInfoVO(); + nodeInfoVO.setOperateName("配送签收"); + nodeInfoVO.setOperateNumber(signNum + "/" + loadNum); + nodeInfoVO.setOperateWarehouseName(qualityDeliverEntity.getWarehouseName()); + nodeInfoVO.setOperateTime(qualityDeliverEntity.getSignTime()); + // 增加网点电话 + BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(qualityDeliverEntity.getWarehouseId()); + if (entityWarehouseId != null) { + nodeInfoVO.setOperateWarehousePhone(entityWarehouseId.getContactNumber()); + } + nodeInfoVOList.add(nodeInfoVO); } - nodeInfoVOList.add(nodeInfoVO); + } } - - //对nodeInfoVOList集合中的作业时间 按照 时间倒序排序 nodeInfoVOList.sort(Comparator.comparing(NodeInfoVO::getOperateTime).reversed()); - - result.setNodeInfoVOList(nodeInfoVOList); // 配送签收