| | |
| | | @OperationLog("generate task from open api") |
| | | public R save(@RequestBody OpenBusSubmitParam param) { |
| | | if (!configService.getVal("TaskAssignMode", Boolean.class)) { |
| | | if (configService.getVal("InAndOutMode", Boolean.class, false)) { |
| | | mainService.generateBusAndTask(param, null); |
| | | return R.ok("generate tasks success"); |
| | | 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/sync") |
| | | @OperationLog("sync loc") |
| | | public R loc(@RequestBody(required = false) Map<String, Object> map) { |
| | | if (map.get("current") == null) { |
| | | map.put("current", 1); |
| | | } |
| | | if (map.get("pageSize") == null) { |
| | | map.put("pageSize", 100); |
| | | } |
| | | public R loc(@RequestBody Map<String, Object> map) { |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<Loc, BaseParam> pageParam = new PageParam<>(baseParam, Loc.class); |
| | | return R.ok().add(locService.page(pageParam, pageParam.buildWrapper(true))); |
| | | return R.ok().add(locService.page(pageParam, pageParam.buildWrapperExcludeNull(true))); |
| | | } |
| | | |
| | | |