| | |
| | | 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.service.*; |
| | | import com.ruoyi.sy.service.impl.ArdSyCarRtuServiceImpl; |
| | | import com.ruoyi.sy.vo.CarLockVo; |
| | |
| | | import com.ruoyi.utils.result.Results; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.eclipse.paho.client.mqttv3.MqttException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @PostMapping("/add") |
| | | @ApiOperation("添加rtu") |
| | | public AjaxResult add(@RequestBody AddRtuParam addRtuParam){ |
| | | return AjaxResult.success("成功添加"+ardSyCarLockService.addRtu(addRtuParam)+"条数据"); |
| | | return AjaxResult.success("成功添加"+ardSyCarLockService.addRtu(addRtuParam)+"条数据,订阅车辆"+addRtuParam.getCarId()+"成功"); |
| | | } |
| | | |
| | | @DeleteMapping("/del") |
| | |
| | | return AjaxResult.success(ardAccessFenceService.updCarAlarm(id)); |
| | | } |
| | | |
| | | @GetMapping("/openLock") |
| | | @GetMapping("/onOff") |
| | | @ApiOperation("远程开锁") |
| | | public AjaxResult openLock(String carId){ |
| | | return AjaxResult.success(ardSyCarRtuService.openLock(ardSyCarRtuService.one(carId))); |
| | | public AjaxResult onOff(@RequestBody LockTypeParam lockTypeParam) { |
| | | return AjaxResult.success(ardSyCarLockService.onOff(lockTypeParam)); |
| | | } |
| | | |
| | | @GetMapping("/seal") |
| | | @ApiOperation("远程封印") |
| | | public AjaxResult seal(@RequestBody RtuTypeParam rtuTypeParam) { |
| | | return AjaxResult.success(ardSyCarLockService.seal(rtuTypeParam)); |
| | | } |
| | | |
| | | @GetMapping("/lockIng") |
| | | @ApiOperation("实时锁状态") |
| | | public AjaxResult lockIng(String carId) { |
| | | return AjaxResult.success(ardSyCarLockService.lockIng(carId)); |
| | | } |
| | | |
| | | |