From 2e0aff8e8d9d9976a9e22b2608edee6dfdec0991 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 30 四月 2025 16:26:50 +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 |    9 +++++----
 1 files changed, 5 insertions(+), 4 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 481f38d..f1cebfe 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;
@@ -61,7 +62,7 @@
      * @return
      */
     @PostMapping(path = "createPlan", consumes = MediaType.APPLICATION_JSON_VALUE)
-    @Transactional(rollbackFor = Exception.class)
+    //@Transactional(rollbackFor = Exception.class)
     public BaseResponse<Boolean> createPlan(@RequestBody @Valid IrrigatePlan planAndSchedule, BindingResult bindingResult){
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
@@ -193,7 +194,7 @@
      * @return
      */
     @PostMapping(path = "publishPlan", consumes = MediaType.APPLICATION_JSON_VALUE)
-    @Transactional(rollbackFor = Exception.class)
+    //@Transactional(rollbackFor = Exception.class)
     public BaseResponse<Boolean> publishPlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult){
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
@@ -315,7 +316,7 @@
      * @return
      */
     @PostMapping(path = "terminatePlan", consumes = MediaType.APPLICATION_JSON_VALUE)
-    @Transactional(rollbackFor = Exception.class)
+    //@Transactional(rollbackFor = Exception.class)
     public BaseResponse<Boolean> terminatePlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult){
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
@@ -328,7 +329,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);

--
Gitblit v1.8.0