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