Parcourir la source

单机信息总览线路明细功率曲线接口

shilin il y a 3 ans
Parent
commit
d0ef5e6c8c

+ 9 - 15
src/main/java/com/gyee/frame/controller/contrast/ContrastController.java

@@ -382,26 +382,20 @@ public class ContrastController {
      **/
     @PostMapping("/benchmarkZjWtList")
     @ResponseBody
-    public AjaxResult benchmarkZjWtList(HttpServletRequest request,Tablepar tablepar, String cid) {
+    public AjaxResult benchmarkZjWtList(HttpServletRequest request,Tablepar tablepar, ConditionVo ct) {
         List<BenchMarkVo> vos=new ArrayList<>();
-        Map<String, List<ConditionVo>> ctmap = null;
-        if (null != request.getSession().getAttribute("bmwtvos")) {
-            ctmap = (Map<String, List<ConditionVo>>) request.getSession().getAttribute("bmwtvos");
-        } else {
-            ctmap = new HashMap<String, List<ConditionVo>>();
-        }
 
-        if (StringUtils.notEmp(cid) && ctmap.containsKey(cid)) {
-            List<ConditionVo> ctvos = ctmap.get(cid);
+
+        if (StringUtils.notEmp(ct) ) {
+
             Map<String, BenchMarkVo> bmmap = new HashMap<String, BenchMarkVo>();
-            for (ConditionVo ct : ctvos) {
 
-                String wpId = ct.getWpId();
-                String beginDate = DateUtils.format(ct.getBeginDate());
-                String endDate =DateUtils.format(ct.getEndDate());
 
-                bmmap=contrastWtService.benchmarkZjInWtList(wpId,null,beginDate,endDate);
-            }
+            String wpId = ct.getWpId();
+            String beginDate = DateUtils.format(ct.getBeginDate());
+            String endDate =DateUtils.format(ct.getEndDate());
+
+            bmmap=contrastWtService.benchmarkZjInWtList(wpId,null,beginDate,endDate);
 
             Set<Map.Entry<String, BenchMarkVo>> set = bmmap.entrySet();
             for (Iterator<Map.Entry<String, BenchMarkVo>> it = set.iterator(); it.hasNext();) {

+ 12 - 12
src/main/java/com/gyee/frame/service/contrast/ContrastZjService.java

@@ -219,18 +219,18 @@ public class ContrastZjService {
 
         request.getSession().setAttribute("bmvos", vos);
 
-        Map<String, List<ConditionVo>> ctmap = null;
-        if (null != request.getSession().getAttribute("bmwtvos")) {
-            ctmap = (Map<String, List<ConditionVo>>) request.getSession().getAttribute("bmwtvos");
-
-            ctmap.put(bm.getCid(), ctvos);
-        } else {
-            ctmap = new HashMap<String, List<ConditionVo>>();
-
-            ctmap.put(bm.getCid(), ctvos);
-        }
-
-        request.getSession().setAttribute("bmwtvos", ctmap);
+//        Map<String, List<ConditionVo>> ctmap = null;
+//        if (null != request.getSession().getAttribute("bmwtvos")) {
+//            ctmap = (Map<String, List<ConditionVo>>) request.getSession().getAttribute("bmwtvos");
+//
+//            ctmap.put(bm.getCid(), ctvos);
+//        } else {
+//            ctmap = new HashMap<String, List<ConditionVo>>();
+//
+//            ctmap.put(bm.getCid(), ctvos);
+//        }
+//
+//        request.getSession().setAttribute("bmwtvos", ctmap);
     }
 
     private void totalBenchmarkInfo(BenchMarkVo bm) {