| | |
| | | package com.qianwen.mdc.collect.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.qianwen.mdc.collect.config.IotDBSessionConfig; |
| | | import com.qianwen.mdc.collect.dto.CalendarShiftInfoDTO; |
| | | import com.qianwen.mdc.collect.dto.StateAggregateTimeDTO; |
| | | import com.qianwen.mdc.collect.entity.iotdb.DeviceState; |
| | | import com.qianwen.mdc.collect.entity.iotdb.Output; |
| | | import com.qianwen.mdc.collect.entity.iotdb.ProcessParam; |
| | | import com.qianwen.mdc.collect.mapper.iotdb.DeviceStateMapper; |
| | | import com.qianwen.mdc.collect.mapper.iotdb.OutputMapper; |
| | | import com.qianwen.mdc.collect.mapper.iotdb.ProcessParamMapper; |
| | | import com.qianwen.mdc.collect.mapper.mgr.CalendarMapper; |
| | |
| | | |
| | | @RestController |
| | | public class StateController { |
| | | |
| | | |
| | | @Autowired |
| | | private DeviceStateAggregateService stateAggregateService; |
| | | |
| | | |
| | | @GetMapping("/stateagg") |
| | | public Object stateagg(Long workstationId) { |
| | | stateAggregateService.stateAggregate(workstationId); |
| | | |
| | | return "1"; |
| | | } |
| | | |
| | | @Autowired |
| | | private DeviceStateMapper stateMapper; |
| | | |
| | | @GetMapping("/range") |
| | | public Object range() { |
| | | long wod = 1656819188967653378L; |
| | | StateAggregateTimeDTO timeRange = new StateAggregateTimeDTO(); |
| | | timeRange.setEndTime(System.currentTimeMillis()); |
| | | List<DeviceState> slist = stateMapper.statesInTimeRange(wod, timeRange); |
| | | |
| | | return "2"; |
| | | } |
| | | |
| | | @GetMapping("/stateagg") |
| | | public Object stateagg(Long workstationId) { |
| | | stateAggregateService.stateAggregate(workstationId); |
| | | |
| | | return "1"; |
| | | } |
| | | |
| | | } |