Răsfoiți Sursa

会议管理增加按房间号统计会议时长

ZhangManMan 2 ani în urmă
părinte
comite
51d79641b5

+ 8 - 3
src/main/java/com/sky/ioc/service/meeting/impl/MeetingRoomServiceImpl.java

@@ -149,8 +149,13 @@ public class MeetingRoomServiceImpl implements MeetingRoomService {
     @Override
     public ReturnMsg getMeetingInfo(IocParam iocParam) {
         ThreadLocalRandom random = ThreadLocalRandom.current();
-        Integer floorId = iocParam.getFloorId()==null?7:iocParam.getFloorId();
-        String[] param ={floorId+"01",floorId+"02",floorId+"03"};
+        String[] param ={"会议室"};
+        int limit = 24;
+        if(iocParam.getFloorId()!=null){
+            limit = 8;
+            Integer floorId = iocParam.getFloorId();
+            param = new String[]{floorId + "01", floorId + "02", floorId + "03"};
+        }
         String startStr = iocParam.getTimeRange().getStartDate();
         String endStr = iocParam.getTimeRange().getEndDate();
         List<String> lists = DateUtil.getBetweenDays(startStr, endStr);
@@ -160,7 +165,7 @@ public class MeetingRoomServiceImpl implements MeetingRoomService {
             Label label = new Label();
             JSONObject jsonObject = new JSONObject();
             for (int j = 0; j < param.length; j++) {
-                int hours = random.nextInt(1,10);
+                int hours = random.nextInt(1,limit);
                 jsonObject.put(param[j],hours);
             }
             label.setJsonObject(jsonObject);