| | |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.modules.base.entity.Factory; |
| | | import org.jeecg.modules.base.model.FactoryIdModel; |
| | | import org.jeecg.modules.base.model.FactoryModel; |
| | | import org.jeecg.modules.base.service.IFactoryService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | 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)); |
| | | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //@AutoLog(value = "产线表-查询树形结构所有产线名称") |
| | | @ApiOperation(value = "产线表-查询树形结构所有产线名称", notes = "产线表-查询树形结构所有产线名称") |
| | | @GetMapping(value = "/queryIdTree") |