From e33bca52d26faa836a4db7436e85eb3a0a08adff Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 19 八月 2025 17:26:02 +0800
Subject: [PATCH] 1、增加查询所有作物昨日蒸腾量功能; 2、增加查询一个作物一段时间内容所有蒸腾量功能。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/VaporCtrl.java |   95 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 95 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/VaporCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/VaporCtrl.java
new file mode 100644
index 0000000..c5a7395
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/vapor/VaporCtrl.java
@@ -0,0 +1,95 @@
+package com.dy.pipIrrModel.vapor;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.util.DateTime;
+import com.dy.common.webUtil.BaseResponse;
+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 io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/8/19 16:21
+ * @Description
+ */
+@Slf4j
+@Tag(name = "浣滅墿鏃ヨ捀鑵鹃噺", description = "浣滅墿鏃ヨ捀鑵鹃噺鏌ヨ绛夋搷浣�")
+@RestController
+@RequestMapping(path = "mdVapor")
+public class VaporCtrl {
+
+    private VaporSv sv;
+
+    @Autowired
+    private void setSv(VaporSv sv) { this.sv = sv; }
+
+
+    /**
+     * 瀹㈡埛绔姹傚緱鍒版墍鏈変綔鐗╃殑鏄ㄦ棩钂歌吘閲�
+     * @return 鎵�鏈夋墍鏈変綔鐗╃殑鏄ㄦ棩钂歌吘閲�
+     */
+    @Operation(summary = "鑾峰緱浣滅墿鐨勬槰鏃ヨ捀鑵鹃噺", description = "杩斿洖鎵�鏈変綔鐗╃殑鏄ㄦ棩钂歌吘閲忔暟鎹�")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "杩斿洖浣滅墿鐨勬槰鏃ヨ捀鑵鹃噺鏁版嵁锛圔aseResponse.content:QueryResultVo[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = MdEt0.class))}
+            )
+    })
+    @GetMapping(path = "allYesterday")
+    @SsoAop()
+    public BaseResponse<List<MdEt0>> allYesterday(){
+        try {
+            String ymd = DateTime.yesterday_yyyy_MM_dd(
+                    Integer.parseInt(DateTime.yyyy()),
+                    Integer.parseInt(DateTime.MM()),
+                    Integer.parseInt(DateTime.dd())) ;
+            List<MdEt0> res = this.sv.selectEt0(ymd) ;
+            return BaseResponseUtils.buildSuccess(res);
+        } catch (Exception e) {
+            log.error("鏌ヨ鎵�鏈変綔鐗╃殑鏄ㄦ棩钂歌吘閲忓紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鏉′欢浣滅墿鏌ヨ涓�娈垫椂闂村唴鐨勮捀鑵鹃噺
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "oneCropsSomeEt0")
+    @SsoAop()
+    public BaseResponse<List<VoManure>> oneCropsSomeEt0(VaporQo qo){
+        try {
+            if(qo.cropId == null){
+                return BaseResponseUtils.buildFail("浣滅墿id涓嶈兘涓虹┖") ;
+            }
+            if(qo.timeStop == null || qo.timeStop.trim().equals("")){
+                qo.timeStop = DateTime.yyyy_MM_dd() ;
+            }
+            if(qo.timeStart == null || qo.timeStart.trim().equals("")){
+                qo.timeStart = DateTime.lastXDay_yyyy_MM_dd(qo.timeStop, 10);
+            }
+            return BaseResponseUtils.buildSuccess(sv.oneCropsSomeEt0(qo));
+        } catch (Exception e) {
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+}

--
Gitblit v1.8.0