| | |
| | | //@PreAuthorize("hasAuthority('open:bus:submit')") |
| | | @PostMapping("/bus/submit") |
| | | @OperationLog("generate task from open api") |
| | | public R save(@RequestBody OpenBusSubmitParam param) { |
| | | if (!configService.getVal("TaskAssignMode", Boolean.class)) { |
| | | public synchronized R save(@RequestBody OpenBusSubmitParam param) { |
| | | for (TaskDto taskDto : param.getTaskList()) { |
| | | if (Cools.isEmpty(taskDto.getSeqNum())) { |
| | | return R.error("缺失任务号"); |
| | |
| | | } |
| | | mainService.generateBusAndTask(param, null); |
| | | return R.ok("generate tasks success"); |
| | | } |
| | | return R.error("generate tasks error"); |
| | | } |
| | | |
| | | |
| | |
| | | @PostMapping("/loc/one") |
| | | @OperationLog("one loc") |
| | | public R emptyLoc(@RequestBody Map<String, Object> map) { |
| | | if (!configService.getVal("TaskAssignMode", Boolean.class)) { |
| | | if (configService.getVal("InAndOutMode", Boolean.class, false)) { |
| | | |
| | | String staNo = map.get("staNo").toString(); |
| | | Integer startRow = null; |
| | | Integer endRow = null; |
| | |
| | | } |
| | | Collections.shuffle(idleList); |
| | | return R.ok().add(idleList.get(0)); |
| | | } |
| | | } |
| | | return R.error("未开启该模式"); |
| | | } |
| | | |
| | | } |