From 7385687086168ea4a9c1172cabe30efa9f8dfb78 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 25 三月 2025 09:19:33 +0800
Subject: [PATCH] 修改83功能码上行数据解析,增加数据容量,及检查IC卡编号与地址的合规性

---
 pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java |   96 +++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 91 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..daa4efb 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,16 +1,21 @@
 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.common.webUtil.QueryResultVo;
+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.VoIrrigatePlan;
+import com.dy.pipIrrGlobal.voIr.VoIrrigateSchedule;
+import com.dy.pipIrrWechat.irrigatePlan.qo.QoIrrigatePlan;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.common.utils.PojoUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author ZhuBaoMin
@@ -26,7 +31,13 @@
     private IrIrrigatePlanMapper irrigatePlanMapper;
 
     @Autowired
+    private IrPlanOperateMapper irPlanOperateMapper;
+
+    @Autowired
     private IrIrrigateScheduleMapper irIrrigateScheduleMapper;
+
+    @Autowired
+    private IrOpeningScheduleMapper irOpeningScheduleMapper;
 
     @Autowired
     private IrIrrigateGroupMapper irIrrigateGroupMapper;
@@ -35,12 +46,68 @@
     private IrIrrigateUnitMapper irIrrigateUnitMapper;
 
     /**
-     * 娣诲姞鐏屾簤璁″垝璁板綍
+     * 娣诲姞鐏屾簤璁″垝
      * @param po
      * @return
      */
     public Long addIrrigatePlan(IrIrrigatePlan po) {
         irrigatePlanMapper.insert(po);
+        return po.getId();
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鐨勮鍒扞D鑾峰彇鍚姩妯″紡
+     * @param planId
+     * @return
+     */
+    public Byte getStartupMode(Long planId) {
+        return irrigatePlanMapper.getStartupMode(planId);
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栬鍒掑垪琛�
+     * @param queryVo
+     * @return
+     */
+    public QueryResultVo<List<VoIrrigatePlan>> getIrrigatePlans(QoIrrigatePlan queryVo) {
+        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
+
+        Long itemTotal = irrigatePlanMapper.getIrrigatePlanCount(params);
+
+        QueryResultVo<List<VoIrrigatePlan>> rsVo = new QueryResultVo<>();
+        rsVo.pageSize = queryVo.pageSize;
+        rsVo.pageCurr = queryVo.pageCurr;
+
+        rsVo.calculateAndSet(itemTotal, params);
+        rsVo.obj = irrigatePlanMapper.getIrrigatePlans(params);
+        return rsVo;
+    }
+
+    /**
+     * 鏍规嵁鎸囧畾鐨勮鍒扞D鑾峰彇宸插彂甯冪殑鐏屾簤璁″垝鏁伴噺
+     * @param planId
+     * @return
+     */
+    public Integer getPublishedCount(Long planId) {
+        return irrigatePlanMapper.getPublishedCount(planId);
+    }
+
+    /**
+     * 鍙戝竷鎸囧畾鐨勭亴婧夎鍒�
+     * @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 +122,25 @@
     }
 
     /**
+     * 鏍规嵁璁″垝ID鑾峰彇鐏屾簤娆″簭
+     * @param planId
+     * @return
+     */
+    public List<VoIrrigateSchedule> getIrrigateSchedules(Byte startupMode, Long planId) {
+        return irIrrigateScheduleMapper.getIrrigateSchedules(startupMode, planId);
+    }
+
+    /**
+     * 娣诲姞寮�闃�璁″垝
+     * @param po
+     * @return
+     */
+    public Long addOpeningSchedule(IrOpeningSchedule po) {
+        irOpeningScheduleMapper.insert(po);
+        return po.getId();
+    }
+
+    /**
      * 鏍规嵁杞亴缁処D鑾峰彇鍙栨按鍙D鍒楄〃
      * @param groupId
      * @return

--
Gitblit v1.8.0