From c42614978ff12013a1eabebd0289b27169a5784f Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 06 五月 2025 17:25:56 +0800
Subject: [PATCH] 1、实现万功能token(0000-0000-1234-9876-5); 2、web端单独实现命令结果等待器,并相应修改相关部分; 3、web端实现透传命令; 4、修改一些不当注释; 5、优化一些代码。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateScheduling/IrIrrigateSchedulingSv.java |   97 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 97 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateScheduling/IrIrrigateSchedulingSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateScheduling/IrIrrigateSchedulingSv.java
new file mode 100644
index 0000000..cd4dbe7
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateScheduling/IrIrrigateSchedulingSv.java
@@ -0,0 +1,97 @@
+package com.dy.pipIrrIrrigate.irrigateScheduling;
+
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoIr.IrIrrigateSchedulingMapper;
+import com.dy.pipIrrGlobal.pojoIr.IrIrrigateScheduling;
+import com.dy.pipIrrGlobal.voIr.VoScheduling;
+import com.dy.pipIrrGlobal.voIr.VoSchedulingOne;
+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.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author :WuZeYu
+ * @Date :2024/5/27  10:12
+ * @LastEditTime :2024/5/27  10:12
+ * @Description
+ */
+@Slf4j
+@Service
+public class IrIrrigateSchedulingSv {
+
+    @Autowired
+    private IrIrrigateSchedulingMapper irIrrigateSchedulingMapper;
+
+    /**
+     * 娣诲姞浣滅墿鐏屾簤鍒跺害
+     *
+     * @param po
+     * @return
+     */
+    public Integer addScheduling(IrIrrigateScheduling po) {
+        po.setDeleted((byte) 0);
+        po.setOperateDt(new Date());
+        int rows = irIrrigateSchedulingMapper.insertSelective(po);
+        if (rows == 0) {
+            return 0;
+        }
+        return 1;
+    }
+    /**
+     * 鍒犻櫎浣滅墿鐏屾簤鍒跺害
+     *
+     * @param id
+     */
+    public Integer deleteScheduling(Long id) {
+        int rows = irIrrigateSchedulingMapper.deleteLogicById(id);
+        if (rows == 0) {
+            return 0;
+        }
+        return 1;
+    }
+
+    /**
+     * 淇敼浣滅墿鐏屾簤鍒跺害
+     * @param po
+     * @return
+     */
+    public Integer updateScheduling(IrIrrigateScheduling po){
+        int rows = irIrrigateSchedulingMapper.updateByPrimaryKeySelective(po);
+        if (rows == 0){
+            return 0;
+        }
+        return 1;
+    }
+
+    /**
+     * 鍒嗛〉鏌ヨ浣滅墿鐏屾簤鍒跺害
+     * @param queryVo
+     * @return
+     */
+    public QueryResultVo<List<VoScheduling>> getSchedulings(QueryVo queryVo){
+        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
+        Long itemTotal = irIrrigateSchedulingMapper.getRecordCount(params);
+
+        QueryResultVo<List<VoScheduling>> rsVo = new QueryResultVo<>();
+        rsVo.pageSize = queryVo.pageSize;
+        rsVo.pageCurr = queryVo.pageCurr;
+        rsVo.calculateAndSet(itemTotal, params);
+        rsVo.obj = irIrrigateSchedulingMapper.getSchedulings(params);
+        return rsVo;
+    }
+
+    /**
+     * 鑾峰彇涓�涓綔鐗╃亴婧夊埗搴︽暟鎹�
+     * @param id
+     * @return
+     */
+    public VoSchedulingOne selectById(Long id){
+        VoSchedulingOne irCrop = irIrrigateSchedulingMapper.selectById(id);
+        return irCrop;
+    }
+}

--
Gitblit v1.8.0