Browse Source

整车线完成

jz.kai 2 years ago
parent
commit
f8f5463e8c

+ 4 - 4
web/src/main/java/com/jpsoft/prices/modules/base/controller/InvoiceQuotesController.java

@@ -301,8 +301,8 @@ 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) && !(totalWeight.compareTo(new BigDecimal(15 * 1000)) > 0 || totalVolume > 50 * 1000000)) {
-                    Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "整车(6.8米)");
+                else 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);
 
@@ -315,8 +315,8 @@ public class InvoiceQuotesController {
                         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米)");
+                else {
+                    Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "整车(6.8米)");
                     if(standard != null) {
                         BigDecimal tempFee = rentalPlan(standard, totalWeight, totalVolume);