| | |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件查询历史记录 |
| | | * @param qo |
| | | * 根据指定条件查询最新记录 |
| | | * @param manureId |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "history") |
| | | @GetMapping(path = "oneLast") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoManure>>> selectHistory(ManureQo qo){ |
| | | public BaseResponse<VoManure> oneLast(Long manureId){ |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(sv.selectHistory(qo)); |
| | | if(manureId == null){ |
| | | return BaseResponseUtils.buildFail("水肥机id不能为空") ; |
| | | } |
| | | return BaseResponseUtils.buildSuccess(sv.oneLast(manureId)); |
| | | } catch (Exception e) { |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件查询历史记录 |
| | | * @param manureId |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "oneHistory") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoManure>>> oneHistory(Long manureId){ |
| | | try { |
| | | if(manureId == null){ |
| | | return BaseResponseUtils.buildFail("水肥机id不能为空") ; |
| | | } |
| | | return BaseResponseUtils.buildSuccess(sv.oneHistory(manureId)); |
| | | } catch (Exception e) { |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "last") |
| | | @GetMapping(path = "someLast") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoManure>>> selectLast(ManureQo qo){ |
| | | public BaseResponse<QueryResultVo<List<VoManure>>> someLast(ManureQo qo){ |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(sv.selectLast(qo)); |
| | | return BaseResponseUtils.buildSuccess(sv.someLast(qo)); |
| | | } catch (Exception e) { |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件查询历史记录 |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "someHistory") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoManure>>> someHistory(ManureQo qo){ |
| | | try { |
| | | return BaseResponseUtils.buildSuccess(sv.someHistory(qo)); |
| | | } catch (Exception e) { |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |