Commit bf510deb authored by 332784038@qq.com's avatar 332784038@qq.com

修改自编号应收报表统计与代码格式化

parent b7436ae7
......@@ -2603,8 +2603,14 @@ public class OrderQueryServiceImpl implements OrderQueryService {
totalNetReceiptsAdvanceOtherFeeGroupDtoMap.put(currencyId, netReceiptsFee.setScale(0, RoundingMode.HALF_UP));
}
if (!Objects.equals(currencyId, collectOtherFeeId)) {
ExchangeRateRespDTO otherRateRespDTO = currencyApi.getCurrencyRate(currencyId, collectOtherFeeId);
totalNetReceiptsAdvanceOtherFee = totalNetReceiptsAdvanceOtherFee.add(netReceiptsFee.multiply(otherRateRespDTO.getCurrencyRate()));
} else {
totalNetReceiptsAdvanceOtherFee = totalNetReceiptsAdvanceOtherFee.add(netReceiptsFee);
}
if (!Objects.equals(currencyId, collectAssistantOtherFeeId)) {
ExchangeRateRespDTO assistantOtherRateRespDTO = currencyApi.getCurrencyRate(currencyId, collectAssistantOtherFeeId);
totalNetReceiptsAdvanceOtherFee = totalNetReceiptsAdvanceOtherFee.add(netReceiptsFee.multiply(assistantOtherRateRespDTO.getCurrencyRate()));
totalNetReceiptsAdvanceAssistantOtherFee = totalNetReceiptsAdvanceAssistantOtherFee.add(netReceiptsFee.multiply(assistantOtherRateRespDTO.getCurrencyRate()));
} else {
totalNetReceiptsAdvanceAssistantOtherFee = totalNetReceiptsAdvanceAssistantOtherFee.add(netReceiptsFee);
}
......@@ -2617,12 +2623,17 @@ public class OrderQueryServiceImpl implements OrderQueryService {
totalNetReceiptsCollectOtherFeeGroupDtoMap.put(currencyId, netReceiptsFee.setScale(0, RoundingMode.HALF_UP));
}
if (!Objects.equals(currencyId, collectOtherFeeId)) {
ExchangeRateRespDTO otherRateRespDTO = currencyApi.getCurrencyRate(currencyId, collectOtherFeeId);
totalNetReceiptsCollectOtherFee = totalNetReceiptsCollectOtherFee.add(netReceiptsFee.multiply(otherRateRespDTO.getCurrencyRate()));
} else {
totalNetReceiptsCollectOtherFee = totalNetReceiptsCollectOtherFee.add(netReceiptsFee);
}
if (!Objects.equals(currencyId, collectAssistantOtherFeeId)) {
ExchangeRateRespDTO assistantOtherRateRespDTO = currencyApi.getCurrencyRate(currencyId, collectAssistantOtherFeeId);
totalNetReceiptsCollectOtherFee = totalNetReceiptsCollectOtherFee.add(netReceiptsFee.multiply(assistantOtherRateRespDTO.getCurrencyRate()));
totalNetReceiptsCollectAssistantOtherFee = totalNetReceiptsCollectAssistantOtherFee.add(netReceiptsFee.multiply(assistantOtherRateRespDTO.getCurrencyRate()));
} else {
totalNetReceiptsCollectAssistantOtherFee = totalNetReceiptsCollectAssistantOtherFee.add(netReceiptsFee);
}
}
}
}
......@@ -2680,9 +2691,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 订单总优惠分组
StringBuilder discountTotalFeeGroup = new StringBuilder();
List<FeeGroupDto> discountTotalFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, receivableTotalFeeGroupDtoMap, netReceiptsTotalFeeGroupDtoMap, discountTotalFeeGroupDtoList, discountTotalFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, receivableTotalFeeGroupDtoMap, netReceiptsTotalFeeGroupDtoMap, discountTotalFeeGroupDtoList, discountTotalFeeGroup);
summaryDto.setDiscountTotalFeeGroupDtoList(discountTotalFeeGroupDtoList);
summaryDto.setDiscountTotalFeeGroup(discountTotalFeeGroup.toString());
// 总费用换算成美元设置的货币单位的总应收、总实收、总优惠
......@@ -2695,35 +2704,27 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 应收运费分组
StringBuilder receivableFreightFeeGroup = new StringBuilder();
List<FeeGroupDto> receivableFreightFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalReceivableFreightFeeGroupDtoMap, receivableFreightFeeGroupDtoList, receivableFreightFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalReceivableFreightFeeGroupDtoMap, receivableFreightFeeGroupDtoList, receivableFreightFeeGroup);
summaryDto.setReceivableFreightFeeGroupDtoList(receivableFreightFeeGroupDtoList);
summaryDto.setReceivableFreightFeeGroup(receivableFreightFeeGroup.toString());
// 实收运费分组
StringBuilder netReceiptsFreightFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsFreightFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsFreightFeeGroupDtoMap, netReceiptsFreightFeeGroupDtoList, netReceiptsFreightFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsFreightFeeGroupDtoMap, netReceiptsFreightFeeGroupDtoList, netReceiptsFreightFeeGroup);
summaryDto.setNetReceiptsFreightFeeGroupDtoList(netReceiptsFreightFeeGroupDtoList);
summaryDto.setNetReceiptsFreightFeeGroup(netReceiptsFreightFeeGroup.toString());
// 实收到付运费分组
StringBuilder netReceiptsCollectFreightFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsCollectFreightFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsCollectFreightFeeGroupDtoMap, netReceiptsCollectFreightFeeGroupDtoList, netReceiptsCollectFreightFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsCollectFreightFeeGroupDtoMap, netReceiptsCollectFreightFeeGroupDtoList, netReceiptsCollectFreightFeeGroup);
summaryDto.setNetReceiptsCollectFreightFeeGroupDtoList(netReceiptsCollectFreightFeeGroupDtoList);
summaryDto.setNetReceiptsCollectFreightFeeGroup(netReceiptsCollectFreightFeeGroup.toString());
// 实收预付运费分组
StringBuilder netReceiptsAdvanceFreightFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsAdvanceFreightFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsAdvanceFreightFeeGroupDtoMap, netReceiptsAdvanceFreightFeeGroupDtoList, netReceiptsAdvanceFreightFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsAdvanceFreightFeeGroupDtoMap, netReceiptsAdvanceFreightFeeGroupDtoList, netReceiptsAdvanceFreightFeeGroup);
summaryDto.setNetReceiptsAdvanceFreightFeeGroupDtoList(netReceiptsAdvanceFreightFeeGroupDtoList);
summaryDto.setNetReceiptsAdvanceFreightFeeGroup(netReceiptsAdvanceFreightFeeGroup.toString());
......@@ -2739,34 +2740,26 @@ public class OrderQueryServiceImpl implements OrderQueryService {
summaryDto.setTotalNetReceiptsAdvanceFreightFee(totalNetReceiptsAdvanceFreightFee.setScale(0, RoundingMode.HALF_UP));
summaryDto.setTotalReceivableFreightFee(totalReceivableFreightFee.setScale(0, RoundingMode.HALF_UP));
summaryDto.setTotalNetReceiptsFreightFee(totalNetReceiptsFreightFee.setScale(0, RoundingMode.HALF_UP));
summaryDto.setDiscountFreightFee(summaryDto.getTotalReceivableFreightFee().
subtract(summaryDto.getTotalNetReceiptsFreightFee()));
summaryDto.setDiscountFreightFee(summaryDto.getTotalReceivableFreightFee().subtract(summaryDto.getTotalNetReceiptsFreightFee()));
// 清关费
// 应收清关费分组
StringBuilder receivableClearanceFeeGroup = new StringBuilder();
List<FeeGroupDto> receivableClearanceFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalReceivableClearanceFeeGroupDtoMap, receivableClearanceFeeGroupDtoList, receivableClearanceFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalReceivableClearanceFeeGroupDtoMap, receivableClearanceFeeGroupDtoList, receivableClearanceFeeGroup);
summaryDto.setReceivableClearanceFeeGroupDtoList(receivableClearanceFeeGroupDtoList);
summaryDto.setReceivableClearanceFeeGroup(receivableClearanceFeeGroup.toString());
// 实收清关费分组
StringBuilder netReceiptsClearanceFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsClearanceFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsClearanceFeeGroupDtoMap, netReceiptsClearanceFeeGroupDtoList, netReceiptsClearanceFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsClearanceFeeGroupDtoMap, netReceiptsClearanceFeeGroupDtoList, netReceiptsClearanceFeeGroup);
summaryDto.setNetReceiptsClearanceFeeGroupDtoList(netReceiptsClearanceFeeGroupDtoList);
summaryDto.setNetReceiptsClearanceFeeGroup(netReceiptsClearanceFeeGroup.toString());
// 实收到付清关费分组
StringBuilder netReceiptsCollectClearanceFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsCollectClearanceFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsCollectClearanceFeeGroupDtoMap, netReceiptsCollectClearanceFeeGroupDtoList, netReceiptsCollectClearanceFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsCollectClearanceFeeGroupDtoMap, netReceiptsCollectClearanceFeeGroupDtoList, netReceiptsCollectClearanceFeeGroup);
summaryDto.setNetReceiptsCollectClearanceFeeGroupDtoList(netReceiptsCollectClearanceFeeGroupDtoList);
summaryDto.setNetReceiptsCollectClearanceFeeGroup(netReceiptsCollectClearanceFeeGroup.toString());
......@@ -2774,18 +2767,14 @@ public class OrderQueryServiceImpl implements OrderQueryService {
// 实收预付清关费分组
StringBuilder netReceiptsAdvanceClearanceFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsAdvanceClearanceFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsAdvanceClearanceFeeGroupDtoMap, netReceiptsAdvanceClearanceFeeGroupDtoList, netReceiptsAdvanceClearanceFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsAdvanceClearanceFeeGroupDtoMap, netReceiptsAdvanceClearanceFeeGroupDtoList, netReceiptsAdvanceClearanceFeeGroup);
summaryDto.setNetReceiptsAdvanceClearanceFeeGroupDtoList(netReceiptsAdvanceClearanceFeeGroupDtoList);
summaryDto.setNetReceiptsAdvanceClearanceFeeGroup(netReceiptsAdvanceClearanceFeeGroup.toString());
// 清关费优惠分组
StringBuilder discountClearanceFeeGroup = new StringBuilder();
List<FeeGroupDto> discountClearanceFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalReceivableClearanceFeeGroupDtoMap, totalNetReceiptsClearanceFeeGroupDtoMap, discountClearanceFeeGroupDtoList, discountClearanceFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalReceivableClearanceFeeGroupDtoMap, totalNetReceiptsClearanceFeeGroupDtoMap, discountClearanceFeeGroupDtoList, discountClearanceFeeGroup);
summaryDto.setDiscountClearanceFeeGroupDtoList(discountClearanceFeeGroupDtoList);
summaryDto.setDiscountClearanceFeeGroup(discountClearanceFeeGroup.toString());
// 清关费换算成目的地设置的货币单位的总应收、总实收、总优惠
......@@ -2794,52 +2783,40 @@ public class OrderQueryServiceImpl implements OrderQueryService {
summaryDto.setTotalReceivableClearanceFee(totalReceivableClearanceFee.setScale(0, RoundingMode.HALF_UP));
summaryDto.setTotalNetReceiptsClearanceFee(totalNetReceiptsClearanceFee.setScale(0, RoundingMode.HALF_UP));
summaryDto.setDiscountClearanceFee(totalReceivableClearanceFee.subtract(totalNetReceiptsClearanceFee));
summaryDto.setDiscountClearanceFee(summaryDto.getTotalReceivableClearanceFee().
subtract(summaryDto.getTotalNetReceiptsClearanceFee()));
summaryDto.setDiscountClearanceFee(summaryDto.getTotalReceivableClearanceFee().subtract(summaryDto.getTotalNetReceiptsClearanceFee()));
// 额外费用
// 应收额外费用分组
StringBuilder receivableOtherFeeGroup = new StringBuilder();
List<FeeGroupDto> receivableOtherFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalReceivableOtherFeeGroupDtoMap, receivableOtherFeeGroupDtoList, receivableOtherFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalReceivableOtherFeeGroupDtoMap, receivableOtherFeeGroupDtoList, receivableOtherFeeGroup);
summaryDto.setReceivableOtherFeeGroupDtoList(receivableOtherFeeGroupDtoList);
summaryDto.setReceivableOtherFeeGroup(receivableOtherFeeGroup.toString());
// 实收额外费用分组
StringBuilder netReceiptsOtherFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsOtherFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsOtherFeeGroupDtoMap, netReceiptsOtherFeeGroupDtoList, netReceiptsOtherFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsOtherFeeGroupDtoMap, netReceiptsOtherFeeGroupDtoList, netReceiptsOtherFeeGroup);
summaryDto.setNetReceiptsOtherFeeGroupDtoList(netReceiptsOtherFeeGroupDtoList);
summaryDto.setNetReceiptsOtherFeeGroup(netReceiptsOtherFeeGroup.toString());
// 实收到付额外费用分组
StringBuilder netReceiptsCollectOtherFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsCollectOtherFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsCollectOtherFeeGroupDtoMap, netReceiptsCollectOtherFeeGroupDtoList, netReceiptsCollectOtherFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsCollectOtherFeeGroupDtoMap, netReceiptsCollectOtherFeeGroupDtoList, netReceiptsCollectOtherFeeGroup);
summaryDto.setNetReceiptsCollectOtherFeeGroupDtoList(netReceiptsCollectOtherFeeGroupDtoList);
summaryDto.setNetReceiptsCollectOtherFeeGroup(netReceiptsCollectOtherFeeGroup.toString());
// 实收预付额外费用分组
StringBuilder netReceiptsAdvanceOtherFeeGroup = new StringBuilder();
List<FeeGroupDto> netReceiptsAdvanceOtherFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalNetReceiptsAdvanceOtherFeeGroupDtoMap, netReceiptsAdvanceOtherFeeGroupDtoList, netReceiptsAdvanceOtherFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalNetReceiptsAdvanceOtherFeeGroupDtoMap, netReceiptsAdvanceOtherFeeGroupDtoList, netReceiptsAdvanceOtherFeeGroup);
summaryDto.setNetReceiptsAdvanceOtherFeeGroupDtoList(netReceiptsAdvanceOtherFeeGroupDtoList);
summaryDto.setNetReceiptsAdvanceOtherFeeGroup(netReceiptsAdvanceOtherFeeGroup.toString());
// 额外费用优惠分组
StringBuilder discountOtherFeeGroup = new StringBuilder();
List<FeeGroupDto> discountOtherFeeGroupDtoList = new ArrayList<>();
this.
convertFeeGroup(currencyRespDTOMap, totalReceivableOtherFeeGroupDtoMap, totalNetReceiptsOtherFeeGroupDtoMap, discountOtherFeeGroupDtoList, discountOtherFeeGroup);
this.convertFeeGroup(currencyRespDTOMap, totalReceivableOtherFeeGroupDtoMap, totalNetReceiptsOtherFeeGroupDtoMap, discountOtherFeeGroupDtoList, discountOtherFeeGroup);
summaryDto.setDiscountOtherFeeGroupDtoList(discountOtherFeeGroupDtoList);
summaryDto.setDiscountOtherFeeGroup(discountOtherFeeGroup.toString());
// 额外费用换算成目的地设置的货币单位的总应收、总实收、总优惠
......@@ -2849,9 +2826,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
summaryDto.setTotalNetReceiptsAdvanceAssistantOtherFee(totalNetReceiptsAdvanceAssistantOtherFee.setScale(0, RoundingMode.HALF_UP));
summaryDto.setTotalReceivableOtherFee(totalReceivableOtherFee.setScale(0, RoundingMode.HALF_UP));
summaryDto.setTotalNetReceiptsOtherFee(totalNetReceiptsOtherFee.setScale(0, RoundingMode.HALF_UP));
summaryDto.setDiscountOtherFee(summaryDto.getTotalReceivableOtherFee().
subtract(summaryDto.getTotalNetReceiptsOtherFee()));
summaryDto.setDiscountOtherFee(summaryDto.getTotalReceivableOtherFee().subtract(summaryDto.getTotalNetReceiptsOtherFee()));
return summaryDto;
}
......
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