|
@@ -160,11 +160,25 @@ public class InvoiceQuotesController {
|
|
|
totalWeight = totalWeight.add(info.getGrossWeight());
|
|
|
totalVolume = totalVolume + info.getBoxLength() * info.getBoxWidth() * info.getBoxHight();
|
|
|
}
|
|
|
+ if(company.getName().equals("跨越物流")) {
|
|
|
+ BigDecimal tempWeight = new BigDecimal(0);
|
|
|
+ tempWeight = new BigDecimal(totalVolume / 6000).setScale(1, BigDecimal.ROUND_HALF_UP);
|
|
|
+ if (tempWeight.compareTo(totalWeight) > 0) {
|
|
|
+ totalWeight = tempWeight;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(company.getName().equals("成程物流")) {
|
|
|
+ BigDecimal tempWeight = new BigDecimal(0);
|
|
|
+ tempWeight = new BigDecimal(totalVolume / 1000000 / 3.3).setScale(1, BigDecimal.ROUND_HALF_UP);
|
|
|
+ if (tempWeight.compareTo(totalWeight) > 0) {
|
|
|
+ totalWeight = tempWeight;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if(totalWeight.compareTo(new BigDecimal(0)) > 0 && (new BigDecimal(1)).compareTo(totalWeight) >= 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖0,1】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -178,7 +192,7 @@ public class InvoiceQuotesController {
|
|
|
if(totalWeight.compareTo(new BigDecimal(1)) > 0 && (new BigDecimal(50)).compareTo(totalWeight) >= 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖1,50】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -192,7 +206,7 @@ public class InvoiceQuotesController {
|
|
|
if(totalWeight.compareTo(new BigDecimal(50)) > 0 && (new BigDecimal(100)).compareTo(totalWeight) >= 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖50,100】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -206,7 +220,7 @@ public class InvoiceQuotesController {
|
|
|
if(totalWeight.compareTo(new BigDecimal(100)) > 0 && (new BigDecimal(200)).compareTo(totalWeight) >= 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖100,200】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -220,7 +234,7 @@ public class InvoiceQuotesController {
|
|
|
if(totalWeight.compareTo(new BigDecimal(200)) > 0 && (new BigDecimal(300)).compareTo(totalWeight) >= 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖200,300】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -234,7 +248,7 @@ public class InvoiceQuotesController {
|
|
|
if(totalWeight.compareTo(new BigDecimal(300)) > 0 && (new BigDecimal(500)).compareTo(totalWeight) >= 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖300,500】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -248,7 +262,7 @@ public class InvoiceQuotesController {
|
|
|
if(totalWeight.compareTo(new BigDecimal(500)) > 0 && (new BigDecimal(1000)).compareTo(totalWeight) >= 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖500,1000】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -262,7 +276,7 @@ public class InvoiceQuotesController {
|
|
|
if(totalWeight.compareTo(new BigDecimal(1000)) > 0 && (new BigDecimal(2000)).compareTo(totalWeight) >= 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖1000,2000】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -276,7 +290,7 @@ public class InvoiceQuotesController {
|
|
|
if(totalWeight.compareTo(new BigDecimal(2000)) > 0) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖2000,∞】");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = weightPlanB(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = weightPlanB(standard, totalWeight);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -287,10 +301,24 @@ public class InvoiceQuotesController {
|
|
|
totalFee = transportFee.add(deliveryFee).add(storageFee).add(insureFee).add(taxFee).add(receiptFee);
|
|
|
}
|
|
|
}
|
|
|
+// if(totalWeight.compareTo(new BigDecimal(300)) > 0 && (new BigDecimal(500)).compareTo(totalWeight) >= 0) {
|
|
|
+// Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "重量〖300,500】");
|
|
|
+// if(standard != null) {
|
|
|
+// BigDecimal tempFee = weightPlanB(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) {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "整车(4.2米)");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = rentalPlan(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = rentalPlan(standard);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -304,7 +332,7 @@ public class InvoiceQuotesController {
|
|
|
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);
|
|
|
+ BigDecimal tempFee = rentalPlan(standard);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|
|
@@ -318,7 +346,7 @@ public class InvoiceQuotesController {
|
|
|
else {
|
|
|
Standard standard = standardService.getStandard(company.getId(), invoice.getDestinationId(), "整车(6.8米)");
|
|
|
if(standard != null) {
|
|
|
- BigDecimal tempFee = rentalPlan(standard, totalWeight, totalVolume);
|
|
|
+ BigDecimal tempFee = rentalPlan(standard);
|
|
|
|
|
|
transportFee = transportFee.add(tempFee);
|
|
|
deliveryFee = standard.getDeliveryFee();
|