|
@@ -287,6 +287,48 @@ public class InvoiceQuotesController {
|
|
|
totalFee = transportFee.add(deliveryFee).add(storageFee).add(insureFee).add(taxFee).add(receiptFee);
|
|
|
}
|
|
|
}
|
|
|
+ if(totalWeight.compareTo(new BigDecimal(5 * 1000)) <= 0 && totalVolume <= 25 * 1000000) {
|
|
|
+ Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "整车(4.2米)");
|
|
|
+ if(standard != null) {
|
|
|
+ BigDecimal tempFee = rentalPlan(standard, totalWeight, totalVolume);
|
|
|
+
|
|
|
+ transportFee = transportFee.add(tempFee);
|
|
|
+ deliveryFee = standard.getDeliveryFee();
|
|
|
+ storageFee = standard.getStorageFee();
|
|
|
+ insureFee = new BigDecimal(invoice.getGoodsValue()).multiply(standard.getInsureFee());
|
|
|
+ taxFee = transportFee.multiply(standard.getTaxFee());
|
|
|
+ receiptFee = standard.getReceiptFee();
|
|
|
+ totalFee = transportFee.add(deliveryFee).add(storageFee).add(insureFee).add(taxFee).add(receiptFee);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!(totalWeight.compareTo(new BigDecimal(5 * 1000)) <= 0 && totalVolume <= 25 * 1000000) && !(totalWeight.compareTo(new BigDecimal(15 * 1000)) > 0 || totalVolume > 50 * 1000000)) {
|
|
|
+ Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "整车(6.8米)");
|
|
|
+ if(standard != null) {
|
|
|
+ BigDecimal tempFee = rentalPlan(standard, totalWeight, totalVolume);
|
|
|
+
|
|
|
+ transportFee = transportFee.add(tempFee);
|
|
|
+ deliveryFee = standard.getDeliveryFee();
|
|
|
+ storageFee = standard.getStorageFee();
|
|
|
+ insureFee = new BigDecimal(invoice.getGoodsValue()).multiply(standard.getInsureFee());
|
|
|
+ taxFee = transportFee.multiply(standard.getTaxFee());
|
|
|
+ receiptFee = standard.getReceiptFee();
|
|
|
+ totalFee = transportFee.add(deliveryFee).add(storageFee).add(insureFee).add(taxFee).add(receiptFee);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(totalWeight.compareTo(new BigDecimal(15 * 1000)) > 0 || totalVolume > 50 * 1000000) {
|
|
|
+ Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "整车(9.6米)");
|
|
|
+ if(standard != null) {
|
|
|
+ BigDecimal tempFee = rentalPlan(standard, totalWeight, totalVolume);
|
|
|
+
|
|
|
+ transportFee = transportFee.add(tempFee);
|
|
|
+ deliveryFee = standard.getDeliveryFee();
|
|
|
+ storageFee = standard.getStorageFee();
|
|
|
+ insureFee = new BigDecimal(invoice.getGoodsValue()).multiply(standard.getInsureFee());
|
|
|
+ taxFee = transportFee.multiply(standard.getTaxFee());
|
|
|
+ receiptFee = standard.getReceiptFee();
|
|
|
+ totalFee = transportFee.add(deliveryFee).add(storageFee).add(insureFee).add(taxFee).add(receiptFee);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
dto.setCompanyName(company.getName());
|
|
|
dto.setNumbers(infoList.size());
|