|
|
@@ -306,7 +306,7 @@ public class KwTransportService {
|
|
|
statuses.add(CarWaybillEnum.REFUSE_TRAFFIC.getCode());
|
|
|
statuses.add(CarWaybillEnum.REVOKED.getCode());
|
|
|
criteria.and("status").in(statuses);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
criteria.and("status").is(Integer.valueOf(query.getStatus()));
|
|
|
}
|
|
|
}
|
|
|
@@ -500,8 +500,7 @@ public class KwTransportService {
|
|
|
//单证审核计算
|
|
|
if (CarWaybillEnum.APPROVAL_IN.getStatus().equals(result.getValue())
|
|
|
|| CarWaybillEnum.APPROVAL_NO_PASS.getStatus().equals(result.getValue())
|
|
|
- || CarWaybillEnum.APPROVAL_PASS.getStatus().equals(result.getValue()))
|
|
|
- {
|
|
|
+ || CarWaybillEnum.APPROVAL_PASS.getStatus().equals(result.getValue())) {
|
|
|
documentCheck = documentCheck + result.getTotal();
|
|
|
}
|
|
|
}
|
|
|
@@ -602,10 +601,12 @@ public class KwTransportService {
|
|
|
vo.setStatusLabel(CarWaybillEnum.getName(waybillOrder.getStatus()));
|
|
|
// 托量单位
|
|
|
vo.setUnit(waybillOrder.getUnit() == null ? null : waybillOrder.getUnit());
|
|
|
- if(waybillOrder.getUnit() != null) {
|
|
|
+ if (waybillOrder.getUnit() != null) {
|
|
|
Map<String, SysDictResDto> unitType = remoteSystemService.queryDictMapByType(DictTypeEnum.UNIT_TYPE.getType());
|
|
|
- SysDictResDto sysDict = unitType.get(waybillOrder.getUnit());
|
|
|
- vo.setUnitLabel(sysDict.getLabel());
|
|
|
+ if (!unitType.isEmpty()) {
|
|
|
+ SysDictResDto sysDict = unitType.get(waybillOrder.getUnit());
|
|
|
+ vo.setUnitLabel(sysDict == null ? null : sysDict.getLabel());
|
|
|
+ }
|
|
|
}
|
|
|
vo.setSendCarTime(waybillOrder.getCreateTime() == null ?
|
|
|
null : DateUtil.getDateTime(waybillOrder.getCreateTime()));
|
|
|
@@ -645,7 +646,7 @@ public class KwTransportService {
|
|
|
String lossUnit = waybillOrder.getLossUnit();
|
|
|
Map<String, SysDictResDto> LossUnitType = remoteSystemService.queryDictMapByType(DictTypeEnum.TAX_RATE_TYPE.getType());
|
|
|
SysDictResDto sysDictRes = LossUnitType.get(lossUnit);
|
|
|
-
|
|
|
+ if (sysDictRes != null) {
|
|
|
if (sysDictRes.getLabel().equals("%")) {
|
|
|
// 百分比
|
|
|
lossAmount = loss.multiply(waybillOrder.getLoadAmount()).divide(BigDecimal.valueOf(100));
|
|
|
@@ -653,6 +654,7 @@ public class KwTransportService {
|
|
|
// 千分比
|
|
|
lossAmount = loss.multiply(waybillOrder.getLoadAmount()).divide(BigDecimal.valueOf(1000));
|
|
|
}
|
|
|
+ }
|
|
|
lossAmount = deficitAmount.subtract(lossAmount);
|
|
|
if (lossAmount.compareTo(new BigDecimal("0.00")) < 0) {
|
|
|
lossAmount = new BigDecimal("0.00");
|