|
|
@@ -1279,8 +1279,11 @@ public class AcceptCarriageOrderService {
|
|
|
// throw new BusinessException("完结订单,实装量不能大于分配量");
|
|
|
// }
|
|
|
BigDecimal amount = logisticsOrder.getAmount() == null ? new BigDecimal("0.00") : logisticsOrder.getAmount();
|
|
|
- if (amount.compareTo(orderFinishDTO.getLoadAmount()) < 0){
|
|
|
- throw new BusinessException("完结订单,实装量不能大于分配量");
|
|
|
+ if (amount.compareTo(orderFinishDTO.getLoadAmount()) < 0) {
|
|
|
+ throw new BusinessException("完结订单,装货量不能大于运输总量");
|
|
|
+ }
|
|
|
+ if (orderFinishDTO.getUnloadAmount().compareTo(orderFinishDTO.getLoadAmount()) > 0) {
|
|
|
+ throw new BusinessException("完结订单,填写卸货量不能大于装货量");
|
|
|
}
|
|
|
/**订单状态验证*/
|
|
|
if (!LogisticsOrderEnum.WAIT_DELIVERY.getStatus().equals(String.valueOf(logisticsOrder.getStatus()))
|
|
|
@@ -1646,6 +1649,53 @@ public class AcceptCarriageOrderService {
|
|
|
orderDetailVO.setScheduleStartTime(logisticsOrder.getStartTime() == null ? null : logisticsOrder.getStartTime());
|
|
|
orderDetailVO.setScheduleEndTime(logisticsOrder.getEndTime() == null ? null : logisticsOrder.getEndTime());
|
|
|
orderDetailVO.setPerformanceAmount(logisticsOrder.getLoadAmount() == null ? null : logisticsOrder.getLoadAmount());
|
|
|
+ if (logisticsOrder.getSettlementCycle() != null) {
|
|
|
+ Map<String, SysDictResDto> dtoMap = remoteSystemService.queryDictMapByType(DictTypeEnum.SETTLEMENT_CYCLE.getType());
|
|
|
+ orderDetailVO.setSettlementCycleLabel(dtoMap.isEmpty() ? null :
|
|
|
+ (dtoMap.get(String.valueOf(logisticsOrder.getSettlementCycle())) == null ? null : dtoMap.get(String.valueOf(logisticsOrder.getSettlementCycle())).getLabel()));
|
|
|
+ }
|
|
|
+ orderDetailVO.setBillingMode(logisticsOrder.getBillingMode());
|
|
|
+ if (logisticsOrder.getBillingMode() != null) {
|
|
|
+ Map<String, SysDictResDto> dictResDtoMap = remoteSystemService.queryDictMapByType(DictTypeEnum.CHARGING_TYPE.getType());
|
|
|
+ orderDetailVO.setBillingModeLabel(dictResDtoMap.isEmpty() ? null :
|
|
|
+ (dictResDtoMap.get(logisticsOrder.getBillingMode()) == null ? null : dictResDtoMap.get(logisticsOrder.getBillingMode()).getLabel()));
|
|
|
+ }
|
|
|
+ if (logisticsOrder.getPayment() != null) {
|
|
|
+ Map<String, SysDictResDto> dictResDtoMap = remoteSystemService.queryDictMapByType(DictTypeEnum.TRADE_TYPE.getType());
|
|
|
+ if (dictResDtoMap.isEmpty()) {
|
|
|
+ orderDetailVO.setPaymentLabel(null);
|
|
|
+ } else {
|
|
|
+ if (dictResDtoMap.get(logisticsOrder.getPayment()) != null) {
|
|
|
+ orderDetailVO.setPaymentLabel(dictResDtoMap.get(logisticsOrder.getPayment()).getLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (orderDetailVO.getSigningWay() != null) {
|
|
|
+ Map<String, SysDictResDto> dictResDtoMap = remoteSystemService.queryDictMapByType(DictTypeEnum.SIGNING_TYPE.getType());
|
|
|
+ if (dictResDtoMap.isEmpty()) {
|
|
|
+ orderDetailVO.setPaymentLabel(null);
|
|
|
+ } else {
|
|
|
+ if (dictResDtoMap.get(orderDetailVO.getSigningWay()) != null) {
|
|
|
+ orderDetailVO.setSigningWayLabel(dictResDtoMap.get(orderDetailVO.getSigningWay()).getLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (logisticsOrder.getGoodsPriceUnit() != null) {
|
|
|
+ SysDictResDto sysDictResDto = remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.PRICE_TYPE.getType(), logisticsOrder.getGoodsPriceUnit());
|
|
|
+ orderDetailVO.setDeductLabel(sysDictResDto == null ? null : sysDictResDto.getLabel());
|
|
|
+ }
|
|
|
+ if (logisticsOrder.getLossUnit() != null) {
|
|
|
+ SysDictResDto sysDictResDto = remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.TAX_RATE_TYPE.getType(), logisticsOrder.getLossUnit());
|
|
|
+ orderDetailVO.setLossLabel(sysDictResDto == null ? null : sysDictResDto.getLabel());
|
|
|
+ }
|
|
|
+ if (logisticsOrder.getUnit()!=null){
|
|
|
+ SysDictResDto sysDictResDto = remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.UNIT_TYPE.getType(), logisticsOrder.getUnit());
|
|
|
+ orderDetailVO.setNumberLabel(sysDictResDto == null ? null : sysDictResDto.getLabel());
|
|
|
+ }
|
|
|
+ if (logisticsOrder.getPriceType() != null) {
|
|
|
+ SysDictResDto sysDictResDto = remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.PRICE_TYPE.getType(), String.valueOf(logisticsOrder.getPriceType()));
|
|
|
+ orderDetailVO.setPriceLabel(sysDictResDto == null ? null : sysDictResDto.getLabel());
|
|
|
+ }
|
|
|
return HttpResult.ok(orderDetailVO);
|
|
|
}
|
|
|
|