|
@@ -825,6 +825,11 @@ public class AcceptCarriageOrderService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ vo.setUnit(kwtLogisticsOrder.getUnit());
|
|
|
|
|
+ if (kwtLogisticsOrder.getUnit() != null) {
|
|
|
|
|
+ SysDictResDto dictResDto = remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.UNIT_TYPE.getType(), kwtLogisticsOrder.getUnit());
|
|
|
|
|
+ vo.setUnitLabel(dictResDto == null ? null : dictResDto.getLabel());
|
|
|
|
|
+ }
|
|
|
vo.setWaybillType(waybillOrder.getType());
|
|
vo.setWaybillType(waybillOrder.getType());
|
|
|
vo.setDeficitAmount(waybillOrder.getDeficitAmount());
|
|
vo.setDeficitAmount(waybillOrder.getDeficitAmount());
|
|
|
vo.setLoss(kwtLogisticsOrder.getLoss());
|
|
vo.setLoss(kwtLogisticsOrder.getLoss());
|
|
@@ -888,6 +893,13 @@ public class AcceptCarriageOrderService {
|
|
|
//联查数据
|
|
//联查数据
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
for (SubcontractConsignmentVO subcontractConsignmentVO : list) {
|
|
for (SubcontractConsignmentVO subcontractConsignmentVO : list) {
|
|
|
|
|
+ //关联父级承运单据号
|
|
|
|
|
+ if (subcontractConsignmentVO.getPid() != null) {
|
|
|
|
|
+ KwtLogisticsOrder kwtLogisticsOrder = logisticsOrderMapper.selectOne(new LambdaQueryWrapper<KwtLogisticsOrder>().eq(KwtLogisticsOrder::getId, subcontractConsignmentVO.getPid()));
|
|
|
|
|
+ if (kwtLogisticsOrder != null) {
|
|
|
|
|
+ subcontractConsignmentVO.setCarrierOrderNo(kwtLogisticsOrder.getLOrderNo());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
subcontractConsignmentVO.setStatusLabel(LogisticsOrderEnum.getDestination(subcontractConsignmentVO.getStatus()));
|
|
subcontractConsignmentVO.setStatusLabel(LogisticsOrderEnum.getDestination(subcontractConsignmentVO.getStatus()));
|
|
|
if (subcontractConsignmentVO.getPriceType() != null) {
|
|
if (subcontractConsignmentVO.getPriceType() != null) {
|
|
|
subcontractConsignmentVO.setPriceTypeLabel(priceDictData == null ? null : priceDictData.get(subcontractConsignmentVO.getPriceType()));
|
|
subcontractConsignmentVO.setPriceTypeLabel(priceDictData == null ? null : priceDictData.get(subcontractConsignmentVO.getPriceType()));
|
|
@@ -986,8 +998,14 @@ public class AcceptCarriageOrderService {
|
|
|
}
|
|
}
|
|
|
for (DriverListVo driverListVo : list) {
|
|
for (DriverListVo driverListVo : list) {
|
|
|
if (!ObjectUtils.isEmpty(truck)) {
|
|
if (!ObjectUtils.isEmpty(truck)) {
|
|
|
- driverListVo.setTransportStatus(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getBusinessStatus());
|
|
|
|
|
|
|
+ if (truck.get(driverListVo.getTruckNo()) != null) {
|
|
|
|
|
+ driverListVo.setTransportStatus(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getBusinessStatus());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (driverListVo.getTransportStatus() != null) {
|
|
|
|
|
+ driverListVo.setTransportStatusLabel((driverListVo.getTransportStatus() == 0) ? "空闲" : "任务中");
|
|
|
|
|
+ }
|
|
|
driverListVo.setCarType(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getTruckType());
|
|
driverListVo.setCarType(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getTruckType());
|
|
|
|
|
+// driverListVo.setCount(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getTotalComplete());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
result.setData(list);
|
|
result.setData(list);
|
|
@@ -1001,7 +1019,13 @@ public class AcceptCarriageOrderService {
|
|
|
}
|
|
}
|
|
|
for (DriverListVo driverListVo : list) {
|
|
for (DriverListVo driverListVo : list) {
|
|
|
if (!ObjectUtils.isEmpty(truck)) {
|
|
if (!ObjectUtils.isEmpty(truck)) {
|
|
|
- driverListVo.setTransportStatus(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getBusinessStatus());
|
|
|
|
|
|
|
+// driverListVo.setTransportStatus(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getBusinessStatus());
|
|
|
|
|
+ if (truck.get(driverListVo.getTruckNo()) != null) {
|
|
|
|
|
+ driverListVo.setTransportStatus(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getBusinessStatus());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (driverListVo.getTransportStatus() != null) {
|
|
|
|
|
+ driverListVo.setTransportStatusLabel((driverListVo.getTransportStatus() == 0) ? "空闲" : "任务中");
|
|
|
|
|
+ }
|
|
|
driverListVo.setCarType(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getTruckType());
|
|
driverListVo.setCarType(truck.get(driverListVo.getTruckNo()) == null ? null : truck.get(driverListVo.getTruckNo()).getTruckType());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1282,10 +1306,12 @@ public class AcceptCarriageOrderService {
|
|
|
// if (totalLoadAmount.compareTo(orderFinishDTO.getLoadAmount()) < 0) {
|
|
// if (totalLoadAmount.compareTo(orderFinishDTO.getLoadAmount()) < 0) {
|
|
|
// throw new BusinessException("完结订单,实装量不能大于分配量");
|
|
// throw new BusinessException("完结订单,实装量不能大于分配量");
|
|
|
// }
|
|
// }
|
|
|
- BigDecimal amount = logisticsOrder.getAmount() == null ? new BigDecimal("0.00") : logisticsOrder.getAmount();
|
|
|
|
|
- if (amount.compareTo(orderFinishDTO.getLoadAmount()) < 0) {
|
|
|
|
|
- throw new BusinessException("完结订单,装货量不能大于运输总量");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
|
|
+ //todo 2023-09-01 根据要求去除校验 物流订单手动完结,实装量可大于分配量,实卸量目前暂定不可大于实装量;根据计费方式,当对应实装或实卸大于分配量时自然完结
|
|
|
|
|
+// BigDecimal amount = logisticsOrder.getAmount() == null ? new BigDecimal("0.00") : logisticsOrder.getAmount();
|
|
|
|
|
+// if (amount.compareTo(orderFinishDTO.getLoadAmount()) < 0) {
|
|
|
|
|
+// throw new BusinessException("完结订单,装货量不能大于运输总量");
|
|
|
|
|
+// }
|
|
|
if (orderFinishDTO.getUnloadAmount().compareTo(orderFinishDTO.getLoadAmount()) > 0) {
|
|
if (orderFinishDTO.getUnloadAmount().compareTo(orderFinishDTO.getLoadAmount()) > 0) {
|
|
|
throw new BusinessException("完结订单,填写卸货量不能大于装货量");
|
|
throw new BusinessException("完结订单,填写卸货量不能大于装货量");
|
|
|
}
|
|
}
|
|
@@ -1363,7 +1389,7 @@ public class AcceptCarriageOrderService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//修改合同履约量
|
|
//修改合同履约量
|
|
|
- commonService.updatePerformed(logisticsOrder,orderFinishDTO.getLoadAmount(),orderFinishDTO.getUnloadAmount());
|
|
|
|
|
|
|
+ commonService.updatePerformed(logisticsOrder, orderFinishDTO.getLoadAmount(), orderFinishDTO.getUnloadAmount());
|
|
|
|
|
|
|
|
//修改mongodb的数据
|
|
//修改mongodb的数据
|
|
|
updateMongoDbByLogisticsOrder(logisticsOrder.getId(), orderFinishDTO, ignoreAmount);
|
|
updateMongoDbByLogisticsOrder(logisticsOrder.getId(), orderFinishDTO, ignoreAmount);
|
|
@@ -2032,7 +2058,7 @@ public class AcceptCarriageOrderService {
|
|
|
loadAddress.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
loadAddress.setId(new IdWorker(NumberConstant.ONE).nextId());
|
|
|
loadAddress.setLOrderId(lOrderId);
|
|
loadAddress.setLOrderId(lOrderId);
|
|
|
loadAddress.setAddressType(NumberConstant.ONE);
|
|
loadAddress.setAddressType(NumberConstant.ONE);
|
|
|
-// loadAddress.setName();
|
|
|
|
|
|
|
+ loadAddress.setName(orderDTO.getLoadName() == null ? null : orderDTO.getLoadName());
|
|
|
// loadAddress.setType();
|
|
// loadAddress.setType();
|
|
|
loadAddress.setContacts(orderDTO.getLoadContacts());
|
|
loadAddress.setContacts(orderDTO.getLoadContacts());
|
|
|
loadAddress.setPhone(orderDTO.getLoadPhone());
|
|
loadAddress.setPhone(orderDTO.getLoadPhone());
|
|
@@ -2053,7 +2079,7 @@ public class AcceptCarriageOrderService {
|
|
|
unloadAddress.setId(new IdWorker(NumberConstant.TWO).nextId());
|
|
unloadAddress.setId(new IdWorker(NumberConstant.TWO).nextId());
|
|
|
unloadAddress.setLOrderId(lOrderId);
|
|
unloadAddress.setLOrderId(lOrderId);
|
|
|
unloadAddress.setAddressType(NumberConstant.TWO);
|
|
unloadAddress.setAddressType(NumberConstant.TWO);
|
|
|
-// unloadAddress.setName();
|
|
|
|
|
|
|
+ unloadAddress.setName(orderDTO.getUnloadName() == null ? null : orderDTO.getUnloadName());
|
|
|
// unloadAddress.setType();
|
|
// unloadAddress.setType();
|
|
|
unloadAddress.setContacts(orderDTO.getUnloadContacts());
|
|
unloadAddress.setContacts(orderDTO.getUnloadContacts());
|
|
|
unloadAddress.setPhone(orderDTO.getUnloadPhone());
|
|
unloadAddress.setPhone(orderDTO.getUnloadPhone());
|