|
|
|
@ -94,6 +94,47 @@ public class InstrumentController extends JeecgController<Instrument, IInstrumen |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
|
* @param instrument |
|
|
|
|
* @param pageNo |
|
|
|
|
* @param pageSize |
|
|
|
|
* @param req |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
//@AutoLog(value = "仪器信息表-分页列表查询")
|
|
|
|
|
@ApiOperation(value="仪器信息表-分页列表查询", notes="仪器信息表-分页列表查询") |
|
|
|
|
@GetMapping(value = "/listcms") |
|
|
|
|
public Result<IPage<Instrument>> listcms(Instrument instrument, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
|
|
|
|
|
QueryWrapper<Instrument> queryWrapper = QueryGenerator.initQueryWrapper(instrument, req.getParameterMap()); |
|
|
|
|
queryWrapper.eq("state","3"); |
|
|
|
|
Page<Instrument> page = new Page<Instrument>(pageNo, pageSize); |
|
|
|
|
IPage<Instrument> pageList = instrumentService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id查询 |
|
|
|
|
* |
|
|
|
|
* @param id |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
//@AutoLog(value = "仪器信息表-通过id查询")
|
|
|
|
|
@ApiOperation(value="仪器信息表-通过id查询", notes="仪器信息表-通过id查询") |
|
|
|
|
@GetMapping(value = "/queryByIdCms") |
|
|
|
|
public Result<Instrument> queryByIdCms(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
Instrument instrument = instrumentService.getById(id); |
|
|
|
|
if(instrument==null) { |
|
|
|
|
return Result.error("未找到对应数据"); |
|
|
|
|
} |
|
|
|
|
return Result.OK(instrument); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
|