九公司定位系统配置文件更新

liujun-2024-05-23-接口漏洞修复
liujun 2024-05-20 13:51:33 +08:00
parent 304a261c35
commit d390ea419f
6 changed files with 97 additions and 17 deletions

View File

@ -91,7 +91,8 @@ public class DwController extends BaseController {
@RequestMapping(value = "getAllMessage") @RequestMapping(value = "getAllMessage")
public Object getAllMessage() throws Exception { public Object getAllMessage() throws Exception {
PageData pd = this.getPageData(); PageData pd = this.getPageData();
return dwService.getAllMessage(); TraceGet dto = JSONObject.parseObject(JSONObject.toJSONString(pd), TraceGet.class);
return dwService.getAllMessage(dto);
} }

View File

@ -3,6 +3,7 @@ package com.zcloud.controller.map;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.zcloud.controller.base.BaseController; import com.zcloud.controller.base.BaseController;
import com.zcloud.controller.map.testDto.TestDto;
import com.zcloud.entity.Page; import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import com.zcloud.service.bus.CorpInfoService; import com.zcloud.service.bus.CorpInfoService;
@ -910,16 +911,22 @@ public class MapController extends BaseController {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData(); PageData pd = this.getPageData();
// TODO 判断是否是公司人员定位 // TODO 判断是否是公司人员定位
if (true){ if ("035958e685cf4850bc40151c5e0617a6".equals(pd.getString("corpId"))) {
TraceGet mapInfo = new TraceGet(); TraceGet mapInfo = new TraceGet();
mapInfo.setId(pd.getString("id")); mapInfo.setId(pd.getString("id"));
return dwService.getTrace(mapInfo); return dwService.getTrace(mapInfo);
}else { }
if ("21590a00ea5e462e9ee44dd332dddc26".equals(pd.getString("corpId"))){
TraceGet mapInfo = new TraceGet();
mapInfo.setId(pd.getString("id"));
return dwService.getLtTrace(mapInfo);
}
PageData value = usersService.getPersonByCardNo(pd); PageData value = usersService.getPersonByCardNo(pd);
map.put("result", "success"); map.put("result", "success");
map.put("pd", value); map.put("pd", value);
return map; return map;
}
} }
@RequestMapping(value = "/getAllDwMessage") @RequestMapping(value = "/getAllDwMessage")
@ -927,7 +934,7 @@ public class MapController extends BaseController {
public Object getAllDwMessage() throws Exception { public Object getAllDwMessage() throws Exception {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData(); PageData pd = this.getPageData();
// TODO 判断是否是公司人员定位 // 一公司人员定位系统
if (pd.get("corpId") != null && "035958e685cf4850bc40151c5e0617a6".equals(pd.getString("corpId"))) { if (pd.get("corpId") != null && "035958e685cf4850bc40151c5e0617a6".equals(pd.getString("corpId"))) {
AlarmGet alarmGet = new AlarmGet(); AlarmGet alarmGet = new AlarmGet();
alarmGet.setPage(new com.zcloud.service.dw.dto.Page()); alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
@ -936,7 +943,25 @@ public class MapController extends BaseController {
alarmGet.setCorpId(pd.getString("corpId")); alarmGet.setCorpId(pd.getString("corpId"));
map.put("result", "success"); map.put("result", "success");
map.put("alarmList", dwService.getAlarmList(alarmGet)); map.put("alarmList", dwService.getAlarmList(alarmGet));
map.put("orthermessage",dwService.getAllMessage()); TraceGet get = new TraceGet();
get.setCorpId("035958e685cf4850bc40151c5e0617a6");
map.put("orthermessage", dwService.getAllMessage(get));
return map;
// 九公司人员定位系统
} else if (pd.get("corpId") != null && "21590a00ea5e462e9ee44dd332dddc26".equals(pd.getString("corpId"))) {
AlarmGet alarmGet = new AlarmGet();
alarmGet.setPage(new com.zcloud.service.dw.dto.Page());
alarmGet.getPage().setCurrent("1");
alarmGet.getPage().setSize("12");
alarmGet.setCorpId(pd.getString("corpId"));
map.put("result", "success");
map.put("alarmList", new ArrayList<>());
// HashMap<String,Object> info = new HashMap<>();
// info.put("infoList",TestDto.getTestInfo());
// info.put("onlineDeviceNum", "0");
TraceGet get = new TraceGet();
get.setCorpId("21590a00ea5e462e9ee44dd332dddc26");
map.put("orthermessage",dwService.getAllMessage(get));
return map; return map;
} else { } else {
PageData value = usersService.getPersonByCardNo(pd); PageData value = usersService.getPersonByCardNo(pd);
@ -944,6 +969,8 @@ public class MapController extends BaseController {
map.put("pd", value); map.put("pd", value);
return map; return map;
} }
} }
/** /**
@ -961,11 +988,15 @@ public class MapController extends BaseController {
GetLastPropDto dto = new GetLastPropDto(); GetLastPropDto dto = new GetLastPropDto();
dto.setDeviceCode(pd.getString("CARDNO")); dto.setDeviceCode(pd.getString("CARDNO"));
return dwService.getLastProp(dto); return dwService.getLastProp(dto);
}else { }
if (pd.get("corpId") != null && "21590a00ea5e462e9ee44dd332dddc26".equals(pd.getString("corpId"))) {
GetLastPropDto dto = new GetLastPropDto();
dto.setDeviceCode(pd.getString("CARDNO"));
return dwService.getLtLastProp(dto);
}
// TODO 其他系统有待开发 // TODO 其他系统有待开发
return null; return null;
} }
}
@RequestMapping(value = "/getCameraList") @RequestMapping(value = "/getCameraList")
@ResponseBody @ResponseBody

View File

@ -0,0 +1,34 @@
package com.zcloud.controller.map.testDto;
import java.util.HashMap;
import java.util.Map;
public class TestDto {
public static Map<String,Object> getTestInfo() {
HashMap<String, Object> map = new HashMap<>();
HashMap<String, String> UwbBQ = new HashMap<>();
HashMap<String, String> UwbJiZhan = new HashMap<>();
HashMap<String, String> HKcamera = new HashMap<>();
HashMap<String, String> tklyr = new HashMap<>();
UwbBQ.put("name", "UWB-BQ");
UwbBQ.put("code", "0");
UwbBQ.put("num", "0");
UwbJiZhan.put("name", "UWB-基站");
UwbJiZhan.put("code", "0");
UwbJiZhan.put("num", "0");
HKcamera.put("name", "海康摄像头");
HKcamera.put("code", "0");
HKcamera.put("num", "0");
tklyr.put("name", "天坑路沿人");
tklyr.put("code", "0");
tklyr.put("num", "0");
map.put("UwbBQ", UwbBQ);
map.put("UwbJiZhan", UwbJiZhan);
map.put("HKcamera", HKcamera);
map.put("tklyr", tklyr);
return map;
}
}

View File

@ -14,6 +14,7 @@ public interface DwService {
@Deprecated @Deprecated
Object saveOrUpdateMap(MapInfo param) throws Exception; Object saveOrUpdateMap(MapInfo param) throws Exception;
Object getTrace(TraceGet param) throws Exception; Object getTrace(TraceGet param) throws Exception;
Object getLtTrace(TraceGet mapInfo);
Object getAlarmList(AlarmGet param) throws Exception; Object getAlarmList(AlarmGet param) throws Exception;
Object manageAlarm(AlarmManageDto param) throws Exception; Object manageAlarm(AlarmManageDto param) throws Exception;
// 废弃 // 废弃
@ -24,8 +25,10 @@ public interface DwService {
Object deleteMap(DeleteDto deleteDto); Object deleteMap(DeleteDto deleteDto);
// 第二版定位接口 // 第二版定位接口
Object getLastProp(GetLastPropDto dto) throws Exception; Object getLastProp(GetLastPropDto dto) throws Exception;
Object getAllMessage() throws Exception; Object getLtLastProp(GetLastPropDto dto) throws Exception;
Object getAllMessage(TraceGet param) throws Exception;
Object getCameraList(GetCameraListDto dto) throws Exception; Object getCameraList(GetCameraListDto dto) throws Exception;
Object getCameraInfo(GetCameraInfoDto dto) throws Exception; Object getCameraInfo(GetCameraInfoDto dto) throws Exception;
} }

View File

@ -6,6 +6,7 @@ import lombok.Data;
public class TraceGet { public class TraceGet {
private String user_id; private String user_id;
private String id; private String id;
private String corpId;
private String startTime; private String startTime;
private String endTime; private String endTime;
} }

View File

@ -48,6 +48,11 @@ public class DwServiceImpl implements DwService {
return HttpUtil.post(url + "dw/getTrace", param); return HttpUtil.post(url + "dw/getTrace", param);
} }
@Override
public Object getLtTrace(TraceGet param) {
return HttpUtil.post(url + "dw/LtGetTrace", param);
}
@Override @Override
public Object getAlarmList(AlarmGet param) throws Exception { public Object getAlarmList(AlarmGet param) throws Exception {
return HttpUtil.post(url + "dw/getAlarmList", param); return HttpUtil.post(url + "dw/getAlarmList", param);
@ -74,8 +79,13 @@ public class DwServiceImpl implements DwService {
} }
@Override @Override
public Object getAllMessage() throws Exception { public Object getLtLastProp(GetLastPropDto dto) throws Exception {
return HttpUtil.post(url + "dw/getAllMessage",null); return HttpUtil.post(url + "dw/getLtLastProp", dto);
}
@Override
public Object getAllMessage(TraceGet param) throws Exception {
return HttpUtil.post(url + "dw/getAllMessage",param);
} }
@Override @Override