|
|
|
@ -54,6 +54,7 @@ import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
|
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseWaybillClient; |
|
|
|
|
import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient; |
|
|
|
|
import com.logpm.warehouse.vo.WaybillOrderTotalWeightAndVolumeVO; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.lang.StringEscapeUtils; |
|
|
|
@ -4516,15 +4517,35 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
trunklineCarsLoadVO.setCarsLoadLineList(loadLineList); |
|
|
|
|
|
|
|
|
|
List<CarsLoadWaybillInfoVO> carsLoadWaybillInfoList = trunklineCarsOrderService.findWaybillOrderByloadId(loadId); |
|
|
|
|
|
|
|
|
|
// 得到集合中的运单号集合
|
|
|
|
|
// List<String> waybillNoList = carsLoadWaybillInfoList.stream().map(CarsLoadWaybillInfoVO::getWaybillNo).collect(Collectors.toList());
|
|
|
|
|
// 查询运单号的总量、体积
|
|
|
|
|
// List<WaybillOrderTotalWeightAndVolumeVO> waybillOrderTotalList = warehouseWaybillDetailClient.findWaybillOrderTotalWeightAndVolumeByWaybillNoList(waybillNoList);
|
|
|
|
|
|
|
|
|
|
for (CarsLoadWaybillInfoVO carsLoadWaybillInfoVO : carsLoadWaybillInfoList) { |
|
|
|
|
String waybillNo = carsLoadWaybillInfoVO.getWaybillNo(); |
|
|
|
|
List<WarehouseWayBillDetail> wayBillDetails = warehouseWaybillDetailClient.findListByWaybillNo(waybillNo); |
|
|
|
|
|
|
|
|
|
// 获取运单对应的总体积和总重量
|
|
|
|
|
// WaybillOrderTotalWeightAndVolumeVO waybillOrderTotalWeightAndVolumeVO = getWaybillOrderTotalWeighAndVolume(carsLoadWaybillInfoVO, waybillOrderTotalList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String waybillNo = carsLoadWaybillInfoVO.getWaybillNo(); |
|
|
|
|
// 查询 明细上的总量和体积
|
|
|
|
|
String openPrice = null; |
|
|
|
|
String productNames = null; |
|
|
|
|
BigDecimal oneWeight = BigDecimal.ZERO; |
|
|
|
|
BigDecimal oneVolume = BigDecimal.ZERO; |
|
|
|
|
if(!StringUtil.isBlank(waybillNo)){ |
|
|
|
|
List<WarehouseWayBillDetail> wayBillDetails = warehouseWaybillDetailClient.findListByWaybillNo(waybillNo); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (WarehouseWayBillDetail wayBillDetail : wayBillDetails) { |
|
|
|
|
String productName = wayBillDetail.getProductName(); |
|
|
|
|
Integer num = wayBillDetail.getNum(); |
|
|
|
|
BigDecimal volume = wayBillDetail.getVolume(); |
|
|
|
|
BigDecimal weight = wayBillDetail.getWeight(); |
|
|
|
|
BigDecimal price = wayBillDetail.getPrice(); |
|
|
|
|
if (StringUtil.isBlank(openPrice)) { |
|
|
|
|
openPrice = price.toPlainString(); |
|
|
|
@ -4537,20 +4558,28 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
productNames = productNames + "," + productName + "(" + num + ")"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
carsLoadWaybillInfoVO.setOpenPrice(openPrice); |
|
|
|
|
carsLoadWaybillInfoVO.setGoodsName(productNames); |
|
|
|
|
|
|
|
|
|
// List<CarsLoadOrderInfoVO> carsLoadOrderInfoList = trunklineCarsOrderService.findCarsLoadOrderInfoList(loadId, waybillNo);
|
|
|
|
|
|
|
|
|
|
List<CarsLoadOrderInfoVO> carsLoadOrderInfoListPlan = trunklineCarsOrderService.findCarsLoadOrderInfoListPlan(loadId, waybillNo); |
|
|
|
|
|
|
|
|
|
carsLoadOrderInfoListPlan.forEach(carsLoadOrderInfoVO -> { |
|
|
|
|
carsLoadOrderInfoVO.setUnloadIncome(carsLoadOrderInfoVO.getUnloadIncome().setScale(2, BigDecimal.ROUND_HALF_UP)); |
|
|
|
|
carsLoadOrderInfoVO.setOrderFreight(carsLoadOrderInfoVO.getOrderFreight().setScale(2, BigDecimal.ROUND_HALF_UP)); |
|
|
|
|
}); |
|
|
|
|
carsLoadWaybillInfoVO.setCarsLoadOrderInfoList(carsLoadOrderInfoListPlan); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
carsLoadWaybillInfoVO.setOpenPrice(openPrice); |
|
|
|
|
carsLoadWaybillInfoVO.setGoodsName(productNames); |
|
|
|
|
|
|
|
|
|
// List<CarsLoadOrderInfoVO> carsLoadOrderInfoList = trunklineCarsOrderService.findCarsLoadOrderInfoList(loadId, waybillNo);
|
|
|
|
|
|
|
|
|
|
if(!StringUtil.isBlank(waybillNo)){ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
carsLoadWaybillInfoVO.setCarsLoadOrderInfoList(carsLoadOrderInfoListPlan); |
|
|
|
|
// carsLoadWaybillInfoVO.setCarsLoadOrderInfoListPlan(carsLoadOrderInfoListPlan);
|
|
|
|
|
|
|
|
|
|
TrunklineCostShareRecordEntity costShareRecordEntity = trunklineCostShareRecordService.findTotalUnloadNumByLoadAndWaybillNo(loadId, waybillNo); |
|
|
|
@ -4660,6 +4689,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
|
|
|
|
|
return R.data(trunklineCarsLoadVO); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private WaybillOrderTotalWeightAndVolumeVO getWaybillOrderTotalWeighAndVolume(CarsLoadWaybillInfoVO carsLoadWaybillInfoVO, List<WaybillOrderTotalWeightAndVolumeVO> waybillOrderTotalList) { |
|
|
|
|
for (WaybillOrderTotalWeightAndVolumeVO waybillOrderTotalWeightAndVolumeVO : waybillOrderTotalList) { |
|
|
|
|
String waybillNo = waybillOrderTotalWeightAndVolumeVO.getWaybillNo(); |
|
|
|
|
if (waybillNo.equals(carsLoadWaybillInfoVO.getWaybillNo())) { |
|
|
|
|
return waybillOrderTotalWeightAndVolumeVO; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R zeroSuppleList(LoadCarsDTO loadCarsDTO) { |
|
|
|
|
|
|
|
|
|