wenhongquan hai 10 meses
pai
achega
fb96c7fb0c

+ 3 - 1
ruoyi-modules/ruoyi-dzbc/src/main/java/org/dromara/system/controller/TblDzbcPathSchedulingController.java

@@ -317,11 +317,13 @@ public class TblDzbcPathSchedulingController extends BaseController {
                                 JSONObject price = prices.getJSONObject(i);
                                 Double min = price.getDouble("min");
                                 Double max = price.getDouble("max");
+                                Double xs = price.getDouble("xs");
                                 Double p = price.getDouble("price");
                                 if(min==null) min = 0.0;
                                 if(max==null) max = Double.MAX_VALUE;
+                                if(xs==null) xs = 0.0;
                                 if(distanceSite1>=min && distanceSite1<=max){
-                                    double jg = (p*100)+(distanceSite1)*jgxs;
+                                    double jg = (p*100)+(distanceSite1)*xs;
                                     tblDzbcPathSchedulingVo.setPrice((int)Math.round(jg));
                                     break;
                                 }

+ 3 - 1
ruoyi-modules/ruoyi-dzbc/src/main/java/org/dromara/system/service/impl/TblDzbcOrderServiceImpl.java

@@ -209,11 +209,13 @@ public class TblDzbcOrderServiceImpl implements ITblDzbcOrderService {
                         JSONObject price = prices.getJSONObject(i);
                         Double min = price.getDouble("min");
                         Double max = price.getDouble("max");
+                        Double xs = price.getDouble("xs");
                         Double p = price.getDouble("price");
                         if (min == null) min = 0.0;
                         if (max == null) max = Double.MAX_VALUE;
+                        if (xs == null) xs = 0.0;
                         if (distanceSite1 >= min && distanceSite1 <= max) {
-                            double jg = (p * 100) + (distanceSite1) * jgxs;
+                            double jg = (p * 100) + (distanceSite1) * xs;
                             add.setPrice((int) Math.round(jg));
                             break;
                         }