efd7ebc2 张雷

人员定位信息位置信息修改

1 个父辈 ce9a7aea
......@@ -3,7 +3,6 @@ package com.skua.modules.location.controller;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.location.UserLocationFactory;
import com.skua.modules.location.entity.UserBaseInfo;
import com.skua.modules.location.entity.UserLocation;
import com.skua.modules.location.service.ILocationService;
import com.skua.modules.location.vo.QueryParams;
......
......@@ -21,4 +21,11 @@ public class UserBaseInfo {
/**在线状态*/
private String userStatus;
/**X坐标*/
private Double x;
/**Y坐标*/
private Double y;
/**楼层*/
private String floor;
}
......
package com.skua.modules.location.service.impl;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.skua.modules.location.entity.*;
import com.skua.modules.location.service.ILocationService;
......@@ -118,6 +119,10 @@ public class YwLocationServiceImpl implements ILocationService {
userBaseInfo.setUserType("员工");
if(onlineMap.get(userBaseInfoYwResult.getDeviceno())!=null){
userBaseInfo.setUserStatus("1");
UserLocation userLocation = JSON.parseObject(onlineMap.get(userBaseInfoYwResult.getDeviceno()).toString(), UserLocation.class);
userBaseInfo.setX(userLocation.getX());
userBaseInfo.setY(userLocation.getY());
userBaseInfo.setFloor(userLocation.getFloor());
}else{
userBaseInfo.setUserStatus("0");
}
......@@ -131,7 +136,7 @@ public class YwLocationServiceImpl implements ILocationService {
Map<String,Object> map = new HashMap();
List<UserLocation> list = getAllUserGPS();
for (UserLocation userLocation : list) {
map.put(userLocation.getDeviceCode(),"1");
map.put(userLocation.getDeviceCode(),userLocation);
}
return map;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!