From a99834962622f6ca8a7f5e4e42581d35d6f59f8a Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期四, 05 十二月 2024 15:48:26 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 iailab-module-model/iailab-module-model-biz/db/mysql.sql                                                                      |    4 +-
 iailab-module-bpm/iailab-module-bpm-biz/src/main/resources/application-dev.yaml                                               |    2 
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/MpkFileServiceImpl.java    |    7 ++-
 iailab-framework/iailab-common/src/main/java/com/iailab/framework/common/enums/DocumentEnum.java                              |    4 +-
 iailab-module-bpm/iailab-module-bpm-biz/pom.xml                                                                               |    2 
 iailab-module-bpm/pom.xml                                                                                                     |    1 
 iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mpk/MpkFileDao.xml                                      |   33 ++++++++++++++++
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java |    4 +-
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java     |    4 ++
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/MpkFileDao.java                     |    2 +
 10 files changed, 52 insertions(+), 11 deletions(-)

diff --git a/iailab-framework/iailab-common/src/main/java/com/iailab/framework/common/enums/DocumentEnum.java b/iailab-framework/iailab-common/src/main/java/com/iailab/framework/common/enums/DocumentEnum.java
index ed01a27..01f8ef4 100644
--- a/iailab-framework/iailab-common/src/main/java/com/iailab/framework/common/enums/DocumentEnum.java
+++ b/iailab-framework/iailab-common/src/main/java/com/iailab/framework/common/enums/DocumentEnum.java
@@ -12,8 +12,8 @@
 @AllArgsConstructor
 public enum DocumentEnum {
 
-    REDIS_INSTALL("https://gitee.com/zhijiantianya/ruoyi-vue-pro/issues/I4VCSJ", "Redis 安装文档"),
-    TENANT("https://doc.iocoder.cn", "SaaS 多租户文档");
+    REDIS_INSTALL("https://iailab.cn", "Redis 安装文档"),
+    TENANT("https://iailab.cn", "SaaS 多租户文档");
     
     private final String url;
     private final String memo;
diff --git a/iailab-module-bpm/iailab-module-bpm-biz/pom.xml b/iailab-module-bpm/iailab-module-bpm-biz/pom.xml
index 4d11427..997d9fa 100644
--- a/iailab-module-bpm/iailab-module-bpm-biz/pom.xml
+++ b/iailab-module-bpm/iailab-module-bpm-biz/pom.xml
@@ -14,7 +14,7 @@
     <description>
         bpm 包下,业务流程管理(Business Process Management),我们放工作流的功能,基于 Flowable 6 版本实现。
         例如说:流程定义、表单配置、审核中心(我的申请、我的待办、我的已办)等等    </description>
-
+    
     <dependencies>
         <!-- Spring Cloud 基础 -->
         <dependency>
diff --git a/iailab-module-bpm/iailab-module-bpm-biz/src/main/resources/application-dev.yaml b/iailab-module-bpm/iailab-module-bpm-biz/src/main/resources/application-dev.yaml
index c596066..708a6ea 100644
--- a/iailab-module-bpm/iailab-module-bpm-biz/src/main/resources/application-dev.yaml
+++ b/iailab-module-bpm/iailab-module-bpm-biz/src/main/resources/application-dev.yaml
@@ -39,7 +39,7 @@
       primary: master
       datasource:
         master:
-          url: jdbc:mysql://127.0.0.1:3306/iailab_plat_system?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
+          url: jdbc:mysql://172.16.8.100:3306/iailab_bpm?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
           #          url: jdbc:mysql://127.0.0.1:3306/iailab-plat?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 连接的示例
           #          url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
           #          url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
diff --git a/iailab-module-bpm/pom.xml b/iailab-module-bpm/pom.xml
index 92b42ec..de5bb2d 100644
--- a/iailab-module-bpm/pom.xml
+++ b/iailab-module-bpm/pom.xml
@@ -34,6 +34,7 @@
                     <artifactId>maven-surefire-plugin</artifactId>
                     <version>${maven-surefire-plugin.version}</version>
                     <configuration>
+                        <encoding>utf8</encoding>
                         <skip>true</skip>
                     </configuration>
                 </plugin>
diff --git a/iailab-module-model/iailab-module-model-biz/db/mysql.sql b/iailab-module-model/iailab-module-model-biz/db/mysql.sql
index 4768887..6f8e5dd 100644
--- a/iailab-module-model/iailab-module-model-biz/db/mysql.sql
+++ b/iailab-module-model/iailab-module-model-biz/db/mysql.sql
@@ -66,7 +66,7 @@
     id        varchar(36) not null,
     modelid   varchar(36),
     `key`     varchar(36),
-    value     varchar(256),
+    value     varchar(1000),
     name      varchar(36),
     valuetype varchar(36),
     primary key (id),
@@ -638,7 +638,7 @@
     `method_id`   varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '方法id',
     `setting_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'key',
     `name`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数名称',
-    `value`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数默认值',
+    `value`       varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数默认值',
     `type`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '输入类型',
     `value_type`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数类型',
     `max`         int NULL DEFAULT NULL COMMENT '最大值',
diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java
index bd527a4..279bf16 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MdkController.java
@@ -110,6 +110,10 @@
             }
 
             try {
+                if (dto.getModelSettings().stream().noneMatch(e -> e.getSettingKey().equals(MdkConstant.PY_FILE_KEY))) {
+                    return error(GlobalErrorCodeConstants.BAD_REQUEST.getCode(),"模型设置参数缺少必要信息【" + MdkConstant.PY_FILE_KEY +  "】,请重新上传模型!");
+                }
+
                 if (dto.getHasModel()) {
                     paramsValueArray[uuids.size()] = dto.getModel();
                     paramsValueArray[uuids.size() + 1] = handleModelSettings(dto.getModelSettings());
diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java
index 9de4bee..32aae26 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java
@@ -60,8 +60,8 @@
 
     @PreAuthorize("@ss.hasPermission('mpk:file:query')")
     @GetMapping("list")
-    public CommonResult<List<MpkFileDTO>> list() {
-        List<MpkFileDTO> list = mpkFileService.list(new HashMap<>());
+    public CommonResult<List<MpkFileDTO>> list(@RequestParam Map<String, Object> params) {
+        List<MpkFileDTO> list = mpkFileService.list(params);
 
         return success(list);
     }
diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/MpkFileDao.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/MpkFileDao.java
index 356721a..3e61336 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/MpkFileDao.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/dao/MpkFileDao.java
@@ -30,4 +30,6 @@
     int getProjectModelCount(String projectId);
 
     List<MpkFileDTO> getProjectModel(@Param("params") Map<String, Object> params);
+
+    List<MpkFileDTO> list(@Param("params") Map<String, Object> params);
 }
diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/MpkFileServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/MpkFileServiceImpl.java
index 4de8772..ecac7f6 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/MpkFileServiceImpl.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/MpkFileServiceImpl.java
@@ -87,9 +87,10 @@
 
     @Override
     public List<MpkFileDTO> list(Map<String, Object> params) {
-        List<MpkFileEntity> entityList = baseDao.selectList(getWrapper(params).orderByDesc("create_date"));
+//        List<MpkFileEntity> entityList = baseDao.selectList(getWrapper(params).orderByDesc("create_date"));
+        List<MpkFileDTO> list = baseDao.list(params);
 
-        return ConvertUtils.sourceToTarget(entityList, MpkFileDTO.class);
+        return list;
     }
 
     private QueryWrapper<MpkFileEntity> getWrapper(Map<String, Object> params) {
@@ -99,7 +100,7 @@
         String label = (String) params.get("label");
 
         QueryWrapper<MpkFileEntity> wrapper = new QueryWrapper<>();
-        wrapper.like(StringUtils.isNotBlank(pyName), "py_name", pyName)
+        wrapper.like(StringUtils.isNotBlank(pyName), "py_chinese_name", pyName)
                 .eq(StringUtils.isNotBlank(pyType), "py_type", pyType)
                 .like(StringUtils.isNotBlank(remark), "remark", remark);
 
diff --git a/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mpk/MpkFileDao.xml b/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mpk/MpkFileDao.xml
index 84df17f..6c672b9 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mpk/MpkFileDao.xml
+++ b/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mpk/MpkFileDao.xml
@@ -102,6 +102,39 @@
         </foreach>
         ORDER BY b.sort,c.sort,d.sort,e.sort,f.sort,a.create_date
     </select>
+    <select id="list" resultMap="mpkFile" parameterType="java.util.Map">
+        SELECT
+        a.*,
+        b.id method_id,
+        b.method_name,
+        b.data_length,
+        b.model,
+        b.result_key,
+        c.id setting_id,
+        c.setting_key,
+        c.name setting_name,
+        c.value,
+        c.type,
+        c.value_type,
+        c.max,
+        c.min,
+        d.id select_id,
+        d.select_key,
+        d.name select_name
+        FROM
+        t_mpk_file a
+        LEFT JOIN t_mpk_model_method b ON a.id = b.mpk_file_id
+        LEFT JOIN t_mpk_method_setting c ON b.id = c.method_id
+        LEFT JOIN t_mpk_setting_select d ON c.id = d.setting_id
+        LEFT JOIN t_mpk_file_menu e ON e.name = a.menu_name
+        LEFT JOIN t_mpk_file_group f ON f.menu_id = e.id and f.name = a.group_name
+        <where>
+            <if test="params.pyType != null and params.pyType != ''">
+                AND a.py_type = #{params.pyType}
+            </if>
+        </where>
+        ORDER BY b.sort,c.sort,d.sort,e.sort,f.sort,a.create_date
+    </select>
     <select id="getProjectModelCount" resultType="java.lang.Integer" parameterType="java.lang.String">
         SELECT
             count(*)

--
Gitblit v1.9.3