|
@@ -6,6 +6,7 @@ import org.jeecg.modules.deviceLesm.entity.*;
|
|
|
import org.jeecg.modules.deviceLesm.mapper.DevicePointMapper;
|
|
|
import org.jeecg.modules.deviceLesm.service.IDeviceInformationService;
|
|
|
import org.jeecg.modules.deviceLesm.service.IDeviceRegionService;
|
|
|
+import org.jeecg.modules.gatherData.entity.FpgMiddleTwoData;
|
|
|
import org.jeecg.modules.gatherData.mapper.FpgGatherDataMapper;
|
|
|
import org.jeecg.modules.homePageData.service.IHomePageDataService;
|
|
|
import org.jeecg.modules.systemConfig.peaksAndValleysTimeConfig.entity.PeaksAndValleysTimeConfig;
|
|
@@ -158,16 +159,30 @@ public class HomePageDataServiceImpl implements IHomePageDataService {
|
|
|
|
|
|
@Override
|
|
|
public Map<String, List> fpvTimeElectricity() {
|
|
|
+ Date today = new Date();
|
|
|
+ String dayDate = new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(today);
|
|
|
+ List<Map<String,String>> tops = new ArrayList<>();
|
|
|
+ List<Map<String,String>> peaks = new ArrayList<>();
|
|
|
+ List<Map<String,String>> flat = new ArrayList<>();
|
|
|
+ List<Map<String,String>> valleys = new ArrayList<>();
|
|
|
+ List<PeaksAndValleysTimeConfig> peaksAndValleysTimeConfiglist = peaksAndValleysTimeConfigService.list();
|
|
|
+ // 查询时段数据
|
|
|
+ List<FpgMiddleTwoData> fpgGatherDatalist = fpgGatherDataMapper.getFpgTheLeftSideOneData(dayDate);
|
|
|
+ // 归类尖峰平谷数据
|
|
|
+ // fpgGatherDatalist.forEach(fpgGatherData -> {
|
|
|
+ // 峰平谷时段处理
|
|
|
+ // peaksAndValleysTimeConfiglist.forEach(peaksAndValleysTime -> {
|
|
|
+ // String startDate = dayDate + " " + peaksAndValleysTime.getStartTime();
|
|
|
+ // String endDate = dayDate + " " + peaksAndValleysTime.getEndTime();
|
|
|
+ // });
|
|
|
+ // });
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.set(Calendar.SECOND, 0);
|
|
|
calendar.set(Calendar.MINUTE, 0);
|
|
|
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
calendar.set(Calendar.MILLISECOND, 0);
|
|
|
Map<String, List> res = new HashMap<>();
|
|
|
- List<Map<String,String>> tops = new ArrayList<>();
|
|
|
- List<Map<String,String>> peaks = new ArrayList<>();
|
|
|
- List<Map<String,String>> flat = new ArrayList<>();
|
|
|
- List<Map<String,String>> valleys = new ArrayList<>();
|
|
|
+
|
|
|
for (int i = 0; i < 24; i++) {
|
|
|
calendar.set(Calendar.HOUR_OF_DAY, i);
|
|
|
Double electricity = Math.random()*100+200;
|