fengxiang
2018-02-05 f1e25082a58c8cb57dd45d226d3a94f4af4a0677
src/main/java/com/moral/controller/ReportController.java
@@ -18,7 +18,7 @@
import org.springframework.web.bind.annotation.RestController;
import com.moral.common.bean.ResultBean;
import com.moral.service.DataService;
import com.moral.service.HistoryMinutelyService;
@RestController
@RequestMapping("report")
@@ -26,19 +26,19 @@
public class ReportController {
   @Resource
   private DataService dataService;
   private HistoryMinutelyService historyMinutelyService;
   
   @GetMapping("compare")
   public ResultBean<Map<String, List<Object>>> getCompareReport(HttpServletRequest request) throws Exception {
      Map<String, Object> parameters = getParametersStartingWith(request, null);
      Map<String, List<Object>> demo = dataService.getCompareReport(parameters);
      Map<String, List<Object>> demo = historyMinutelyService.getCompareReport(parameters);
      return new ResultBean<Map<String,List<Object>>>(demo);
   }
   @GetMapping("excel")
   public ResultBean<Boolean> getExcelReport(HttpServletRequest request,HttpServletResponse response) throws Exception {
      Map<String, Object> parameters = getParametersStartingWith(request, null);
      List<Map<String, Object>> list = dataService.getMonitorPointOrDeviceAvgData4Excel(parameters);
      List<Map<String, Object>> list = historyMinutelyService.getMonitorPointOrDeviceAvgData(parameters);
      String[][] exportColumn =  new String[2][];
      exportColumn[0] = new String[] { "时间", "20", "time" };
      if (parameters.containsKey("sensors")) {