Commit 8744a59c authored by 332784038@qq.com's avatar 332784038@qq.com

应收报表核算bug修复

parent 1a756e50
...@@ -2450,11 +2450,12 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -2450,11 +2450,12 @@ public class OrderQueryServiceImpl implements OrderQueryService {
for (OrderItemDO orderItemDO : orderItemDOList) { for (OrderItemDO orderItemDO : orderItemDOList) {
// 判断品名是否入仓 // 判断品名是否入仓
boolean isWarehouseIn = Objects.nonNull(orderItemDO.getWarehouseInInfoVO()) && orderItemDO.getWarehouseInInfoVO().getCartonsNum() > 0; boolean isWarehouseIn = Objects.nonNull(orderItemDO.getWarehouseInInfoVO()) && orderItemDO.getWarehouseInInfoVO().getCartonsNum() > 0;
BigDecimal seaFreight = orderItemDO.getSeaFreight().setScale(0, RoundingMode.HALF_UP);
BigDecimal receivableSeaFreight = orderItemDO.getReceivableSeaFreight().compareTo(BigDecimal.ZERO) == 0 ? seaFreight : orderItemDO.getReceivableSeaFreight();
BigDecimal clearanceFreight = orderItemDO.getClearanceFreight().setScale(0, RoundingMode.HALF_UP);
BigDecimal receivableClearanceFreight = orderItemDO.getReceivableClearanceFreight().compareTo(BigDecimal.ZERO) == 0 ? clearanceFreight : orderItemDO.getReceivableClearanceFreight();
if (isWarehouseIn) { if (isWarehouseIn) {
BigDecimal seaFreight = Objects.nonNull(orderItemDO.getSeaFreight()) ? orderItemDO.getSeaFreight().setScale(0, RoundingMode.HALF_UP) : BigDecimal.ZERO;
BigDecimal receivableSeaFreight = Objects.nonNull(orderItemDO.getReceivableSeaFreight()) ? (orderItemDO.getReceivableSeaFreight().compareTo(BigDecimal.ZERO) == 0 ? seaFreight : orderItemDO.getReceivableSeaFreight()) : BigDecimal.ZERO;
BigDecimal clearanceFreight = Objects.nonNull(orderItemDO.getClearanceFreight()) ? orderItemDO.getClearanceFreight().setScale(0, RoundingMode.HALF_UP) : BigDecimal.ZERO;
BigDecimal receivableClearanceFreight = Objects.nonNull(orderItemDO.getReceivableClearanceFreight()) ? (orderItemDO.getReceivableClearanceFreight().compareTo(BigDecimal.ZERO) == 0 ? clearanceFreight : orderItemDO.getReceivableClearanceFreight()) : BigDecimal.ZERO;
Long freightCurrencyId = Long.parseLong(String.valueOf(orderItemDO.getSeaFreightCurrency())); Long freightCurrencyId = Long.parseLong(String.valueOf(orderItemDO.getSeaFreightCurrency()));
ExchangeRateRespDTO collectFreightRateRespDTO = currencyApi.getCurrencyRate(freightCurrencyId, collectFreightFeeId); ExchangeRateRespDTO collectFreightRateRespDTO = currencyApi.getCurrencyRate(freightCurrencyId, collectFreightFeeId);
ExchangeRateRespDTO freightTotalFeeRateRespDTO = currencyApi.getCurrencyRate(freightCurrencyId, collectTotalFeeId);// 运费总费用汇率计算 ExchangeRateRespDTO freightTotalFeeRateRespDTO = currencyApi.getCurrencyRate(freightCurrencyId, collectTotalFeeId);// 运费总费用汇率计算
...@@ -2790,9 +2791,7 @@ public class OrderQueryServiceImpl implements OrderQueryService { ...@@ -2790,9 +2791,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 运费优惠分组 // 运费优惠分组
StringBuilder discountFreightFeeGroup = new StringBuilder(); StringBuilder discountFreightFeeGroup = new StringBuilder();
List<FeeGroupDto> discountFreightFeeGroupDtoList = new ArrayList<>(); List<FeeGroupDto> discountFreightFeeGroupDtoList = new ArrayList<>();
this. this.convertFeeGroup(currencyRespDTOMap, totalReceivableFreightFeeGroupDtoMap, totalNetReceiptsFreightFeeGroupDtoMap, discountFreightFeeGroupDtoList, discountFreightFeeGroup);
convertFeeGroup(currencyRespDTOMap, totalReceivableFreightFeeGroupDtoMap, totalNetReceiptsFreightFeeGroupDtoMap, discountFreightFeeGroupDtoList, discountFreightFeeGroup);
summaryDto.setDiscountFreightFeeGroupDtoList(discountFreightFeeGroupDtoList); summaryDto.setDiscountFreightFeeGroupDtoList(discountFreightFeeGroupDtoList);
summaryDto.setDiscountFreightFeeGroup(discountFreightFeeGroup.toString()); summaryDto.setDiscountFreightFeeGroup(discountFreightFeeGroup.toString());
// 运费换算成目的地设置的货币单位的总应收、总实收、总优惠 // 运费换算成目的地设置的货币单位的总应收、总实收、总优惠
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment