From f60327c377097f67ed42c349bda2a54c3147b7be Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 07 三月 2024 16:35:45 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java |   39 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
index fb541a0..c055460 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
@@ -4,6 +4,7 @@
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.example.erp.entity.pp.ProductionScheduling;
 import com.example.erp.entity.sd.OrderDetail;
 import com.example.erp.mapper.pp.ProductionSchedulingMapper;
@@ -53,9 +54,9 @@
     }
 
     //甯﹁鍗曞彿鏌ヨ
-    public Map<String, Object> SelectSchedulingNotSv(String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling) {
+    public Map<String, Object> selectSchedulingNotSv(String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling) {
         Map<String, Object> map = new HashMap<>();
-        map.put("data", productionSchedulingMapper.SelectSchedulingNotMp(selectTime1, selectTime2,orderId,processes, productionScheduling));
+        map.put("data", productionSchedulingMapper.selectSchedulingNotMp(selectTime1, selectTime2,orderId,processes, productionScheduling));
         return map;
     }
 
@@ -92,4 +93,38 @@
         }
 
     }
+
+    public boolean deleteSchedulingSv(Map<String, Object> object) throws Exception {
+        JSONObject objJson = new JSONObject(object);
+        List<ProductionScheduling> Scheduling = JSONArray.parseArray(JSONObject.toJSONString(objJson.get("scheduling")), ProductionScheduling.class);
+        if (!Scheduling.isEmpty()) {
+            for (ProductionScheduling productionScheduling : Scheduling) {
+                productionSchedulingMapper.deleteSchedulingMp(productionScheduling.getSchedulingId());
+                // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId());
+            }
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+
+    public boolean ExamineSchedulingSv(Map<String, Object> object) {
+        String userName = "";
+        if (object.get("userName") != null) {
+            userName = object.get("userName").toString();
+        }
+        List<ProductionScheduling> schedulinglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("scheduling")), ProductionScheduling.class);
+
+        if (!schedulinglist.isEmpty()) {
+            for (ProductionScheduling productionScheduling : schedulinglist) {
+                productionSchedulingMapper.ExamineSchedulingMp(productionScheduling.getSchedulingId(),userName);
+                // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId());
+            }
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
 }

--
Gitblit v1.8.0