| | |
| | | import org.jeecg.common.util.oConvertUtils; |
| | | import org.jeecg.config.mybatis.MybatisPlusSaasConfig; |
| | | import org.jeecg.modules.dry.entity.DryEquipment; |
| | | import org.jeecg.modules.dry.service.IDryEqpTypeService; |
| | | import org.jeecg.modules.dry.service.IDryEquipmentService; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | public class DryEquipmentController extends JeecgController<DryEquipment, IDryEquipmentService> { |
| | | @Autowired |
| | | private IDryEquipmentService dryEquipmentService; |
| | | |
| | | @Autowired |
| | | private IDryEqpTypeService dryEqpTypeService; |
| | | |
| | | /** |
| | | * 分页列表查询 |
| | |
| | | //------------------------------------------------------------------------------------------------ |
| | | QueryWrapper<DryEquipment> queryWrapper = QueryGenerator.initQueryWrapper(dryEquipment, req.getParameterMap()); |
| | | |
| | | queryWrapper.orderByAsc("code"); |
| | | List<DryEquipment> eqps = dryEquipmentService.list(queryWrapper); |
| | | return Result.OK(eqps); |
| | | } |
| | |
| | | @GetMapping(value = "/queryById") |
| | | public Result<DryEquipment> queryById(@RequestParam(name="id",required=true) String id) { |
| | | DryEquipment dryEquipment = dryEquipmentService.getById(id); |
| | | dryEquipment.setType(dryEqpTypeService.getById(dryEquipment.getType()).getName()); |
| | | if(dryEquipment==null) { |
| | | return Result.error("未找到对应数据"); |
| | | } |