一公司人员定位地图功能完善

liujun-2024-05-23-接口漏洞修复
liujun 2024-04-16 17:22:44 +08:00
parent ff4be346ff
commit 1da764000c
6 changed files with 45 additions and 6 deletions

View File

@ -4,6 +4,9 @@ import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.dw.DwService;
import com.zcloud.service.dw.dto.MapGet;
import com.zcloud.service.dw.dto.TraceGet;
import com.zcloud.service.keyProjects.VideoManagerService;
import com.zcloud.service.map.*;
import com.zcloud.service.map.util.ReturnMap;
@ -24,6 +27,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import java.util.*;
/**
@ -73,6 +77,8 @@ public class MapController extends BaseController {
@Autowired
private WeatherUtil weatherUtil;
@Resource
private DwService dwService;
@ResponseBody
@RequestMapping("/getCorpInfo")
@ -864,11 +870,38 @@ public class MapController extends BaseController {
public Object getPersonByCardNo() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
// TODO 判断是否是公司人员定位
if (true){
MapGet mapInfo = new MapGet();
mapInfo.setId(pd.getString("CARDNO"));
return dwService.getMapInfo(mapInfo);
}else {
PageData value = usersService.getPersonByCardNo(pd);
map.put("result", "success");
map.put("pd", value);
return map;
}
}
@RequestMapping(value = "/getPersonTrace")
@ResponseBody
public Object getPersonTrace() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
PageData pd = this.getPageData();
// TODO 判断是否是公司人员定位
if (true){
TraceGet mapInfo = new TraceGet();
mapInfo.setId(pd.getString("id"));
return dwService.getTrace(mapInfo);
}else {
PageData value = usersService.getPersonByCardNo(pd);
map.put("result", "success");
map.put("pd", value);
return map;
}
}
/**
* (使

View File

@ -4,6 +4,7 @@ import com.zcloud.service.dw.dto.*;
public interface DwService {
Object getMapInfo(MapGet param) throws Exception;
Object getMapList(MapGet param) throws Exception;
Object saveOrUpdateMap(MapInfo param) throws Exception;
Object getTrace(TraceGet param) throws Exception;

View File

@ -7,11 +7,12 @@ public class MapGet {
private String departmentId;
private String userId;
private String userName;
private String userCardId;
private String corpId;
private String userCardId;
private String userPhone;
private String deviceId;
private String deviceName;
private String type;
private String id;
private Page page;
}

View File

@ -6,7 +6,6 @@ import lombok.Data;
public class MapRequired {
//映射类型0-人员1-设备)
private String type;
// 设备名称
private String typeName;
//人员id
private String userId;

View File

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

View File

@ -20,6 +20,10 @@ public class DwServiceImpl implements DwService {
@Resource
private CorpInfoService corpInfoService;
@Override
public Object getMapInfo(MapGet param) throws Exception {
return HttpUtil.post(url + "dw/getMapInfo", param);
}
@Override
public Object getMapList(MapGet param) throws Exception {