|  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.BaseResponseUtils; | 
|---|
|  |  |  | import com.dy.common.webUtil.ResultCodeMsg; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoMd.MdEt0; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voRm.VoManure; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Operation; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Content; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RestController; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @Tag(name = "作物日蒸腾量", description = "作物日蒸腾量查询等操作") | 
|---|
|  |  |  | @Tag(name = "作物日蒸散量", description = "作物日蒸散量查询等操作") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping(path = "mdVapor") | 
|---|
|  |  |  | public class VaporCtrl { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 客户端请求得到所有作物的昨日蒸腾量 | 
|---|
|  |  |  | * @return 所有所有作物的昨日蒸腾量 | 
|---|
|  |  |  | * 客户端请求得到所有作物的昨日蒸散量 | 
|---|
|  |  |  | * @return 所有所有作物的昨日蒸散量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "获得作物的昨日蒸腾量", description = "返回所有作物的昨日蒸腾量数据") | 
|---|
|  |  |  | @Operation(summary = "获得作物的昨日蒸散量", description = "返回所有作物的昨日蒸散量数据") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "返回作物的昨日蒸腾量数据(BaseResponse.content:QueryResultVo[{}])", | 
|---|
|  |  |  | description = "返回作物的昨日蒸散量数据(BaseResponse.content:QueryResultVo[{}])", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = MdEt0.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | 
|---|
|  |  |  | List<MdEt0> res = this.sv.selectEt0(ymd) ; | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("查询所有作物的昨日蒸腾量异常", e); | 
|---|
|  |  |  | log.error("查询所有作物的昨日蒸散量异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据指定条件作物查询一段时间内的蒸腾量 | 
|---|
|  |  |  | * 根据指定条件作物查询一段时间内的蒸散量 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @GetMapping(path = "oneCropsSomeEt0") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<List<VoManure>> oneCropsSomeEt0(VaporQo qo){ | 
|---|
|  |  |  | public BaseResponse<List<MdEt0>> oneCropsSomeEt0(VaporQo qo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | if(qo.cropId == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("作物id不能为空") ; | 
|---|
|  |  |  | 
|---|
|  |  |  | if(qo.timeStart == null || qo.timeStart.trim().equals("")){ | 
|---|
|  |  |  | qo.timeStart = DateTime.lastXDay_yyyy_MM_dd(qo.timeStop, 10); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(sv.oneCropsSomeEt0(qo)); | 
|---|
|  |  |  | List<MdEt0> list = sv.oneCropsSomeEt0(qo) ; | 
|---|
|  |  |  | if(list == null){ | 
|---|
|  |  |  | list = new ArrayList<>() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(list); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|