From 203223860baa19deb6860eb2ba3181910d662980 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 17 四月 2025 14:22:59 +0800
Subject: [PATCH] 1. 轮灌组被终止时灌溉时长为实际数值。2. 计划历史表按照创建时间倒排序。3. 发布计划时判断是否同项目下未完成计划,是否其他项目下使用了本计划的轮灌组且计划未完成。4. 根据计划ID获取计划最新状态。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsCtrl.java |  164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 164 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsCtrl.java
new file mode 100644
index 0000000..260171c
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/allRound/Ar4StatisticsCtrl.java
@@ -0,0 +1,164 @@
+package com.dy.pipIrrStatistics.allRound;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.voAllRound.*;
+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/2/5 10:46
+ * @Description
+ */
+@Slf4j
+@Tag(name = "鍙栨按鍙g患鍚堜俊鎭箣鐩稿叧缁熻鏁版嵁", description = "鍙栨按鍙g患鍚堜俊鎭箣鐩稿叧缁熻鏁版嵁")
+@RestController
+@RequestMapping(path = "ar4Statistics")
+@SuppressWarnings("unchecked")//java鐗堟湰瓒婇珮锛屽娉涘瀷绾︽潫瓒婁弗锛屾墍浠ラ厤缃甋uppressWarnings("unchecked")
+public class Ar4StatisticsCtrl {
+
+    private Ar4StatisticsSv sv;
+
+    @Autowired
+    private void setSv(Ar4StatisticsSv sv) {
+        this.sv = sv;
+    }
+
+    /**
+     * 缁煎悎淇℃伅
+     * 鍙栨按鍙e紑鍏抽榾鏁版嵁
+     * @return
+     */
+    @Operation(summary = "缁煎悎淇℃伅", description = "鍙栨按鍙e紑鍏抽榾鏁版嵁")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "鍙栨按鍙e紑鍏抽榾鏁版嵁锛圔aseResponse.content:VoArIntakeOpenCloseValve[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = VoArIntakeOpenCloseValve.class))}
+            )
+    })
+    @GetMapping(path = "openCloseValveInfo")
+    @SsoAop()
+    public BaseResponse<List<VoArIntakeOpenCloseValve>> openCloseValveInfo(Long intakeId) {
+        if (intakeId == null || intakeId.longValue() == 0L) {
+            return BaseResponseUtils.buildException("鍙栨按鍙d涓嶈兘涓虹┖");
+        }
+        List<VoArIntakeOpenCloseValve> res = this.sv.openCloseValveRecords(intakeId);
+        return BaseResponseUtils.buildSuccess(res);
+    }
+
+
+    /**
+     * 缁煎悎淇℃伅
+     * 鍙栨按鍙f棩婕忔崯鏁版嵁
+     * @return
+     */
+    @Operation(summary = "缁煎悎淇℃伅", description = "鍙栨按鍙f棩婕忔崯鏁版嵁")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "鍙栨按鍙f棩婕忔崯鏁版嵁锛圔aseResponse.content:VoArIntakeLossDay[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = VoArIntakeLossDay.class))}
+            )
+    })
+    @GetMapping(path = "lossDayRecords")
+    @SsoAop()
+    public BaseResponse<List<VoArIntakeLossDay>> lossDayRecords(Long intakeId) {
+        if (intakeId == null || intakeId.longValue() == 0L) {
+            return BaseResponseUtils.buildException("鍙栨按鍙d涓嶈兘涓虹┖");
+        }
+        List<VoArIntakeLossDay> res = this.sv.lossDayRecords(intakeId);
+        return BaseResponseUtils.buildSuccess(res);
+    }
+
+    /**
+     * 缁煎悎淇℃伅
+     * 鍙栨按鍙f湀婕忔崯鏁版嵁
+     * @return
+     */
+    @Operation(summary = "缁煎悎淇℃伅", description = "鍙栨按鍙f湀婕忔崯鏁版嵁")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "鍙栨按鍙f湀婕忔崯鏁版嵁锛圔aseResponse.content:VoArIntakeLossMonth[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = VoArIntakeLossMonth.class))}
+            )
+    })
+    @GetMapping(path = "lossMonthRecords")
+    @SsoAop()
+    public BaseResponse<List<VoArIntakeLossMonth>> lossMonthRecords(Long intakeId) {
+        if (intakeId == null || intakeId.longValue() == 0L) {
+            return BaseResponseUtils.buildException("鍙栨按鍙d涓嶈兘涓虹┖");
+        }
+        List<VoArIntakeLossMonth> res = this.sv.lossMonthRecords(intakeId);
+        return BaseResponseUtils.buildSuccess(res);
+    }
+
+    /**
+     * 缁煎悎淇℃伅
+     * 鍙栨按鍙f棩鍙栨按鏁版嵁
+     * @return
+     */
+    @Operation(summary = "缁煎悎淇℃伅", description = "鍙栨按鍙f棩鍙栨按鏁版嵁")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "鍙栨按鍙f棩鍙栨按鏁版嵁锛圔aseResponse.content:VoArIntakeAmountDay[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = VoArIntakeAmountDay.class))}
+            )
+    })
+    @GetMapping(path = "amountDayRecords")
+    @SsoAop()
+    public BaseResponse<List<VoArIntakeAmountDay>> amountDayRecords(Long intakeId) {
+        if (intakeId == null || intakeId.longValue() == 0L) {
+            return BaseResponseUtils.buildException("鍙栨按鍙d涓嶈兘涓虹┖");
+        }
+        List<VoArIntakeAmountDay> res = this.sv.amountDayRecords(intakeId);
+        return BaseResponseUtils.buildSuccess(res);
+    }
+
+    /**
+     * 缁煎悎淇℃伅
+     * 鍙栨按鍙f湀鍙栨按鏁版嵁
+     * @return
+     */
+    @Operation(summary = "缁煎悎淇℃伅", description = "鍙栨按鍙f湀鍙栨按鏁版嵁")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "鍙栨按鍙f湀鍙栨按鏁版嵁锛圔aseResponse.content:VoArIntakeAmountDay[{}]锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = VoArIntakeAmountMonth.class))}
+            )
+    })
+    @GetMapping(path = "amountMonthRecords")
+    @SsoAop()
+    public BaseResponse<List<VoArIntakeAmountMonth>> amountMonthRecords(Long intakeId) {
+        if (intakeId == null || intakeId.longValue() == 0L) {
+            return BaseResponseUtils.buildException("鍙栨按鍙d涓嶈兘涓虹┖");
+        }
+        List<VoArIntakeAmountMonth> res = this.sv.amountMonthRecords(intakeId);
+        return BaseResponseUtils.buildSuccess(res);
+    }
+
+
+}

--
Gitblit v1.8.0