| | |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation(value = "产线表集合", notes = "产线表集合") |
| | | @GetMapping(value = "/queryTreeAppList") |
| | | public Result<List<FactoryModel>> queryTreeAppList() { |
| | | Result<List<FactoryModel>> result = new Result<>(); |
| | | try { |
| | | List<Factory> factoryList = factoryService.list(new LambdaQueryWrapper<Factory>() |
| | | .eq(Factory::getDelFlag, CommonConstant.DEL_FLAG_0) |
| | | .orderByAsc(Factory::getSorter)); |
| | | |
| | | @ApiOperation(value = "获取所有产线列表", notes = "获取所有产线列表") |
| | | @GetMapping(value = "/queryProductionLineList") |
| | | public Result<List<FactoryModel>> queryProductionLineList() { |
| | | List<Factory> factoryList = factoryService.queryProductionLineList(); |
| | | List<FactoryModel> factoryModels = factoryList.stream() |
| | | .map(factory -> new FactoryModel(factory.getId(), factory.getFactoryName())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | result.setSuccess(true); |
| | | result.setResult(factoryModels); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | } |
| | | return result; |
| | | return Result.ok(factoryModels); |
| | | } |
| | | |
| | | |