From f3de04db06bae67537d093017e28863ee685f8a3 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期五, 03 一月 2025 13:36:38 +0800
Subject: [PATCH] 修改dynamicSettings为空异常

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleModelSettingServiceImpl.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleModelSettingServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleModelSettingServiceImpl.java
index a2caba9..f50e8c5 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleModelSettingServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleModelSettingServiceImpl.java
@@ -44,10 +44,18 @@
         if (CollectionUtils.isEmpty(saveList)) {
             return;
         }
-        saveList.forEach(item -> {
+        for (int i = 0; i < saveList.size(); i++) {
+            StScheduleModelSettingSaveReqVO item = saveList.get(i);
             StScheduleModelSettingEntity entity = BeanUtils.toBean(item, StScheduleModelSettingEntity.class);
             entity.setId(UUID.randomUUID().toString());
+            entity.setModelid(modelId);
+            entity.setSort(i);
             baseDao.insert(entity);
-        });
+        }
+    }
+
+    @Override
+    public void updatePyFile(String pyModule, String fileName) {
+        baseDao.updatePyFile(pyModule + "." + fileName.substring(0,fileName.lastIndexOf("_")+1),pyModule + "." + fileName);
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3