From 1f19230e00b543b58f03853df1a38ebd8b508e55 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期五, 21 二月 2025 16:55:01 +0800
Subject: [PATCH] 发布灌溉计划并生成开阀计划
---
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 49 insertions(+), 5 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java
index e123311..c0875cf 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java
@@ -1,11 +1,11 @@
package com.dy.pipIrrWechat.irrigatePlan;
-import com.dy.pipIrrGlobal.daoIr.IrIrrigateGroupMapper;
-import com.dy.pipIrrGlobal.daoIr.IrIrrigatePlanMapper;
-import com.dy.pipIrrGlobal.daoIr.IrIrrigateScheduleMapper;
-import com.dy.pipIrrGlobal.daoIr.IrIrrigateUnitMapper;
+import com.dy.pipIrrGlobal.daoIr.*;
import com.dy.pipIrrGlobal.pojoIr.IrIrrigatePlan;
import com.dy.pipIrrGlobal.pojoIr.IrIrrigateSchedule;
+import com.dy.pipIrrGlobal.pojoIr.IrOpeningSchedule;
+import com.dy.pipIrrGlobal.pojoIr.IrPlanOperate;
+import com.dy.pipIrrGlobal.voIr.VoIrrigateSchedule;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -26,7 +26,13 @@
private IrIrrigatePlanMapper irrigatePlanMapper;
@Autowired
+ private IrPlanOperateMapper irPlanOperateMapper;
+
+ @Autowired
private IrIrrigateScheduleMapper irIrrigateScheduleMapper;
+
+ @Autowired
+ private IrOpeningScheduleMapper irOpeningScheduleMapper;
@Autowired
private IrIrrigateGroupMapper irIrrigateGroupMapper;
@@ -35,12 +41,31 @@
private IrIrrigateUnitMapper irIrrigateUnitMapper;
/**
- * 娣诲姞鐏屾簤璁″垝璁板綍
+ * 娣诲姞鐏屾簤璁″垝
* @param po
* @return
*/
public Long addIrrigatePlan(IrIrrigatePlan po) {
irrigatePlanMapper.insert(po);
+ return po.getId();
+ }
+
+ /**
+ * 鍙戝竷鎸囧畾鐨勭亴婧夎鍒�
+ * @param planId
+ * @return
+ */
+ public Integer publishIrrigatePlan(Long planId) {
+ return irrigatePlanMapper.publishIrrigatePlan(planId);
+ }
+
+ /**
+ * 娣诲姞鐏屾簤璁″垝鎿嶄綔璁板綍
+ * @param po
+ * @return
+ */
+ public Long addPlanOperate(IrPlanOperate po) {
+ irPlanOperateMapper.insert(po);
return po.getId();
}
@@ -55,6 +80,25 @@
}
/**
+ * 鏍规嵁璁″垝ID鑾峰彇鐏屾簤娆″簭
+ * @param planId
+ * @return
+ */
+ public List<VoIrrigateSchedule> getIrrigateSchedules(Long planId) {
+ return irIrrigateScheduleMapper.getIrrigateSchedules(planId);
+ }
+
+ /**
+ * 娣诲姞寮�闃�璁″垝
+ * @param po
+ * @return
+ */
+ public Long addOpeningSchedule(IrOpeningSchedule po) {
+ irOpeningScheduleMapper.insert(po);
+ return po.getId();
+ }
+
+ /**
* 鏍规嵁杞亴缁処D鑾峰彇鍙栨按鍙D鍒楄〃
* @param groupId
* @return
--
Gitblit v1.8.0