|  |  |  | 
|---|
|  |  |  | package com.ruoyi.sy.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONArray; | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.github.pagehelper.PageHelper; | 
|---|
|  |  |  | import com.github.pagehelper.PageInfo; | 
|---|
|  |  |  | 
|---|
|  |  |  | String syURL = sysConfigService.getSYURL(); | 
|---|
|  |  |  | Map<String,Object> map = ardSyCarService.getCarGPSBycarId(usersId,carId,syURL,ardSyUser); | 
|---|
|  |  |  | List list1 = (List) map.get("list"); | 
|---|
|  |  |  | JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(list1.get(0))); | 
|---|
|  |  |  | String carPlate = (String) jsonObject.get("carPlate"); | 
|---|
|  |  |  | carVo.setCarPlate(carPlate); | 
|---|
|  |  |  | String drvName = (String) jsonObject.get("drvName"); | 
|---|
|  |  |  | carVo.setDrvName(drvName); | 
|---|
|  |  |  | String drvPhone = (String) jsonObject.get("drvPhone"); | 
|---|
|  |  |  | carVo.setDrvPhone(drvPhone); | 
|---|
|  |  |  | carLockVo.setCar(carVo); | 
|---|
|  |  |  | if(list1.size()>0){ | 
|---|
|  |  |  | JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(list1.get(0))); | 
|---|
|  |  |  | String carPlate = (String) jsonObject.get("carPlate"); | 
|---|
|  |  |  | carVo.setCarPlate(carPlate); | 
|---|
|  |  |  | String drvName = (String) jsonObject.get("drvName"); | 
|---|
|  |  |  | carVo.setDrvName(drvName); | 
|---|
|  |  |  | String drvPhone = (String) jsonObject.get("drvPhone"); | 
|---|
|  |  |  | carVo.setDrvPhone(drvPhone); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String rtu = carVo.getRtu(); | 
|---|
|  |  |  | carLockVo.setCarLockList(ardSyCarLockService.carLock(rtu)); | 
|---|
|  |  |  | ArdSyCarRtu ardSyCarRtu = ardSyCarRtuService.one(carId); | 
|---|
|  |  |  | carVo.setInstallType(ardSyCarRtu.getInstallType()); | 
|---|
|  |  |  | carVo.setUnloadType(ardSyCarRtu.getUnloadType()); | 
|---|
|  |  |  | carLockVo.setCar(carVo); | 
|---|
|  |  |  | return AjaxResult.success(carLockVo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @GetMapping("/lockIng") | 
|---|
|  |  |  | @ApiOperation("实时锁状态") | 
|---|
|  |  |  | public AjaxResult lockIng(String carId)  { | 
|---|
|  |  |  | return AjaxResult.success(ardSyCarLockService.lockIng(carId)); | 
|---|
|  |  |  | return ardSyCarLockService.lockIng(carId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|