From 2ad08ea181d8ec1e2b4b90bd1ddd40a2ba595b59 Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期四, 07 三月 2024 08:08:25 +0800 Subject: [PATCH] 提交更新 --- north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 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..73eddcd 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; @@ -92,4 +93,30 @@ } } + + 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); + productionSchedulingMapper.delete(new LambdaQueryWrapper<ProductionScheduling>().eq(ProductionScheduling::getSchedulingId, Scheduling.get(0).getId())); + return true; + } + + 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