wwh 2 miesięcy temu
rodzic
commit
061c880ce1

+ 6 - 6
huimv-farm/src/main/java/vip/xiaonuo/sale/service/impl/SaleProduceServiceImpl.java

@@ -71,16 +71,16 @@ public class SaleProduceServiceImpl extends ServiceImpl<SaleProduceMapper, SaleP
         }
         DecimalFormat def = new DecimalFormat("0.00");
         JSONObject jsonObject = new JSONObject();
-        jsonObject.put("monthSaleMoney", def.format(monthSaleMoney));
-        jsonObject.put("yearSaleMoney",def.format(yearSaleMoney));
+        jsonObject.put("monthPrice", def.format(monthSaleMoney));
+        jsonObject.put("yearPrice",def.format(yearSaleMoney));
         if (materials.size() != 0) {
             double v = monthPrice / materials.size();
             double v1 = yearPrice / materials.size();
-            jsonObject.put("monthPrice", def.format(v));
-            jsonObject.put("yearPrice", def.format(v1));
+            jsonObject.put("monthSaleMoney", def.format(v));
+            jsonObject.put("yearSaleMoney", def.format(v1));
         } else {
-            jsonObject.put("monthPrice", "0");
-            jsonObject.put("yearPrice", "0");
+            jsonObject.put("monthSaleMoney", "0");
+            jsonObject.put("yearSaleMoney", "0");
         }
         return jsonObject;
     }