소스 검색

Merge remote-tracking branch 'origin/main' into main

# Conflicts:
#	zkqy-admin/src/main/resources/application.yml
#	zkqy-admin/src/main/resources/logback-spring.xml
侯茂昌 1 년 전
부모
커밋
3e9de672e4

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 5 - 0
zkqy-admin/src/main/java/com/zkqy/web/ljj.java


+ 4 - 4
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteProcessServiceImpl.java

@@ -83,14 +83,14 @@ public class BpmExecuteProcessServiceImpl implements IBpmExecuteProcessService {
             List<Map<String, Object>> tenantRetList = (List<Map<String, Object>>) tenantRetMap.get("rows");
             Map<String, Object> objectMap = new HashMap<>();  // 查询执行管道的参数
             objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
+            tenantRetList.forEach(item -> {
+                objectMap.put(item.get("dictLabel").toString(), item.get("dictValue"));
+            });
             if (bpmExecuteProcess.getTaskProcessState() == 3L) {
                 // 首先根据当前登陆用户得到他可以执行的所有节点
-                List<CommonEntity> commonEntities = runBpmExecuteProcessMapper.queryExecuteProcess(objectMap);
+                List<CommonEntity> commonEntities = runBpmExecuteProcessMapper.queryExecuteProcessEnd(objectMap);
                 return commonEntities;
             } else {
-                tenantRetList.forEach(item -> {
-                    objectMap.put(item.get("dictLabel").toString(), item.get("dictValue"));
-                });
                 List<SysRole> sysRoles = SecurityUtils.getLoginUser().getUser().getRoles();
                 List<String> roles = new ArrayList<>();
                 if (sysRoles.size() != 0) {

+ 33 - 39
zkqy-process-execution/src/main/resources/mapper/bpm/dispersed/BpmExecuteProcessMapper.xml

@@ -61,9 +61,10 @@
             </if>
         </where>
     </select>
-    <!--benm.task_process_key-->
+    <!--benm.task_process_key  管道展示 -->
     <select id="selectBpmExecuteProcessListLog" resultMap="retMap">
         select
+        plan.${planName} as task_plan_name,
         bep.*
         from {DBNAME}.bpm_execute_process bep
         join {DBNAME}.bpm_execute_node_middle benm on bep.task_key = benm.task_process_key
@@ -76,24 +77,18 @@
             </foreach>
         </if>
 
-        <if test="taskKey != null  and taskKey != ''">and bep.task_key = #{taskKey}</if>
-        <if test="taskName != null  and taskName != ''">and bep.task_name like concat('%', #{taskName}, '%')</if>
-        <if test="taskNodeKey != null  and taskNodeKey != ''">and bep.task_node_key = #{taskNodeKey}</if>
-        <if test="taskNodeNextKey != null  and taskNodeNextKey != ''">and bep.task_node_next_key =
-            #{taskNodeNextKey}
-        </if>
-        <if test="taskProcessKey != null  and taskProcessKey != ''">and bep.task_process_key = #{taskProcessKey}
-        </if>
-        <if test="taskProcessXmlContent != null  and taskProcessXmlContent != ''">and bep.task_process_xml_content =
-            #{taskProcessXmlContent}
-        </if>
-        <if test="taskProcessState != null ">and bep.task_process_state = #{taskProcessState}</if>
-        <if test="taskProcessNote != null  and taskProcessNote != ''">and bep.task_process_note =
-            #{taskProcessNote}
-        </if>
-        <if test="taskProcessType != null  and taskProcessType != ''">and bep.task_process_type =
-            #{taskProcessType}
+        <if test="taskName != null  and taskName != ''">
+            and CONCAT(
+            IFNULL( bep.task_key, '' ),
+            IFNULL( bep.task_name, '' ),
+            IFNULL( bep.task_node_key, '' ),
+            IFNULL( bep.task_node_next_key, '' ),
+            IFNULL( bep.task_process_key, '' ),
+            IFNULL( bep.task_process_note, '' ),
+            IFNULL( plan.${planName}, '' ),
+            IFNULL( task_process_type, '' )) LIKE concat('%', #{taskName}, '%')
         </if>
+
         GROUP BY benm.task_process_key
     </select>
 
@@ -250,17 +245,16 @@
             </foreach>
         </if>
         )
-        <if test="taskKey != null  and taskKey != ''">and bep.task_key = #{taskKey}</if>
-        <if test="taskName != null  and taskName != ''">and bep.task_name like concat('%', #{taskName}, '%')</if>
-        <if test="taskNodeKey != null  and taskNodeKey != ''">and bep.task_node_key = #{taskNodeKey}</if>
-        <if test="taskNodeNextKey != null  and taskNodeNextKey != ''">and bep.task_node_next_key =
-            #{executeProcessTaskNodeNextKey}
-        </if>
-        <if test="taskProcessKey != null  and taskProcessKey != ''">and bep.task_process_key = #{taskProcessKey}</if>
-        <if test="taskProcessState != null ">and bep.task_process_state = #{taskProcessState}</if>
-        <if test="taskProcessNote != null  and taskProcessNote != ''">and bep.task_process_note = #{taskProcessNote}
-        </if>
-        <if test="taskProcessType != null  and taskProcessType != ''">and bep.task_process_type = #{taskProcessType}
+        <if test="taskName != null  and taskName != ''">
+            and CONCAT(
+            IFNULL( bep.task_key, '' ),
+            IFNULL( bep.task_name, '' ),
+            IFNULL( bep.task_node_key, '' ),
+            IFNULL( bep.task_node_next_key, '' ),
+            IFNULL( bep.task_process_key, '' ),
+            IFNULL( bep.task_process_note, '' ),
+            IFNULL( plan.${planName}, '' ),
+            IFNULL( task_process_type, '' )) LIKE concat('%', #{taskName}, '%')
         </if>
         order by ben.create_time desc
     </select>
@@ -325,16 +319,16 @@
         join {DBNAME}.${planTableName} as plan on
         plan.${planID} = bep.task_plan_key
         where bep.task_process_state = 3
-        <if test="taskKey != null  and taskKey != ''">and bep.task_key = #{taskKey}</if>
-        <if test="taskName != null  and taskName != ''">and bep.task_name like concat('%', #{taskName}, '%')</if>
-        <if test="taskNodeKey != null  and taskNodeKey != ''">and bep.task_node_key = #{taskNodeKey}</if>
-        <if test="taskNodeNextKey != null  and taskNodeNextKey != ''">and bep.task_node_next_key =
-            #{executeProcessTaskNodeNextKey}
-        </if>
-        <if test="taskProcessKey != null  and taskProcessKey != ''">and bep.task_process_key = #{taskProcessKey}</if>
-        <if test="taskProcessNote != null  and taskProcessNote != ''">and bep.task_process_note = #{taskProcessNote}
-        </if>
-        <if test="taskProcessType != null  and taskProcessType != ''">and bep.task_process_type = #{taskProcessType}
+        <if test="taskName != null  and taskName != ''">
+            and CONCAT(
+            IFNULL( bep.task_key, '' ),
+            IFNULL( bep.task_name, '' ),
+            IFNULL( bep.task_node_key, '' ),
+            IFNULL( bep.task_node_next_key, '' ),
+            IFNULL( bep.task_process_key, '' ),
+            IFNULL( bep.task_process_note, '' ),
+            IFNULL( plan.${planName}, '' ),
+            IFNULL( task_process_type, '' )) LIKE concat('%', #{taskName}, '%')
         </if>
         order by ben.create_time desc
     </select>

+ 14 - 11
zkqy-system/src/main/java/com/zkqy/system/service/impl/BpmProcessServiceImpl.java

@@ -84,7 +84,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
             try {
                 // 解析得到当前文件中的内容
                 byte[] bytes = fileXML.getBytes();
-                String xmlContent = new String(bytes);
+                String xmlContent = new String(bytes, StandardCharsets.UTF_8);  // 使用UTF-8编码处理文件内容
                 // 存储标签内容
                 bpmProcess.setProcessXmlContent(xmlContent);
                 // 指定文件路径上传
@@ -118,7 +118,7 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
             try {
                 // 解析得到当前文件中的内容
                 byte[] bytes = fileXML.getBytes();
-                String xmlContent = new String(bytes);
+                String xmlContent = new String(bytes, StandardCharsets.UTF_8);  // 使用UTF-8编码处理文件内容
                 // 存储标签内容
                 bpmProcess.setProcessXmlContent(xmlContent);
                 // 指定文件路径上传
@@ -195,6 +195,8 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
         bpmProcessList.forEach(item -> {
             list.add(localPath + StringUtils.substringAfter(item.getProcessXmlPath(), Constants.RESOURCE_PREFIX));
         });
+
+
         if (CollectionUtils.isEmpty(list)) {
             throw new Exception("请选择要下载文件/图片");
         }
@@ -220,14 +222,14 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
             log.error("系统异常", e);
         }
 
-        if (list.size() > 1) {
-            //多文件/图压缩下载
-            batchFileDownLoad(list, downloadName, response);
-        } else {
-            //单文件/图直接下载
-            singleFileDownLoad(list, bpmProcessList.get(0).getProcessName(), response);
-
-        }
+//        if (list.size() > 1) {
+        //多文件/图压缩下载
+        batchFileDownLoad(list, downloadName, response);
+//        } else {
+//            //单文件/图直接下载
+//            singleFileDownLoad(list, bpmProcessList.get(0).getProcessName(), response);
+//
+//        }
 
     }
 
@@ -272,8 +274,9 @@ public class BpmProcessServiceImpl implements IBpmProcessService {
                     }
                     FileInputStream fs = null;
                     try {
+                        String[] filename = name.split("/");
                         //添加ZipEntry,并将ZipEntry中写入文件流
-                        zipOs.putNextEntry(new ZipEntry(URLEncoder.encode(name, StandardCharsets.UTF_8.toString()) + ".bpmn"));
+                        zipOs.putNextEntry(new ZipEntry(URLEncoder.encode(filename[filename.length - 1], StandardCharsets.UTF_8.toString())));
                         os = new DataOutputStream(zipOs);
                         fs = new FileInputStream(file);
                         byte[] b = new byte[100];

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.