Levi.u преди 4 години
родител
ревизия
c00cdc7a0a

+ 6 - 12
src/main/java/com/ebei/screen/controller/park/ParkSystemController.java

@@ -143,12 +143,6 @@ public class ParkSystemController {
         return parkSystemService.differentPayByPage(params);
     }
 
-    @ApiOperation("异常趋势统计查询 ✔")
-    @PostMapping(value = {"/exceptionAnalysis/{parkCode}", "/exceptionAnalysis"})
-    public ResponseBean exceptionAnalysis(@PathVariable(required = false) String parkCode) {
-        return parkSystemService.exceptionAnalysis(parkCode);
-    }
-
     @ApiOperation("获取crm项目列表 ✔")
     @PostMapping("/getCrmProjectList")
     public ResponseBean getCrmProjectList() {
@@ -174,15 +168,15 @@ public class ParkSystemController {
     }
 
     @ApiOperation("异常趋势统计查询 ✔")
-    @PostMapping(value = {"/getExceptionTrend/{parkCode}", "/getExceptionTrend"})
-    public ResponseBean getExceptionTrend(@PathVariable(required = false) String parkCode) {
-        return parkSystemService.getExceptionTrend(parkCode);
+    @PostMapping(value = {"/exceptionAnalysis/{parkCode}", "/exceptionAnalysis"})
+    public ResponseBean exceptionAnalysis(@PathVariable(required = false) String parkCode) {
+        return parkSystemService.exceptionAnalysis(parkCode);
     }
 
     @ApiOperation("异常趋势统计分页查询详情 ✔")
-    @PostMapping("/getExceptionTrendByPage")
-    public ResponseBean getExceptionTrendByPage(@RequestBody ExceptionTrendReq params) {
-        return parkSystemService.getExceptionTrendByPage(params);
+    @PostMapping("/exceptionAnalysisByPage")
+    public ResponseBean exceptionAnalysisByPage(@RequestBody ExceptionTrendReq params) {
+        return parkSystemService.exceptionAnalysisByPage(params);
     }
 
 }

+ 2 - 10
src/main/java/com/ebei/screen/service/ParkSystemService.java

@@ -140,14 +140,6 @@ public interface ParkSystemService {
      */
     ResponseBean differentPayByPage(DifferentPayPageReq params);
 
-    /**
-     * 异常趋势统计查询
-     *
-     * @param parkCode
-     * @return
-     */
-    ResponseBean exceptionAnalysis(String parkCode);
-
     /**
      * 查询已配置的crm项目列表
      *
@@ -193,7 +185,7 @@ public interface ParkSystemService {
      * @param parkCode
      * @return
      */
-    ResponseBean getExceptionTrend(String parkCode);
+    ResponseBean exceptionAnalysis(String parkCode);
 
     /**
      * 异常趋势统计分页查询详情
@@ -201,5 +193,5 @@ public interface ParkSystemService {
      * @param params
      * @return
      */
-    ResponseBean getExceptionTrendByPage(ExceptionTrendReq params);
+    ResponseBean exceptionAnalysisByPage(ExceptionTrendReq params);
 }

+ 5 - 19
src/main/java/com/ebei/screen/service/impl/ParkSystemServiceImpl.java

@@ -258,7 +258,9 @@ public class ParkSystemServiceImpl implements ParkSystemService {
             outCountResult.set(outCount.intValue() + outCountResult.get());
             outCountOldResult.set(outCountOld.intValue() + outCountOldResult.get());
             List<Map> exceptionResult = new ArrayList<>();
-            exceptionData.keySet().forEach(x -> exceptionResult.addAll((List<Map>) exceptionData.get(x)));
+            if (exceptionData != null) {
+                exceptionData.keySet().forEach(x -> exceptionResult.addAll((List<Map>) exceptionData.get(x)));
+            }
             for (int i = 0; i < indexs.size(); i++) {
                 Levi levi = result.get(i);
                 levi.set("in", levi.getInt("in") + (inObjList == null ? 0 : inObjList.getJSONObject(indexs.get(i)).getJSONArray("data").size()));
@@ -593,7 +595,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
      * @return
      */
     @Override
-    public ResponseBean getExceptionTrend(String parkCode) {
+    public ResponseBean exceptionAnalysis(String parkCode) {
         List<String> parkCodeList = Arrays.asList(parkCode);
         if (StringUtils.isBlank(parkCode)) {
             parkCodeList = ParkUtils.getParkCodeList();
@@ -617,7 +619,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
      * @return
      */
     @Override
-    public ResponseBean getExceptionTrendByPage(ExceptionTrendReq params) {
+    public ResponseBean exceptionAnalysisByPage(ExceptionTrendReq params) {
         String parkCode = params.getParkCode();
         String paramsCode = params.getCode();
         List<String> parkCodeList = Arrays.asList(parkCode);
@@ -704,22 +706,6 @@ public class ParkSystemServiceImpl implements ParkSystemService {
         return ResponseBuilder.ok(PageBean.<Map>builder().total(resStream.get().count()).row(resultsList).build());
     }
 
-    /**
-     * 异常趋势统计查询
-     *
-     * @param parkCode
-     * @return
-     */
-    @Override
-    public ResponseBean exceptionAnalysis(String parkCode) {
-        List<String> parkCodeList = Arrays.asList(parkCode);
-        if (StringUtils.isBlank(parkCode)) {
-            parkCodeList = ParkUtils.getParkCodeList();
-        }
-        // TODO 异常还未统计
-        return ResponseBuilder.ok("");
-    }
-
     /**
      * 查询已配置的crm项目列表
      *