|
|
@@ -2003,12 +2003,14 @@ public class WaybillOrderService {
|
|
|
log.info("当前企业无贸易订单!,entId:{}", param.getEntId());
|
|
|
return new ArrayList<>();
|
|
|
}
|
|
|
+ log.info("贸易订单,size:{}", tOrderIds.size());
|
|
|
|
|
|
// 2. 采购商
|
|
|
List<OrderUnitInfoDetailVO> tOrderUnit= tradeOrderInfoService.queryOrderUnitInfByTOrderIds(tOrderIds, "1");
|
|
|
if (CollectionUtils.isEmpty(tOrderUnit)) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.TRADE_ORDER_NOT_FOUND, "采购商不存在,tOrderIds:" + JSON.toJSONString(tOrderIds));
|
|
|
}
|
|
|
+ log.info("采购商,size:{}", tOrderUnit.size());
|
|
|
Map<Long, OrderUnitInfoDetailVO> tOrderUnitMap = tOrderUnit.stream()
|
|
|
.collect(Collectors.toMap(OrderUnitInfoDetailVO::getTOrderId, Function.identity(), (x, y) -> x));
|
|
|
|
|
|
@@ -2017,6 +2019,7 @@ public class WaybillOrderService {
|
|
|
if (CollectionUtils.isEmpty(tOrderGoodsVos)) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.TRADE_ORDER_NOT_FOUND, "贸易商品不存在,tOrderIds:" + JSON.toJSONString(tOrderIds));
|
|
|
}
|
|
|
+ log.info("贸易商品,size:{}", tOrderGoodsVos.size());
|
|
|
Map<Long, TradeOrderGoodsVo> tOrderGoodsMap = tOrderGoodsVos.stream()
|
|
|
.collect(Collectors.toMap(TradeOrderGoodsVo::getTradeOrderId, Function.identity(), (x, y) -> x));
|
|
|
|
|
|
@@ -2025,6 +2028,7 @@ public class WaybillOrderService {
|
|
|
if (CollectionUtils.isEmpty(logisticsOrders)) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.LOGISTICS_ORDER_NOT_FOUND, "物流订单不存在,tOrderIds:" + JSON.toJSONString(tOrderIds));
|
|
|
}
|
|
|
+ log.info("物流订单,size:{}", logisticsOrders.size());
|
|
|
Set<Long> lOrderIds= logisticsOrders.stream().map(KwtLogisticsOrder::getId).collect(Collectors.toSet());
|
|
|
Map<Long, KwtLogisticsOrder> logOrderMap = logisticsOrders.stream()
|
|
|
.collect(Collectors.toMap(KwtLogisticsOrder::getId, Function.identity(), (x, y) -> x));
|
|
|
@@ -2034,18 +2038,21 @@ public class WaybillOrderService {
|
|
|
if (CollectionUtils.isEmpty(lOrderAddresseList)) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.LOGISTICS_ADDRESS_NOT_FOUND, "物流订单卸货信息不存在,lOrderIds:" + JSON.toJSONString(lOrderIds));
|
|
|
}
|
|
|
+ log.info("物流卸货订单,size:{}", lOrderAddresseList.size());
|
|
|
Map<Long, KwtLogisticsOrderAddress> addressMap = lOrderAddresseList.stream()
|
|
|
.collect(Collectors.toMap(KwtLogisticsOrderAddress::getLOrderId, Function.identity(), (x, y) -> x));
|
|
|
|
|
|
// 6.运单
|
|
|
List<KwtWaybillOrder> waybillOrderList = queryWaybillOrders(param, lOrderIds);
|
|
|
List<Long> wOrderIds = waybillOrderList.stream().map(KwtWaybillOrder::getId).collect(Collectors.toList());
|
|
|
+ log.info("运单,size:{}", wOrderIds.size());
|
|
|
|
|
|
// 7. 运单装货单
|
|
|
List<KwtWaybillOrderTicket> ticketList = waybillOrderTicketRepository.queryByWOrderIdsAndType(wOrderIds, Global.ADDRESS_LOAD);
|
|
|
if (CollectionUtils.isEmpty(ticketList)) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_NOT_FOUND, "运单装货单不存在,wOrderIds:" + JSON.toJSONString(wOrderIds));
|
|
|
}
|
|
|
+ log.info("运单装货单,size:{}", ticketList.size());
|
|
|
Map<Long, KwtWaybillOrderTicket> ticketMap = ticketList.stream()
|
|
|
.collect(Collectors.toMap(KwtWaybillOrderTicket::getWOrderId, Function.identity(), (x, y) -> x));
|
|
|
|
|
|
@@ -2054,6 +2061,7 @@ public class WaybillOrderService {
|
|
|
if (CollectionUtils.isEmpty(gatekeepers)) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_NOT_FOUND, "门卫运单不存在,wOrderIds:" + JSON.toJSONString(wOrderIds));
|
|
|
}
|
|
|
+ log.info("门卫,size:{}", gatekeepers.size());
|
|
|
Map<Long, KwtGatekeeperWaybillOrder> gatekeeperMap = gatekeepers.stream()
|
|
|
.collect(Collectors.toMap(KwtGatekeeperWaybillOrder::getWOrderId, Function.identity(), (x, y) -> x));
|
|
|
|
|
|
@@ -2062,6 +2070,7 @@ public class WaybillOrderService {
|
|
|
if (CollectionUtils.isEmpty(forklifts)) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_NOT_FOUND, "铲车订单不存在,wOrderIds:" + JSON.toJSONString(wOrderIds));
|
|
|
}
|
|
|
+ log.info("铲车,size:{}", forklifts.size());
|
|
|
Map<Long, KwtForkliftWaybillOrder> forkliftMap = forklifts.stream().collect(Collectors.toMap(KwtForkliftWaybillOrder::getWOrderId, Function.identity(), (x, y) -> x));
|
|
|
|
|
|
//组装参数
|
|
|
@@ -2069,7 +2078,7 @@ public class WaybillOrderService {
|
|
|
.map(waybillOrder -> {
|
|
|
return getWaybillOrderReport(waybillOrder, tOrderUnitMap, tOrderGoodsMap, logOrderMap, addressMap, ticketMap, gatekeeperMap, forkliftMap);
|
|
|
}).collect(Collectors.toList());
|
|
|
- log.info("[报表]查询运单每日报表结算,还未分组, size:{}",orderList.size());
|
|
|
+ log.info("[报表]查询运单每日报表结束,还未分组, size:{}",orderList.size());
|
|
|
return orderList;
|
|
|
}
|
|
|
|
|
|
@@ -2089,9 +2098,7 @@ public class WaybillOrderService {
|
|
|
.eq(KwtWaybillOrder::getDelFlag, 0)
|
|
|
.orderByDesc(KwtWaybillOrder::getUpdateTime);
|
|
|
|
|
|
- Page<KwtWaybillOrder> pageList = waybillOrderRepository.page(new Page<>(param.getPageNum(), param.getPageSize()), queryWrapper);
|
|
|
-
|
|
|
- List<KwtWaybillOrder> waybillOrderList = pageList.getRecords();
|
|
|
+ List<KwtWaybillOrder> waybillOrderList = waybillOrderRepository.list(queryWrapper);
|
|
|
if (CollectionUtils.isEmpty(waybillOrderList)) {
|
|
|
throw new BusinessPlatfromException(ErrorCodeEnum.WAYBILL_ORDER_NOT_FOUND, "物流运单不存在,lOrderIds:" + JSON.toJSONString(lOrderIds));
|
|
|
}
|