|
@@ -382,7 +382,9 @@ public class WorkOrderManageController {
|
|
|
|
|
|
@GetMapping("/maintain/user")
|
|
|
@ApiOperation(value = "维护列表/人员")
|
|
|
- public AjaxMessage<List<Map<String,Object>>> selectMaintainUser(){
|
|
|
+ public AjaxMessage<List<Map<String,Object>>> selectMaintainUser(
|
|
|
+ @ApiParam(value = "wkid", required = false) @RequestParam(required = false) String wkid,
|
|
|
+ @ApiParam(value = "偏移量(x,y)", required = false) @RequestParam(required = false) String moveXY){
|
|
|
List<Map<String,Object>> list = new ArrayList<Map<String,Object>>();
|
|
|
AjaxMessage<List<UserEntity>> listAjaxMessage = userCenterClient.findUserListByType();
|
|
|
for(UserEntity userEntity : listAjaxMessage.getData()){
|
|
@@ -394,11 +396,34 @@ public class WorkOrderManageController {
|
|
|
map.put("deptName", userEntity.getDeptOrgName());
|
|
|
if (orderStatusMap != null) {
|
|
|
map.put("status", orderStatusMap.get("S").toString());
|
|
|
- map.put("online","在线");
|
|
|
}
|
|
|
else {
|
|
|
map.put("status", "空闲");
|
|
|
- map.put("online","离线");
|
|
|
+ }
|
|
|
+ Map<String, Object> onLineStatusMap = workOrderManageService.selectMaintainUserStatus(userEntity.getId().toString());
|
|
|
+ if(onLineStatusMap != null) {
|
|
|
+ if (!org.apache.commons.lang3.StringUtils.isEmpty(wkid)
|
|
|
+ && wkid.equals("2360")
|
|
|
+ && onLineStatusMap.get("X") != null
|
|
|
+ && onLineStatusMap.get("Y") != null) {
|
|
|
+ MyPoint myPoint = ConvertXY.ConvertXYToXian80(onLineStatusMap.get("X").toString(),
|
|
|
+ onLineStatusMap.get("Y").toString(), moveXY);
|
|
|
+ map.put("geo", String.format("[%s,%s]", myPoint.getX(), myPoint.getY()));
|
|
|
+ } else if (!org.apache.commons.lang3.StringUtils.isEmpty(wkid)
|
|
|
+ && wkid.equals("3857")
|
|
|
+ && onLineStatusMap.get("X") != null
|
|
|
+ && onLineStatusMap.get("Y") != null) {
|
|
|
+ MyPoint myPoint = ConvertXY.ConvertXYToMercato(onLineStatusMap.get("X").toString(),
|
|
|
+ onLineStatusMap.get("Y").toString(), moveXY);
|
|
|
+ map.put("geo", String.format("[%s,%s]", myPoint.getX(), myPoint.getY()));
|
|
|
+ } else if (onLineStatusMap.get("X") != null && onLineStatusMap.get("Y") != null) {
|
|
|
+ map.put("geo", String.format("[%s,%s]", onLineStatusMap.get("X"), onLineStatusMap.get("Y")));
|
|
|
+ }
|
|
|
+ map.put("online", onLineStatusMap.get("L").toString());
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ map.put("coords", null);
|
|
|
+ map.put("online", "离线");
|
|
|
}
|
|
|
list.add(map);
|
|
|
}
|