Browse Source

Merge remote-tracking branch 'origin/pre-production' into pre-production

pre-production
pref_mail@163.com 3 months ago
parent
commit
33a8ec0dd2
  1. 24
      blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java
  2. 4
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java

24
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<TrunklineCarsLoadScanEntity> allListByWaybillNo = traceCarsLoadScanClient.findAllListByWaybillNo(waybillNo);
log.info( ">> allListByWaybillNo ={}",allListByWaybillNo);
if (allListByWaybillNo != null && !allListByWaybillNo.isEmpty()) {
// 按照 车次号进行分组
Map<String, List<TrunklineCarsLoadScanEntity>> 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<TrunklineCarsLoadScanEntity> 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<TrunklineCarsLoadScanEntity> trunklineCarsLoadScanEntities, String key) {
// 判断trunklineCarsLoadScanEntities 中 warehouseId 不是null的集合
log.info(">>> trunklineCarsLoadScanEntities ={}",trunklineCarsLoadScanEntities);
List<TrunklineCarsLoadScanEntity> 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<String, List<DistributionParcelListEntity>> 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<DistributionParcelListEntity> distributionParcelListEntities = groupedByWarehouse.get(departureWarehouseName);
log.info("入库集合:{}",distributionParcelListEntities);
if(distributionParcelListEntities==null || distributionParcelListEntities.isEmpty()){
return null;
}

4
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);
if(warehouseInfo!=null){
targetWarehouse.setWarehouseId(endWarehouseId);
targetWarehouse.setWarehouseName(warehouseInfo.getWarehouseName());
targetWarehouse.setLat(warehouseInfo.getLat());
targetWarehouse.setLng(warehouseInfo.getLng());
target.add(targetWarehouse);
}
});
mapWarehouseVO.setTarget(target);

Loading…
Cancel
Save