| | |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件查询某气象站某一日记录 |
| | | * @param soilId |
| | | * @param yyyy_MM |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "oneDayByMonth") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoSoilDay>> oneDayByMonth(Long soilId, String yyyy_MM){ |
| | | try { |
| | | if(soilId == null){ |
| | | return BaseResponseUtils.buildFail("墒情站id不能为空") ; |
| | | } |
| | | if(yyyy_MM == null || yyyy_MM.trim().equals("")){ |
| | | return BaseResponseUtils.buildFail("查询月份不能为空") ; |
| | | } |
| | | String ymdStr = yyyy_MM.replaceAll("-", "") ; |
| | | if(!NumUtil.isPlusIntNumber(ymdStr)){ |
| | | return BaseResponseUtils.buildFail("查询日期格式不正确,格式规定为yyyy-MM-dd") ; |
| | | } |
| | | Integer ymStart = Integer.parseInt(ymdStr) * 100; |
| | | Integer ymEnd = Integer.parseInt(ymdStr) * 100 + 31; |
| | | return BaseResponseUtils.buildSuccess(sv.oneDayByMonth(soilId, ymStart, ymEnd)); |
| | | } catch (Exception e) { |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据指定条件查询某气象站一些日记录 |
| | | * @param qo |
| | | * @return |