|
@@ -228,7 +228,6 @@ public class AppCameraController extends AppBaseController {
|
|
|
* camera_use 视联网
|
|
|
* device_type 物联网
|
|
|
* broadcast_use 云广播
|
|
|
- *
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping("/getSortByType")
|
|
@@ -244,6 +243,26 @@ public class AppCameraController extends AppBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据类型查询分类并统计数量
|
|
|
+ * camera_use 视联网
|
|
|
+ * device_type 物联网
|
|
|
+ * broadcast_use 云广播
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/getSortByTypeAndCount")
|
|
|
+ public AjaxResult getSortByTypeAndCount(@RequestParam("dictType") String dictType) {
|
|
|
+ if ("device_type".equals(dictType)) {
|
|
|
+ AjaxResult result = remoteSystemBaseService.getSortByTypeAndCount(dictType);
|
|
|
+ List<Map<String, Object>> data = (List<Map<String, Object>>) result.get("data");
|
|
|
+ List<Map<String, Object>> cameraUse = (List<Map<String, Object>>) remoteSystemBaseService.getSortByTypeAndCount("camera_use").get("data");
|
|
|
+ data.addAll(screenSort(cameraUse));
|
|
|
+ return result;
|
|
|
+ } else {
|
|
|
+ return remoteSystemBaseService.getSortByTypeAndCount(dictType);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public List<Map<String, Object>> screenSort(List<Map<String, Object>> data) {
|
|
|
List<Map<String, Object>> result = data.stream()
|
|
|
.filter(datum -> {
|