|
@@ -11,9 +11,9 @@ import com.sooka.sponest.mobile.appbigdata.domain.CenterdataTEnvironmentRyList;
|
|
|
import com.sooka.sponest.mobile.appbigdata.domain.ForestCloudRYList;
|
|
|
import com.sooka.sponest.mobile.appbigdata.domain.bo.EnvironmentCloudRYBO;
|
|
|
import com.sooka.sponest.mobile.appbigdata.domain.bo.ForestCloudRYBO;
|
|
|
+import com.sooka.sponest.mobile.appbigdata.domain.bo.VisualBO;
|
|
|
import com.sooka.sponest.mobile.appbigdata.domain.vo.ForestCloudMapVO;
|
|
|
import com.sooka.sponest.mobile.appbigdata.domain.vo.VisuForestCloudMapVO;
|
|
|
-import com.sooka.sponest.mobile.appbigdata.domain.bo.VisualBO;
|
|
|
import com.sooka.sponest.mobile.base.service.AppAttendanceService;
|
|
|
import com.sooka.sponest.mobile.data.digitalagriculture.domain.VisuBaseService;
|
|
|
import com.sooka.sponest.mobile.remoteapi.RemoteDataBaseService;
|
|
@@ -21,35 +21,30 @@ import com.sooka.sponest.mobile.remoteapi.RemoteEventBaseService;
|
|
|
import com.sooka.sponest.mobile.remoteapi.RemoteMiddlewareService;
|
|
|
import com.sooka.sponest.mobile.remoteapi.domain.DataVO;
|
|
|
import com.sooka.sponest.mobile.utils.PictureReplaceAll;
|
|
|
-import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/AppBigDataCountController")
|
|
|
public class AppBigDataCountController extends VisuBaseService {
|
|
|
|
|
|
- public final static String EVENT_TYPE = "eventType";
|
|
|
- public final static String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
|
|
|
- public final static String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
|
|
|
- public final static String EVENT = "event";
|
|
|
- public final static String NAME_CHINESE = "name_chinese";
|
|
|
- public final static String NAME_ORIGINAL = "name_original";
|
|
|
+ public static final String EVENT_TYPE = "eventType";
|
|
|
+ public static final String FOREST_EVENT_STATUS_2 = "forest_event_status_2";
|
|
|
+ public static final String FOREST_EVENT_STATUS_5 = "forest_event_status_5";
|
|
|
+ public static final String EVENT = "event";
|
|
|
+ public static final String NAME_CHINESE = "name_chinese";
|
|
|
+ public static final String NAME_ORIGINAL = "name_original";
|
|
|
|
|
|
@Autowired
|
|
|
private RemoteMiddlewareService middlewareService;
|
|
|
- @Resource
|
|
|
- AppAttendanceService appAttendanceService;
|
|
|
- @Resource
|
|
|
- RemoteEventBaseService remoteEventBaseService;
|
|
|
-
|
|
|
- @Resource
|
|
|
- RemoteDataBaseService dataBaseService;
|
|
|
- ;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private AppAttendanceService appAttendanceService;
|
|
|
+ @Autowired
|
|
|
+ private RemoteEventBaseService remoteEventBaseService;
|
|
|
+ @Autowired
|
|
|
+ private RemoteDataBaseService dataBaseService;
|
|
|
|
|
|
/**
|
|
|
* 查询落点集合接口
|
|
@@ -78,9 +73,9 @@ public class AppBigDataCountController extends VisuBaseService {
|
|
|
R resultData = middlewareService.getResourcePointById(vb.getId(), vb.getType());
|
|
|
if (HttpStatus.SUCCESS == resultData.getCode()) {
|
|
|
Map<String, Object> data = (Map<String, Object>) resultData.getData();
|
|
|
- if(data.containsKey("pictures")){
|
|
|
+ if (data.containsKey("pictures")) {
|
|
|
List<String> pictures = (List<String>) data.get("pictures");
|
|
|
- if(!pictures.isEmpty()){
|
|
|
+ if (!pictures.isEmpty()) {
|
|
|
List<String> strList = PictureReplaceAll.replacePicturesList(pictures);
|
|
|
data.put("pictures", strList);
|
|
|
}
|
|
@@ -162,8 +157,8 @@ public class AppBigDataCountController extends VisuBaseService {
|
|
|
JSONArray result = new JSONArray();
|
|
|
for (Object data : list) {
|
|
|
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(data);
|
|
|
- if(jsonObject.containsKey("dictType")){
|
|
|
- jsonObject.put("jobValue",jsonObject.remove("dictType"));
|
|
|
+ if (jsonObject.containsKey("dictType")) {
|
|
|
+ jsonObject.put("jobValue", jsonObject.remove("dictType"));
|
|
|
}
|
|
|
result.add(jsonObject);
|
|
|
}
|
|
@@ -171,39 +166,26 @@ public class AppBigDataCountController extends VisuBaseService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * @throws
|
|
|
* @description
|
|
|
* @author LG
|
|
|
* @param[1] deptId
|
|
|
* @param[2] leadType
|
|
|
- * @throws
|
|
|
* @Api 河长,路长,田长,获取人员类型
|
|
|
* @time 2023/8/16 18:29
|
|
|
*/
|
|
|
- private ArrayList<Map<String, Object>> getRyListByJob(Long deptId, String leadType){
|
|
|
+ private ArrayList<Map<String, Object>> getRyListByJob(Long deptId, String leadType) {
|
|
|
AjaxResult waterResult = dataBaseService.getRyListToWaterConservancyViewByType(deptId, leadType);
|
|
|
LinkedHashMap<String, Object> data = (LinkedHashMap<String, Object>) waterResult.get("data");
|
|
|
- ArrayList<Map<String, Object>> list = (ArrayList<Map<String, Object>>) data.get("ryList");
|
|
|
- return list;
|
|
|
+ return (ArrayList<Map<String, Object>>) data.get("ryList");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @throws 手机端:人员巡查轨迹五级联动
|
|
|
- * @description
|
|
|
- * @author LG
|
|
|
- * @param[1] null
|
|
|
- * @time 2023/8/16 11:08
|
|
|
- */
|
|
|
-
|
|
|
- //1. 获取航管局列表
|
|
|
- //字典值,调用/AppCameraController/getSortByType 传dictType(字典值的key) 获取数据
|
|
|
-
|
|
|
- //2. 获取航管局对应的人员类型
|
|
|
-
|
|
|
- /**
|
|
|
* 获取航管局对应的人员类型
|
|
|
+ *
|
|
|
* @param dictValue 行管局类型 1:林业;2:农业;3:水利;4:环保;5:应急;6:交通;7:资源;8:消防
|
|
|
- * @param deptId 部门id
|
|
|
- * @param leadType 人员类型
|
|
|
+ * @param deptId 部门id
|
|
|
+ * @param leadType 人员类型
|
|
|
* @return AjaxResult
|
|
|
*/
|
|
|
@GetMapping("/getPersonTypeBySystem")
|
|
@@ -213,54 +195,42 @@ public class AppBigDataCountController extends VisuBaseService {
|
|
|
switch (dictValue) {
|
|
|
case "1"://林业
|
|
|
R<ForestCloudRYList> ryListToForestView = dataBaseService.getRyListToForestView(forestMapVo);
|
|
|
- if(HttpStatus.SUCCESS == ryListToForestView.getCode()){
|
|
|
+ if (HttpStatus.SUCCESS == ryListToForestView.getCode()) {
|
|
|
ArrayList<ForestCloudRYBO> visuForestCloudRYBO = (ArrayList<ForestCloudRYBO>) ryListToForestView.getData().getVisuForestCloudRYBO();
|
|
|
return AjaxResult.success(typeUnity(visuForestCloudRYBO));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return AjaxResult.error(ryListToForestView.getCode(), ryListToForestView.getMsg());
|
|
|
}
|
|
|
case "2"://农业
|
|
|
//无
|
|
|
return AjaxResult.success(new JSONArray());
|
|
|
-
|
|
|
case "3"://水利
|
|
|
return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
|
|
|
-
|
|
|
case "4"://环保
|
|
|
R<CenterdataTEnvironmentRyList> ryListToEnvironmentView = dataBaseService.getRyListToEnvironmentView(forestMapVo);
|
|
|
- if(HttpStatus.SUCCESS == ryListToEnvironmentView.getCode()){
|
|
|
+ if (HttpStatus.SUCCESS == ryListToEnvironmentView.getCode()) {
|
|
|
ArrayList<EnvironmentCloudRYBO> userList = (ArrayList<EnvironmentCloudRYBO>) ryListToEnvironmentView.getData().getUser();
|
|
|
return AjaxResult.success(typeUnity(userList));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return AjaxResult.error(ryListToEnvironmentView.getCode(), ryListToEnvironmentView.getMsg());
|
|
|
}
|
|
|
case "5"://应急
|
|
|
return AjaxResult.success(new JSONArray());
|
|
|
-
|
|
|
case "6"://交通
|
|
|
return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
|
|
|
-
|
|
|
case "7"://资源
|
|
|
return AjaxResult.success(typeUnity(getRyListByJob(deptId, leadType)));
|
|
|
-
|
|
|
case "8"://消防
|
|
|
R<Map<String, Object>> ryListToFireControlView = dataBaseService.getRyListToFireControlView(deptId);
|
|
|
- if(HttpStatus.SUCCESS == ryListToFireControlView.getCode()){
|
|
|
+ if (HttpStatus.SUCCESS == ryListToFireControlView.getCode()) {
|
|
|
ArrayList<Map<String, Object>> fireControlList = (ArrayList<Map<String, Object>>) ryListToFireControlView.getData().get("ryList");
|
|
|
return AjaxResult.success(typeUnity(fireControlList));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return AjaxResult.error(ryListToFireControlView.getCode(), ryListToFireControlView.getMsg());
|
|
|
}
|
|
|
-
|
|
|
default: {
|
|
|
return AjaxResult.error(500, "航管局类型错误");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- //3. 获取类型对应的人员信息
|
|
|
-
|
|
|
- //4. 获取人员对应的巡护任务列表
|
|
|
-
|
|
|
- //5. 根据巡护任务查询任务详情轨迹
|
|
|
}
|