Merge remote-tracking branch 'origin/master'

This commit is contained in:
2024-02-19 10:49:03 +08:00
6 changed files with 0 additions and 65 deletions

View File

@@ -33,7 +33,6 @@ public class DeviceController {
@GetMapping
@Log("查询设备")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(deviceService.queryAll(whereJson, page), HttpStatus.OK);
}

View File

@@ -34,31 +34,24 @@ public class InstructionController {
@GetMapping
@Log("查询指令")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(instructionService.queryAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/getAll")
@Log("历史查询指令")
public ResponseEntity<Object> get(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(instructionService.getAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/unfinish")
@Log("查询所有未完成指令")
public ResponseEntity<Object> queryUnFinish() {
return new ResponseEntity<>(instructionService.queryAll("instruction_status < 2"), HttpStatus.OK);
}
@GetMapping("/reload")
@Log("数据同步")
public ResponseEntity<Object> reload() {
instructionService.reload();
return new ResponseEntity<>(HttpStatus.OK);
@@ -66,8 +59,6 @@ public class InstructionController {
@PostMapping
@Log("新增指令")
public ResponseEntity<Object> create(@Validated @RequestBody Instruction dto) throws Exception {
instructionService.create(dto);
return new ResponseEntity<>(HttpStatus.CREATED);
@@ -75,15 +66,12 @@ public class InstructionController {
@PutMapping
@Log("修改指令")
public ResponseEntity<Object> update(@Validated @RequestBody Instruction dto) {
instructionService.update(dto);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除指令")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody String[] ids) throws Exception {
instructionService.deleteAll(ids);
@@ -91,7 +79,6 @@ public class InstructionController {
}
@Log("完成指令")
@PostMapping(value = "/finish/{id}")
public ResponseEntity<Object> finish(@RequestBody String id) throws Exception {
instructionService.finish(id);
@@ -99,7 +86,6 @@ public class InstructionController {
}
@Log("取消指令")
@PostMapping(value = "/cancel/{id}")
public ResponseEntity<Object> cancel(@RequestBody String id) throws Exception {
instructionService.cancel(id);
@@ -107,7 +93,6 @@ public class InstructionController {
}
@Log("强制取消指令")
@PostMapping(value = "/forceCancel/{id}")
public ResponseEntity<Object> forceCancel(@RequestBody String id) throws Exception {
instructionService.forceCancel(id);
@@ -115,16 +100,13 @@ public class InstructionController {
}
@Log("导出指令")
@GetMapping(value = "/download")
public void download(HttpServletResponse response, Map whereJson) throws IOException {
instructionService.download(instructionService.queryAll(whereJson), response);
}
@Log("缓存查询指令")
@PostMapping(value = "/findByCodeFromCache/{id}")
public ResponseEntity<Object> findByCodeFromCache(@RequestBody String id) {
return new ResponseEntity<>(instructionService.findByCodeFromCache(id), HttpStatus.OK);
@@ -132,21 +114,18 @@ public class InstructionController {
@SaIgnore
@Log("查询缓存所有指令")
@PostMapping(value = "/findAllInstFromCache")
public ResponseEntity<Object> findAllInstFromCache() {
return new ResponseEntity<>(instructionService.findAllInstFromCache(), HttpStatus.OK);
}
@Log("查询指定任务的所有指令")
@PostMapping(value = "/queryByTaskId/{taskId}")
public ResponseEntity<Object> queryByTaskId(@RequestBody String taskId) {
return new ResponseEntity<>(instructionService.getByTaskId(taskId), HttpStatus.OK);
}
@Log("初始化")
@PostMapping(value = "/init/{id}")
public ResponseEntity<Object> init(@RequestBody String id) throws Exception {
instructionService.init(id);
@@ -155,8 +134,6 @@ public class InstructionController {
@GetMapping("/downloadInstLogging")
@Log("导出指令记录")
public void downloadInstLogging(HttpServletResponse response,@RequestParam Map whereJson) throws IOException {
instructionService.downloadInstLogging(instructionService.getInstList(whereJson), response);
}

View File

@@ -33,14 +33,12 @@ public class RouteLineController {
@GetMapping
@Log("查询路由路线")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(routeLineService.queryAll(whereJson, page), HttpStatus.OK);
}
@PostMapping
@Log("新增路由路线")
//@PreAuthorize("@el.check('routeLine:add')")
public ResponseEntity<Object> create(@RequestBody Map data) throws SQLException {
routeLineService.create(data);
@@ -49,8 +47,6 @@ public class RouteLineController {
@GetMapping("/reload")
@Log("数据同步")
public ResponseEntity<Object> reload() throws SQLException {
routeLineService.reload();
return new ResponseEntity<>(HttpStatus.OK);
@@ -59,7 +55,6 @@ public class RouteLineController {
@PutMapping
@Log("修改路由路线")
//@PreAuthorize("@el.check('routeLine:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody RouteLineDto dto) throws SQLException {
routeLineService.update(dto);
@@ -68,7 +63,6 @@ public class RouteLineController {
@PutMapping("/enabled")
@Log("启用禁用路由路线")
//@PreAuthorize("@el.check('routeLine:edit')")
public ResponseEntity<Object> enabled(@Validated @RequestBody RouteLineDto dto) throws SQLException {
routeLineService.enabled(dto.getLine_uuid(), dto.getIs_active());
@@ -77,7 +71,6 @@ public class RouteLineController {
@Log("删除路由路线")
//@PreAuthorize("@el.check('routeLine:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody String[] ids) throws SQLException {
@@ -86,7 +79,6 @@ public class RouteLineController {
}
@Log("导出路由路线")
@GetMapping(value = "/download")
//@PreAuthorize("@el.check('routeLine:list')")
public void download(HttpServletResponse response, Map whereJson) throws IOException {
@@ -95,7 +87,6 @@ public class RouteLineController {
@Log("查询最优路由路线")
@PostMapping(value = "/getShortPathLines")
public ResponseEntity<Object> getShortPathLines(String device_code, String next_device_code, String route_plan_code) {
return new ResponseEntity<>(routeLineService.getShortPathLines(device_code, next_device_code, route_plan_code), HttpStatus.OK);

View File

@@ -32,14 +32,12 @@ public class RouteLocController {
@GetMapping
@Log("查询路由坐标")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(routeLocService.queryAll(whereJson, page), HttpStatus.OK);
}
@PostMapping
@Log("新增路由坐标")
//@PreAuthorize("@el.check('routeLoc:add')")
public ResponseEntity<Object> create(@Validated @RequestBody RouteLocDto dto) {
routeLocService.create(dto);
@@ -48,7 +46,6 @@ public class RouteLocController {
@PutMapping
@Log("修改路由坐标")
//@PreAuthorize("@el.check('routeLoc:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody RouteLocDto dto) {
routeLocService.update(dto);
@@ -56,7 +53,6 @@ public class RouteLocController {
}
@Log("删除路由坐标")
//@PreAuthorize("@el.check('routeLoc:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
@@ -65,7 +61,6 @@ public class RouteLocController {
}
@Log("导出路由坐标")
@GetMapping(value = "/download")
//@PreAuthorize("@el.check('routeLoc:list')")
public void download(HttpServletResponse response, Map whereJson) throws IOException {

View File

@@ -32,14 +32,12 @@ public class RoutePlanController {
@GetMapping
@Log("查询路由方案")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(routePlanService.queryAll(whereJson, page), HttpStatus.OK);
}
@PostMapping
@Log("新增路由方案")
//@PreAuthorize("@el.check('routePlan:add')")
public ResponseEntity<Object> create(@Validated @RequestBody RoutePlanDto dto) {
routePlanService.create(dto);
@@ -48,7 +46,6 @@ public class RoutePlanController {
@PutMapping
@Log("修改路由方案")
//@PreAuthorize("@el.check('routePlan:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody RoutePlanDto dto) {
routePlanService.update(dto);
@@ -56,7 +53,6 @@ public class RoutePlanController {
}
@Log("删除路由方案")
//@PreAuthorize("@el.check('routePlan:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody String[] ids) {
@@ -65,7 +61,6 @@ public class RoutePlanController {
}
@Log("导出路由方案")
@GetMapping(value = "/download")
//@PreAuthorize("@el.check('routePlan:list')")
public void download(HttpServletResponse response, Map whereJson) throws IOException {
@@ -74,7 +69,6 @@ public class RoutePlanController {
@GetMapping("/selectList")
@Log("下拉选路由方案")
//@PreAuthorize("@el.check('routePlan:list')")
public ResponseEntity<Object> selectList() {
return new ResponseEntity<>(routePlanService.selectList(), HttpStatus.OK);

View File

@@ -30,16 +30,13 @@ public class TaskController {
@GetMapping
@Log("查询任务")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(taskService.queryAll(whereJson, page), HttpStatus.OK);
}
@GetMapping("/reload")
@Log("数据同步")
@SaIgnore
public ResponseEntity<Object> reload() {
taskService.reload();
return new ResponseEntity<>(HttpStatus.OK);
@@ -47,8 +44,6 @@ public class TaskController {
@GetMapping("/getAll")
@Log("历史查询任务")
public ResponseEntity<Object> get(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(taskService.getAll(whereJson, page), HttpStatus.OK);
}
@@ -63,17 +58,14 @@ public class TaskController {
@PostMapping(value = "/adds")
@Log("常规任务保存")
//@PreAuthorize("@el.check('task:add')")
public ResponseEntity<Object> ordinaryTaskCreate(@RequestBody JSONObject json) throws Exception {
taskService.ordinaryTaskCreate(json);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PostMapping(value = "/addes")
@Log("特殊任务保存")
public ResponseEntity<Object> specialTaskCreate(@RequestBody JSONObject json) throws Exception {
taskService.specialTaskCreate(json);
return new ResponseEntity<>(HttpStatus.CREATED);
@@ -81,7 +73,6 @@ public class TaskController {
@PutMapping
@Log("修改任务")
//@PreAuthorize("@el.check('task:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody TaskDto dto) {
taskService.update(dto);
@@ -89,7 +80,6 @@ public class TaskController {
}
@Log("删除任务")
//@PreAuthorize("@el.check('task:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody String[] ids) throws Exception {
@@ -98,7 +88,6 @@ public class TaskController {
}
@Log("完成任务")
@PostMapping(value = "/finish/{id}")
public ResponseEntity<Object> finish(@RequestBody String id) {
taskService.finish(id);
@@ -106,7 +95,6 @@ public class TaskController {
}
@Log("取消任务")
@PostMapping(value = "/cancel/{id}")
public ResponseEntity<Object> cancel(@RequestBody String id) throws Exception {
taskService.cancel(id);
@@ -114,7 +102,6 @@ public class TaskController {
}
@Log("手动创建指令")
@PostMapping(value = "/createInst/{id}")
public ResponseEntity<Object> createInst(@RequestBody String id) throws Exception {
taskService.createInst(id);
@@ -122,15 +109,12 @@ public class TaskController {
}
@Log("导出任务")
@GetMapping(value = "/download")
public void download(HttpServletResponse response, Map whereJson) throws IOException {
taskService.download(taskService.queryAll(whereJson), response);
}
@Log("一体机触发任务")
@PostMapping("/createTaskByClick")
//@PreAuthorize("@el.check('task:add')")
public ResponseEntity<Object> createTaskByClick(@RequestBody JSONObject json) {
@@ -140,7 +124,6 @@ public class TaskController {
@SaIgnore
@Log("查询缓存所有任务")
@PostMapping(value = "/findAllTaskFromCache")
public ResponseEntity<Object> findAllTaskFromCache() {
return new ResponseEntity<>(taskService.findAllTaskFromCache(), HttpStatus.OK);
@@ -148,8 +131,6 @@ public class TaskController {
@GetMapping("/downloadTaskTreeLogging")
@Log("导出任务树形记录")
public void downloadTaskTreeLogging(HttpServletResponse response,@RequestParam Map whereJson) throws IOException {
taskService.downloadTaskTreeLogging(taskService.getTaskAndInst(whereJson), response);
}
@@ -157,8 +138,6 @@ public class TaskController {
@GetMapping("/downloadTaskLogging")
@Log("导出任务树形记录")
public void downloadTaskLogging(HttpServletResponse response,@RequestParam Map whereJson) throws IOException {
taskService.downloadTaskLogging(taskService.getTaskList(whereJson), response);
}