From 548678d4cf3d1792e2cb989f26cf7e8af0ec8fde Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期三, 09 四月 2025 11:41:49 +0800
Subject: [PATCH] 优化灌溉计划起止时间格式,精确到分钟
---
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java | 85 +++++++++++++++++++++++++-----------------
1 files changed, 51 insertions(+), 34 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 2108113..1727a53 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
@@ -7,10 +7,7 @@
import com.dy.pipIrrGlobal.pojoIr.IrPlanOperate;
import com.dy.pipIrrGlobal.pojoIr.IrPlanSchedule;
import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory;
-import com.dy.pipIrrGlobal.voIr.VoIrrigateSchedule;
-import com.dy.pipIrrGlobal.voIr.VoPlanSimple;
-import com.dy.pipIrrGlobal.voIr.VoPlans;
-import com.dy.pipIrrGlobal.voIr.VoToTerminateIntakes;
+import com.dy.pipIrrGlobal.voIr.*;
import com.dy.pipIrrGlobal.voRm.VoIntakeVc;
import com.dy.pipIrrWechat.command.CommandSv;
import com.dy.pipIrrWechat.command.dto.AutomaticClose;
@@ -162,36 +159,6 @@
}
return BaseResponseUtils.buildSuccess();
- }
-
- /**
- * 鑾峰彇鏈畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢�
- * @return
- */
- @GetMapping(path = "/getNotCompletePlans")
- public BaseResponse<List<VoPlans>> getNotCompletePlans() {
- try {
- List<VoPlans> res = irrigatePlanSv.getNotCompletePlans();
- return BaseResponseUtils.buildSuccess(res);
- } catch (Exception e) {
- log.error("鑾峰彇鏈畬鐨勮鍒掑紓甯�", e);
- return BaseResponseUtils.buildException(e.getMessage());
- }
- }
-
- /**
- * 鑾峰彇宸插畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢�
- * @return
- */
- @GetMapping(path = "/getCompletedPlans")
- public BaseResponse<List<VoPlans>> getCompletedPlans() {
- try {
- List<VoPlans> res = irrigatePlanSv.getCompletedPlans();
- return BaseResponseUtils.buildSuccess(res);
- } catch (Exception e) {
- log.error("鑾峰彇椤圭洰璁板綍寮傚父", e);
- return BaseResponseUtils.buildException(e.getMessage());
- }
}
/**
@@ -382,4 +349,54 @@
}
return BaseResponseUtils.buildSuccess();
}
+
+ /**
+ * 鑾峰彇鏈畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢�
+ * @return
+ */
+ @GetMapping(path = "/getNotCompletePlans")
+ public BaseResponse<List<VoPlans>> getNotCompletePlans() {
+ try {
+ List<VoPlans> res = irrigatePlanSv.getNotCompletePlans();
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鏈畬鐨勮鍒掑紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
+ /**
+ * 鑾峰彇宸插畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢�
+ * @return
+ */
+ @GetMapping(path = "/getCompletedPlans")
+ public BaseResponse<List<VoPlans>> getCompletedPlans() {
+ try {
+ List<VoPlans> res = irrigatePlanSv.getCompletedPlans();
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇椤圭洰璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
+ /**
+ * 鏍规嵁璁″垝ID鑾峰彇璁″垝鍙戝竷缁撴灉
+ * @param planId
+ * @return
+ */
+ @GetMapping(path = "/getPublishResults")
+ public BaseResponse<VoPlanDetails> getPublishResults(@RequestParam Long planId) {
+ if(planId == null) {
+ return BaseResponseUtils.buildErrorMsg("璁″垝ID涓嶈兘涓虹┖");
+ }
+
+ try {
+ VoPlanDetails res = irrigatePlanSv.getPublishResults(planId);
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇璁″垝鍙戝竷缁撴灉寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
}
--
Gitblit v1.8.0