一公司人员定位功能接口对接功能

liujun-2024-05-23-接口漏洞修复
liujun 2024-04-23 14:36:32 +08:00
parent 2be4c2a38a
commit 84080f7498
1 changed files with 17 additions and 0 deletions

View File

@ -11,12 +11,14 @@ import com.zcloud.service.majordangersource.MajordangersourceStoragetankService;
import com.zcloud.util.DateUtil; import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction; import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools; import com.zcloud.util.Tools;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* - * -
@ -266,6 +268,21 @@ public class ApiHomeMajorDangerSourceController extends BaseController {
pd = this.getPageData(); pd = this.getPageData();
pd.put("CORPINFO_ID", "035958e685cf4850bc40151c5e0617a6"); // 企业 pd.put("CORPINFO_ID", "035958e685cf4850bc40151c5e0617a6"); // 企业
List<PageData> varList = majordangersourceService.findAllSourceAndVideo(pd); //获取重大危险源和视频监控 List<PageData> varList = majordangersourceService.findAllSourceAndVideo(pd); //获取重大危险源和视频监控
// 将摄像头和灌区区分开
if (pd.get("TYPE") != null && StringUtils.isNotEmpty(pd.getString("TYPE"))){
PageData finalPd = pd;
varList = varList.stream().filter(n -> finalPd.getString("TYPE").equals(n.getString("TYPE"))).collect(Collectors.toList());
for(PageData pageData:varList){
if(StringUtils.isBlank(pageData.getString("NAME"))){
pageData.put("MAP_POINT_NAME","");
}else {
pageData.put("MAP_POINT_NAME",pageData.getString("NAME"));
}
}
map.put("varList", varList);
}else {
map.put("varList", new ArrayList<>());
}
map.put("varList", varList); map.put("varList", varList);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;