From 6eeac9efdb16f92d19536bf23a2d1471705fe752 Mon Sep 17 00:00:00 2001
From: dongyukun <1208714201@qq.com>
Date: 星期二, 31 十二月 2024 18:34:38 +0800
Subject: [PATCH] 调度模型下发

---
 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