From 4e5af86ad91040f4c9a2656396079b7192c8bdcf Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期一, 08 七月 2024 14:33:34 +0800
Subject: [PATCH] update

---
 lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcProcessQuantityServiceImpl.java |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcProcessQuantityServiceImpl.java b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcProcessQuantityServiceImpl.java
index 1082564..371afbc 100644
--- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcProcessQuantityServiceImpl.java
+++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/MdcProcessQuantityServiceImpl.java
@@ -16,6 +16,7 @@
 import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 import org.jeecgframework.poi.excel.entity.ExportParams;
 import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.web.servlet.ModelAndView;
 
@@ -141,4 +142,27 @@
     public MdcProcessQuantityDto findById(String id) {
         return this.baseMapper.findById(id);
     }
+
+
+    /**
+     * 娣诲姞鏁版嵁
+     *
+     * @param mdcProcessQuantity
+     * @return
+     */
+    @Override
+    public boolean addData(MdcProcessQuantity mdcProcessQuantity) {
+        boolean result = false;
+        String[] equipmentIds = mdcProcessQuantity.getEquipmentIds().split(",");
+        for (String equipmentId : equipmentIds) {
+            MdcProcessQuantity processQuantity = new MdcProcessQuantity();
+            BeanUtils.copyProperties(mdcProcessQuantity, processQuantity);
+            processQuantity.setEquipmentId(equipmentId);
+            boolean b = super.save(processQuantity);
+            if (b) {
+                result = true;
+            }
+        }
+        return result;
+    }
 }

--
Gitblit v1.9.3