Commit 8859119c authored by 韩桐桐's avatar 韩桐桐

feat(统计):bug

parent 7d42463b
package com.yeejoin.amos.boot.module.statistcs.biz.controller; package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto; import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
...@@ -175,23 +176,41 @@ public class YJDPStatisticsController { ...@@ -175,23 +176,41 @@ public class YJDPStatisticsController {
@ApiOperation(value = "应急大屏使用-警情类型", notes = "应急大屏使用-警情类型") @ApiOperation(value = "应急大屏使用-警情类型", notes = "应急大屏使用-警情类型")
@PostMapping("/alertOperations/dp") @PostMapping("/alertOperations/dp")
public ResponseModel<Object> alertOperations() { public ResponseModel<Object> alertOperations() {
return ResponseHelper.buildResponse(statisticsService.alertOperations()); JSONArray objects = new JSONArray();
objects.add(statisticsService.alertOperations());
return ResponseHelper.buildResponse(objects);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-报警类型", notes = "应急大屏使用-报警类型") @ApiOperation(value = "应急大屏使用-报警类型", notes = "应急大屏使用-报警类型")
@PostMapping("/alertTypeOperations/dp") @PostMapping("/alertTypeOperations/dp")
public ResponseModel<Object> alertTypeOperations() { public ResponseModel<Object> alertTypeOperations() {
HashMap<String, String> map = new HashMap<>(); JSONArray res = new JSONArray();
map.put(AlertStageEnums.JQCB.getId(),AlertStageEnums.JQCB.getValue()); JSONObject jsonObject1 = new JSONObject().fluentPut("label", AlertStageEnums.JQCB.getValue()).fluentPut("value", AlertStageEnums.JQCB.getId());
map.put(AlertStageEnums.JQGB.getId(), AlertStageEnums.JQGB.getValue()); JSONObject jsonObject2 = new JSONObject().fluentPut("label", AlertStageEnums.JQGB.getValue()).fluentPut("value", AlertStageEnums.JQGB.getId());
return ResponseHelper.buildResponse(map); res.add(jsonObject1);
res.add(jsonObject2);
return ResponseHelper.buildResponse(res);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-报警类型", notes = "应急大屏使用-报警类型")
@PostMapping("/alertSourceOperations/dp")
public ResponseModel<Object> alertSourceOperations() {
JSONArray res = new JSONArray();
JSONObject jsonObject1 = new JSONObject().fluentPut("label", AlertStageEnums.KRJY.getValue()).fluentPut("value", AlertStageEnums.KRJY.getId());
JSONObject jsonObject2 = new JSONObject().fluentPut("label", AlertStageEnums.GZWX.getValue()).fluentPut("value", AlertStageEnums.GZWX.getId());
JSONObject jsonObject3 = new JSONObject().fluentPut("label", AlertStageEnums.TSZX.getValue()).fluentPut("value", AlertStageEnums.TSZX.getId());
res.add(jsonObject1);
res.add(jsonObject2);
res.add(jsonObject3);
return ResponseHelper.buildResponse(res);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格", @ApiOperation(value = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格",
notes = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格") notes = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格")
@PostMapping("/alertRecordTable/dp") @PostMapping("/alertRecordTable/dp")
public ResponseModel<IPage<Map<String, Object>>> alertRecordTableForDP(DPFilterParamForDetailDto recordFilterVo) { public ResponseModel<IPage<Map<String, Object>>> alertRecordTableForDP(@Validated @RequestBody DPFilterParamForDetailDto recordFilterVo) {
return statisticsService.alertRecordTableForDP(recordFilterVo); return statisticsService.alertRecordTableForDP(recordFilterVo);
} }
...@@ -203,12 +222,13 @@ public class YJDPStatisticsController { ...@@ -203,12 +222,13 @@ public class YJDPStatisticsController {
List<JSONObject> subList = Collections.singletonList(new JSONObject() List<JSONObject> subList = Collections.singletonList(new JSONObject()
.fluentPut("value", "use") .fluentPut("value", "use")
.fluentPut("title", "使用单位")); .fluentPut("title", "使用单位"));
JSONArray res = new JSONArray();
JSONObject jsonObject = new JSONObject() JSONObject jsonObject = new JSONObject()
.fluentPut("title", "企业类型") .fluentPut("title", "企业类型")
.fluentPut("value", "all") .fluentPut("value", "all")
.fluentPut("children", subList); .fluentPut("children", subList);
return ResponseHelper.buildResponse(jsonObject); res.add(jsonObject);
return ResponseHelper.buildResponse(res);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment