Selaa lähdekoodia

智慧餐厅核心指标第4个订单均价改为累计就餐人数
第二个改成餐厅就餐率

ZhangManMan 2 vuotta sitten
vanhempi
commit
fac25754c4

+ 6 - 3
src/main/java/com/sky/ioc/service/canteen/impl/RestaurantServiceImpl.java

@@ -133,12 +133,15 @@ public class RestaurantServiceImpl implements RestaurantService {
         DecimalFormat decimalFormat = new DecimalFormat("#.0");
         compare = Double.parseDouble(decimalFormat.format(compare));
 
-        Integer flow = random.nextInt(85,100);
-        Integer eat = random.nextInt(84,flow);
+        Integer flow = 0;
+        if(totalOrder>0){
+            flow = random.nextInt(85,95);
+        }
+
         objects.get(0).put("value",dayPerson);
         objects.get(0).put("compare",compare);
 
-        objects.get(1).put("value",eat+"/"+flow);
+        objects.get(1).put("value",flow);
         objects.get(1).put("compare",compare);
 
         objects.get(2).put("value",totalPrice);