efd7ebc2 张雷

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

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