| | |
| | | import static com.moral.common.util.WebUtils.getParametersStartingWith;
|
| | |
|
| | | import java.io.OutputStream;
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Set;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
| | |
|
| | | import com.moral.common.bean.ResultBean;
|
| | | import com.moral.entity.charts.LineChartCriteria;
|
| | | import com.moral.service.AlarmService;
|
| | | import com.moral.service.HistoryMinutelyService;
|
| | |
|
| | | @SuppressWarnings("unchecked")
|
| | | @SuppressWarnings({ "unchecked", "rawtypes" })
|
| | | @RestController
|
| | | @RequestMapping("report")
|
| | | @CrossOrigin(origins = "*", maxAge = 3600)
|
| | |
| | | @Resource
|
| | | private HistoryMinutelyService historyMinutelyService;
|
| | |
|
| | | @Resource
|
| | | private AlarmService alarmService;
|
| | | |
| | | @GetMapping("compare")
|
| | | public ResultBean<Map<String, List<Object>>> getCompareReport(HttpServletRequest request) throws Exception {
|
| | | public ResultBean<Map<String, List>> getCompareReport(HttpServletRequest request) throws Exception {
|
| | | Map<String, Object> parameters = getParametersStartingWith(request, null);
|
| | | Map<String, List<Object>> demo = historyMinutelyService.getCompareReport(parameters);
|
| | | return new ResultBean<Map<String, List<Object>>>(demo);
|
| | | Map<String, List> demo = historyMinutelyService.getCompareReport(parameters);
|
| | | return new ResultBean<Map<String, List>>(demo);
|
| | | }
|
| | |
|
| | | @PostMapping("line-chart")
|
| | |
| | | outputStream.close();
|
| | | return new ResultBean<Boolean>(true);
|
| | | }
|
| | | |
| | | @GetMapping("pie")
|
| | | public ResultBean<Map<String, Object>> getPieData(HttpServletRequest request) throws Exception {
|
| | | Map<String, Object> parameters = getParametersStartingWith(request, null);
|
| | | Map pieData = alarmService.getPieData(parameters);
|
| | | |
| | | return new ResultBean<Map<String, Object>>(pieData);
|
| | | }
|
| | |
|
| | | }
|