lizijie
2022-04-28 dacae5af651baa6ae102c8dd4350a7b8b7d86fe6
screen-api/src/main/java/com/moral/api/service/impl/ServicesScopeServiceImpl.java
@@ -53,6 +53,9 @@
    @Autowired
    private HistoryHourlyMapper historyHourlyMapper;
    @Autowired
    private HistoryHourlyService historyHourlyService;
    @Override
    public List<Map<String, Object>> getDateByOrgIdAndCondition(Map map) {
        int orgId = Integer.parseInt(map.get("organization_id").toString());
@@ -157,11 +160,11 @@
            }
        }
        if (type.equals("hourly")){
            Date houtly_time = DateUtils.getDate(time+":00:00",DateUtils.yyyy_MM_dd_HH_mm_ss_EN);
            Date hourly_time = DateUtils.getDate(time+":00:00",DateUtils.yyyy_MM_dd_HH_mm_ss_EN);
            QueryWrapper<HistoryHourly> wrapper = new QueryWrapper<>();
            wrapper.in("mac", deviceMacs);
            wrapper.eq("time", houtly_time);
            List<HistoryHourly> historyHourlies = historyHourlyMapper.selectList(wrapper);
            wrapper.eq("time", hourly_time);
            List<HistoryHourly> historyHourlies = historyHourlyService.getHourlyDataByMacs(deviceMacs,time);
            for (HistoryHourly historyHourly : historyHourlies) {
                historyDataMap.put(historyHourly.getMac(), JSON.parseObject(JSON.toJSONString(historyHourly), Map.class));
            }