From 44eb64bef08ce231ac95d5ee482b046014dc8afa Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 08 九月 2025 11:29:26 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java |   56 ++------------------------------------------------------
 1 files changed, 2 insertions(+), 54 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java
index a30cb61..6f5032d 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java
@@ -22,6 +22,7 @@
 import jakarta.validation.Valid;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.http.MediaType;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.validation.BindingResult;
@@ -51,15 +52,6 @@
     private final IrrigatePlanSv irrigatePlanSv;
     private final CommandSv commandSv;
 
-    /**
-     * 鍒涘缓鐏屾簤璁″垝
-     * 1. 娣诲姞鐏屾簤璁″垝
-     * 2. 娣诲姞鐏屾簤娆″簭
-     * 3. 娣诲姞鐏屾簤璁″垝鎿嶄綔璁板綍
-     * @param planAndSchedule
-     * @param bindingResult
-     * @return
-     */
     @PostMapping(path = "createPlan", consumes = MediaType.APPLICATION_JSON_VALUE)
     //@Transactional(rollbackFor = Exception.class)
     public BaseResponse<Boolean> createPlan(@RequestBody @Valid IrrigatePlan planAndSchedule, BindingResult bindingResult){
@@ -164,12 +156,6 @@
         return BaseResponseUtils.buildSuccess();
     }
 
-    /**
-     * 鍒犻櫎鐏屾簤璁″垝
-     * @param planSimple
-     * @param bindingResult
-     * @return
-     */
     @PostMapping(path = "deletePlan")
     public BaseResponse<Boolean> deletePlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult) {
         if(bindingResult != null && bindingResult.hasErrors()){
@@ -183,15 +169,6 @@
         return BaseResponseUtils.buildSuccess() ;
     }
 
-    /**
-     * 鍙戝竷鐏屾簤璁″垝
-     * 1. 淇敼鐏屾簤璁″垝鐘舵�佷负鍙戝竷鐘舵��
-     * 2. 娣诲姞鐏屾簤璁″垝鎿嶄綔璁板綍
-     * 3. 鐢熸垚寮�闃�璁″垝
-     * @param planSimple
-     * @param bindingResult
-     * @return
-     */
     @PostMapping(path = "publishPlan", consumes = MediaType.APPLICATION_JSON_VALUE)
     //@Transactional(rollbackFor = Exception.class)
     public BaseResponse<Boolean> publishPlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult){
@@ -289,11 +266,6 @@
         //return BaseResponseUtils.buildSuccess();
     }
 
-    /**
-     * 鏍规嵁璁″垝ID鑾峰彇璁″垝鏈�鏂扮姸鎬�
-     * @param planId
-     * @return
-     */
     @GetMapping(path = "/getPlanLatestState")
     public BaseResponse<Integer> getPlanLatestState(@RequestParam Long planId) {
         if(planId == null) {
@@ -308,12 +280,6 @@
         }
     }
 
-    /**
-     * 缁堟鐏屾簤璁″垝
-     * @param planSimple
-     * @param bindingResult
-     * @return
-     */
     @PostMapping(path = "terminatePlan", consumes = MediaType.APPLICATION_JSON_VALUE)
     //@Transactional(rollbackFor = Exception.class)
     public BaseResponse<Boolean> terminatePlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult){
@@ -328,7 +294,7 @@
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         String terminateStartTimeStr = LocalDate.now().getYear() + "-01-01 00:00:00";
         Date terminateStartTime = Date.from(LocalDateTime.parse(terminateStartTimeStr, formatter).atZone(ZoneId.systemDefault()).toInstant());
-        Integer terminateDuration = 9999;
+        Integer terminateDuration = 0;
 
         // 鍒ゆ柇璇ヨ鍒掓槸鍚﹀彲鎵ц缁堟鎿嶄綔锛氭湭鍒犻櫎銆佹湭缁堟銆佸凡鍙戝竷銆佸綋鍓嶆椂闂村皬浜庤鍒掔粨鏉熸椂闂�
         Date planStartTime = irrigatePlanSv.getToTerminatePlan(planId);
@@ -396,10 +362,6 @@
         return BaseResponseUtils.buildSuccess();
     }
 
-    /**
-     * 鑾峰彇鏈畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢�
-     * @return
-     */
     @GetMapping(path = "/getNotCompletePlans")
     public BaseResponse<List<VoPlans>> getNotCompletePlans() {
         try {
@@ -411,10 +373,6 @@
         }
     }
 
-    /**
-     * 鑾峰彇宸插畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢�
-     * @return
-     */
     @GetMapping(path = "/getCompletedPlans")
     public BaseResponse<QueryResultVo<List<VoPlans>>> getCompletedPlans(QueryConditionVo qo) {
         try {
@@ -425,11 +383,6 @@
         }
     }
 
-    /**
-     * 鏍规嵁璁″垝ID鑾峰彇璁″垝鍙戝竷缁撴灉
-     * @param planId
-     * @return
-     */
     @GetMapping(path = "/getPublishResults")
     public BaseResponse<VoPlanDetails> getPublishResults(@RequestParam Long planId) {
         if(planId == null) {
@@ -445,11 +398,6 @@
         }
     }
 
-    /**
-     * 鏍规嵁璁″垝ID鑾峰彇璁″垝缁堟鎿嶄綔缁撴灉
-     * @param planId
-     * @return
-     */
     @GetMapping(path = "/getTerminateResults")
     public BaseResponse<VoPlanDetails> getTerminateResults(@RequestParam Long planId) {
         if(planId == null) {

--
Gitblit v1.8.0