| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | @PostMapping("/sendCheckCommandersPosition") |
| | | @GetMapping("/getOnlineCommanderPosition") |
| | | @ApiOperation("单兵端查看已通过审批的在线指挥端位置") |
| | | public AjaxResult getOnlineCommanderPosition() { |
| | | String soilderId = SecurityUtils.getUserId(); |
| | | try{ |
| | | List<Map<String,Object>> result = ardAppPositionService.getOnlineCommanderPosition(soilderId); |
| | | return AjaxResult.success(result); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | |
| | | /*@PostMapping("/sendCheckCommandersPosition") |
| | | @ApiOperation("发起查看指挥端位置") |
| | | public AjaxResult sendCheckCommandersPosition(@RequestBody Map<String,Object> para) { |
| | | String usersId = SecurityUtils.getUserId(); |
| | |
| | | }catch(Exception e){ |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @PostMapping("/sendCheckSYCarsPosition") |
| | | /*@PostMapping("/sendCheckSYCarsPosition") |
| | | @ApiOperation("发起查看车辆位置") |
| | | public AjaxResult sendCheckSYCarsPosition(@RequestBody Map<String,Object> para) { |
| | | String usersId = SecurityUtils.getUserId(); |
| | |
| | | }catch(Exception e){ |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @GetMapping("/getCheckCommandersPosition") |
| | | /*@GetMapping("/getCheckCommandersPosition") |
| | | @ApiOperation("指挥端查看指挥端位置申请") |
| | | public AjaxResult getCheckCommandersPosition() {//弃用 |
| | | String usersId = SecurityUtils.getUserId(); |
| | |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @GetMapping("/getCheckSYCarsPosition") |
| | | /*@GetMapping("/getCheckSYCarsPosition") |
| | | @ApiOperation("指挥端查看车辆位置申请") |
| | | public AjaxResult getCheckSYCarsPosition() {//弃用 |
| | | String usersId = SecurityUtils.getUserId(); |
| | |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @GetMapping("/getCheckPosition") |
| | | /*@GetMapping("/getCheckPosition") |
| | | @ApiOperation("指挥端查看位置申请") |
| | | public AjaxResult getCheckPosition() { |
| | | String usersId = SecurityUtils.getUserId(); |
| | |
| | | e.printStackTrace(); |
| | | return AjaxResult.error(); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | |
| | | package com.ruoyi.app.position.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.app.position.domain.ArdAppPosition; |
| | | |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteArdAppPositionByIds(String[] ids); |
| | | |
| | | public List<Map<String,Object>> getOnlineCommanderPosition(String soilderId); |
| | | } |
| | |
| | | |
| | | public Map<String,List<SysUser>> getOnlinePCOrCommander(String usersId); |
| | | |
| | | public void sendCheckCommandersPosition(String usersId,Map<String,Object> para); |
| | | public List<Map<String,Object>> getOnlineCommanderPosition(String soilderId); |
| | | |
| | | public void sendCheckSYCarsPosition(String usersId,Map<String,Object> para); |
| | | //public void sendCheckCommandersPosition(String usersId,Map<String,Object> para); |
| | | |
| | | public List<Map<String,Object>> getCheckCommandersPosition(String usersId); |
| | | //public void sendCheckSYCarsPosition(String usersId,Map<String,Object> para); |
| | | |
| | | public List<Map<String,Object>> getCheckSYCarsPosition(String usersId); |
| | | //public List<Map<String,Object>> getCheckCommandersPosition(String usersId); |
| | | |
| | | public Map<String,List<Map<String,Object>>> getCheckPosition(String usersId); |
| | | //public List<Map<String,Object>> getCheckSYCarsPosition(String usersId); |
| | | |
| | | //public Map<String,List<Map<String,Object>>> getCheckPosition(String usersId); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String,Object>> getOnlineCommanderPosition(String soilderId) { |
| | | List<Map<String,Object>> result = ardAppPositionMapper.getOnlineCommanderPosition(soilderId); |
| | | return result; |
| | | } |
| | | |
| | | /*@Override |
| | | public void sendCheckCommandersPosition(String usersId,Map<String, Object> para) { |
| | | String reason = (String) para.get("reason"); |
| | | List<String> usersIdList = (List<String>) para.get("usersIdList"); |
| | |
| | | value.put("soilderId",usersId); |
| | | redisCache.setCacheObject(key, JSON.toJSONString(value)); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @Override |
| | | /*@Override |
| | | public void sendCheckSYCarsPosition(String usersId, Map<String, Object> para) { |
| | | String reason = (String) para.get("reason"); |
| | | List<String> usersIdList = (List<String>) para.get("usersIdList"); |
| | |
| | | value.put("soilderId",usersId); |
| | | redisCache.setCacheObject(key, JSON.toJSONString(value)); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @Override |
| | | /*@Override |
| | | public List<Map<String, Object>> getCheckCommandersPosition(String usersId) { |
| | | String key = "checkCommanderPosition_" + usersId + "_"; |
| | | List<Object> keyValueList = redisCache.getListKey(key); |
| | |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | }*/ |
| | | |
| | | @Override |
| | | /*@Override |
| | | public List<Map<String, Object>> getCheckSYCarsPosition(String usersId) { |
| | | String key = "checkSYCarsPosition_" + usersId + "_"; |
| | | List<Object> keyValueList = redisCache.getListKey(key); |
| | |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | }*/ |
| | | |
| | | @Override |
| | | /*@Override |
| | | public Map<String, List<Map<String, Object>>> getCheckPosition(String usersId) { |
| | | Map<String, List<Map<String, Object>>> result = new HashMap(); |
| | | //查看指挥端位置申请 |
| | |
| | | result.put("commander",resultCommanderPosition); |
| | | result.put("SYCars",resultSYCarsPosition); |
| | | return result; |
| | | } |
| | | }*/ |
| | | } |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="getOnlineCommanderPosition" parameterType="java.lang.String" resultType="java.util.Map"> |
| | | select su.user_name as "userName",su.nick_name as "nickName", |
| | | aap.user_id as "userId",aap.longitude,aap.latitude,aap.altitude, |
| | | aap.speed,aap.bearing,aap.create_time as "createTime" |
| | | from ard_app_application aaa |
| | | inner join sys_user su on aaa.commander_id = su.user_id |
| | | inner join ard_app_position aap on su.user_id = aap.user_id |
| | | where aaa.soilder_id = #{soilderId} and aaa.application_type = 'Commander' |
| | | and aaa.state = '1' and su.app_online_state = '1' |
| | | order by aap.create_time desc limit 1 offset 0 |
| | | </select> |
| | | </mapper> |