| | |
| | | package com.ruoyi.sy.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | |
| | | 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.param.AddRtuParam; |
| | | import com.ruoyi.sy.param.LockTypeParam; |
| | | import com.ruoyi.sy.param.RtuTypeParam; |
| | | import com.ruoyi.sy.param.*; |
| | | import com.ruoyi.sy.service.*; |
| | | import com.ruoyi.sy.service.impl.ArdSyCarRtuServiceImpl; |
| | | import com.ruoyi.sy.vo.CarLockVo; |
| | |
| | | |
| | | @GetMapping("/query") |
| | | @ApiOperation("查询所有rtu挂载的车辆") |
| | | public Results query(){ |
| | | public Results query(LockPageParam lockPageParam){ |
| | | List<CarVo> list = ardSyCarLockService.carList(); |
| | | analysis(list); |
| | | return Results.succeed(list); |
| | | List<CarVo> newList = new ArrayList<>(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | String plate = list.get(i).getCarPlate(); |
| | | if(lockPageParam.getCarPlate()!=null){ |
| | | if(plate.contains(lockPageParam.getCarPlate())){ |
| | | newList.add(list.get(i)); |
| | | } |
| | | } |
| | | } |
| | | PageHelper.startPage(lockPageParam.getPageNum(),lockPageParam.getPageSize()); |
| | | if(lockPageParam.getCarPlate()!=null){ |
| | | return Results.succeed(new PageInfo<>(newList)); |
| | | }else { |
| | | return Results.succeed(new PageInfo<>(list)); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/addLock") |