Browse Source

调试运单查询

dev
pref_mail@163.com 6 days ago
parent
commit
a899e6e4f2
  1. 12
      blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/LogpmDataSearchServiceImpl.java

12
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 {
@ -290,6 +292,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));
@ -371,7 +374,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;
}
@ -388,7 +391,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;
}
@ -403,7 +408,9 @@ public class LogpmDataSearchServiceImpl implements ILogpmDataSearchService {
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 +419,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;
}

Loading…
Cancel
Save