| | |
| | | */ |
| | | @RestController |
| | | @Slf4j |
| | | @RequestMapping("/api/v1/electronicFence") |
| | | @RequestMapping("") |
| | | public class XpElectronicFenceController { |
| | | |
| | | |
| | |
| | | * 查询省市管理 |
| | | */ |
| | | @ApiOperation(value = "查询省市区",response = XpRegion.class) |
| | | @GetMapping(value = "/getRegion") |
| | | @GetMapping(value = "/api/v1/electronicFence/getRegion") |
| | | public R<List<List<XpRegion>>> geXpRegion() { |
| | | return R.ok(regionService.getXpRegion()); |
| | | } |
| | | @ApiOperation(value = "电子围栏管理列表", response = XpElectronicFence.class) |
| | | @PostMapping("/pageList") |
| | | @PostMapping("/api/v1/electronicFence/pageList") |
| | | public R<PageInfo<XpElectronicFence>> pageList(@RequestBody ElectronicPageListQuery query) { |
| | | PageInfo<XpElectronicFence> pageList = xpElectronicFenceService.pageList(query); |
| | | return R.ok(pageList); |
| | |
| | | * @return 电子围栏列表 |
| | | */ |
| | | @ApiOperation(value = "电子围栏列表接口", tags = {"运维APP-车辆管理"}) |
| | | @GetMapping("/operationsFenceList") |
| | | @GetMapping("/maintenance-app/api/v1/electronicFence/operationsFenceList") |
| | | public R<List<XpElectronicFence>> operationsFenceList() { |
| | | List<XpElectronicFence> list = xpElectronicFenceService.list(Wrappers.lambdaQuery(XpElectronicFence.class).eq(XpElectronicFence::getStatus, 2)); |
| | | return R.ok(list); |
| | |
| | | /** |
| | | * 新增电子围栏 |
| | | */ |
| | | @PostMapping("/add") |
| | | @PostMapping("/api/v1/electronicFence/add") |
| | | @ApiOperation(value = "新增电子围栏") |
| | | public R add(@Validated @RequestBody ElectronicFenceAddDto dto) { |
| | | return xpElectronicFenceService.addElectronic(dto); |
| | |
| | | /** |
| | | * 修改状态 |
| | | */ |
| | | @PostMapping("/updateStatus") |
| | | @PostMapping("/api/v1/electronicFence/updateStatus") |
| | | @ResponseBody |
| | | @ApiOperation(value = "修改状态") |
| | | public R updateStatus(@RequestBody ElectronicFenceAreaUpdateStatusDto dto) { |
| | |
| | | /** |
| | | * 电子围栏详情 |
| | | */ |
| | | @PostMapping("/queryById") |
| | | @PostMapping("/api/v1/electronicFence/queryById") |
| | | @ApiOperation(value = "电子围栏详情") |
| | | public R<ElectronicFenceDetailVo> queryById(@RequestParam("id")Long id) { |
| | | ElectronicFenceDetailVo res = new ElectronicFenceDetailVo(); |
| | |
| | | /** |
| | | * 编辑电子围栏 |
| | | */ |
| | | @PostMapping("/edit1") |
| | | @PostMapping("/api/v1/electronicFence/edit1") |
| | | @ApiOperation(value = "编辑电子围栏") |
| | | public R edit(@Validated @RequestBody ElectronicFenceUpdateDto dto) { |
| | | return xpElectronicFenceService.editElectronic(dto); |
| | |
| | | /** |
| | | * 复制电子围栏 |
| | | */ |
| | | @PostMapping("/copy") |
| | | @PostMapping("/api/v1/electronicFence/copy") |
| | | @ApiOperation(value = "复制电子围栏") |
| | | @Transactional |
| | | @ShardingSphereTransactionType(TransactionType.BASE) |
| | |
| | | * @param electronicIdSet |
| | | * @return |
| | | */ |
| | | @PostMapping("/listByIds") |
| | | @PostMapping("/api/v1/electronicFence/listByIds") |
| | | R<List<XpElectronicFence>> listByIds(@RequestBody Collection<Long> electronicIdSet) { |
| | | if (CollUtil.isEmpty(electronicIdSet)) { |
| | | return R.ok(Collections.emptyList()); |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "获取已启用的电子围栏列表",tags = {"管理后台-在库车辆管理"}) |
| | | @GetMapping("/available/list") |
| | | @GetMapping("/api/v1/electronicFence/available/list") |
| | | R<List<XpElectronicFence>> getAvailableList(){ |
| | | return R.ok(xpElectronicFenceService.getAvailableList()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取不分页的电子围栏列表",tags = {"管理后台-在库车辆管理"}) |
| | | @GetMapping("/list") |
| | | @GetMapping("/api/v1/electronicFence/list") |
| | | R<List<XpElectronicFence>> getList(){ |
| | | return R.ok(xpElectronicFenceService.getList()); |
| | | } |