From 01cb633562174ae7390d12b85690a45997f34be7 Mon Sep 17 00:00:00 2001
From: yyt <306727702@qq.com>
Date: 星期三, 24 一月 2024 11:17:20 +0800
Subject: [PATCH] 更新OPCUA

---
 jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java |   49 ++++++++++++++++++++++++++++++++++---------------
 1 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
index 9b7dd5c..83b3669 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/service/impl/BsOrderSchedulingServiceImpl.java
@@ -1,20 +1,23 @@
 package com.jcdm.main.bs.orderScheduling.service.impl;
 
-import java.util.List;
+import com.jcdm.common.utils.DateUtils;
+import com.jcdm.main.bs.orderScheduling.Query.PrepareOnlineQuery;
+import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
+import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper;
+import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper;
-import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling;
-import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService;
+
+import java.util.List;
 
 /**
  * 璁㈠崟鎺掍骇Service涓氬姟灞傚鐞�
  * 
  * @author jiang
- * @date 2024-01-09
+ * @date 2024-01-13
  */
 @Service
-public class BsOrderSchedulingServiceImpl implements IBsOrderSchedulingService 
+public class BsOrderSchedulingServiceImpl implements IBsOrderSchedulingService
 {
     @Autowired
     private BsOrderSchedulingMapper bsOrderSchedulingMapper;
@@ -22,13 +25,13 @@
     /**
      * 鏌ヨ璁㈠崟鎺掍骇
      * 
-     * @param orderNumber 璁㈠崟鎺掍骇涓婚敭
+     * @param id 璁㈠崟鎺掍骇涓婚敭
      * @return 璁㈠崟鎺掍骇
      */
     @Override
-    public BsOrderScheduling selectBsOrderSchedulingByOrderNumber(String orderNumber)
+    public BsOrderScheduling selectBsOrderSchedulingById(Long id)
     {
-        return bsOrderSchedulingMapper.selectBsOrderSchedulingByOrderNumber(orderNumber);
+        return bsOrderSchedulingMapper.selectBsOrderSchedulingById(id);
     }
 
     /**
@@ -40,9 +43,23 @@
     @Override
     public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling)
     {
+        if(bsOrderScheduling.getDateConditions()!=null){
+            String[] conditions = bsOrderScheduling.getDateConditions();
+            bsOrderScheduling.setStartTime(conditions[0]);
+            bsOrderScheduling.setEndTime(conditions[1]);
+        }
         return bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling);
     }
 
+
+    /**
+     * 鏌ヨ鍚堢涓婄嚎鍒楄〃
+     * @param prepareOnlineQuery
+     * @return list
+     */
+    public List<BsOrderScheduling> getPrepareOnlineList(PrepareOnlineQuery prepareOnlineQuery){
+        return bsOrderSchedulingMapper.getPrepareOnlineList(prepareOnlineQuery);
+    }
     /**
      * 鏂板璁㈠崟鎺掍骇
      * 
@@ -52,6 +69,7 @@
     @Override
     public int insertBsOrderScheduling(BsOrderScheduling bsOrderScheduling)
     {
+        bsOrderScheduling.setCreateTime(DateUtils.getNowDate());
         return bsOrderSchedulingMapper.insertBsOrderScheduling(bsOrderScheduling);
     }
 
@@ -64,30 +82,31 @@
     @Override
     public int updateBsOrderScheduling(BsOrderScheduling bsOrderScheduling)
     {
+        bsOrderScheduling.setUpdateTime(DateUtils.getNowDate());
         return bsOrderSchedulingMapper.updateBsOrderScheduling(bsOrderScheduling);
     }
 
     /**
      * 鎵归噺鍒犻櫎璁㈠崟鎺掍骇
      * 
-     * @param orderNumbers 闇�瑕佸垹闄ょ殑璁㈠崟鎺掍骇涓婚敭
+     * @param ids 闇�瑕佸垹闄ょ殑璁㈠崟鎺掍骇涓婚敭
      * @return 缁撴灉
      */
     @Override
-    public int deleteBsOrderSchedulingByOrderNumbers(String[] orderNumbers)
+    public int deleteBsOrderSchedulingByIds(Long[] ids)
     {
-        return bsOrderSchedulingMapper.deleteBsOrderSchedulingByOrderNumbers(orderNumbers);
+        return bsOrderSchedulingMapper.deleteBsOrderSchedulingByIds(ids);
     }
 
     /**
      * 鍒犻櫎璁㈠崟鎺掍骇淇℃伅
      * 
-     * @param orderNumber 璁㈠崟鎺掍骇涓婚敭
+     * @param id 璁㈠崟鎺掍骇涓婚敭
      * @return 缁撴灉
      */
     @Override
-    public int deleteBsOrderSchedulingByOrderNumber(String orderNumber)
+    public int deleteBsOrderSchedulingById(Long id)
     {
-        return bsOrderSchedulingMapper.deleteBsOrderSchedulingByOrderNumber(orderNumber);
+        return bsOrderSchedulingMapper.deleteBsOrderSchedulingById(id);
     }
 }

--
Gitblit v1.9.3