|
@@ -3,7 +3,6 @@ package com.sckw.transport.service;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.sckw.core.common.enums.NumberConstant;
|
|
import com.sckw.core.common.enums.NumberConstant;
|
|
|
import com.sckw.core.common.enums.enums.DictTypeEnum;
|
|
import com.sckw.core.common.enums.enums.DictTypeEnum;
|
|
|
-import com.sckw.core.exception.BusinessException;
|
|
|
|
|
import com.sckw.core.model.constant.Global;
|
|
import com.sckw.core.model.constant.Global;
|
|
|
import com.sckw.core.model.enums.CarWaybillEnum;
|
|
import com.sckw.core.model.enums.CarWaybillEnum;
|
|
|
import com.sckw.core.model.enums.CarWaybillQueryEnum;
|
|
import com.sckw.core.model.enums.CarWaybillQueryEnum;
|
|
@@ -193,10 +192,13 @@ public class WaybillManagementService {
|
|
|
waybillTicketVO.setDeficitAmount(String.valueOf(info.getDeficitAmount()));
|
|
waybillTicketVO.setDeficitAmount(String.valueOf(info.getDeficitAmount()));
|
|
|
BigDecimal deficitLoss = info.getLoss() == null ? BigDecimal.valueOf(0) : info.getLoss();
|
|
BigDecimal deficitLoss = info.getLoss() == null ? BigDecimal.valueOf(0) : info.getLoss();
|
|
|
BigDecimal deficitAmount = info.getDeficitAmount() == null ? BigDecimal.valueOf(0) : info.getDeficitAmount();
|
|
BigDecimal deficitAmount = info.getDeficitAmount() == null ? BigDecimal.valueOf(0) : info.getDeficitAmount();
|
|
|
- BigDecimal deficitRealAmount = BigDecimal.valueOf(0);
|
|
|
|
|
- if (deficitAmount.compareTo(BigDecimal.valueOf(0)) > 0) {
|
|
|
|
|
- deficitRealAmount = deficitLoss.subtract(deficitAmount);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// BigDecimal deficitRealAmount = BigDecimal.valueOf(0);
|
|
|
|
|
+// if (deficitAmount.compareTo(BigDecimal.valueOf(0)) > 0) {
|
|
|
|
|
+// deficitRealAmount = deficitLoss.subtract(deficitAmount);
|
|
|
|
|
+// }
|
|
|
|
|
+ BigDecimal loadAmount = info.getLoadAmount() == null ? new BigDecimal("0.00") : info.getLoadAmount();
|
|
|
|
|
+ BigDecimal unloadAmount = info.getUnloadAmount() == null ? new BigDecimal("0.00") : info.getUnloadAmount();
|
|
|
|
|
+ BigDecimal deficitRealAmount = commonService.deficitPrice(info.getLoadAmount(), loadAmount.subtract(unloadAmount), deficitLoss, info.getLossUnit());
|
|
|
waybillTicketVO.setDeficitRealAmount(deficitRealAmount.toString());
|
|
waybillTicketVO.setDeficitRealAmount(deficitRealAmount.toString());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -819,10 +821,10 @@ public class WaybillManagementService {
|
|
|
*/
|
|
*/
|
|
|
public HttpResult waybillDataStatisticApp(String keyword, String startDate, String endDate) {
|
|
public HttpResult waybillDataStatisticApp(String keyword, String startDate, String endDate) {
|
|
|
Long entId = LoginUserHolder.getEntId();
|
|
Long entId = LoginUserHolder.getEntId();
|
|
|
- if(StringUtils.isNotBlank(startDate)) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(startDate)) {
|
|
|
startDate = startDate.concat(" 00:00:00");
|
|
startDate = startDate.concat(" 00:00:00");
|
|
|
}
|
|
}
|
|
|
- if(StringUtils.isNotBlank(endDate)) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(endDate)) {
|
|
|
endDate = endDate.concat(" 00:00:00");
|
|
endDate = endDate.concat(" 00:00:00");
|
|
|
}
|
|
}
|
|
|
// 运输途中
|
|
// 运输途中
|