jinpengyong
2020-04-30 a6a45c2fb382a9012984233c061b90020e0fd642
update
1 files modified
12 ■■■■ changed files
src/main/java/com/moral/controller/ReportController.java 12 ●●●● patch | view | raw | blame | history
src/main/java/com/moral/controller/ReportController.java
@@ -10,6 +10,7 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
@@ -92,7 +93,15 @@
    public ResultBean<Boolean> getNExcelReport(HttpServletRequest request, HttpServletResponse response) throws Exception {
        Map<String, Object> parameters = getParametersStartingWith(request, null);
        List<Map<String, Object>> list = historyMinutelyService.getMonitorPointOrDeviceAvgData(parameters);
        System.out.println(list);
        ArrayList<String> sensorKeys = (ArrayList<String>)parameters.get("sensorKeys");
        for (Map<String, Object> map : list) {
            for (String sensorKey : sensorKeys) {
                if(map.get(sensorKey)==null){
                    map.put(sensorKey,"");
                }
            }
        }
        String type = parameters.get("type").toString();
        String time = parameters.get("time").toString();
        System.out.println(parameters);
@@ -102,7 +111,6 @@
        } else {
            timeb = parameters.get("timeb").toString();
        }
        String[] endTimes = timeb.split("-");
        String dateFormat = "";