| | |
| | | import com.ruoyi.sy.domain.ArdSyCarRtu; |
| | | import com.ruoyi.sy.domain.ArdSyUser; |
| | | import com.ruoyi.sy.mapper.ArdAccessFenceMapper; |
| | | import com.ruoyi.sy.param.AddCarParam; |
| | | import com.ruoyi.sy.service.ArdAccessFenceService; |
| | | import com.ruoyi.sy.service.ArdSyCarLockService; |
| | | import com.ruoyi.sy.service.IArdSyCarService; |
| | |
| | | String usersId = SecurityUtils.getUserId(); |
| | | ArdSyUser ardSyUser = iArdSyUserService.userById(usersId); |
| | | String syURL = sysConfigService.getSYURL(); |
| | | Results results = ardSyCarService.getCarGPSBycarId(usersId,carId,syURL,ardSyUser); |
| | | Map<String,Object> map = (Map<String, Object>) results.getData(); |
| | | 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"); |
| | |
| | | String usersId = SecurityUtils.getUserId(); |
| | | ArdSyUser ardSyUser = iArdSyUserService.userById(usersId); |
| | | String syURL = sysConfigService.getSYURL(); |
| | | Results results = ardSyCarService.getCarGPSBycarId(usersId,carId,syURL,ardSyUser); |
| | | Map<String,Object> map = (Map<String, Object>) results.getData(); |
| | | 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"); |
| | |
| | | @GetMapping("/queryCar") |
| | | @ApiOperation("清淤手动添加车辆查询") |
| | | public AjaxResult queryCar(){ |
| | | List<ArdAccessFence> ardAccessFences = ardAccessFenceService.all(); |
| | | String url = sysConfigService.selectConfigByKey("minioIn")+"/"; |
| | | List<ArdAccessFence> ardAccessFences = ardAccessFenceService.all(url); |
| | | List<String> carIdList = new ArrayList<>(); |
| | | for (int i = 0; i < ardAccessFences.size(); i++) { |
| | | String carId = ardAccessFences.get(i).getCarId(); |
| | |
| | | |
| | | @PostMapping("/addCar") |
| | | @ApiOperation("清淤手动添加车辆保存") |
| | | public AjaxResult addCar(String carId){ |
| | | List<CarVo> list = ardSyCarLockService.addCarBefore(carId); |
| | | public AjaxResult addCar(@RequestBody AddCarParam addCarParam){ |
| | | List<CarVo> list = ardSyCarLockService.addCarBefore(addCarParam.getCarId()); |
| | | analysis(list); |
| | | if(list.size()>0){ |
| | | return AjaxResult.success(ardAccessFenceService.addCar(list.get(0))); |
| | | String usersId = SecurityUtils.getUserId(); |
| | | ArdSyUser ardSyUser = iArdSyUserService.userById(usersId); |
| | | String syURL = sysConfigService.getSYURL(); |
| | | Map<String, Object> map = ardSyCarService.getCarGPSBycarId(usersId,addCarParam.getCarId(),syURL,ardSyUser); |
| | | List list1 = (List) map.get("list"); |
| | | JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(list1.get(0))); |
| | | String lng = (String) jsonObject.get("lng"); |
| | | String lat = (String) jsonObject.get("lat"); |
| | | return AjaxResult.success(ardAccessFenceService.addCar(list.get(0),addCarParam.getIsAlarm(),lng,lat)); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | return AjaxResult.success(ardAccessFenceService.delCar(id)); |
| | | } |
| | | |
| | | @PutMapping("/addCar") |
| | | @PutMapping("/cleanAlarm") |
| | | @ApiOperation("清空报警") |
| | | public AjaxResult updCarAlarm(String id){ |
| | | return AjaxResult.success(ardAccessFenceService.updCarAlarm(id)); |
| | |
| | | for (int i = 0; i < list.size(); i++) { |
| | | CarVo carVo = list.get(i); |
| | | String carId = carVo.getCarId(); |
| | | Results results = ardSyCarService.getCarGPSBycarId(usersId,carId,syURL,ardSyUser); |
| | | Map<String,Object> map = (Map<String, Object>) results.getData(); |
| | | 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"); |