|
@@ -1,14 +1,22 @@
|
|
|
package com.sky.ioc.service.meeting.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.sky.ioc.config.RestTemplateConfig;
|
|
|
+import com.sky.ioc.entity.Label;
|
|
|
import com.sky.ioc.entity.domain.meeting.MeetingRecord;
|
|
|
import com.sky.ioc.entity.domain.meeting.MeetingRoom;
|
|
|
import com.sky.ioc.entity.domain.space.BuildingFloor;
|
|
|
+import com.sky.ioc.entity.domain.space.Company;
|
|
|
+import com.sky.ioc.entity.domain.space.Department;
|
|
|
+import com.sky.ioc.entity.params.IocParam;
|
|
|
+import com.sky.ioc.entity.params.IocTimeRange;
|
|
|
import com.sky.ioc.mapper.meeting.MeetingRecordMapper;
|
|
|
import com.sky.ioc.mapper.meeting.MeetingRoomMapper;
|
|
|
import com.sky.ioc.mapper.space.BuildingFloorMapper;
|
|
|
import com.sky.ioc.service.meeting.MeetingRoomService;
|
|
|
+import com.sky.ioc.tool.DateUtil;
|
|
|
import com.sky.ioc.tool.ReturnMsg;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -19,8 +27,10 @@ import org.springframework.web.client.RestTemplate;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.ThreadLocalRandom;
|
|
|
import java.util.regex.Matcher;
|
|
|
import java.util.regex.Pattern;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
@Slf4j
|
|
@@ -135,4 +145,29 @@ public class MeetingRoomServiceImpl implements MeetingRoomService {
|
|
|
}
|
|
|
return ReturnMsg.ok(mapList);
|
|
|
}
|
|
|
+
|
|
|
+ @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 startStr = iocParam.getTimeRange().getStartDate();
|
|
|
+ String endStr = iocParam.getTimeRange().getEndDate();
|
|
|
+ List<String> lists = DateUtil.getBetweenDays(startStr, endStr);
|
|
|
+ String[] labKey = lists.toArray(new String[0]);
|
|
|
+ List<Label> labels1 = new ArrayList<>();
|
|
|
+ for (int i = 0; i < labKey.length; i++) {
|
|
|
+ Label label = new Label();
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ for (int j = 0; j < param.length; j++) {
|
|
|
+ int hours = random.nextInt(1,10);
|
|
|
+ jsonObject.put(param[j],hours);
|
|
|
+ }
|
|
|
+ label.setJsonObject(jsonObject);
|
|
|
+ label.setLabel(labKey[i]);
|
|
|
+ labels1.add(label);
|
|
|
+ }
|
|
|
+ // List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
|
+ return ReturnMsg.ok(labels1);
|
|
|
+ }
|
|
|
}
|