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 cd7aa7f4b..13859a0d5 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 @@ -17,6 +17,7 @@ import com.logpm.trunkline.feign.ITrunklineWaybillOrderClient; import com.logpm.warehouse.entity.WarehouseWaybillEntity; import com.logpm.warehouse.feign.IWarehouseWaybillClient; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springblade.common.exception.CustomerException; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; @@ -27,6 +28,7 @@ import org.springframework.stereotype.Service; import java.util.*; import java.util.stream.Collectors; +@Slf4j @Service @AllArgsConstructor public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { @@ -201,9 +203,10 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { } nodeInfoVOList.add(nodeInfoVO); } - result.setNodeInfoVOList(nodeInfoVOList); + } + result.setNodeInfoVOList(nodeInfoVOList); // 配送签收 return result; @@ -290,6 +293,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { // 干线发车 List allListByWaybillNo = traceCarsLoadScanClient.findAllListByWaybillNo(waybillNo); + log.info( ">> allListByWaybillNo ={}",allListByWaybillNo); if (allListByWaybillNo != null && !allListByWaybillNo.isEmpty()) { // 按照 车次号进行分组 Map> groupedByLoadId = allListByWaybillNo.stream().collect(Collectors.groupingBy(TrunklineCarsLoadScanEntity::getLoadCode)); @@ -356,12 +360,9 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { nodeInfoVOList.add(nodeInfoVO); } - result.setNodeInfoVOList(nodeInfoVOList); - - } - + result.setNodeInfoVOList(nodeInfoVOList); // 配送签收 return result; @@ -371,7 +372,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { // 获取卸车集合 List collect = trunklineCarsLoadScanEntities.stream().filter(t -> t.getScanStatus().equals("2")).collect(Collectors.toList()); - + log.info(">>> collect ={}",collect); if (collect.isEmpty()) { return null; } @@ -379,7 +380,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { NodeInfoVO nodeInfoVO = new NodeInfoVO(); nodeInfoVO.setOperateName("干线到达"); nodeInfoVO.setOperateNumber(collect.size() + ""); - nodeInfoVO.setOperateWarehouseName(trunklineCarsLoadScanEntity.getWarehouseName()); + nodeInfoVO.setOperateWarehouseName(trunklineCarsLoadScanEntity.getUnloadNodeName()); nodeInfoVO.setOperateTime(trunklineCarsLoadScanEntity.getCreateTime()); return nodeInfoVO; @@ -388,7 +389,9 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { private NodeInfoVO buildTrunklineByLoadCar(List trunklineCarsLoadScanEntities, String key) { // 判断trunklineCarsLoadScanEntities 中 warehouseId 不是null的集合 + log.info(">>> trunklineCarsLoadScanEntities ={}",trunklineCarsLoadScanEntities); List collect = trunklineCarsLoadScanEntities.stream().filter(t -> t.getWarehouseId() != null).collect(Collectors.toList()); + log.info(">>> collect ={}",collect); if (collect.isEmpty()) { return null; } @@ -397,13 +400,15 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { nodeInfoVO.setOperateName("干线发车"); nodeInfoVO.setOperateNumber(collect.size() + ""); nodeInfoVO.setOperateWarehouseName(trunklineCarsLoadScanEntity.getWarehouseName()); - nodeInfoVO.setOperateTime(trunklineCarsLoadScanEntity.getCreateTime()); + nodeInfoVO.setOperateTime(trunklineCarsLoadScanEntity.getUnloadTime()); return nodeInfoVO; } private NodeInfoVO buildFristRuKu(Map> groupedByWarehouse, String departureWarehouseName, Integer totalCount) { - + log.info( " >>> groupedByWarehouse={}",groupedByWarehouse); + log.info(" >>> departureWarehouseName={}",departureWarehouseName); + log.info(" >>> departureWarehouseName={}",totalCount); if(groupedByWarehouse.isEmpty()){ return null; } @@ -412,6 +417,7 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService { nodeInfoVO.setOperateName("入库"); nodeInfoVO.setOperateWarehouseName(departureWarehouseName); List distributionParcelListEntities = groupedByWarehouse.get(departureWarehouseName); + log.info("入库集合:{}",distributionParcelListEntities); if(distributionParcelListEntities==null || distributionParcelListEntities.isEmpty()){ return null; } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java index bca70eb7f..c57e17a78 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java @@ -56,13 +56,13 @@ public class MapWarehouseServiceImpl implements IMapWarehouseService { String[] endWarehouseIds = lineInfoVO.getEndWarehouseIds().split(","); Long endWarehouseId = Long.valueOf(endWarehouseIds[endWarehouseIds.length - 1]); WarehouseInfoVO warehouseInfo = warehouseInfoMap.get(endWarehouseId); - - targetWarehouse.setWarehouseId(endWarehouseId); - targetWarehouse.setWarehouseName(warehouseInfo.getWarehouseName()); - targetWarehouse.setLat(warehouseInfo.getLat()); - targetWarehouse.setLng(warehouseInfo.getLng()); - - target.add(targetWarehouse); + if(warehouseInfo!=null){ + targetWarehouse.setWarehouseId(endWarehouseId); + targetWarehouse.setWarehouseName(warehouseInfo.getWarehouseName()); + targetWarehouse.setLat(warehouseInfo.getLat()); + targetWarehouse.setLng(warehouseInfo.getLng()); + target.add(targetWarehouse); + } }); mapWarehouseVO.setTarget(target);