Browse Source

feat:添加流程执行工程修改些固定的配置文件

lucky 3 months ago
parent
commit
9cbd6dce78
100 changed files with 12964 additions and 110 deletions
  1. 8 8
      README.md
  2. 12 7
      pom.xml
  3. 92 16
      zkqy-admin/pom.xml
  4. 177 26
      zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysBpmNodeScriptController.java
  5. 122 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/tool/PlaceholderReplacer.java
  6. 30 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/utils/DefaultPackageClassLoader.java
  7. 22 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/utils/DefaultPackageCompiler.java
  8. 21 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/utils/DefaultPackageCompiler1.java
  9. 285 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/utils/DefaultPackageCompiler2.java
  10. 37 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/utils/SpringBeanRegistrar.java
  11. 7 2
      zkqy-admin/src/main/resources/application.yml
  12. 9 1
      zkqy-common/src/main/java/com/zkqy/common/config/ZkqyConfig.java
  13. 54 0
      zkqy-common/src/main/java/com/zkqy/common/config/bpm/BpmProperties.java
  14. 21 0
      zkqy-common/src/main/java/com/zkqy/common/constant/BpmNodeTypeConstants.java
  15. 36 1
      zkqy-common/src/main/java/com/zkqy/common/constant/HttpStatus.java
  16. 160 0
      zkqy-common/src/main/java/com/zkqy/common/core/domain/BaseEntityPlus.java
  17. 54 20
      zkqy-common/src/main/java/com/zkqy/common/utils/PlaceholderReplacer.java
  18. 10 0
      zkqy-common/src/main/java/com/zkqy/common/utils/SecurityUtils.java
  19. 59 29
      zkqy-common/src/main/java/com/zkqy/common/utils/StringUtils.java
  20. 30 0
      zkqy-common/src/main/java/com/zkqy/common/utils/bpm/BpmUtils.java
  21. 320 0
      zkqy-common/src/main/java/com/zkqy/common/utils/bpm/XmlDataParserUtils.java
  22. 40 0
      zkqy-process-execution/pom.xml
  23. 105 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmApprovalStatusController.java
  24. 94 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmExecuteNodeController.java
  25. 93 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmExecuteNodeFormController.java
  26. 92 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmExecuteNodeMiddleController.java
  27. 147 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmExecuteProcessController.java
  28. 167 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmRunController.java
  29. 39 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmScriptController.java
  30. 113 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmApprovalStatus.java
  31. 371 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteNode.java
  32. 138 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteNodeForm.java
  33. 441 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteNodeLog.java
  34. 150 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteNodeMiddle.java
  35. 226 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteProcess.java
  36. 98 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmNodeHandleUser.java
  37. 138 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmNodeScript.java
  38. 140 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmNodeScriptRelevance.java
  39. 245 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmProcess.java
  40. 264 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmProcessConfiguration.java
  41. 263 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/CommonEntity.java
  42. 161 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/DragFormGroup.java
  43. 153 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/TableSql.java
  44. 79 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmBackNodeVo.java
  45. 69 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmRunNodeFormDateVo.java
  46. 134 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmRunNodeFormFilterConditionsVo.java
  47. 102 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmRunNodeFromVo.java
  48. 169 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmRunNodeVo.java
  49. 67 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmUserScriptVo.java
  50. 91 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/IRunBPMEntity.java
  51. 57 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/IScriptEntity.java
  52. 105 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/IntoProduction.java
  53. 142 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/SysBpmNodeScriptVO.java
  54. 73 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/TriggerExceptionVO.java
  55. 42 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/vo/FileVo.java
  56. 66 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/vo/NodeVo.java
  57. 89 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmApprovalStatusMapper.java
  58. 127 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteNodeFormMapper.java
  59. 94 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteNodeLogMapper.java
  60. 114 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteNodeMapper.java
  61. 83 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteNodeMiddleMapper.java
  62. 234 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteProcessMapper.java
  63. 71 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmNodeHandleUserMapper.java
  64. 93 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmNodeScriptRelevanceMapper.java
  65. 72 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmProcessConfigurationMapper.java
  66. 83 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmProcessMapper.java
  67. 143 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/CommonMapper.java
  68. 71 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/DragFormGroupMapper.java
  69. 96 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/TableSqlMapper.java
  70. 936 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/runbpm/PreExecutionToolClass.java
  71. 187 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/runbpm/RunImplementationClass.java
  72. 5 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/DynamicJavaService.java
  73. 87 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmApprovalStatusService.java
  74. 79 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteNodeFormService.java
  75. 75 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteNodeLogService.java
  76. 73 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteNodeMiddleService.java
  77. 80 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteNodeService.java
  78. 157 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteProcessService.java
  79. 69 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmNodeHandleUserService.java
  80. 83 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmNodeScriptRelevanceService.java
  81. 87 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmProcessConfigurationService.java
  82. 91 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmProcessService.java
  83. 102 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/ICommonService.java
  84. 71 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IDragFormGroupService.java
  85. 70 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IRunBPMService.java
  86. 53 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IScriptService.java
  87. 41 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/ITableSqlService.java
  88. 104 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmApprovalStatusServiceImpl.java
  89. 110 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteNodeFormServiceImpl.java
  90. 103 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteNodeLogServiceImpl.java
  91. 168 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteNodeMiddleServiceImpl.java
  92. 194 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteNodeServiceImpl.java
  93. 552 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteProcessServiceImpl.java
  94. 99 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmNodeHandleUserServiceImpl.java
  95. 115 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmNodeScriptRelevanceServiceImpl.java
  96. 278 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmProcessConfigurationServiceImpl.java
  97. 364 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmProcessServiceImpl.java
  98. 555 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/CommonServiceImpl.java
  99. 102 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/DragFormGroupServiceImpl.java
  100. 64 0
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/DynamicJavaServiceImpl.java

+ 8 - 8
README.md

@@ -1,18 +1,18 @@
-# 基本信息 
+# 基本信息
 中科擎云智能制造sass平台研发111
 
 # 账号
 租户管理端:
-    地址:http://192.168.110.83:1024/adminLogin
-    账号:admin 
-    密码:admin123
+地址:http://192.168.110.83:1024/adminLogin
+账号:admin
+密码:admin123
 
 租户端工具端:
-    地址:http://192.168.110.83:1024/login?tenantCode=huaxian
-    账号:huaxian
-    密码:123456
+地址:http://192.168.110.83:1024/login?tenantCode=huaxian
+账号:huaxian
+密码:123456
 
-# git 多仓库切换提交
+#  git 多仓库切换提交
 ## 本地已有项目添加新的远程仓库
     git remote add  zkqyOrigin http://175.27.169.173:10880/zkqy-sass-platform/mec-cloud_-intelligent-manufacturing_crm.git
     git push -u zkqyOrigin master

+ 12 - 7
pom.xml

@@ -2,8 +2,8 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	
+    <modelVersion>4.0.0</modelVersion>
+
     <groupId>com.zkqy</groupId>
     <artifactId>zkqy</artifactId>
     <version>3.8.5</version>
@@ -11,7 +11,7 @@
     <name>zkqy</name>
     <url>http://www.zkqy.vip</url>
     <description>若依管理系统</description>
-    
+
     <properties>
         <zkqy.version>3.8.5</zkqy.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -31,7 +31,7 @@
         <velocity.version>2.3</velocity.version>
         <jwt.version>0.9.1</jwt.version>
     </properties>
-	
+
     <!-- 依赖声明 -->
     <dependencyManagement>
         <dependencies>
@@ -170,6 +170,12 @@
                 <version>${zkqy.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>com.zkqy</groupId>
+                <artifactId>zkqy-process-execution</artifactId>
+                <version>${zkqy.version}</version>
+            </dependency>
+
             <!-- mybatis-plus -->
             <dependency>
                 <groupId>com.baomidou</groupId>
@@ -185,7 +191,6 @@
 
         </dependencies>
     </dependencyManagement>
-
     <modules>
         <module>zkqy-admin</module>
         <module>zkqy-framework</module>
@@ -193,9 +198,9 @@
         <module>zkqy-quartz</module>
         <module>zkqy-generator</module>
         <module>zkqy-common</module>
+        <module>zkqy-process-execution</module>
     </modules>
     <packaging>pom</packaging>
-
     <build>
         <plugins>
             <plugin>
@@ -236,4 +241,4 @@
         </pluginRepository>
     </pluginRepositories>
 
-</project>
+</project>

+ 92 - 16
zkqy-admin/pom.xml

@@ -37,7 +37,7 @@
             <version>1.6.2</version>
         </dependency>
 
-         <!-- Mysql驱动包 -->
+        <!-- Mysql驱动包 -->
         <dependency>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
@@ -56,6 +56,11 @@
             <artifactId>zkqy-framework</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>com.zkqy</groupId>
+            <artifactId>zkqy-process-execution</artifactId>
+        </dependency>
+
         <!-- 定时任务-->
         <dependency>
             <groupId>com.zkqy</groupId>
@@ -80,36 +85,107 @@
             <artifactId>okhttp</artifactId>
             <version>3.10.0</version>
         </dependency>
+
+        <!--jdk的tools工具包-->
+        <!-- 声明 tools.jar 为 system 范围的依赖 -->
+        <dependency>
+            <groupId>com.sun</groupId>
+            <artifactId>tools</artifactId>
+            <version>1.8</version>
+            <scope>system</scope>
+            <systemPath>${java.home}/../lib/tools.jar</systemPath>
+        </dependency>
     </dependencies>
 
     <build>
         <plugins>
+            <!--            <plugin>-->
+            <!--                <groupId>org.springframework.boot</groupId>-->
+            <!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
+            <!--                <version>2.1.1.RELEASE</version>-->
+            <!--                <configuration>-->
+            <!--                    <fork>true</fork> &lt;!&ndash; 如果没有该配置,devtools不会生效 &ndash;&gt;-->
+            <!--                </configuration>-->
+            <!--                <executions>-->
+            <!--                    <execution>-->
+            <!--                        <goals>-->
+            <!--                            <goal>repackage</goal>-->
+            <!--                        </goals>-->
+            <!--                    </execution>-->
+            <!--                </executions>-->
+            <!--            </plugin>-->
+            <!--            <plugin>-->
+            <!--                <groupId>org.apache.maven.plugins</groupId>-->
+            <!--                <artifactId>maven-war-plugin</artifactId>-->
+            <!--                <version>3.1.0</version>-->
+            <!--                <configuration>-->
+            <!--                    <failOnMissingWebXml>false</failOnMissingWebXml>-->
+            <!--                    <warName>${project.artifactId}</warName>-->
+            <!--                </configuration>-->
+            <!--           </plugin>-->
             <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>2.1.1.RELEASE</version>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
                 <configuration>
-                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <addClasspath>true</addClasspath>
+                            <!--指定jar程序入口-->
+                            <mainClass>com.zkqy.ZkqyApplication</mainClass>
+                        </manifest>
+                        <!-- 手动添加 tools.jar 到类路径 -->
+                        <manifestEntries>
+                            <Class-Path>lib/tools.jar</Class-Path>
+                        </manifestEntries>
+                    </archive>
                 </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
                 <executions>
                     <execution>
+                        <id>copy-dependencies</id>
+                        <phase>package</phase>
                         <goals>
-                            <goal>repackage</goal>
+                            <goal>copy-dependencies</goal>
                         </goals>
+                        <configuration>
+                            <!-- lib依赖包输出目录,打包的时候不打进jar包里 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <excludeTransitive>false</excludeTransitive>
+                            <stripVersion>false</stripVersion>
+                            <includeScope>runtime</includeScope>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <!-- maven-antrun-plugin: 复制 tools.jar -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>3.0.0</version>
+                <executions>
+                    <execution>
+                        <id>copy-tools-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target>
+                                <copy file="${java.home}/../lib/tools.jar" todir="${project.build.directory}/lib" />
+                            </target>
+                        </configuration>
                     </execution>
                 </executions>
             </plugin>
-            <plugin>   
-                <groupId>org.apache.maven.plugins</groupId>   
-                <artifactId>maven-war-plugin</artifactId>   
-                <version>3.1.0</version>   
-                <configuration>
-                    <failOnMissingWebXml>false</failOnMissingWebXml>
-                    <warName>${project.artifactId}</warName>
-                </configuration>   
-           </plugin>   
         </plugins>
         <finalName>${project.artifactId}</finalName>
     </build>
 
-</project>
+</project>

+ 177 - 26
zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysBpmNodeScriptController.java

@@ -5,27 +5,23 @@ import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 import javax.servlet.http.HttpServletResponse;
 
-import com.mchange.v1.identicator.IdList;
 import com.zkqy.common.annotation.Anonymous;
-import com.zkqy.common.core.domain.entity.SysUser;
 import com.zkqy.common.utils.PlaceholderReplacer;
-import com.zkqy.common.utils.SecurityUtils;
 import com.zkqy.system.service.ISysUserService;
+import com.zkqy.web.controller.utils.DefaultPackageCompiler;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.tuple.Pair;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.core.io.FileSystemResource;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.MediaType;
@@ -50,6 +46,7 @@ import org.springframework.web.multipart.MultipartFile;
 @RestController
 @RequestMapping("/system/script")
 @Api(value = "/system/script")
+@Slf4j
 public class SysBpmNodeScriptController extends BaseController {
 
 
@@ -62,6 +59,10 @@ public class SysBpmNodeScriptController extends BaseController {
     @Value("${template.urlDownload}")
     private  String  url;
 
+    @Value("${template.urlDownloadVue}")
+    private  String  urlVue;
+
+
     @Value("${template.urluPload}")
     private  String  urluPload;
 
@@ -83,6 +84,24 @@ public class SysBpmNodeScriptController extends BaseController {
         return getDataTable(list);
     }
 
+    @GetMapping("/getfromlist")
+    @ApiOperation(value = "查询流程节点脚本列表")
+    @Anonymous
+    public AjaxResult getfromlist(SysBpmNodeScript sysBpmNodeScript) {
+        SysBpmNodeScript sysBpmNodeScript1=new SysBpmNodeScript();
+        sysBpmNodeScript1.setIsOld("1");//老节点标识
+        List<SysBpmNodeScript> list= sysBpmNodeScriptService.selectSysBpmNodeScriptList(sysBpmNodeScript);
+        List<Map<String,String>> mapList=new ArrayList<>();
+        list.forEach(item->{
+            Map<String,String> stringStringMap=new HashMap<>();
+            stringStringMap.put("formKey",item.getScriptKey());
+            stringStringMap.put("formName",item.getScriptName()+"表单");
+            mapList.add(stringStringMap);
+        });
+        return AjaxResult.success(mapList);
+    }
+
+
 
     /**
      * 新增逻辑里的脚本key-我已经删除掉
@@ -130,7 +149,23 @@ public class SysBpmNodeScriptController extends BaseController {
                     String fileContent = file.getRight(); // 文件内容
                     addFileToZip(zipOutputStream, fileName, fileContent);
                 }
+
+
+                //添加Vue模版
+                // 添加 a.vue 模板文件(从服务器路径读取)
+//                String vueFilePath = urlVue; // 服务器上的文件路径
+                String vueFileName = "template.vue"; // 压缩包中的文件名
+                // 读取服务器上的文件内容
+                String vueFileContent;
+                try {
+                    vueFileContent = new String(Files.readAllBytes(Paths.get(urlVue)), StandardCharsets.UTF_8);
+                } catch (IOException e) {
+                    throw new RuntimeException("Failed to read a.vue file from server: " + urlVue, e);
+                }
+                // 将 a.vue 文件添加到 ZIP
+                addFileToZip(zipOutputStream, vueFileName, vueFileContent);
             }
+
             // 设置响应头
             HttpHeaders headers = new HttpHeaders();
             headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
@@ -148,6 +183,71 @@ public class SysBpmNodeScriptController extends BaseController {
         }
     }
 
+
+
+    /**
+     * 新增逻辑里的脚本key-我已经删除掉
+     * @param scriptKey
+     * @param response
+     * @return
+     */
+    @Anonymous
+    @GetMapping("/checkDownloadTheNodeTemplate")
+    @ApiOperation(value = "检查检查文件信息")
+    public ResponseEntity<byte[]> checkDownloadTheNodeTemplate(@RequestParam String scriptKey, HttpServletResponse response) {
+        try {
+            File fileJava=new File(urluPload+scriptKey+".java");// Java文件
+            File fileVue=new File(pageUrl+scriptKey+".vue");//   Vue文件
+
+            // 假设 id 是用来区分不同文件路径的标识
+            String javaFilePath = urluPload+scriptKey+".java"; // 服务器上的 Java 文件路径
+
+            String vueFilePath =  pageUrl+scriptKey+".vue";   // 服务器上的 Vue 文件路径
+
+            if(!fileJava.exists()&&!fileVue.exists()){
+                System.out.println("没有任何的文件信息不能下载减价");
+                return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+            }
+
+            // 创建 ByteArrayOutputStream 和 ZipOutputStream
+            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+            try (ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream)) {
+                if(fileJava.exists()){
+                    // 添加 Java 文件到 ZIP
+                    addFileToZip(zipOutputStream, scriptKey+".java", readFileContent(javaFilePath));
+                }
+                if(fileVue.exists()) {
+                    // 添加 Vue 文件到 ZIP
+                    addFileToZip(zipOutputStream, scriptKey+".vue", readFileContent(vueFilePath));
+                }
+            }
+            // 设置响应头
+            HttpHeaders headers = new HttpHeaders();
+            headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
+            headers.setContentDispositionFormData("attachment", "check.zip");
+
+            // 返回二进制数据
+            return new ResponseEntity<>(byteArrayOutputStream.toByteArray(), headers, HttpStatus.OK);
+        } catch (Exception e) {
+            // 全局异常处理
+            System.out.println("Error while generating ZIP file: " + e.getMessage());
+            e.printStackTrace();
+            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(null);
+        }
+    }
+
+    /**
+     * 读取文件内容
+     *
+     * @param filePath 文件路径
+     * @return 文件内容字符串
+     * @throws IOException 如果读取失败
+     */
+    private String readFileContent(String filePath) throws IOException {
+        return new String(Files.readAllBytes(Paths.get(filePath)), StandardCharsets.UTF_8);
+    }
+
+
     private void addFileToZip(ZipOutputStream zipOutputStream, String fileName, String content) throws IOException {
         ZipEntry zipEntry = new ZipEntry(fileName);
         zipOutputStream.putNextEntry(zipEntry);
@@ -157,7 +257,8 @@ public class SysBpmNodeScriptController extends BaseController {
 
 
     /**
-     * 脚本节点上传
+     * 脚本节点上传  1、用户首先拷贝下来一个模版文件
+     *             2、上传根据脚本key 查询脚本信息,然后替换,基本内容
      * @param file
      * @return
      */
@@ -168,29 +269,78 @@ public class SysBpmNodeScriptController extends BaseController {
             return ResponseEntity.badRequest().body("请选择一个文件进行上传!");
         }
         try {
-            // 确保保存文件的目录存在
+            // 1、上传文件的文件名称
+            String fileName = file.getOriginalFilename().toString();
+
+
+            // 2、确保保存文件的目录存在
             Path uploadPath = Paths.get(urluPload);
             if (!Files.exists(uploadPath)) {
                 Files.createDirectories(uploadPath);
             }
 
-            //更新节点编码状态
-            String string = file.getOriginalFilename().toString();
-            String replace = string.replace(".java", "");//替换内容
-            SysBpmNodeScript sysBpmNodeScript = new SysBpmNodeScript();
-            sysBpmNodeScript.setScriptState("0");
-            sysBpmNodeScript.setScriptKey(replace);//脚本可以
-            int i = sysBpmNodeScriptService.updateSysBpmNodeScriptByScriptKey(sysBpmNodeScript);//更新脚本key
-            if(i>0){
-                // 将文件保存到指定路径
-                byte[] bytes = file.getBytes();
-                Path path = Paths.get(urluPload + file.getOriginalFilename());
-                Files.write(path, bytes);
-                return ResponseEntity.ok("文件上传成功:" + file.getOriginalFilename());
+            // 3、删除对应的java源文件
+            StringBuffer stringBuffer=new StringBuffer();
+            stringBuffer.append(urluPload).append(fileName);
+            File newFile = new File(stringBuffer.toString());
+            // 如果存在编译文件就把编译文件删除掉从新编译
+            if (newFile.exists()) {
+                newFile.delete();
+                log.info("java源文件删除成功!!!");
+            }
+
+            // 4、删除对应的编译文件
+            String replace = fileName.replace(".java", "");//替换内容
+            // 判断有没有生成对应的编译文件如果有就把编译文件删除掉
+            StringBuffer stringBufferClass=new StringBuffer();
+            stringBufferClass.append(urluPload).append(replace).append(".class");
+            File newFileClass = new File(stringBufferClass.toString());
+            // 如果存在编译文件就把编译文件删除掉从新编译
+            if (newFileClass.exists()) {
+                newFileClass.delete();
+                log.info("编译文件删除成功!!!");
+            }
+
+            // 5、将文件保存到指定路径
+            byte[] bytes = file.getBytes();
+            String pathString=   urluPload + file.getOriginalFilename();
+            Path path = Paths.get(pathString);
+            Files.write(path, bytes);
+//            PlaceholderReplacer placeholderReplacer=new PlaceholderReplacer();
+            //查询脚本信息
+//            SysBpmNodeScript sysBpmNodeScript1 = sysBpmNodeScriptService.selectSysBpmNodeScriptByScriptKey(replace);
+            //COMPONENT_ID PLACEHOLDERDesc
+//            placeholderReplacer.setCOMPONENT_ID(sysBpmNodeScript1.getScriptKey()); //脚本id
+//            placeholderReplacer.setPLACEHOLDERDesc(sysBpmNodeScript1.getScriptName());// 脚本描述----脚本名称
+            // 更改文件内容
+            // 第一步:将注解中的内容替换为占位符
+//            String filledContent =placeholderReplacer.replaceWithPlaceholder(pathString);
+            // 第二步:将填充好的内容写入新文件
+//            placeholderReplacer.createNewFile(pathString, filledContent);
+
+            // 6、开始把java文件编译成.class文件
+            DefaultPackageCompiler defaultPackageCompiler=new DefaultPackageCompiler();
+            String s = defaultPackageCompiler.compileJavaFile(stringBuffer.toString());
+            if(s.equals("编译成功")){
+                SysBpmNodeScript sysBpmNodeScript = new SysBpmNodeScript();
+                sysBpmNodeScript.setScriptState("0");
+                sysBpmNodeScript.setScriptKey(replace);//脚本可以
+                int i = sysBpmNodeScriptService.updateSysBpmNodeScriptByScriptKey(sysBpmNodeScript);//更新脚本key
+                return ResponseEntity.ok("文件上传+编译成功:" + file.getOriginalFilename());
             }else {
-                return ResponseEntity.status(200).body("脚本节点未更新状态成功");
+                // java 源文件
+                if (newFile.exists()) {
+                    newFile.delete();
+                    log.info("java源文件删除成功!!!");
+                }
+                // class 文件
+                if (newFileClass.exists()) {
+                    newFileClass.delete();
+                    log.info("class编译文件删除成功!!!");
+                }
+                return ResponseEntity.status(500).body("编译失败:文件上传失败:");
             }
-        } catch (IOException e) {
+        } catch (Exception e) {
             e.printStackTrace();
             return ResponseEntity.status(500).body("文件上传失败:" + e.getMessage());
         }
@@ -211,6 +361,7 @@ public class SysBpmNodeScriptController extends BaseController {
     @PostMapping("/uploadPage")
     public ResponseEntity<String> uploadPage(@RequestParam("file") MultipartFile file,@RequestParam("id") String id) {
         if (file.isEmpty()) {
+            System.out.println("动态脚本节点");
             return ResponseEntity.badRequest().body("请选择一个文件进行上传!");
         }
         try {
@@ -231,7 +382,7 @@ public class SysBpmNodeScriptController extends BaseController {
             if(i>0){
                 // 将文件保存到指定路径
                 byte[] bytes = file.getBytes();
-                Path path = Paths.get(pageUrl + sysBpmNodeScript1.getScriptKey()+".html");
+                Path path = Paths.get(pageUrl + sysBpmNodeScript1.getScriptKey()+".vue");
                 Files.write(path, bytes);
                 return ResponseEntity.ok("文件上传成功:" + file.getOriginalFilename());
             }else {

+ 122 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/tool/PlaceholderReplacer.java

@@ -0,0 +1,122 @@
+package com.zkqy.web.controller.tool;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+public class PlaceholderReplacer {
+
+    // 组件id占位符
+    private static final String PLACEHOLDEROne = "${componentId}";
+
+    // 组件ID
+    private static final String COMPONENT_ID = "3c374962955748cab96865977f608af6";
+
+    // 类描述信息占位符
+    private  static  final  String PLACEHOLDERTwo="desc";
+
+    // 类描述信息
+    private  static  final  String PLACEHOLDERDesc="组装节点";
+
+
+
+    public static void main(String[] args) {
+        try {
+            // 文件路径
+            String filePath = "D:\\zkqy\\test\\AddAmmunitionPickingUp.java";
+
+            // 新文件路径(基于组件ID生成)
+            String newFilePath = "D:\\zkqy\\test\\" + COMPONENT_ID + ".java";
+
+            // 第一步:将注解中的内容替换为占位符
+            String filledContent = replaceWithPlaceholder(filePath);
+
+            // 第二步:将填充好的内容写入新文件
+            createNewFile(newFilePath, filledContent);
+
+            System.out.println("操作完成!");
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 将注解中的内容替换为占位符
+     *
+     * @param filePath 文件路径
+     * @throws IOException 如果发生 I/O 错误
+     */
+    private static String replaceWithPlaceholder(String filePath) throws IOException {
+        // 读取文件内容
+        StringBuilder contentBuilder = new StringBuilder();
+        try (BufferedReader reader = Files.newBufferedReader(Paths.get(filePath))) {
+            String line;
+            while ((line = reader.readLine()) != null) {
+                if (line.contains("${componentId}")) {
+                    // 替换为占位符
+                    line = line.replace( PLACEHOLDEROne,COMPONENT_ID);
+                }
+                if(line.contains("@{desc}")){  //${desc}
+                    line = line.replace(PLACEHOLDERTwo,PLACEHOLDERDesc ); //${desc}---> 组装节点
+                }
+                contentBuilder.append(line).append(System.lineSeparator());
+            }
+        }
+
+//        // 写回文件
+//        try (BufferedWriter writer = Files.newBufferedWriter(Paths.get(filePath))) {
+//            writer.write(contentBuilder.toString());
+//        }
+        return contentBuilder.toString();
+    }
+
+
+    /**
+     * 重命名文件
+     *
+     * @param originalFilePath 原始文件路径
+     * @param newFileName      新文件名
+     * @throws IOException 如果发生 I/O 错误
+     */
+    private static void renameFile(String originalFilePath, String newFileName) throws IOException {
+        File originalFile = new File(originalFilePath);
+        File newFile = new File(originalFile.getParent(), newFileName);
+
+        // 确保新文件名不冲突
+        if (!newFile.exists()) {
+            boolean success = originalFile.renameTo(newFile);
+            if (!success) {
+                throw new IOException("无法重命名文件");
+            }
+        } else {
+            throw new IOException("目标文件已存在:" + newFile.getAbsolutePath());
+        }
+    }
+
+
+    /**
+     * 创建新文件并将内容写入
+     *
+     * @param newFilePath 新文件路径
+     * @param content     要写入的内容
+     * @throws IOException 如果发生 I/O 错误
+     */
+    private static void createNewFile(String newFilePath, String content) throws IOException {
+        File newFile = new File(newFilePath);
+
+        // 确保父目录存在
+        if (!newFile.getParentFile().exists()) {
+            newFile.getParentFile().mkdirs();
+        }
+
+        // 写入内容到新文件
+        try (BufferedWriter writer = Files.newBufferedWriter(Paths.get(newFilePath))) {
+            writer.write(content);
+        }
+    }
+}
+
+

+ 30 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/utils/DefaultPackageClassLoader.java

@@ -0,0 +1,30 @@
+package com.zkqy.web.controller.utils;
+
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+public class DefaultPackageClassLoader extends ClassLoader{
+
+
+    public DefaultPackageClassLoader(ClassLoader parent) {
+        super(parent);
+    }
+
+    public Class<?> loadClassFromFile(String classFilePath) throws Exception {
+        File file = new File(classFilePath);
+        URL url = file.getParentFile().toURI().toURL();
+        URL[] urls = new URL[]{url};
+        // 使用 URLClassLoader 加载类
+        ClassLoader loader = new URLClassLoader(urls, this);
+        String className = getClassNameFromPath(classFilePath);
+        return loader.loadClass(className);
+    }
+
+
+
+    private String getClassNameFromPath(String filePath) {
+        // 默认包中,类名就是文件名去掉 ".class" 后缀
+        return new File(filePath).getName().replace(".class", "");
+    }
+}

+ 22 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/utils/DefaultPackageCompiler.java

@@ -0,0 +1,22 @@
+package com.zkqy.web.controller.utils;
+
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+
+public class DefaultPackageCompiler {
+    public  String compileJavaFile(String javaFilePath) throws Exception {
+        // 获取系统默认的 Java 编译器
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        if (compiler == null) {
+            throw new IllegalStateException("Java 编译器不可用,请确保使用的是 JDK 而非 JRE");
+        }
+        String classpath = System.getProperty("java.class.path"); // 获取当前运行时的类路径
+        // 编译指定的 .java 文件
+        int result = compiler.run(null, null, null, "-classpath",classpath, "-encoding", "UTF-8", javaFilePath);
+        if (result != 0) {
+            return "编译失败";
+        }else {
+            return "编译成功";
+        }
+    }
+}

+ 21 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/utils/DefaultPackageCompiler1.java

@@ -0,0 +1,21 @@
+package com.zkqy.web.controller.utils;
+
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+
+public class DefaultPackageCompiler1 {
+    public  String compileJavaFile(String javaFilePath) throws Exception {
+        // 获取系统默认的 Java 编译器
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        if (compiler == null) {
+            throw new IllegalStateException("Java 编译器不可用,请确保使用的是 JDK 而非 JRE");
+        }
+        // 编译指定的 .java 文件
+        int result = compiler.run(null, null, null, "-encoding", "UTF-8", javaFilePath);
+        if (result != 0) {
+            return "编译失败";
+        }else {
+            return "编译成功";
+        }
+    }
+}

+ 285 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/utils/DefaultPackageCompiler2.java

@@ -0,0 +1,285 @@
+package com.zkqy.web.controller.utils;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.util.StringUtils;
+
+import javax.tools.*;
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+public class DefaultPackageCompiler2 {
+    private String projectRoot;
+    private List<String> classPaths;
+    private Map<String, String> classLocationMap;
+    private ClassLoader springBootClassLoader;
+
+    public void DefaultPackageCompiler() {
+        this.springBootClassLoader = this.getClass().getClassLoader();
+        this.projectRoot = getProjectRoot();
+        this.classPaths = new ArrayList<>();
+        this.classLocationMap = new HashMap<>();
+        initializeClassPaths();
+    }
+
+    public DefaultPackageCompiler2(String projectRoot, List<String> classPaths, Map<String, String> classLocationMap, ClassLoader springBootClassLoader) {
+        this.projectRoot = projectRoot;
+        this.classPaths = classPaths;
+        this.classLocationMap = classLocationMap;
+        this.springBootClassLoader = springBootClassLoader;
+    }
+
+    private String getProjectRoot() {
+        try {
+            // 获取SpringBoot jar包路径
+            URL location = springBootClassLoader.getResource("");
+            String path = location.getPath();
+
+            // 处理URL编码问题
+            path = URLDecoder.decode(path, StandardCharsets.UTF_8.name());
+
+            // 处理file:和!字符
+            if (path.startsWith("file:")) {
+                path = path.substring(5);
+            }
+            if (path.contains("!")) {
+                path = path.substring(0, path.indexOf("!"));
+            }
+
+            // 处理Windows路径
+            if (path.startsWith("/")) {
+                path = path.substring(1);
+            }
+
+            log.info("处理后的项目根路径: {}", path);
+
+            if (path.endsWith(".jar")) {
+                return new File(path).getParentFile().getAbsolutePath();
+            } else {
+                return new File(path).getParentFile().getParentFile().getAbsolutePath();
+            }
+        } catch (Exception e) {
+            log.error("获取项目根目录失败", e);
+            throw new RuntimeException("无法获取项目根目录", e);
+        }
+    }
+
+    private void initializeClassPaths() {
+        try {
+            // 添加SpringBoot jar包路径
+            String cleanProjectRoot = projectRoot.replace("file:", "").replace("!", "");
+            classPaths.add(cleanProjectRoot);
+
+            // 添加BOOT-INF/classes路径
+            String bootInfClasses = cleanProjectRoot + File.separator + "BOOT-INF" + File.separator + "classes";
+            if (new File(bootInfClasses).exists()) {
+                classPaths.add(bootInfClasses);
+                log.info("添加BOOT-INF/classes路径: {}", bootInfClasses);
+            }
+
+            // 添加BOOT-INF/lib路径下的所有jar包
+            String bootInfLib = cleanProjectRoot + File.separator + "BOOT-INF" + File.separator + "lib";
+            File libDir = new File(bootInfLib);
+            if (libDir.exists() && libDir.isDirectory()) {
+                File[] libFiles = libDir.listFiles((dir, name) -> name.endsWith(".jar"));
+                if (libFiles != null) {
+                    for (File file : libFiles) {
+                        classPaths.add(file.getAbsolutePath());
+                        log.info("添加jar包路径: {}", file.getAbsolutePath());
+                    }
+                }
+            }
+
+            addSystemClassPath();
+            buildClassLocationMap();
+
+            log.info("当前类路径: {}", String.join(File.pathSeparator, classPaths));
+        } catch (Exception e) {
+            log.error("初始化类路径失败", e);
+            throw new RuntimeException("初始化类路径失败", e);
+        }
+    }
+    private void addSystemClassPath() {
+        try {
+            // 获取系统类路径
+            String systemClassPath = System.getProperty("java.class.path");
+            if (StringUtils.hasText(systemClassPath)) {
+                // 分割类路径
+                String[] paths = systemClassPath.split(File.pathSeparator);
+                for (String path : paths) {
+                    // 检查路径是否已存在
+                    if (!classPaths.contains(path)) {
+                        // 检查路径是否存在
+                        File file = new File(path);
+                        if (file.exists()) {
+                            classPaths.add(path);
+                            // 如果是目录,扫描其中的类文件
+                            if (file.isDirectory()) {
+                                scanDirectory(file, "");
+                            }
+                        } else {
+                            log.warn("系统类路径不存在: {}", path);
+                        }
+                    }
+                }
+            }
+
+            // 添加运行时类路径
+            ClassLoader classLoader = this.getClass().getClassLoader();
+            if (classLoader instanceof URLClassLoader) {
+                URL[] urls = ((URLClassLoader) classLoader).getURLs();
+                for (URL url : urls) {
+                    String path = url.getPath();
+                    if (!classPaths.contains(path)) {
+                        classPaths.add(path);
+                    }
+                }
+            }
+
+            // 添加当前工作目录
+            String userDir = System.getProperty("user.dir");
+            if (StringUtils.hasText(userDir)) {
+                File userDirFile = new File(userDir);
+                if (userDirFile.exists() && !classPaths.contains(userDir)) {
+                    classPaths.add(userDir);
+                }
+            }
+
+        } catch (Exception e) {
+//            log.error("添加系统类路径失败", e);
+            throw new RuntimeException("添加系统类路径失败", e);
+        }
+    }
+    private void buildClassLocationMap() {
+        try {
+            // 使用Spring的ResourcePatternResolver扫描类文件
+            PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(springBootClassLoader);
+            Resource[] resources = resolver.getResources("classpath*:**/*.class");
+
+            for (Resource resource : resources) {
+                String path = resource.getURL().getPath();
+                if (path.contains("BOOT-INF/classes")) {
+                    // 提取类名
+                    String className = path.substring(path.indexOf("BOOT-INF/classes/") + 17)
+                            .replace('/', '.')
+                            .replace(".class", "");
+                    classLocationMap.put(className, path);
+                }
+            }
+        } catch (Exception e) {
+            throw new RuntimeException("构建类位置映射失败", e);
+        }
+    }
+
+    public String compileJavaFile(String javaFilePath) throws Exception {
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        if (compiler == null) {
+            throw new IllegalStateException("Java 编译器不可用,请确保使用的是 JDK 而非 JRE");
+        }
+
+        DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
+        StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null);
+
+        // 确保输出目录存在
+        File outputDir = new File(projectRoot + File.separator + "target" + File.separator + "classes");
+        if (!outputDir.exists()) {
+            outputDir.mkdirs();
+        }
+
+        // 构建编译选项
+        List<String> options = new ArrayList<>();
+        options.add("-encoding");
+        options.add("UTF-8");
+        options.add("-cp");
+
+        // 处理类路径
+        String classPath = String.join(File.pathSeparator, classPaths);
+        // 移除file:和!字符
+        classPath = classPath.replace("file:", "").replace("!", "");
+        options.add(classPath);
+
+        options.add("-d");
+        options.add(outputDir.getAbsolutePath());
+
+        // 创建JavaFileObject
+        File javaFile = new File(javaFilePath);
+        Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjects(javaFile);
+
+        log.info("编译选项: {}", String.join(" ", options));
+        log.info("编译文件: {}", javaFilePath);
+        log.info("类路径: {}", classPath);
+
+        // 执行编译
+        JavaCompiler.CompilationTask task = compiler.getTask(
+                null,
+                fileManager,
+                diagnostics,
+                options,
+                null,
+                compilationUnits
+        );
+
+        boolean success = task.call();
+
+        if (success) {
+            log.info("编译成功: {}", javaFilePath);
+            return "编译成功";
+        } else {
+            StringBuilder errorMsg = new StringBuilder("编译失败:\n");
+            diagnostics.getDiagnostics().forEach(diagnostic ->
+                    errorMsg.append(diagnostic.getMessage(null)).append("\n")
+            );
+            log.error("编译失败: {}", errorMsg);
+            return errorMsg.toString();
+        }
+    }
+
+    // 添加自定义类路径
+    public void addClassPath(String path) {
+        if (!classPaths.contains(path)) {
+            classPaths.add(path);
+            // 更新类位置映射
+            File file = new File(path);
+            if (file.exists()) {
+                if (file.isDirectory()) {
+                    scanDirectory(file, "");
+                } else if (path.endsWith(".jar")) {
+                    // 处理jar包
+                }
+            }
+        }
+    }
+
+    // 获取当前类路径
+    public String getClassPath() {
+        return String.join(File.pathSeparator, classPaths);
+    }
+
+    // 获取类的位置
+    public String getClassLocation(String className) {
+        return classLocationMap.get(className);
+    }
+
+    private void scanDirectory(File dir, String packageName) {
+        File[] files = dir.listFiles();
+        if (files != null) {
+            for (File file : files) {
+                if (file.isDirectory()) {
+                    scanDirectory(file, packageName + file.getName() + ".");
+                } else if (file.getName().endsWith(".class")) {
+                    String className = packageName + file.getName().substring(0, file.getName().length() - 6);
+                    classLocationMap.put(className, file.getAbsolutePath());
+                }
+            }
+        }
+    }
+}

+ 37 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/utils/SpringBeanRegistrar.java

@@ -0,0 +1,37 @@
+package com.zkqy.web.controller.utils;
+
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.beans.factory.support.RootBeanDefinition;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ConfigurableApplicationContext;
+
+public class SpringBeanRegistrar {
+    public static void registerBean(ApplicationContext context, String beanName, Class<?> clazz) throws Exception {
+        // 确保 ApplicationContext 是 ConfigurableApplicationContext 类型
+        if (!(context instanceof ConfigurableApplicationContext)) {
+            throw new IllegalArgumentException("上下文类型不支持动态注册 Bean");
+        }
+
+        // 获取 BeanFactory
+        ConfigurableListableBeanFactory beanFactory = ((ConfigurableApplicationContext) context).getBeanFactory();
+        // 检查 Bean 是否已存在
+        if (beanFactory.containsSingleton(beanName)) {
+            System.out.println("Bean with name '" + beanName + "' already exists. Skipping registration.");
+            return;
+        }
+        ConfigurableApplicationContext configurableApplicationContext = (ConfigurableApplicationContext) context;
+        DefaultListableBeanFactory beanFactory2 = (DefaultListableBeanFactory) configurableApplicationContext.getBeanFactory();
+        // 注册 BeanDefinition
+        RootBeanDefinition beanDefinition = new RootBeanDefinition(clazz);
+        beanDefinition.setScope("prototype"); // 设置作用域为 prototype
+        beanFactory2.registerBeanDefinition(beanName, beanDefinition);
+
+        // 列出所有 Bean 名称
+        String[] beanNames = context.getBeanDefinitionNames();
+        System.out.println("All Beans in the container:");
+        for (String name : beanNames) {
+            System.out.println(name);
+        }
+    }
+}

+ 7 - 2
zkqy-admin/src/main/resources/application.yml

@@ -82,9 +82,9 @@ spring:
     host: 127.0.0.1
     # 端口,默认为6379
     # port: 6378
-    port: 6378
+    port: 6379
     # 数据库索引
-    database: 5
+    database: 11
     # 密码
     password:
     # 连接超时时间
@@ -166,5 +166,10 @@ OpenAuthorization2:
     CALLBACK: http://124.126.77.28:8080/oauth/callback
 
 template:
+  #模版下载地址
   urlDownload: D:\zkqy\test\AddAmmunitionPickingUp.java
+  urlDownloadVue: C:\nginx-1.22.1\script\template.Vue
+  #脚本地址
   urluPload: D:\zkqy\test\a\
+  #页面组件地址
+  pageUrl: C:\nginx-1.22.1\script\

+ 9 - 1
zkqy-common/src/main/java/com/zkqy/common/config/ZkqyConfig.java

@@ -5,7 +5,7 @@ import org.springframework.stereotype.Component;
 
 /**
  * 读取项目相关配置
- * 
+ *
  * @author zkqy
  */
 @Component
@@ -132,4 +132,12 @@ public class ZkqyConfig
     {
         return getProfile() + "/upload";
     }
+
+
+    /**
+     * 获取上传流程xml路径
+     */
+    public static String getUploadXMLPath() {
+        return getProfile() + "/upload/bpmnXML";
+    }
 }

+ 54 - 0
zkqy-common/src/main/java/com/zkqy/common/config/bpm/BpmProperties.java

@@ -0,0 +1,54 @@
+package com.zkqy.common.config.bpm;
+
+/**
+ * @author hmc
+ * @date 2023-11-02 18:07
+ * @Description:
+ */
+//@Configuration
+public class BpmProperties {
+
+
+    //根据用户id查询当前用户所具备的角色key的ip地址 MAIN_ROLESKEY_IP
+    //@Value("${parameter.ip.MAIN_ROLESKEY_IP}")
+    //public String mainRolesKeyIp;
+
+    // 根据scriptKey获取节点脚本详情地址
+    //@Value("${parameter.ip.GET_NODESCRIPT_IP}")
+    //public String getNodeScriptIp;
+    // crm项目查看角色下是否存在真实用户
+    //@Value("${parameter.ip.QUERY_USER_EXISTS_BY_ROLEKEY_IP}")
+    //public String queryUserExistsByRoleKeyIp;
+    // crm项目查看一组用户是否存在真实用户
+    //@Value("${parameter.ip.QUERY_USER_EXISTS_BY_USERIDS_IP}")
+    //public String queryUserExistsByUserIdsIp;
+    // form项目共通修改接口
+    //@Value("${parameter.ip.FORM_COMMON_UPDATE_IP}")
+    //public String formCommonUpdateIp;
+    // FORM_COMMON_GETINFO_IP
+    //@Value("${parameter.ip.FORM_COMMON_GETINFO_IP}")
+    //public String formCommonGetInfoIp;
+    // form项目共通新增接口
+    //@Value("${parameter.ip.FORM_COMMON_BATCHINSERT_IP}")
+    //public String formCommonBatchInsertIp;
+    // CRM项目根据scriptKeys获取节点脚本详情地址
+    //@Value("${parameter.ip.GET_NODESCRIPTS_IP}")
+    //public String getNodeScriptsIp;
+    // 租户字典:根据字典类型得到当前字典下的所有的数据
+    //@Value("${parameter.ip.GET_TENANT_DICT_IP}")
+    //public String getTenantDictValIp;
+    // form项目共通新增接口
+    //@Value("${parameter.ip.FORM_COMMON_INSERT_IP}")
+    //public String formCommonInsertIp;
+    //form项目根据表单Fid查询详情接口
+    //@Value("${parameter.ip.FORM_GET_FORM_INFO_IP}")
+    //public String formGetFormInfoIp;
+    //from项目根据groupKey查询表格组信息
+    //@Value("${parameter.ip.FORM_GET_GROUP_INFO_IP}")
+    //public String formGetGroupInfoIp;
+    //CRM项目获取所有模板库数据表信息
+    //@Value("${parameter.ip.CRM_QUERY_TEMPLATEBASE_TABLE}")
+    //public String crmQueryTemplateBaseTableIp;
+
+
+}

+ 21 - 0
zkqy-common/src/main/java/com/zkqy/common/constant/BpmNodeTypeConstants.java

@@ -0,0 +1,21 @@
+package com.zkqy.common.constant;
+
+/**
+ * 流程节点类型常量信息
+ */
+public class BpmNodeTypeConstants {
+
+    /** 开始节点 */
+    public static final String START_EVENT = "startEvent";
+
+    /** 结束节点 */
+    public static final String END_EVENT = "endEvent";
+
+    /** 用户任务 */
+    public static final String USER_TASK = "userTask";
+
+    /** 异常任务 */
+    public static final String EXCEPTION_TASK = "exceptionTask";
+
+
+}

+ 36 - 1
zkqy-common/src/main/java/com/zkqy/common/constant/HttpStatus.java

@@ -2,7 +2,7 @@ package com.zkqy.common.constant;
 
 /**
  * 返回状态码
- * 
+ *
  * @author zkqy
  */
 public class HttpStatus
@@ -91,4 +91,39 @@ public class HttpStatus
      * 系统警告消息
      */
     public static final int WARN = 601;
+
+
+
+
+    /**
+     * 系统警告消息:数据源信息未找到!认证失败。
+     */
+    public static final int ERRORWARN = 602;
+
+    /**
+     * 系统警告消息:sql执行异常
+     */
+    public static final int SQLERROR = 603;
+
+    /**
+     * 流程数据    执行出现问题
+     */
+    public static final int EXECUTEPROCESS = 604;
+
+    /**
+     * 流程执行出现问题,执行脚本异常
+     */
+    public static final int SCRIPTEXCEPTION = 605;
+
+
+    /**
+     * 流程执行出现问题,执行脚本异常
+     */
+    public static final int PROCESSERROR = 606;
+
+    /**
+     * 系统警告消息:按钮执行逻辑异常
+     *
+     */
+    public static final int BTNERROR = 607;
 }

+ 160 - 0
zkqy-common/src/main/java/com/zkqy/common/core/domain/BaseEntityPlus.java

@@ -0,0 +1,160 @@
+package com.zkqy.common.core.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Entity基类
+ *
+ * @author zkqy
+ */
+public class BaseEntityPlus implements Serializable {
+
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 搜索值
+     */
+    @JsonIgnore
+    private String searchValue;
+
+    /**
+     * 创建者Id
+     */
+    private Long createById;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 修改者Id
+     */
+    private Long updateById;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 请求参数
+     */
+    @JsonInclude(JsonInclude.Include.NON_EMPTY)
+    private Map<String, Object> params;
+
+    public String getSearchValue() {
+        return searchValue;
+    }
+
+    public void setSearchValue(String searchValue) {
+        this.searchValue = searchValue;
+    }
+
+    public Long getCreateById() {
+        return createById == null ? SecurityUtils.getUserId() : createById;
+    }
+
+    public void setCreateById(Long createById) {
+        this.createById = createById;
+    }
+
+    public String getCreateBy() {
+        return createBy == null||createBy=="" ? SecurityUtils.getUsername() : createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime == null || createTime.toString().isEmpty() ? getNowData() : createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Long getUpdateById() {
+        return updateById == null ? SecurityUtils.getUserId() : updateById;
+    }
+
+    public void setUpdateById(Long updateById) {
+        this.updateById = updateById;
+    }
+
+    public String getUpdateBy() {
+        return updateBy == null||createBy=="" ? SecurityUtils.getUsername() : updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime == null || updateTime.toString().isEmpty() ? getNowData() : updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Map<String, Object> getParams() {
+        if (params == null) {
+            params = new HashMap<>();
+        }
+        return params;
+    }
+
+    public void setParams(Map<String, Object> params) {
+        this.params = params;
+    }
+
+    Date getNowData() {
+        String dateString = DateUtils.getTime();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            Date date = sdf.parse(dateString);
+            return date;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return new Date();
+    }
+}

+ 54 - 20
zkqy-common/src/main/java/com/zkqy/common/utils/PlaceholderReplacer.java

@@ -7,37 +7,71 @@ import java.nio.file.Paths;
 public class PlaceholderReplacer {
 
     // 组件id占位符
-    private static final String PLACEHOLDEROne = "${componentId}";
+    private  String PLACEHOLDEROne = "${componentId}";
 
     // 组件ID
-    private static final String COMPONENT_ID = "3c374962955748cab96865977f608af6";
+    private  String COMPONENT_ID = "3c374962955748cab96865977f608af6";
 
     // 类描述信息占位符
-    private  static  final  String PLACEHOLDERTwo="desc";
+    private    String PLACEHOLDERTwo="desc";
 
     // 类描述信息
-    private  static  final  String PLACEHOLDERDesc="组装节点";
+    private   String PLACEHOLDERDesc="组装节点";
 
+    public String getPLACEHOLDEROne() {
+        return PLACEHOLDEROne;
+    }
 
+    public void setPLACEHOLDEROne(String PLACEHOLDEROne) {
+        this.PLACEHOLDEROne = PLACEHOLDEROne;
+    }
 
-    public static void main(String[] args) {
-        try {
-            // 文件路径
-            String filePath = "D:\\zkqy\\test\\AddAmmunitionPickingUp.java";
+    public String getCOMPONENT_ID() {
+        return COMPONENT_ID;
+    }
 
-            // 新文件路径(基于组件ID生成)
-            String newFilePath = "D:\\zkqy\\test\\" + COMPONENT_ID + ".java";
+    public void setCOMPONENT_ID(String COMPONENT_ID) {
+        this.COMPONENT_ID = COMPONENT_ID;
+    }
 
-            // 第一步:将注解中的内容替换为占位符
-            String filledContent = replaceWithPlaceholder(filePath);
+    public String getPLACEHOLDERTwo() {
+        return PLACEHOLDERTwo;
+    }
 
-            // 第二步:将填充好的内容写入新文件
-            createNewFile(newFilePath, filledContent);
+    public void setPLACEHOLDERTwo(String PLACEHOLDERTwo) {
+        this.PLACEHOLDERTwo = PLACEHOLDERTwo;
+    }
 
-            System.out.println("操作完成!");
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
+    public String getPLACEHOLDERDesc() {
+        return PLACEHOLDERDesc;
+    }
+
+    public void setPLACEHOLDERDesc(String PLACEHOLDERDesc) {
+        this.PLACEHOLDERDesc = PLACEHOLDERDesc;
+    }
+
+
+
+
+
+    public static void main(String[] args) {
+//        try {
+//            // 文件路径
+//            String filePath = "D:\\zkqy\\test\\AddAmmunitionPickingUp.java";
+//
+//            // 新文件路径(基于组件ID生成)
+//            String newFilePath = "D:\\zkqy\\test\\" + COMPONENT_ID + ".java";
+//
+//            // 第一步:将注解中的内容替换为占位符
+//            String filledContent = replaceWithPlaceholder(filePath);
+//
+//            // 第二步:将填充好的内容写入新文件
+//            createNewFile(newFilePath, filledContent);
+//
+//            System.out.println("操作完成!");
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
     }
 
     /**
@@ -46,7 +80,7 @@ public class PlaceholderReplacer {
      * @param filePath 文件路径
      * @throws IOException 如果发生 I/O 错误
      */
-    private static String replaceWithPlaceholder(String filePath) throws IOException {
+    public String replaceWithPlaceholder(String filePath) throws IOException {
         // 读取文件内容
         StringBuilder contentBuilder = new StringBuilder();
         try (BufferedReader reader = Files.newBufferedReader(Paths.get(filePath))) {
@@ -101,7 +135,7 @@ public class PlaceholderReplacer {
      * @param content     要写入的内容
      * @throws IOException 如果发生 I/O 错误
      */
-    private static void createNewFile(String newFilePath, String content) throws IOException {
+    public  void createNewFile(String newFilePath, String content) throws IOException {
         File newFile = new File(newFilePath);
 
         // 确保父目录存在

+ 10 - 0
zkqy-common/src/main/java/com/zkqy/common/utils/SecurityUtils.java

@@ -14,6 +14,16 @@ import com.zkqy.common.exception.ServiceException;
  * @author zkqy
  */
 public class SecurityUtils {
+    /**
+     * 获取数据源名称
+     */
+    public static String getDatabaseName() {
+        try {
+            return getLoginUser().getUser().getTenant().getDataSource().getDatabaseName();
+        } catch (Exception e) {
+            throw new ServiceException("获取获取数据名称异常", HttpStatus.UNAUTHORIZED);
+        }
+    }
     /**
      * 用户ID
      **/

+ 59 - 29
zkqy-common/src/main/java/com/zkqy/common/utils/StringUtils.java

@@ -6,13 +6,16 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 import org.springframework.util.AntPathMatcher;
 import com.zkqy.common.constant.Constants;
 import com.zkqy.common.core.text.StrFormatter;
 
 /**
  * 字符串工具类
- * 
+ *
  * @author zkqy
  */
 public class StringUtils extends org.apache.commons.lang3.StringUtils
@@ -23,9 +26,36 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
     /** 下划线 */
     private static final char SEPARATOR = '_';
 
+    /**
+     * 不带T
+     */
+    private static final String DATE_TIME_PATTERN1 = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}";
+
+    /**
+     * 带T的
+     */
+    private static final String DATE_TIME_PATTERN2 = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}";
+
+    /**
+     * 带T的只有十分
+     */
+    private static final String DATE_TIME_PATTERN3 = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}";
+
+
+    private static final Pattern pattern1 = Pattern.compile(DATE_TIME_PATTERN1);
+    private static final Pattern pattern2 = Pattern.compile(DATE_TIME_PATTERN2);
+
+    private static final Pattern pattern3 = Pattern.compile(DATE_TIME_PATTERN3);
+
+    public static boolean isValidDateTimeFormat(String input) {
+        Matcher matcher1 = pattern1.matcher(input);
+        Matcher matcher2 = pattern2.matcher(input);
+        Matcher matcher3= pattern3.matcher(input);
+        return matcher1.matches() || matcher2.matches()||matcher3.matches();
+    }
     /**
      * 获取参数不为空值
-     * 
+     *
      * @param value defaultValue 要判断的value
      * @return value 返回值
      */
@@ -36,7 +66,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个Collection是否为空, 包含List,Set,Queue
-     * 
+     *
      * @param coll 要判断的Collection
      * @return true:为空 false:非空
      */
@@ -47,7 +77,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个Collection是否非空,包含List,Set,Queue
-     * 
+     *
      * @param coll 要判断的Collection
      * @return true:非空 false:空
      */
@@ -58,7 +88,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个对象数组是否为空
-     * 
+     *
      * @param objects 要判断的对象数组
      ** @return true:为空 false:非空
      */
@@ -69,7 +99,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个对象数组是否非空
-     * 
+     *
      * @param objects 要判断的对象数组
      * @return true:非空 false:空
      */
@@ -80,7 +110,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个Map是否为空
-     * 
+     *
      * @param map 要判断的Map
      * @return true:为空 false:非空
      */
@@ -91,7 +121,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个Map是否为空
-     * 
+     *
      * @param map 要判断的Map
      * @return true:非空 false:空
      */
@@ -102,7 +132,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个字符串是否为空串
-     * 
+     *
      * @param str String
      * @return true:为空 false:非空
      */
@@ -113,7 +143,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个字符串是否为非空串
-     * 
+     *
      * @param str String
      * @return true:非空串 false:空串
      */
@@ -124,7 +154,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个对象是否为空
-     * 
+     *
      * @param object Object
      * @return true:为空 false:非空
      */
@@ -135,7 +165,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个对象是否非空
-     * 
+     *
      * @param object Object
      * @return true:非空 false:空
      */
@@ -146,7 +176,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * * 判断一个对象是否是数组类型(Java基本型别的数组)
-     * 
+     *
      * @param object 对象
      * @return true:是数组 false:不是数组
      */
@@ -165,7 +195,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 截取字符串
-     * 
+     *
      * @param str 字符串
      * @param start 开始
      * @return 结果
@@ -196,7 +226,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 截取字符串
-     * 
+     *
      * @param str 字符串
      * @param start 开始
      * @param end 结束
@@ -248,7 +278,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
      * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
      * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
      * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
-     * 
+     *
      * @param template 文本模板,被替换的部分用 {} 表示
      * @param params 参数值
      * @return 格式化后的文本
@@ -264,7 +294,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 是否为http(s)://开头
-     * 
+     *
      * @param link 链接
      * @return 结果
      */
@@ -275,7 +305,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 字符串转set
-     * 
+     *
      * @param str 字符串
      * @param sep 分隔符
      * @return set集合
@@ -287,7 +317,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 字符串转list
-     * 
+     *
      * @param str 字符串
      * @param sep 分隔符
      * @param filterBlank 过滤纯空白
@@ -424,7 +454,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 是否包含字符串
-     * 
+     *
      * @param str 验证字符串
      * @param strs 字符串组
      * @return 包含返回true
@@ -446,7 +476,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld
-     * 
+     *
      * @param name 转换前的下划线大写方式命名的字符串
      * @return 转换后的驼峰式命名的字符串
      */
@@ -520,7 +550,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 查找指定字符串是否匹配指定字符串列表中的任意一个字符串
-     * 
+     *
      * @param str 指定字符串
      * @param strs 需要检查的字符串数组
      * @return 是否匹配
@@ -542,11 +572,11 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
     }
 
     /**
-     * 判断url是否与规则配置: 
-     * ? 表示单个字符; 
-     * * 表示一层路径内的任意字符串,不可跨层级; 
+     * 判断url是否与规则配置:
+     * ? 表示单个字符;
+     * * 表示一层路径内的任意字符串,不可跨层级;
      * ** 表示任意层路径;
-     * 
+     *
      * @param pattern 匹配规则
      * @param url 需要匹配的url
      * @return
@@ -565,7 +595,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 数字左边补齐0,使之达到指定长度。注意,如果数字转换为字符串后,长度大于size,则只保留 最后size个字符。
-     * 
+     *
      * @param num 数字对象
      * @param size 字符串指定长度
      * @return 返回数字的字符串格式,该字符串为指定长度。
@@ -577,7 +607,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
 
     /**
      * 字符串左补齐。如果原始字符串s长度大于size,则只保留最后size个字符。
-     * 
+     *
      * @param s 原始字符串
      * @param size 字符串指定长度
      * @param c 用于补齐的字符
@@ -611,4 +641,4 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
         }
         return sb.toString();
     }
-}
+}

+ 30 - 0
zkqy-common/src/main/java/com/zkqy/common/utils/bpm/BpmUtils.java

@@ -0,0 +1,30 @@
+package com.zkqy.common.utils.bpm;
+
+import org.springframework.stereotype.Component;
+
+/**
+ * @author hmc
+ * @date 2023-11-02 15:29
+ * @Description:
+ */
+@Component
+public class BpmUtils {
+
+    //@Autowired
+    //private BpmProperties bpmProperties;
+
+    /**
+     * 根据用户查询角色key
+     *
+     * @param userId
+     * @return
+     */
+    //public String[] getRoleKeyByUserId(Long userId) {
+    //    RestTemplate restTemplate = new RestTemplate();
+    //    String ret = restTemplate.getForObject(bpmProperties.mainRolesKeyIp + userId, String.class);
+    //    JSONObject jsonObject = JSONObject.parseObject(ret);
+    //    String s = (String) jsonObject.get("rolesKey");
+    //    String[] strings = JSONObject.parseObject(s, String[].class);
+    //    return strings;
+    //}
+}

+ 320 - 0
zkqy-common/src/main/java/com/zkqy/common/utils/bpm/XmlDataParserUtils.java

@@ -0,0 +1,320 @@
+package com.zkqy.common.utils.bpm;
+
+import cn.hutool.core.util.XmlUtil;
+import com.zkqy.common.utils.uuid.IdUtils;
+import org.w3c.dom.*;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathFactory;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 解析流程xml工具类
+ */
+public class XmlDataParserUtils {
+
+    /**
+     * 解析流程xml文件内容,得到开始节点和下一个节点
+     *
+     * @param xmlData xml内容
+     * @return
+     */
+    public static Map<String, String> getStartNodeAndNextNode(String xmlData) {
+        Map<String, String> map = new HashMap<>();
+        Document document = XmlUtil.parseXml(xmlData);
+        //获得XML文档根节点
+        Element elementG = XmlUtil.getRootElement(document);
+        //获取bpmn:process节点
+        Element bpmnProcessEvent = XmlUtil.getElement(elementG, "bpmn:process");
+        //获取开始节点并得到开始节点ID
+        Element bpmnStartEvent = XmlUtil.getElement(bpmnProcessEvent, "bpmn:startEvent");
+        String startNode = bpmnStartEvent.getAttribute("id");
+        map.put("startNode", startNode);
+
+        //获取所有序列流(顺序),循环得到开始节点的下一个节点
+        NodeList elementsByTagName = elementG.getElementsByTagName("bpmn:sequenceFlow");
+        for (int i = 0; i < elementsByTagName.getLength(); i++) {
+            if (startNode.equals(elementsByTagName.item(i).getAttributes().getNamedItem("sourceRef").getNodeValue())) {
+                map.put("nextNode", elementsByTagName.item(i).getAttributes().getNamedItem("targetRef").getNodeValue());
+                break;
+            }
+        }
+        return map;
+    }
+
+    /**
+     * 新增用户异常节点
+     *
+     * @param userTaskTagName 新增节点名称
+     * @param nextTagId       新增节点下一节点ID
+     * @return
+     */
+    public static String addUserTaskTag(String xmlData, String newUserTaskTagId, String userTaskTagName, String nextTagId) throws Exception {
+        //新增节点标签ID
+//        String newUserTaskTagId = "Flow_" + IdUtils.fastSimpleUUID().substring(0,7);
+        //新增序列流ID
+        String newSequenceFlowId = "Flow_" + IdUtils.fastUUID();
+        //新增节点下一节点序列流ID
+        String sequenceFlowId = null;
+        //上一节点标签ID
+        String previousId = null;
+        //将xml文件内容转成Document对象
+        Document document = XmlUtil.parseXml(xmlData);
+        //获得XML文档根节点
+        Element elementG = XmlUtil.getRootElement(document);
+        //获取所有序列流(顺序),循环得到新增节点下一节点序列流ID、上一节点标签ID,修改新增节点下一节点序列流sourceRef为新增节点标签ID
+        NodeList elementsByTagName = elementG.getElementsByTagName("bpmn:sequenceFlow");
+        for (int i = 0; i < elementsByTagName.getLength(); i++) {
+            if (nextTagId.equals(elementsByTagName.item(i).getAttributes().getNamedItem("targetRef").getNodeValue())) {
+                sequenceFlowId = elementsByTagName.item(i).getAttributes().getNamedItem("id").getNodeValue();
+                previousId = elementsByTagName.item(i).getAttributes().getNamedItem("sourceRef").getNodeValue();
+                //获取当前元素
+                Node node = elementsByTagName.item(i);
+                //创建一个新的Attr对象,并设置新的属性值
+                Attr newAttr = document.createAttribute("sourceRef");
+                newAttr.setValue(newUserTaskTagId);
+                node.getAttributes().setNamedItem(newAttr);
+                break;
+            }
+        }
+        //创建异常任务节点标签
+        Element userTaskTag = document.createElement("bpmn:exceptionTask");
+        userTaskTag.setAttribute("id", newUserTaskTagId);
+        userTaskTag.setAttribute("name", userTaskTagName);
+        userTaskTag.appendChild(document.createTextNode("\n\t\t"));
+        Element userTaskTagChild1 = document.createElement("bpmn:incoming");
+        userTaskTagChild1.setTextContent(newSequenceFlowId);
+        userTaskTag.appendChild(userTaskTagChild1);
+        userTaskTag.appendChild(document.createTextNode("\n\t\t"));
+        Element userTaskTagChild2 = document.createElement("bpmn:outgoing");
+        userTaskTagChild2.setTextContent(sequenceFlowId);
+        userTaskTag.appendChild(userTaskTagChild2);
+        userTaskTag.appendChild(document.createTextNode("\n\t"));
+        //创建新序列流标签
+        Element sequenceFlowTag = document.createElement("bpmn:sequenceFlow");
+        sequenceFlowTag.setAttribute("id", newSequenceFlowId);
+        sequenceFlowTag.setAttribute("sourceRef", previousId);
+        sequenceFlowTag.setAttribute("targetRef", newUserTaskTagId);
+        //修改上一节点bpmn:outgoing和下一节点bpmn:incoming
+        //获取bpmn:process节点
+        Element bpmnProcessEvent = XmlUtil.getElement(elementG, "bpmn:process");
+        NodeList bpmnProcessNextLevelEventList = bpmnProcessEvent.getChildNodes();
+        for (int i = 0; i < bpmnProcessNextLevelEventList.getLength(); i++) {
+            Node node = bpmnProcessNextLevelEventList.item(i);
+            //判断node是元素节点,并且是Element实例
+            if (node.getNodeType() == Node.ELEMENT_NODE && node instanceof Element) {
+                Element element = (Element) node;
+                String id = element.getAttribute("id");
+                if (id.equals(previousId)) {
+                    Element elementOutgoing = XmlUtil.getElement(element, "bpmn:outgoing");
+                    elementOutgoing.setTextContent(newSequenceFlowId);
+                }
+                if (id.equals(nextTagId)) {
+                    Element elementOutgoing = XmlUtil.getElement(element, "bpmn:incoming");
+                    elementOutgoing.setTextContent(sequenceFlowId);
+                    //插入标签
+                    Node parentNode = element.getParentNode();
+                    parentNode.insertBefore(userTaskTag, element);
+
+                    parentNode.insertBefore(sequenceFlowTag, element);
+                }
+            }
+        }
+        //将document对象转成字符串
+        TransformerFactory transformerFactory = TransformerFactory.newInstance();
+        Transformer transformer = transformerFactory.newTransformer();
+        DOMSource source = new DOMSource(document);
+        StreamResult result = new StreamResult(new StringWriter()); // 使用StringWriter来将结果输出为字符串
+        transformer.transform(source, result);
+        String data = result.getWriter().toString();
+        return data;
+    }
+
+    /**
+     * 获取下一节点key
+     *
+     * @param xmlData     xml内容
+     * @param taskNodeKey 当前节点key
+     * @return
+     */
+    public static String getNextNodeKey(String xmlData, String taskNodeKey) {
+        //下一节点key
+        String nextTaskNodeKey = null;
+        Document document = XmlUtil.parseXml(xmlData);
+        //获得XML文档根节点
+        Element elementG = XmlUtil.getRootElement(document);
+        //获取所有序列流(顺序),循环得到开始节点的下一个节点
+        NodeList elementsByTagName = elementG.getElementsByTagName("bpmn:sequenceFlow");
+        for (int i = 0; i < elementsByTagName.getLength(); i++) {
+            if (taskNodeKey.equals(elementsByTagName.item(i).getAttributes().getNamedItem("sourceRef").getNodeValue())) {
+                nextTaskNodeKey = elementsByTagName.item(i).getAttributes().getNamedItem("targetRef").getNodeValue();
+            }
+        }
+        return nextTaskNodeKey;
+    }
+
+    /**
+     * 按顺序获取流程节点
+     *
+     * @param xmlData xml内容
+     * @return
+     */
+    public static Map<String, Object> getAllNodeKey(String xmlData) {
+        Map<String, Object> resultMap = new HashMap<>();
+        //将xml文件内容转成Document对象
+        Document document = XmlUtil.parseXml(xmlData);
+        //获得XML文档根节点
+        Element elementG = XmlUtil.getRootElement(document);
+        //获取bpmn:process节点
+        Element bpmnProcessEvent = XmlUtil.getElement(elementG, "bpmn:process");
+        //获取所有序列流(顺序)
+        NodeList elementsByTagName = elementG.getElementsByTagName("bpmn:sequenceFlow");
+        //获取开始节点并得到开始节点ID
+        Element bpmnStartEvent = XmlUtil.getElement(bpmnProcessEvent, "bpmn:startEvent");
+        String startNode = bpmnStartEvent.getAttribute("id");
+        Map<String, Integer> map = new HashMap<>();
+        map.put(startNode, 0);
+        List<String> list = new ArrayList<>();
+        list.add(startNode);
+        resultMap.put("nodeList", list);
+        resultMap.put("nodeMap", recursiveParse(elementsByTagName, startNode, map, list));
+        return resultMap;
+    }
+
+    //递归查找下一节点
+    private static Map<String, Integer> recursiveParse(NodeList nodeList, String currentId, Map<String, Integer> map, List<String> list) {
+        for (int i = 0; i < nodeList.getLength(); i++) {
+            Node node = nodeList.item(i);
+            if (node.getNodeType() == Node.ELEMENT_NODE) {
+                Element element = (Element) node;
+                String sourceRef = element.getAttribute("sourceRef");
+                String targetRef = element.getAttribute("targetRef");
+                if (sourceRef.equals(currentId)) {
+                    map.put(targetRef, map.size() + 1);
+                    list.add(targetRef);
+                    recursiveParse(nodeList, targetRef, map, list);
+                    break;
+                }
+            }
+        }
+        return map;
+    }
+
+    /**
+     * 清空异常节点
+     *
+     * @param xmlData       xml内容
+     * @param currentNodeId 当前节点ID
+     * @return
+     */
+    public static String clearExceptionTask(String xmlData, String currentNodeId) {
+        //将xml文件内容转成Document对象
+        Document document = XmlUtil.parseXml(xmlData);
+        //得到当前所有节点ID
+        Map<String, Object> allNodeKey = getAllNodeKey(xmlData);
+        List<String> list = (List<String>) allNodeKey.get("nodeList");
+        //截取当前节点后的所有ID
+        list = new ArrayList<>(list.subList(list.indexOf(currentNodeId), list.size()));
+        //获取所有异常节点,筛选出正常节点和异常节点
+        List<String> exceptionList = new ArrayList<>();
+        List<String> endList = new ArrayList<>();
+        for (int i = 1; i < list.size(); i++) {
+            Element node = getElement(document, list.get(i), "id");
+            String nodeTagName = node.getTagName();
+            if (nodeTagName.equals("bpmn:exceptionTask")) {
+                exceptionList.add(list.get(i));
+            } else {
+                endList.add(list.get(i));
+            }
+        }
+        endList.add(0, list.get(0));
+        // 循环正常节点,修改下一个节点指向
+        for (int i = 0; i < endList.size() - 1; i++) {
+            //获取下一节点
+            Element nextNode = getElement(document, endList.get(i + 1), "id");
+            //得到上一个正常节点得序列流元素,修改targetRef指向下一个节点ID
+            Element currentSequenceFlow = getElement(document, endList.get(i), "sourceRef");
+            currentSequenceFlow.setAttribute("targetRef", endList.get(i + 1));
+            //修改下一个节点入口incoming指向上一个节点序列流ID
+            Element elementOutgoing = XmlUtil.getElement(nextNode, "bpmn:incoming");
+            elementOutgoing.setTextContent(currentSequenceFlow.getAttributes().getNamedItem("id").getNodeValue());
+        }
+        //删除异常节点及异常节点序列线
+        for (int i = 0; i < exceptionList.size(); i++) {
+            //获取异常节点-删除
+            Element node = getElement(document, exceptionList.get(i), "id");
+            node.getParentNode().removeChild(node);
+            //获取序列线-删除
+            Element nodeXian = getElement(document, exceptionList.get(i), "sourceRef");
+            nodeXian.getParentNode().removeChild(nodeXian);
+        }
+        //将document对象转成字符串
+        String data = "";
+        try {
+            TransformerFactory transformerFactory = TransformerFactory.newInstance();
+            Transformer transformer = transformerFactory.newTransformer();
+            DOMSource source = new DOMSource(document);
+            StreamResult result = new StreamResult(new StringWriter()); // 使用StringWriter来将结果输出为字符串
+            transformer.transform(source, result);
+            data = result.getWriter().toString();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return data;
+    }
+
+    /**
+     * 获取元素
+     *
+     * @param document
+     * @param nodeAttributeId   节点属性ID
+     * @param nodeAttributeName 节点属性名称
+     * @return
+     */
+    private static Element getElement(Document document, String nodeAttributeId, String nodeAttributeName) {
+        try {
+            String expression = "//*[namespace-uri()='http://www.omg.org/spec/BPMN/20100524/MODEL'][@" + nodeAttributeName + "='" + nodeAttributeId + "']";
+            XPath xpath = XPathFactory.newInstance().newXPath();
+            NodeList nodeList = (NodeList) xpath.compile(expression).evaluate(document, XPathConstants.NODESET);
+            // 遍历节点列表并获取第一个匹配的元素
+            Element userTaskElement = null;
+            for (int i = 0; i < nodeList.getLength(); i++) {
+                Node node = nodeList.item(i);
+                if (node instanceof Element) {
+                    userTaskElement = (Element) node;
+                    break;
+                }
+            }
+            // 检查是否找到了匹配的元素
+            if (userTaskElement != null) {
+                return userTaskElement;
+            } else {
+                System.out.println("No matching user task element found.");
+                return null;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+
+    public static String getNodeType(String xmlData, String nodeKey) {
+        //将xml文件内容转成Document对象
+        Document document = XmlUtil.parseXml(xmlData);
+        Element nodeinfo = getElement(document, nodeKey, "id");
+        // 返回当前节点类型
+        return nodeinfo.getLocalName();
+    }
+
+}

+ 40 - 0
zkqy-process-execution/pom.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <artifactId>zkqy</artifactId>
+        <groupId>com.zkqy</groupId>
+        <version>3.8.5</version>
+    </parent>
+
+    <artifactId>zkqy-process-execution</artifactId>
+    <name>zkqy-process-execution</name>
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.zkqy</groupId>
+            <artifactId>zkqy-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.zkqy</groupId>
+            <artifactId>zkqy-system</artifactId>
+        </dependency>
+        <!-- https://mvnrepository.com/artifact/com.google.zxing/core -->
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.5.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.datatype</groupId>
+            <artifactId>jackson-datatype-jsr310</artifactId>
+        </dependency>
+
+    </dependencies>
+
+</project>

+ 105 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmApprovalStatusController.java

@@ -0,0 +1,105 @@
+package com.zkqy.execution.produce.dispersed.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.execution.produce.dispersed.entity.BpmApprovalStatus;
+import com.zkqy.execution.produce.dispersed.service.IBpmApprovalStatusService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 审批数据条中间Controller
+ *
+ * @author hzh
+ * @date 2024-01-31
+ */
+@RestController
+@RequestMapping("/system/approvalStatus")
+public class BpmApprovalStatusController extends BaseController
+{
+    @Autowired
+    private IBpmApprovalStatusService bpmApprovalStatusService;
+
+    /**
+     * 查询审批数据条中间列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:approvalStatus:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BpmApprovalStatus bpmApprovalStatus)
+    {
+        startPage();
+        List<BpmApprovalStatus> list = bpmApprovalStatusService.selectBpmApprovalStatusList(bpmApprovalStatus);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出审批数据条中间列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:approvalStatus:export')")
+    @Log(title = "审批数据条中间", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BpmApprovalStatus bpmApprovalStatus)
+    {
+        List<BpmApprovalStatus> list = bpmApprovalStatusService.selectBpmApprovalStatusList(bpmApprovalStatus);
+        ExcelUtil<BpmApprovalStatus> util = new ExcelUtil<BpmApprovalStatus>(BpmApprovalStatus.class);
+        util.exportExcel(response, list, "审批数据条中间数据");
+    }
+
+    /**
+     * 获取审批数据条中间详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:approvalStatus:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bpmApprovalStatusService.selectBpmApprovalStatusById(id));
+    }
+
+    /**
+     * 新增审批数据条中间
+     */
+    @PreAuthorize("@ss.hasPermi('system:approvalStatus:add')")
+    @Log(title = "审批数据条中间", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BpmApprovalStatus bpmApprovalStatus)
+    {
+        return toAjax(bpmApprovalStatusService.insertBpmApprovalStatus(bpmApprovalStatus));
+    }
+
+    /**
+     * 修改审批数据条中间
+     */
+    @PreAuthorize("@ss.hasPermi('system:approvalStatus:edit')")
+    @Log(title = "审批数据条中间", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BpmApprovalStatus bpmApprovalStatus)
+    {
+        return toAjax(bpmApprovalStatusService.updateBpmApprovalStatus(bpmApprovalStatus));
+    }
+
+    /**
+     * 删除审批数据条中间
+     */
+    @PreAuthorize("@ss.hasPermi('system:approvalStatus:remove')")
+    @Log(title = "审批数据条中间", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(bpmApprovalStatusService.deleteBpmApprovalStatusByIds(ids));
+    }
+}

+ 94 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmExecuteNodeController.java

@@ -0,0 +1,94 @@
+package com.zkqy.execution.produce.dispersed.controller;
+
+
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.core.page.TableDataInfo;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNode;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 节点执行(记录)Controller
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@RestController
+@RequestMapping("/system/execute/node")
+public class BpmExecuteNodeController extends BaseController {
+
+    @Autowired
+    private IBpmExecuteNodeService bpmExecuteNodeService;
+
+    /**
+     * 查询节点执行(记录)列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:node:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BpmExecuteNode bpmExecuteNode) {
+        startPage();
+        List<BpmExecuteNode> list = bpmExecuteNodeService.selectBpmExecuteNodeList(bpmExecuteNode);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出节点执行(记录)列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:node:export')")
+    @Log(title = "节点执行日志", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BpmExecuteNode bpmExecuteNode) {
+        List<BpmExecuteNode> list = bpmExecuteNodeService.selectBpmExecuteNodeList(bpmExecuteNode);
+        ExcelUtil<BpmExecuteNode> util = new ExcelUtil<BpmExecuteNode>(BpmExecuteNode.class);
+        util.exportExcel(response, list, "节点执行(记录)数据");
+    }
+
+    /**
+     * 获取节点执行(记录)详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:node:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(bpmExecuteNodeService.selectBpmExecuteNodeById(id));
+    }
+
+    /**
+     * 新增节点执行(记录)
+     */
+    @PreAuthorize("@ss.hasPermi('system:node:add')")
+    @Log(title = "节点执行日志", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BpmExecuteNode bpmExecuteNode) {
+        return toAjax(bpmExecuteNodeService.insertBpmExecuteNode(bpmExecuteNode));
+    }
+
+    /**
+     * 修改节点执行(记录)
+     */
+    //@PreAuthorize("@ss.hasPermi('system:node:edit')")
+    @Log(title = "节点执行日志", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BpmExecuteNode bpmExecuteNode) {
+        return toAjax(bpmExecuteNodeService.updateBpmExecuteNode(bpmExecuteNode));
+    }
+
+    /**
+     * 删除节点执行(记录)
+     */
+    @PreAuthorize("@ss.hasPermi('system:node:remove')")
+    @Log(title = "节点执行日志", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(bpmExecuteNodeService.deleteBpmExecuteNodeByIds(ids));
+    }
+
+}

+ 93 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmExecuteNodeFormController.java

@@ -0,0 +1,93 @@
+package com.zkqy.execution.produce.dispersed.controller;
+
+
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.core.page.TableDataInfo;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeForm;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeFormService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+
+/**
+ * 执行节点单Controller
+ *
+ * @author zkqy
+ * @date 2023-12-07
+ */
+@RestController
+@RequestMapping("/system/form")
+public class BpmExecuteNodeFormController extends BaseController {
+    @Autowired
+    private IBpmExecuteNodeFormService bpmExecuteNodeFormService;
+
+    /**
+     * 查询执行节点单列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:form:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BpmExecuteNodeForm bpmExecuteNodeForm) {
+        startPage();
+        List<BpmExecuteNodeForm> list = bpmExecuteNodeFormService.selectBpmExecuteNodeFormList(bpmExecuteNodeForm);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出执行节点单列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:form:export')")
+    @Log(title = "执行节点表单", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BpmExecuteNodeForm bpmExecuteNodeForm) {
+        List<BpmExecuteNodeForm> list = bpmExecuteNodeFormService.selectBpmExecuteNodeFormList(bpmExecuteNodeForm);
+        ExcelUtil<BpmExecuteNodeForm> util = new ExcelUtil<BpmExecuteNodeForm>(BpmExecuteNodeForm.class);
+        util.exportExcel(response, list, "执行节点单数据");
+    }
+
+    /**
+     * 获取执行节点单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:form:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(bpmExecuteNodeFormService.selectBpmExecuteNodeFormById(id));
+    }
+
+    /**
+     * 新增执行节点单
+     */
+    @PreAuthorize("@ss.hasPermi('system:form:add')")
+    @Log(title = "执行节点表单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BpmExecuteNodeForm bpmExecuteNodeForm) {
+        return toAjax(bpmExecuteNodeFormService.insertBpmExecuteNodeForm(bpmExecuteNodeForm));
+    }
+
+    /**
+     * 修改执行节点单
+     */
+    @PreAuthorize("@ss.hasPermi('system:form:edit')")
+    @Log(title = "执行节点表单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BpmExecuteNodeForm bpmExecuteNodeForm) {
+        return toAjax(bpmExecuteNodeFormService.updateBpmExecuteNodeForm(bpmExecuteNodeForm));
+    }
+
+    /**
+     * 删除执行节点单
+     */
+    @PreAuthorize("@ss.hasPermi('system:form:remove')")
+    @Log(title = "执行节点表单", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(bpmExecuteNodeFormService.deleteBpmExecuteNodeFormByIds(ids));
+    }
+}

+ 92 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmExecuteNodeMiddleController.java

@@ -0,0 +1,92 @@
+package com.zkqy.execution.produce.dispersed.controller;
+
+
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.core.page.TableDataInfo;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeMiddle;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeMiddleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 执行流程用户、节点关联脚本中间Controller
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@RestController
+@RequestMapping("/system/execute/middle")
+public class BpmExecuteNodeMiddleController extends BaseController {
+    @Autowired
+    private IBpmExecuteNodeMiddleService bpmExecuteNodeMiddleService;
+
+    /**
+     * 查询执行流程用户、节点关联脚本中间列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:middle:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BpmExecuteNodeMiddle bpmExecuteNodeMiddle) {
+        startPage();
+        List<BpmExecuteNodeMiddle> list = bpmExecuteNodeMiddleService.selectBpmExecuteNodeMiddleList(bpmExecuteNodeMiddle);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出执行流程用户、节点关联脚本中间列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:middle:export')")
+    @Log(title = "执行流程日志", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BpmExecuteNodeMiddle bpmExecuteNodeMiddle) {
+        List<BpmExecuteNodeMiddle> list = bpmExecuteNodeMiddleService.selectBpmExecuteNodeMiddleList(bpmExecuteNodeMiddle);
+        ExcelUtil<BpmExecuteNodeMiddle> util = new ExcelUtil<BpmExecuteNodeMiddle>(BpmExecuteNodeMiddle.class);
+        util.exportExcel(response, list, "执行流程用户、节点关联脚本中间数据");
+    }
+
+    /**
+     * 获取执行流程用户、节点关联脚本中间详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:middle:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(bpmExecuteNodeMiddleService.selectBpmExecuteNodeMiddleById(id));
+    }
+
+    /**
+     * 新增执行流程用户、节点关联脚本中间
+     */
+    @PreAuthorize("@ss.hasPermi('system:middle:add')")
+    @Log(title = "执行流程日志", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BpmExecuteNodeMiddle bpmExecuteNodeMiddle) {
+        return toAjax(bpmExecuteNodeMiddleService.insertBpmExecuteNodeMiddle(bpmExecuteNodeMiddle));
+    }
+
+    /**
+     * 修改执行流程用户、节点关联脚本中间
+     */
+    @PreAuthorize("@ss.hasPermi('system:middle:edit')")
+    @Log(title = "执行流程日志", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BpmExecuteNodeMiddle bpmExecuteNodeMiddle) {
+        return toAjax(bpmExecuteNodeMiddleService.updateBpmExecuteNodeMiddle(bpmExecuteNodeMiddle));
+    }
+
+    /**
+     * 删除执行流程用户、节点关联脚本中间
+     */
+    @PreAuthorize("@ss.hasPermi('system:middle:remove')")
+    @Log(title = "执行流程日志", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(bpmExecuteNodeMiddleService.deleteBpmExecuteNodeMiddleByIds(ids));
+    }
+}

+ 147 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmExecuteProcessController.java

@@ -0,0 +1,147 @@
+package com.zkqy.execution.produce.dispersed.controller;
+
+
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.core.page.TableDataInfo;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.runbpm.PreExecutionToolClass;
+import com.zkqy.execution.produce.dispersed.runbpm.RunImplementationClass;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteProcessService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+
+/**
+ * 流程执行任务Controller
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@RestController
+@RequestMapping("/system/execute/process")
+public class BpmExecuteProcessController extends BaseController {
+    @Autowired
+    private IBpmExecuteProcessService bpmExecuteProcessService;
+    @Autowired
+    private RunImplementationClass implementationClass;
+    @Autowired
+    private PreExecutionToolClass PreExecutionToolClass;
+
+    /**
+     * 查询流程执行任务列表
+     */
+    // @PreAuthorize("@ss.hasPermi('system:process:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BpmExecuteProcess bpmExecuteProcess) throws Exception {
+        startPage();
+        return getDataTable(bpmExecuteProcessService.selectBpmExecuteProcessList(bpmExecuteProcess));
+    }
+
+    /**
+     * 查询当前用户已提交的审批流程记录
+     */
+    @GetMapping("/listApproveLog")
+    public TableDataInfo listApproveLog(BpmExecuteProcess bpmExecuteProcess) throws Exception {
+        startPage();
+        return getDataTable(bpmExecuteProcessService.selectBpmExecuteProcessApproveLogList(bpmExecuteProcess));
+    }
+
+    @GetMapping("listLog")
+    public TableDataInfo listLog(BpmExecuteProcess bpmExecuteProcess) {
+        startPage();
+        return getDataTable(bpmExecuteProcessService.selectBpmExecuteProcessListLog(bpmExecuteProcess));
+    }
+
+    @GetMapping("listLogfjqy")
+    public TableDataInfo listLogFjqy(BpmExecuteProcess bpmExecuteProcess) {
+        startPage();
+        return getDataTable(bpmExecuteProcessService.selectBpmExecuteProcessListLogFjqy(bpmExecuteProcess));
+    }
+
+    /**
+     * 导出流程执行任务列表
+     */
+    // @PreAuthorize("@ss.hasPermi('system:process:export')")
+    @Log(title = "流程执行任务", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BpmExecuteProcess bpmExecuteProcess) {
+//        List<BpmExecuteProcess> list = bpmExecuteProcessService.selectBpmExecuteProcessList(bpmExecuteProcess);
+//        ExcelUtil<BpmExecuteProcess> util = new ExcelUtil<BpmExecuteProcess>(BpmExecuteProcess.class);
+//        util.exportExcel(response, list, "流程执行任务数据");
+    }
+
+    /**
+     * 获取流程执行任务详细信息
+     */
+    // @PreAuthorize("@ss.hasPermi('system:process:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(bpmExecuteProcessService.selectBpmExecuteProcessById(id));
+    }
+
+    /**
+     * 新增流程执行任务
+     */
+    // @PreAuthorize("@ss.hasPermi('system:process:add')")
+    @Log(title = "流程执行任务", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BpmExecuteProcess bpmExecuteProcess) {
+        return toAjax(bpmExecuteProcessService.insertBpmExecuteProcess(bpmExecuteProcess));
+    }
+
+    /**
+     * 修改流程执行任务
+     */
+    // @PreAuthorize("@ss.hasPermi('system:process:edit')")
+    @Log(title = "流程执行任务", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BpmExecuteProcess bpmExecuteProcess) {
+        return toAjax(bpmExecuteProcessService.updateBpmExecuteProcess(bpmExecuteProcess));
+    }
+
+    /**
+     * 删除流程执行任务
+     */
+    // @PreAuthorize("@ss.hasPermi('system:process:remove')")
+    @Log(title = "流程执行任务", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(bpmExecuteProcessService.deleteBpmExecuteProcessByIds(ids));
+    }
+
+    /**
+     * 共通投产流程接口
+     */
+    @Log(title = "投产执行流程", businessType = BusinessType.INSERT)
+    @PostMapping("/productionScheduling")
+    public AjaxResult productionScheduling(@RequestBody CommonEntity commonEntity) {
+        return bpmExecuteProcessService.productionScheduling(commonEntity);
+    }
+
+    /**
+     * 查询节点表单信息
+     */
+    @GetMapping("/getNodeFormInfos")
+    public AjaxResult getNodeFormInfos(Map<String, String> nodeForm) {
+        return AjaxResult.success(PreExecutionToolClass.getNodeFormInfos(nodeForm));
+    }
+
+
+    /**
+     * 化纤项目查询流程执行任务列表
+     */
+     @PreAuthorize("@ss.hasPermi('system:process:list')")
+    @GetMapping("/list/chemicalFibreList")
+    public TableDataInfo ChemicalFibreList(BpmExecuteProcess bpmExecuteProcess) throws Exception {
+        startPage();
+        return getDataTable(bpmExecuteProcessService.selectChemicalFibreBpmExecuteProcessList(bpmExecuteProcess));
+    }
+
+}

+ 167 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmRunController.java

@@ -0,0 +1,167 @@
+package com.zkqy.execution.produce.dispersed.controller;
+
+
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.BpmRunNodeFormDateVo;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.BpmRunNodeFromVo;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.BpmRunNodeVo;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.TriggerExceptionVO;
+import com.zkqy.execution.produce.dispersed.runbpm.PreExecutionToolClass;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeService;
+import com.zkqy.execution.produce.utils.EchoNodeFormData;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+/**
+ * 流程执行共通Controller
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@RestController
+@RequestMapping("/system/runbpm/process")
+public class BpmRunController extends BaseController {
+
+    @Autowired
+    private PreExecutionToolClass ipreExecutionToolClass;
+
+    @Autowired
+    private IBpmExecuteNodeService bpmExecuteNodeService;
+
+    @Autowired
+    private EchoNodeFormData echoNodeFormData;
+
+    /**
+     * 共通投产流程接口
+     */
+    @Log(title = "投产执行流程", businessType = BusinessType.INSERT)
+    @PostMapping("/productionScheduling")
+    public AjaxResult productionScheduling(@RequestBody CommonEntity commonEntity) {
+        return AjaxResult.success(ipreExecutionToolClass.ReadyToExecute(commonEntity));
+    }
+
+    /**
+     * 共通执行节点接口 工业离散型
+     */
+    @Log(title = "执行流程节点", businessType = BusinessType.INSERT)
+    @PostMapping("/processNodeExecution")
+    public AjaxResult processNodeExecution(BpmRunNodeVo bpmRunNodeVo, @RequestParam("fileXML") MultipartFile fileXML) {
+        if (!fileXML.isEmpty()) {
+            try {
+                // 解析得到当前文件中的内容
+                byte[] bytes = fileXML.getBytes();
+                String xmlContent = new String(bytes);
+                bpmRunNodeVo.setTaskProcessXmlContent(xmlContent);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return ipreExecutionToolClass.executionNode(bpmRunNodeVo);
+    }
+
+    /**
+     * 共通执行节点接口 工业离散型
+     */
+    @Log(title = "执行流程节点", businessType = BusinessType.INSERT)
+    @PostMapping("/processNodeExecutionFjqy")
+    public AjaxResult processNodeExecutionFjqy(BpmRunNodeVo bpmRunNodeVo, @RequestParam("fileXML") MultipartFile fileXML) {
+        if (!fileXML.isEmpty()) {
+            try {
+                // 解析得到当前文件中的内容
+                byte[] bytes = fileXML.getBytes();
+                String xmlContent = new String(bytes);
+                bpmRunNodeVo.setTaskProcessXmlContent(xmlContent);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return AjaxResult.success(ipreExecutionToolClass.executionNode(bpmRunNodeVo));
+    }
+
+    /**
+     * 共通执行节点接口 审批类型
+     */
+    @Log(title = "执行流程节点", businessType = BusinessType.INSERT)
+    @PostMapping("/processNodeExecutionApproval")
+    public AjaxResult processNodeExecutionApproval(BpmRunNodeVo bpmRunNodeVo, @RequestParam("fileXML") MultipartFile fileXML) {
+        if (!fileXML.isEmpty()) {
+            try {
+                // 解析得到当前文件中的内容
+                byte[] bytes = fileXML.getBytes();
+                String xmlContent = new String(bytes);
+                bpmRunNodeVo.setTaskProcessXmlContent(xmlContent);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return AjaxResult.success(ipreExecutionToolClass.approvalNode(bpmRunNodeVo));
+    }
+
+
+    /**
+     * 共通执行节点表单回显数据接口
+     */
+    @GetMapping("/processNodeFormInfoData")
+    public AjaxResult processNodeFormInfoData(BpmRunNodeFromVo bpmRunNodeFromVo) {
+        return AjaxResult.success(ipreExecutionToolClass.processNodeFormInfoData(bpmRunNodeFromVo));
+    }
+
+    /**
+     * 共通执行节点表单回显数据接口
+     * * 审批获取表单模板
+     */
+    @GetMapping("/processNodeFormTemplate")
+    public AjaxResult processNodeFormTemplate(BpmRunNodeFromVo bpmRunNodeFromVo) {
+        return AjaxResult.success(ipreExecutionToolClass.getProcessNodeFormTemplate(bpmRunNodeFromVo));
+    }
+
+    /**
+     * 处理流程节点表单提交的业务数据
+     *
+     * @param bpmRunNodeFormDateVo
+     * @return
+     */
+    @PostMapping("/submitNodeForm")
+    public AjaxResult handleSubmitFormData(@RequestBody BpmRunNodeFormDateVo bpmRunNodeFormDateVo) {
+        return AjaxResult.success(echoNodeFormData.handleSubmitForm(bpmRunNodeFormDateVo));
+    }
+
+
+    /**
+     * 触发异常节点
+     */
+    @PostMapping("/triggerExceptionNode")
+    public AjaxResult triggerExceptionNode(@RequestBody TriggerExceptionVO vo) throws Exception {
+        return toAjax(bpmExecuteNodeService.triggerExceptionNode(vo));
+    }
+
+    /**
+     * 发起人撤销当前申请的数据条
+     *
+     * @param bpmRunNodeVo 当前节点信息
+     * @param fileXML      当前流程xml
+     * @return
+     */
+    @PostMapping("/revokeApplication")
+    public AjaxResult revokeApplication(BpmRunNodeVo bpmRunNodeVo, @RequestParam("fileXML") MultipartFile fileXML) {
+        if (!fileXML.isEmpty()) {
+            try {
+                // 解析得到当前文件中的内容
+                byte[] bytes = fileXML.getBytes();
+                String xmlContent = new String(bytes);
+                bpmRunNodeVo.setTaskProcessXmlContent(xmlContent);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return AjaxResult.success(ipreExecutionToolClass.revokeApplication(bpmRunNodeVo));
+    }
+
+}

+ 39 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/controller/BpmScriptController.java

@@ -0,0 +1,39 @@
+package com.zkqy.execution.produce.dispersed.controller;
+
+
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.IScriptEntity;
+import com.zkqy.execution.produce.dispersed.runbpm.RunImplementationClass;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * @author hanzihang
+ * @date 2023/11/16 6:14 PM
+ */
+@RestController
+@RequestMapping("/system/script")
+public class BpmScriptController {
+
+    @Resource
+    private RunImplementationClass irunImplementationClass;
+
+    /**
+     * 共通投产流程接口
+     */
+    @Log(title = "脚本执行接口", businessType = BusinessType.UPDATE)
+    @PostMapping("/execute")
+    public AjaxResult productionScheduling(@RequestBody String scriptKey)   {
+        IScriptEntity iScriptEntity = new IScriptEntity();
+        iScriptEntity.setScriptFlowKey(scriptKey); // 脚本别名
+        return AjaxResult.success(irunImplementationClass.RunScriptImplementationClassLogicCode(iScriptEntity,scriptKey));
+        //return AjaxResult.success(ipreExecutionToolClass.ReadyToExecute(intoProduction));
+    }
+
+}

+ 113 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmApprovalStatus.java

@@ -0,0 +1,113 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 审批数据条中间对象 bpm_approval_status
+ *
+ * @author hzh
+ * @date 2024-01-31
+ */
+public class BpmApprovalStatus extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 表名某张表的数据表名
+     */
+    @Excel(name = "表名某张表的数据表名")
+    private String tableName;
+
+    /**
+     * 审批数据条主键
+     */
+    @Excel(name = "审批数据条主键")
+    private String tableId;
+
+    /**
+     * 审批状态 (0:已提交、1:已通过、2:不通过、4:驳回、5:审批中)
+     */
+    @Excel(name = "审批状态 (0:已提交、1:已通过、2:不通过、3:撤销、4:驳回、5:审批中)")
+    private String approvalState;
+
+    /**
+     * 流程任务key
+     */
+    @Excel(name = "流程任务key")
+    private String taskKey;
+
+    // 根据流程编号修改审批中间表状态
+    public BpmApprovalStatus(String approvalState, String taskKey) {
+        this.approvalState = approvalState;
+        this.taskKey = taskKey;
+    }
+
+    public BpmApprovalStatus() {
+    }
+
+    public BpmApprovalStatus(Long id, String tableName, String tableId, String approvalState, String taskKey) {
+        this.id = id;
+        this.tableName = tableName;
+        this.tableId = tableId;
+        this.approvalState = approvalState;
+        this.taskKey = taskKey;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableId(String tableId) {
+        this.tableId = tableId;
+    }
+
+    public String getTableId() {
+        return tableId;
+    }
+
+    public void setApprovalState(String approvalState) {
+        this.approvalState = approvalState;
+    }
+
+    public String getApprovalState() {
+        return approvalState;
+    }
+
+    public void setTaskKey(String taskKey) {
+        this.taskKey = taskKey;
+    }
+
+    public String getTaskKey() {
+        return taskKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("tableName", getTableName())
+                .append("tableId", getTableId())
+                .append("approvalState", getApprovalState())
+                .append("taskKey", getTaskKey())
+                .toString();
+    }
+}

+ 371 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteNode.java

@@ -0,0 +1,371 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+
+import com.zkqy.common.core.domain.BaseEntityPlus;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.io.Serializable;
+
+/**
+ * 节点执行 对象 bpm_execute_node
+ *
+ * @author hzh
+ * @date 2023-12-18
+ */
+public class BpmExecuteNode extends BaseEntityPlus implements Serializable {
+    private static final long serialVersionUID = 1123123L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 当前执行流程任务编号task_key
+     */
+    @Excel(name = "当前执行流程任务编号task_key")
+    private String taskProcessKey;
+
+    /**
+     * 节点编号
+     */
+    @Excel(name = "节点编号")
+    private String taskNodeKey;
+
+    /**
+     * 节点名称
+     */
+    @Excel(name = "节点名称")
+    private String taskNodeName;
+
+    /**
+     * 表单编号
+     */
+    @Excel(name = "表单编号")
+    private String taskNodeFormKey;
+
+    /**
+     * 任务节点表单类型
+     */
+    private String taskNodeFormType;
+
+    /**
+     * 节点类型(当前节点是判断、网关、普通节点等等。。。。。)
+     */
+    @Excel(name = "节点类型", readConverterExp = "当=前节点是判断、网关、普通节点等等。。。。。")
+    private String taskNodeType;
+
+    /**
+     * 节点执行类型(0:true:自动执行;1:false:手动执行)
+     */
+    private String taskNodeExecuteType;
+
+    /**
+     * 节点前(节点前后只能执行脚本,下一个节点前相当于当前节点后)
+     */
+    @Excel(name = "节点前", readConverterExp = "节=点前后只能执行脚本,下一个节点前相当于当前节点后")
+    private String taskNodeBefore;
+
+    /**
+     * 节点后(节点前只存在一个)
+     */
+    @Excel(name = "节点后", readConverterExp = "节=点前只存在一个")
+    private String taskNodeAfter;
+
+    /**
+     * 角色权限 虚拟角色-》勾选用户存储中间表
+     */
+    @Excel(name = "角色权限 虚拟角色-》勾选用户存储中间表")
+    private String taskNodeRolePermission;
+
+    /**
+     * 节点描述
+     */
+    @Excel(name = "节点描述")
+    private String taskRemark;
+
+    /**
+     * 节点任务执行数量记录(件数)
+     */
+    @Excel(name = "节点任务执行数量记录", readConverterExp = "件=数")
+    private String taskNodeNumber;
+
+    /**
+     * 节点任务执行重量记录(重量)
+     */
+    @Excel(name = "节点任务执行重量记录", readConverterExp = "重=量")
+    private String taskNodeWeight;
+
+    /**
+     * 节点状态(0:未执行 1:已执行)
+     */
+    @Excel(name = "节点状态(0:未执行 1:已执行)")
+    private String taskNodeState;
+
+    /**
+     * 节点其他状态记录(1,2,3具体对应字典,当前节点工序状态)
+     */
+    @Excel(name = "节点状态(0:未执行 1:已执行)")
+    private String taskNodeOtherState;
+
+    /**
+     * 流程发起的时添设置该任务的优先级
+     */
+    @Excel(name = "流程发起的时添设置该任务的优先级")
+    private String taskPriority;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task1;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task2;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task3;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task4;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task5;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    private String delFlag;
+
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    public void setTaskNodeName(String taskNodeName) {
+        this.taskNodeName = taskNodeName;
+    }
+
+    public String getTaskNodeName() {
+        return taskNodeName;
+    }
+
+    public void setTaskNodeFormKey(String taskNodeFormKey) {
+        this.taskNodeFormKey = taskNodeFormKey;
+    }
+
+    public String getTaskNodeFormKey() {
+        return taskNodeFormKey;
+    }
+
+    public String getTaskNodeFormType() {
+        return taskNodeFormType;
+    }
+
+    public void setTaskNodeFormType(String taskNodeFormType) {
+        this.taskNodeFormType = taskNodeFormType;
+    }
+
+    public void setTaskNodeType(String taskNodeType) {
+        this.taskNodeType = taskNodeType;
+    }
+
+    public String getTaskNodeType() {
+        return taskNodeType;
+    }
+
+    public String getTaskNodeExecuteType() {
+        return taskNodeExecuteType;
+    }
+
+    public void setTaskNodeExecuteType(String taskNodeExecuteType) {
+        this.taskNodeExecuteType = taskNodeExecuteType;
+    }
+
+    public void setTaskNodeBefore(String taskNodeBefore) {
+        this.taskNodeBefore = taskNodeBefore;
+    }
+
+    public String getTaskNodeBefore() {
+        return taskNodeBefore;
+    }
+
+    public void setTaskNodeAfter(String taskNodeAfter) {
+        this.taskNodeAfter = taskNodeAfter;
+    }
+
+    public String getTaskNodeAfter() {
+        return taskNodeAfter;
+    }
+
+    public void setTaskNodeRolePermission(String taskNodeRolePermission) {
+        this.taskNodeRolePermission = taskNodeRolePermission;
+    }
+
+    public String getTaskNodeRolePermission() {
+        return taskNodeRolePermission;
+    }
+
+    public void setTaskRemark(String taskRemark) {
+        this.taskRemark = taskRemark;
+    }
+
+    public String getTaskRemark() {
+        return taskRemark;
+    }
+
+    public void setTaskNodeNumber(String taskNodeNumber) {
+        this.taskNodeNumber = taskNodeNumber;
+    }
+
+    public String getTaskNodeNumber() {
+        return taskNodeNumber;
+    }
+
+    public void setTaskNodeWeight(String taskNodeWeight) {
+        this.taskNodeWeight = taskNodeWeight;
+    }
+
+    public String getTaskNodeWeight() {
+        return taskNodeWeight;
+    }
+
+    public void setTaskNodeState(String taskNodeState) {
+        this.taskNodeState = taskNodeState;
+    }
+
+    public String getTaskNodeState() {
+        return taskNodeState;
+    }
+
+    public String getTaskNodeOtherState() {
+        return taskNodeOtherState;
+    }
+
+    public void setTaskNodeOtherState(String taskNodeOtherState) {
+        this.taskNodeOtherState = taskNodeOtherState;
+    }
+
+    public void setTaskPriority(String taskPriority) {
+        this.taskPriority = taskPriority;
+    }
+
+    public String getTaskPriority() {
+        return taskPriority;
+    }
+
+    public void setTask1(String task1) {
+        this.task1 = task1;
+    }
+
+    public String getTask1() {
+        return task1;
+    }
+
+    public void setTask2(String task2) {
+        this.task2 = task2;
+    }
+
+    public String getTask2() {
+        return task2;
+    }
+
+    public void setTask3(String task3) {
+        this.task3 = task3;
+    }
+
+    public String getTask3() {
+        return task3;
+    }
+
+    public void setTask4(String task4) {
+        this.task4 = task4;
+    }
+
+    public String getTask4() {
+        return task4;
+    }
+
+    public void setTask5(String task5) {
+        this.task5 = task5;
+    }
+
+    public String getTask5() {
+        return task5;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return (delFlag == null || delFlag.isEmpty()) ? "0" : delFlag;
+    }
+
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("taskProcessKey", getTaskProcessKey())
+                .append("taskNodeKey", getTaskNodeKey())
+                .append("taskNodeName", getTaskNodeName())
+                .append("taskNodeFormKey", getTaskNodeFormKey())
+                .append("taskNodeFormType", getTaskNodeFormType())
+                .append("taskNodeType", getTaskNodeType())
+                .append("taskNodeExecuteType", getTaskNodeExecuteType())
+                .append("taskNodeBefore", getTaskNodeBefore())
+                .append("taskNodeAfter", getTaskNodeAfter())
+                .append("taskNodeRolePermission", getTaskNodeRolePermission())
+                .append("taskRemark", getTaskRemark())
+                .append("taskNodeNumber", getTaskNodeNumber())
+                .append("taskNodeWeight", getTaskNodeWeight())
+                .append("taskNodeState", getTaskNodeState())
+                .append("taskNodeOtherState", getTaskNodeOtherState())
+                .append("taskPriority", getTaskPriority())
+                .append("task1", getTask1())
+                .append("task2", getTask2())
+                .append("task3", getTask3())
+                .append("task4", getTask4())
+                .append("task5", getTask5())
+                .append("delFlag", getDelFlag())
+                .append("createById", getCreateById())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .toString();
+    }
+}

+ 138 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteNodeForm.java

@@ -0,0 +1,138 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+
+/**
+ * 执行节点单对象 bpm_execute_node_form
+ *
+ * @author zkqy
+ * @date 2023-12-07
+ */
+public class BpmExecuteNodeForm extends BaseEntityPlus {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 任务流程编码
+     */
+    @Excel(name = "任务流程编码")
+    private String taskProcessKey;
+
+    /**
+     * 节点编码
+     */
+    @Excel(name = "节点编码")
+    private String taskNodeKey;
+
+    /**
+     * 脚本编码
+     */
+    @Excel(name = "脚本编码")
+    private String taskScriptKey;
+
+    /**
+     * 表单编码
+     */
+    @Excel(name = "表单编码")
+    private String taskNodeFormKey;
+
+    /**
+     * 表单类型
+     */
+    @Excel(name = "表单类型")
+    private String taskNodeFormType;
+
+    /**
+     * 表单内容
+     */
+    @Excel(name = "表单内容")
+    private String taskNodeFormContent;
+
+    // 节点名称
+    private String taskNodeName;
+
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskScriptKey() {
+        return taskScriptKey;
+    }
+
+    public void setTaskScriptKey(String taskScriptKey) {
+        this.taskScriptKey = taskScriptKey;
+    }
+
+    public String getTaskNodeFormKey() {
+        return taskNodeFormKey;
+    }
+
+    public void setTaskNodeFormKey(String taskNodeFormKey) {
+        this.taskNodeFormKey = taskNodeFormKey;
+    }
+
+    public String getTaskNodeFormType() {
+        return taskNodeFormType;
+    }
+
+    public void setTaskNodeFormType(String taskNodeFormType) {
+        this.taskNodeFormType = taskNodeFormType;
+    }
+
+    public String getTaskNodeFormContent() {
+        return taskNodeFormContent;
+    }
+
+    public void setTaskNodeFormContent(String taskNodeFormContent) {
+        this.taskNodeFormContent = taskNodeFormContent;
+    }
+
+    public String getTaskNodeName() {
+        return taskNodeName;
+    }
+
+    public void setTaskNodeName(String taskNodeName) {
+        this.taskNodeName = taskNodeName;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("BpmExecuteNodeForm{");
+        sb.append("id=").append(id);
+        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", taskScriptKey='").append(taskScriptKey).append('\'');
+        sb.append(", taskNodeFormKey='").append(taskNodeFormKey).append('\'');
+        sb.append(", taskNodeFormType='").append(taskNodeFormType).append('\'');
+        sb.append(", taskNodeFormContent='").append(taskNodeFormContent).append('\'');
+        sb.append(", taskNodeFormName='").append(taskNodeName).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+}

+ 441 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteNodeLog.java

@@ -0,0 +1,441 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+
+import java.io.Serializable;
+
+/**
+ * 节点执行(记录)对象 bpm_execute_node
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+public class BpmExecuteNodeLog extends BaseEntityPlus implements Serializable {
+
+    private static final long serialVersionUID = 1123123L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+
+    /**
+     * 节点回滚,记录某个节点发起的操作
+     */
+    private String taskParentNodeKey;
+
+    /**
+     * 当前执行流程任务编号task_key
+     */
+    @Excel(name = "当前执行流程任务编号task_key")
+    private String taskProcessKey;
+
+    /**
+     * 节点编号
+     */
+    @Excel(name = "节点编号")
+    private String taskNodeKey;
+
+    /**
+     * 节点名称
+     */
+    @Excel(name = "节点名称")
+    private String taskNodeName;
+
+    /**
+     * 表单编号
+     */
+    @Excel(name = "表单编号")
+    private String taskNodeFormKey;
+
+    /**
+     * 任务节点表单类型
+     */
+    private String taskNodeFormType;
+
+    /**
+     * 节点类型(当前节点是判断、网关、普通节点等等。。。。。)
+     */
+    @Excel(name = "节点类型", readConverterExp = "当=前节点是判断、网关、普通节点等等。。。。。")
+    private String taskNodeType;
+
+    /**
+     * 节点执行类型(0:true:自动执行;1:false:手动执行)
+     */
+    private String taskNodeExecuteType;
+
+    /**
+     * 节点前(节点前后只能执行脚本,下一个节点前相当于当前节点后)
+     */
+    @Excel(name = "节点前", readConverterExp = "节=点前后只能执行脚本,下一个节点前相当于当前节点后")
+    private String taskNodeBefore;
+
+    /**
+     * 节点后(节点前只存在一个)
+     */
+    @Excel(name = "节点后", readConverterExp = "节=点前只存在一个")
+    private String taskNodeAfter;
+
+    /**
+     * 角色权限 虚拟角色-》勾选用户存储中间表
+     */
+    @Excel(name = "角色权限 虚拟角色-》勾选用户存储中间表")
+    private String taskNodeRolePermission;
+
+    /**
+     * 节点描述
+     */
+    @Excel(name = "节点描述")
+    private String taskRemark;
+
+    /**
+     * 节点任务执行数量记录(件数)
+     */
+    @Excel(name = "节点任务执行数量记录", readConverterExp = "件=数")
+    private String taskNodeNumber;
+
+    /**
+     * 节点任务执行重量记录(重量)
+     */
+    @Excel(name = "节点任务执行重量记录", readConverterExp = "重=量")
+    private String taskNodeWeight;
+
+    /**
+     * 节点状态(0:未执行 1:已执行)
+     */
+    @Excel(name = "节点状态(0:未执行 1:已执行)")
+    private String taskNodeState;
+
+    /**
+     * 节点其他状态记录(1,2,3具体对应字典,当前节点工序状态)
+     */
+    @Excel(name = "节点状态(0:未执行 1:已执行)")
+    private String taskNodeOtherState;
+
+    /**
+     * 流程发起的时添设置该任务的优先级
+     */
+    @Excel(name = "流程发起的时添设置该任务的优先级")
+    private String taskPriority;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task1;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task2;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task3;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task4;
+
+    /**
+     * 执行节点备用列(未启用)
+     */
+    @Excel(name = "执行节点备用列", readConverterExp = "未=启用")
+    private String task5;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    private String delFlag;
+
+
+    public BpmExecuteNodeLog(Long id, String taskParentNodeKey, String taskProcessKey, String taskNodeKey, String taskNodeName, String taskNodeFormKey, String taskNodeFormType, String taskNodeType, String taskNodeExecuteType, String taskNodeBefore, String taskNodeAfter, String taskNodeRolePermission, String taskRemark, String taskNodeNumber, String taskNodeWeight, String taskNodeState, String taskNodeOtherState, String taskPriority, String task1, String task2, String task3, String task4, String task5, String delFlag) {
+        this.id = id;
+        this.taskParentNodeKey = taskParentNodeKey;
+        this.taskProcessKey = taskProcessKey;
+        this.taskNodeKey = taskNodeKey;
+        this.taskNodeName = taskNodeName;
+        this.taskNodeFormKey = taskNodeFormKey;
+        this.taskNodeFormType = taskNodeFormType;
+        this.taskNodeType = taskNodeType;
+        this.taskNodeExecuteType = taskNodeExecuteType;
+        this.taskNodeBefore = taskNodeBefore;
+        this.taskNodeAfter = taskNodeAfter;
+        this.taskNodeRolePermission = taskNodeRolePermission;
+        this.taskRemark = taskRemark;
+        this.taskNodeNumber = taskNodeNumber;
+        this.taskNodeWeight = taskNodeWeight;
+        this.taskNodeState = taskNodeState;
+        this.taskNodeOtherState = taskNodeOtherState;
+        this.taskPriority = taskPriority;
+        this.task1 = task1;
+        this.task2 = task2;
+        this.task3 = task3;
+        this.task4 = task4;
+        this.task5 = task5;
+        this.delFlag = delFlag;
+    }
+
+    public BpmExecuteNodeLog() {
+    }
+
+    public BpmExecuteNodeLog(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public BpmExecuteNodeLog(BpmExecuteNode bpmExecuteNode) {
+        this.id = bpmExecuteNode.getId();
+        this.taskProcessKey = bpmExecuteNode.getTaskProcessKey();
+        this.taskNodeKey = bpmExecuteNode.getTaskNodeKey();
+        this.taskNodeName = bpmExecuteNode.getTaskNodeName();
+        this.taskNodeFormKey = bpmExecuteNode.getTaskNodeFormKey();
+        this.taskNodeFormType = bpmExecuteNode.getTaskNodeFormType();
+        this.taskNodeType = bpmExecuteNode.getTaskNodeType();
+        this.taskNodeExecuteType = bpmExecuteNode.getTaskNodeExecuteType();
+        this.taskNodeBefore = bpmExecuteNode.getTaskNodeBefore();
+        this.taskNodeAfter = bpmExecuteNode.getTaskNodeAfter();
+        this.taskNodeRolePermission = bpmExecuteNode.getTaskNodeRolePermission();
+        this.taskRemark = bpmExecuteNode.getTaskRemark();
+        this.taskNodeNumber = bpmExecuteNode.getTaskNodeNumber();
+        this.taskNodeWeight = bpmExecuteNode.getTaskNodeWeight();
+        this.taskNodeState = bpmExecuteNode.getTaskNodeState();
+        this.taskNodeOtherState = bpmExecuteNode.getTaskNodeOtherState();
+        this.taskPriority = bpmExecuteNode.getTaskPriority();
+        this.task1 = bpmExecuteNode.getTask1();
+        this.task2 = bpmExecuteNode.getTask2();
+        this.task3 = bpmExecuteNode.getTask3();
+        this.task4 = bpmExecuteNode.getTask4();
+        this.task5 = bpmExecuteNode.getTask5();
+        this.delFlag = bpmExecuteNode.getDelFlag();
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getTaskParentNodeKey() {
+        return taskParentNodeKey;
+    }
+
+    public void setTaskParentNodeKey(String taskParentNodeKey) {
+        this.taskParentNodeKey = taskParentNodeKey;
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeName() {
+        return taskNodeName;
+    }
+
+    public void setTaskNodeName(String taskNodeName) {
+        this.taskNodeName = taskNodeName;
+    }
+
+    public String getTaskNodeFormKey() {
+        return taskNodeFormKey;
+    }
+
+    public void setTaskNodeFormKey(String taskNodeFormKey) {
+        this.taskNodeFormKey = taskNodeFormKey;
+    }
+
+    public String getTaskNodeFormType() {
+        return taskNodeFormType;
+    }
+
+    public void setTaskNodeFormType(String taskNodeFormType) {
+        this.taskNodeFormType = taskNodeFormType;
+    }
+
+    public String getTaskNodeType() {
+        return taskNodeType;
+    }
+
+    public void setTaskNodeType(String taskNodeType) {
+        this.taskNodeType = taskNodeType;
+    }
+
+    public String getTaskNodeExecuteType() {
+        return taskNodeExecuteType;
+    }
+
+    public void setTaskNodeExecuteType(String taskNodeExecuteType) {
+        this.taskNodeExecuteType = taskNodeExecuteType;
+    }
+
+    public String getTaskNodeBefore() {
+        return taskNodeBefore;
+    }
+
+    public void setTaskNodeBefore(String taskNodeBefore) {
+        this.taskNodeBefore = taskNodeBefore;
+    }
+
+    public String getTaskNodeAfter() {
+        return taskNodeAfter;
+    }
+
+    public void setTaskNodeAfter(String taskNodeAfter) {
+        this.taskNodeAfter = taskNodeAfter;
+    }
+
+    public String getTaskNodeRolePermission() {
+        return taskNodeRolePermission;
+    }
+
+    public void setTaskNodeRolePermission(String taskNodeRolePermission) {
+        this.taskNodeRolePermission = taskNodeRolePermission;
+    }
+
+    public String getTaskRemark() {
+        return taskRemark;
+    }
+
+    public void setTaskRemark(String taskRemark) {
+        this.taskRemark = taskRemark;
+    }
+
+    public String getTaskNodeNumber() {
+        return taskNodeNumber;
+    }
+
+    public void setTaskNodeNumber(String taskNodeNumber) {
+        this.taskNodeNumber = taskNodeNumber;
+    }
+
+    public String getTaskNodeWeight() {
+        return taskNodeWeight;
+    }
+
+    public void setTaskNodeWeight(String taskNodeWeight) {
+        this.taskNodeWeight = taskNodeWeight;
+    }
+
+    public String getTaskNodeState() {
+        return taskNodeState;
+    }
+
+    public void setTaskNodeState(String taskNodeState) {
+        this.taskNodeState = taskNodeState;
+    }
+
+    public String getTaskNodeOtherState() {
+        return taskNodeOtherState;
+    }
+
+    public void setTaskNodeOtherState(String taskNodeOtherState) {
+        this.taskNodeOtherState = taskNodeOtherState;
+    }
+
+    public String getTaskPriority() {
+        return taskPriority;
+    }
+
+    public void setTaskPriority(String taskPriority) {
+        this.taskPriority = taskPriority;
+    }
+
+    public String getTask1() {
+        return task1;
+    }
+
+    public void setTask1(String task1) {
+        this.task1 = task1;
+    }
+
+    public String getTask2() {
+        return task2;
+    }
+
+    public void setTask2(String task2) {
+        this.task2 = task2;
+    }
+
+    public String getTask3() {
+        return task3;
+    }
+
+    public void setTask3(String task3) {
+        this.task3 = task3;
+    }
+
+    public String getTask4() {
+        return task4;
+    }
+
+    public void setTask4(String task4) {
+        this.task4 = task4;
+    }
+
+    public String getTask5() {
+        return task5;
+    }
+
+    public void setTask5(String task5) {
+        this.task5 = task5;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("BpmExecuteNodeLog{");
+        sb.append("id=").append(id);
+        sb.append(", taskParentNodeKey='").append(taskParentNodeKey).append('\'');
+        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", taskNodeName='").append(taskNodeName).append('\'');
+        sb.append(", taskNodeFormKey='").append(taskNodeFormKey).append('\'');
+        sb.append(", taskNodeFormType='").append(taskNodeFormType).append('\'');
+        sb.append(", taskNodeType='").append(taskNodeType).append('\'');
+        sb.append(", taskNodeExecuteType='").append(taskNodeExecuteType).append('\'');
+        sb.append(", taskNodeBefore='").append(taskNodeBefore).append('\'');
+        sb.append(", taskNodeAfter='").append(taskNodeAfter).append('\'');
+        sb.append(", taskNodeRolePermission='").append(taskNodeRolePermission).append('\'');
+        sb.append(", taskRemark='").append(taskRemark).append('\'');
+        sb.append(", taskNodeNumber='").append(taskNodeNumber).append('\'');
+        sb.append(", taskNodeWeight='").append(taskNodeWeight).append('\'');
+        sb.append(", taskNodeState='").append(taskNodeState).append('\'');
+        sb.append(", taskNodeOtherState='").append(taskNodeOtherState).append('\'');
+        sb.append(", taskPriority='").append(taskPriority).append('\'');
+        sb.append(", task1='").append(task1).append('\'');
+        sb.append(", task2='").append(task2).append('\'');
+        sb.append(", task3='").append(task3).append('\'');
+        sb.append(", task4='").append(task4).append('\'');
+        sb.append(", task5='").append(task5).append('\'');
+        sb.append(", delFlag='").append(delFlag).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+}

+ 150 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteNodeMiddle.java

@@ -0,0 +1,150 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+
+/**
+ * 执行流程用户、节点关联脚本中间对象 bpm_execute_node_middle
+ * 
+ * @author hzh
+ * @date 2023-11-01
+ */
+public class BpmExecuteNodeMiddle extends BaseEntityPlus
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 任务流程编码 */
+    @Excel(name = "节点编码")
+    private String taskProcessKey;
+
+    /** 节点编码 */
+    @Excel(name = "节点编码")
+    private String taskNodeKey;
+
+    /** 虚拟角色编码 */
+    @Excel(name = "虚拟角色编码")
+    private String taskVirtuallyRole;
+
+    /** 角色编码1,2,3 */
+    @Excel(name = "角色编码1,2,3")
+    private String taskRealRole;
+
+    /** 执行用户编号1,2,3 */
+    @Excel(name = "执行用户编号1,2,3")
+    private String taskExecuteUserNo;
+
+    /** 手动触发脚本编码1,2,3 */
+    @Excel(name = "异常触发脚本编码1,2,3")
+    private String taskArtificialScriptKey;
+
+    /** 自动触发脚本编码1,2,3(自动触发的脚本需要根据执行节点表中的节点前后执行) */
+    @Excel(name = "正常触发脚本编码(自动触发的脚本需要根据执行节点表中的节点前后执行)")
+    private String taskAutomaticScriptTriggerType;
+
+
+    /** 自动触发的脚本需要根据执行节点表中的节点前后执行 */
+    private String taskNodeAroundScriptKey;
+
+
+
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey)
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+    public void setTaskVirtuallyRole(String taskVirtuallyRole) 
+    {
+        this.taskVirtuallyRole = taskVirtuallyRole;
+    }
+
+    public String getTaskVirtuallyRole() 
+    {
+        return taskVirtuallyRole;
+    }
+    public void setTaskRealRole(String taskRealRole) 
+    {
+        this.taskRealRole = taskRealRole;
+    }
+
+    public String getTaskRealRole() 
+    {
+        return taskRealRole;
+    }
+    public void setTaskExecuteUserNo(String taskExecuteUserNo) 
+    {
+        this.taskExecuteUserNo = taskExecuteUserNo;
+    }
+
+    public String getTaskExecuteUserNo() 
+    {
+        return taskExecuteUserNo;
+    }
+    public void setTaskArtificialScriptKey(String taskArtificialScriptKey) 
+    {
+        this.taskArtificialScriptKey = taskArtificialScriptKey;
+    }
+
+    public String getTaskArtificialScriptKey() 
+    {
+        return taskArtificialScriptKey;
+    }
+    public void setTaskAutomaticScriptTriggerType(String taskAutomaticScriptTriggerType) 
+    {
+        this.taskAutomaticScriptTriggerType = taskAutomaticScriptTriggerType;
+    }
+
+    public String getTaskAutomaticScriptTriggerType() 
+    {
+        return taskAutomaticScriptTriggerType;
+    }
+
+    public String getTaskNodeAroundScriptKey() {
+        return taskNodeAroundScriptKey;
+    }
+
+    public void setTaskNodeAroundScriptKey(String taskNodeAroundScriptKey) {
+        this.taskNodeAroundScriptKey = taskNodeAroundScriptKey;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("BpmExecuteNodeMiddle{");
+        sb.append("id=").append(id);
+        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", taskVirtuallyRole='").append(taskVirtuallyRole).append('\'');
+        sb.append(", taskRealRole='").append(taskRealRole).append('\'');
+        sb.append(", taskExecuteUserNo='").append(taskExecuteUserNo).append('\'');
+        sb.append(", taskArtificialScriptKey='").append(taskArtificialScriptKey).append('\'');
+        sb.append(", taskAutomaticScriptTriggerType='").append(taskAutomaticScriptTriggerType).append('\'');
+        sb.append(", taskNodeAroundScriptKey='").append(taskNodeAroundScriptKey).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+}

+ 226 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmExecuteProcess.java

@@ -0,0 +1,226 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+
+import java.io.Serializable;
+
+/**
+ * 流程执行任务对象 bpm_execute_process
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+public class BpmExecuteProcess extends BaseEntityPlus implements Serializable {
+    private static final long serialVersionUID = 435235L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 流程任务执行别名
+     */
+    @Excel(name = "流程任务执行别名")
+    private String taskKey;
+
+    /**
+     * 任务计划key租户业务表中的唯一编码
+     */
+    @Excel(name = "任务计划key租户业务表中的唯一编码")
+    private String taskPlanKey;
+
+    /**
+     * 任务名称,租户业务库中的计划名称(通过联合查询的方式得到)
+     */
+    @Excel(name = "任务名称")
+    private String taskName;
+
+    /**
+     * 流程名称:审批发起的流程
+     */
+    @Excel(name = "任务名称")
+    private String taskProcessName;
+
+    /**
+     * 任务节点别名(记录当前流程执行过的最后一个节点id)
+     */
+    @Excel(name = "任务节点别名", readConverterExp = "记=录当前流程执行过的最后一个节点id")
+    private String taskNodeKey;
+    /**
+     * 记录下一个需要执行的节点
+     */
+    @Excel(name = "任务节点别名", readConverterExp = "记录当前流程下一个执行节点")
+    private String taskNodeNextKey;
+
+    /**
+     * 定义的流程别名
+     */
+    @Excel(name = "定义的流程别名")
+    private String taskProcessKey;
+
+    /**
+     * xml标签内容
+     */
+    @Excel(name = "xml标签内容")
+    private String taskProcessXmlContent;
+
+    /**
+     * 任务流程状态
+     */
+    @Excel(name = "任务流程状态")
+    private Long taskProcessState;
+
+    /**
+     * 版本注释
+     */
+    @Excel(name = "版本注释")
+    private String taskProcessNote;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    private String delFlag;
+
+    /**
+     * 流程类型
+     */
+    @Excel(name = "流程类型")
+    private String taskProcessType;
+
+    /** 产线编号 */
+    private String taskProductionLineNo;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getTaskKey() {
+        return taskKey;
+    }
+
+    public void setTaskKey(String taskKey) {
+        this.taskKey = taskKey;
+    }
+
+    public String getTaskPlanKey() {
+        return taskPlanKey;
+    }
+
+    public void setTaskPlanKey(String taskPlanKey) {
+        this.taskPlanKey = taskPlanKey;
+    }
+
+    public String getTaskName() {
+        return taskName;
+    }
+
+    public void setTaskName(String taskName) {
+        this.taskName = taskName;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessXmlContent() {
+        return taskProcessXmlContent;
+    }
+
+    public void setTaskProcessXmlContent(String taskProcessXmlContent) {
+        this.taskProcessXmlContent = taskProcessXmlContent;
+    }
+
+    public Long getTaskProcessState() {
+        return taskProcessState;
+    }
+
+    public void setTaskProcessState(Long taskProcessState) {
+        this.taskProcessState = taskProcessState;
+    }
+
+    public String getTaskProcessNote() {
+        return taskProcessNote;
+    }
+
+    public void setTaskProcessNote(String taskProcessNote) {
+        this.taskProcessNote = taskProcessNote;
+    }
+
+    public String getDelFlag() {
+        return (delFlag == null || delFlag.isEmpty()) ? "0" : delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getTaskProcessType() {
+        return taskProcessType;
+    }
+
+    public void setTaskProcessType(String taskProcessType) {
+        this.taskProcessType = taskProcessType;
+    }
+
+    public String getTaskNodeNextKey() {
+        return taskNodeNextKey;
+    }
+
+    public void setTaskNodeNextKey(String taskNodeNextKey) {
+        this.taskNodeNextKey = taskNodeNextKey;
+    }
+
+    public String getTaskProcessName() {
+        return taskProcessName;
+    }
+
+    public void setTaskProcessName(String taskProcessName) {
+        this.taskProcessName = taskProcessName;
+    }
+
+    public String getTaskProductionLineNo() {
+        return taskProductionLineNo;
+    }
+
+    public void setTaskProductionLineNo(String taskProductionLineNo) {
+        this.taskProductionLineNo = taskProductionLineNo;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("BpmExecuteProcess{");
+        sb.append("id=").append(id);
+        sb.append(", taskKey='").append(taskKey).append('\'');
+        sb.append(", taskPlanKey='").append(taskPlanKey).append('\'');
+        sb.append(", taskName='").append(taskName).append('\'');
+        sb.append(", taskProcessName='").append(taskProcessName).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", taskNodeNextKey='").append(taskNodeNextKey).append('\'');
+        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskProcessXmlContent='").append(taskProcessXmlContent).append('\'');
+        sb.append(", taskProcessState=").append(taskProcessState);
+        sb.append(", taskProcessNote='").append(taskProcessNote).append('\'');
+        sb.append(", delFlag='").append(delFlag).append('\'');
+        sb.append(", taskProcessType='").append(taskProcessType).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+}

+ 98 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmNodeHandleUser.java

@@ -0,0 +1,98 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.io.Serializable;
+
+/**
+ * 节点处理用户对象 bpm_node_handle_user
+ *
+ * @author hzh
+ * @date 2023-10-26
+ */
+public class BpmNodeHandleUser extends BaseEntity implements Serializable {
+    private static final long serialVersionUID = 1234L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 虚拟角色:勾选特定用户生成虚拟角色编号
+     */
+    @Excel(name = "虚拟角色:勾选特定用户生成虚拟角色编号")
+    private String virtuallyRole;
+
+    /**
+     * 真实角色:选择角色执行,存储真实角色编号(权限字符)
+     */
+    @Excel(name = "真实角色:选择角色执行,存储真实角色编号", readConverterExp = "权=限字符")
+    private String realRole;
+
+    /**
+     * 执行用户编号
+     */
+    @Excel(name = "执行用户编号")
+    private String executeUserNo;
+
+    public BpmNodeHandleUser(String virtuallyRole) {
+        this.virtuallyRole = virtuallyRole;
+    }
+
+    public BpmNodeHandleUser() {
+
+    }
+
+    public BpmNodeHandleUser(Long id, String virtuallyRole, String realRole, String executeUserNo) {
+        this.id = id;
+        this.virtuallyRole = virtuallyRole;
+        this.realRole = realRole;
+        this.executeUserNo = executeUserNo;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setVirtuallyRole(String virtuallyRole) {
+        this.virtuallyRole = virtuallyRole;
+    }
+
+    public String getVirtuallyRole() {
+        return virtuallyRole;
+    }
+
+    public void setRealRole(String realRole) {
+        this.realRole = realRole;
+    }
+
+    public String getRealRole() {
+        return realRole;
+    }
+
+    public void setExecuteUserNo(String executeUserNo) {
+        this.executeUserNo = executeUserNo;
+    }
+
+    public String getExecuteUserNo() {
+        return executeUserNo;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("virtuallyRole", getVirtuallyRole())
+                .append("realRole", getRealRole())
+                .append("executeUserNo", getExecuteUserNo())
+                .toString();
+    }
+}

+ 138 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmNodeScript.java

@@ -0,0 +1,138 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 流程节点脚本对象 bpm_node_script
+ * 
+ * @author hzh
+ * @date 2023-10-26
+ */
+public class BpmNodeScript extends BaseEntityPlus
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 脚本编码 */
+    @Excel(name = "脚本编码")
+    private String scriptKey;
+
+    /** 脚本方法名称 */
+    @Excel(name = "脚本方法名称")
+    private String scriptFunctionName;
+
+    /** 脚本名称 */
+    @Excel(name = "脚本名称")
+    private String scriptName;
+
+    /** 脚本方法体 */
+    @Excel(name = "脚本方法体")
+    private String scriptFunctionCode;
+
+    /** 脚本类型 */
+    @Excel(name = "脚本类型")
+    private Long scriptType;
+
+    /** 脚本描述 */
+    @Excel(name = "脚本描述")
+    private String scriptDescription;
+
+    /** 删除标志(0:否;1:是) */
+    private String delFlag;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setScriptKey(String scriptKey) 
+    {
+        this.scriptKey = scriptKey;
+    }
+
+    public String getScriptKey() 
+    {
+        return scriptKey;
+    }
+    public void setScriptFunctionName(String scriptFunctionName) 
+    {
+        this.scriptFunctionName = scriptFunctionName;
+    }
+
+    public String getScriptFunctionName() 
+    {
+        return scriptFunctionName;
+    }
+    public void setScriptName(String scriptName) 
+    {
+        this.scriptName = scriptName;
+    }
+
+    public String getScriptName() 
+    {
+        return scriptName;
+    }
+    public void setScriptFunctionCode(String scriptFunctionCode) 
+    {
+        this.scriptFunctionCode = scriptFunctionCode;
+    }
+
+    public String getScriptFunctionCode() 
+    {
+        return scriptFunctionCode;
+    }
+    public void setScriptType(Long scriptType) 
+    {
+        this.scriptType = scriptType;
+    }
+
+    public Long getScriptType() 
+    {
+        return scriptType;
+    }
+    public void setScriptDescription(String scriptDescription) 
+    {
+        this.scriptDescription = scriptDescription;
+    }
+
+    public String getScriptDescription() 
+    {
+        return scriptDescription;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag.isEmpty() ? "0" : delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("scriptKey", getScriptKey())
+            .append("scriptFunctionName", getScriptFunctionName())
+            .append("scriptName", getScriptName())
+            .append("scriptFunctionCode", getScriptFunctionCode())
+            .append("scriptType", getScriptType())
+            .append("scriptDescription", getScriptDescription())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 140 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmNodeScriptRelevance.java

@@ -0,0 +1,140 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+
+import java.io.Serializable;
+
+/**
+ * 流程节点脚本关联对象 bpm_node_script_relevance
+ *
+ * @author hzh
+ * @date 2023-10-26
+ */
+public class BpmNodeScriptRelevance extends BaseEntityPlus implements Serializable {
+    private static final long serialVersionUID = 1231251L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 节点编码
+     */
+    @Excel(name = "节点编码")
+    private String nodeKey;
+
+    /**
+     * 脚本编码
+     */
+    @Excel(name = "脚本编码")
+    private String scriptKey;
+
+    /**
+     * 异常节点表单
+     */
+    private String formKey;
+    /**
+     * 脚本触发机制(0:异常手动;1:正常自动;2:节点前后自动)
+     */
+    @Excel(name = "脚本触发机制", readConverterExp = "0=:异常脚本;1:正常脚本 2:节点前后自动")
+    private Long scriptTriggerType;
+    /**
+     * 异常节点名称
+     */
+    private String scriptNodeName;
+    /**
+     * 异常节点表单类型
+     */
+    private String scriptNodeFormType;
+
+    public String getFormKey() {
+        return formKey;
+    }
+
+    public void setFormKey(String formKey) {
+        this.formKey = formKey;
+    }
+
+    public String getScriptNodeName() {
+        return scriptNodeName;
+    }
+
+    public void setScriptNodeName(String scriptNodeName) {
+        this.scriptNodeName = scriptNodeName;
+    }
+
+    public BpmNodeScriptRelevance(String nodeKey) {
+        this.nodeKey = nodeKey;
+    }
+
+    public BpmNodeScriptRelevance() {
+    }
+
+    public BpmNodeScriptRelevance(Long id, String nodeKey, String scriptKey, Long scriptTriggerType, String formKey, String scriptNodeName, String scriptNodeFormType) {
+        this.id = id;
+        this.nodeKey = nodeKey;
+        this.scriptKey = scriptKey;
+        this.scriptTriggerType = scriptTriggerType;
+        this.formKey = formKey;
+        this.scriptNodeName = scriptNodeName;
+        this.scriptNodeFormType = scriptNodeFormType;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setNodeKey(String nodeKey) {
+        this.nodeKey = nodeKey;
+    }
+
+    public String getNodeKey() {
+        return nodeKey;
+    }
+
+    public void setScriptKey(String scriptKey) {
+        this.scriptKey = scriptKey;
+    }
+
+    public String getScriptKey() {
+        return scriptKey;
+    }
+
+    public void setScriptTriggerType(Long scriptTriggerType) {
+        this.scriptTriggerType = scriptTriggerType;
+    }
+
+    public Long getScriptTriggerType() {
+        return scriptTriggerType;
+    }
+
+    public String getScriptNodeFormType() {
+        return scriptNodeFormType;
+    }
+
+    public void setScriptNodeFormType(String scriptNodeFormType) {
+        this.scriptNodeFormType = scriptNodeFormType;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("BpmNodeScriptRelevance{");
+        sb.append("id=").append(id);
+        sb.append(", nodeKey='").append(nodeKey).append('\'');
+        sb.append(", scriptKey='").append(scriptKey).append('\'');
+        sb.append(", scriptTriggerType=").append(scriptTriggerType);
+        sb.append(", formKey='").append(formKey).append('\'');
+        sb.append(", scriptNodeName='").append(scriptNodeName).append('\'');
+        sb.append(", scriptNodeFormType='").append(scriptNodeFormType).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+
+
+}

+ 245 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmProcess.java

@@ -0,0 +1,245 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 流程定义对象 bpm_process
+ *
+ * @author hzh
+ * @date 2023-10-10
+ */
+public class BpmProcess extends BaseEntityPlus implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long processId;
+
+    /**
+     * 流程名称
+     */
+    @Excel(name = "流程名称")
+    private String processName;
+
+    /**
+     * 流程别名
+     */
+    @Excel(name = "流程别名")
+    private String processKey;
+
+    /**
+     * 流程开启状态
+     */
+    @Excel(name = "流程开启状态")
+    private Long processOpneState;
+
+    /**
+     * 流程类型。例如(OA类型,mes类型)
+     */
+    @Excel(name = "流程类型。例如", readConverterExp = "O=A类型,mes类型")
+    private Long processType;
+
+    /**
+     * 流程部署时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "流程部署时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date processDeployTime;
+
+    /**
+     * 启动事件类型
+     */
+    @Excel(name = "启动事件类型")
+    private Long startEventType;
+
+    /**
+     * 版本注释
+     */
+    @Excel(name = "版本注释")
+    private String note;
+
+    /**
+     * 版本状态(0代表最新版本,1代表历史版本)
+     */
+    @Excel(name = "版本状态", readConverterExp = "0=代表最新版本,1代表历史版本")
+    private Long processVersion;
+
+    /**
+     * xml流文件
+     */
+    @Excel(name = "xml流文件")
+    private String processXml;
+
+    /**
+     * 节点json串
+     */
+    @Excel(name = "节点json串")
+    private String processJson;
+
+    /**
+     * xml标签内容
+     */
+    @Excel(name = "xml标签内容")
+    private String processXmlContent;
+
+    /**
+     * xml文件存放地址
+     */
+    @Excel(name = "xml文件存放地址")
+    private String processXmlPath;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    private String delFlag;
+
+    ///**
+    // *
+    // */
+    //private String delFlag;
+
+    /**
+     * 回传的xml流文件
+     */
+    // private MultipartFile fileXML;
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("BpmProcess{");
+        sb.append("processId=").append(processId);
+        sb.append(", processName='").append(processName).append('\'');
+        sb.append(", processKey='").append(processKey).append('\'');
+        sb.append(", processOpneState=").append(processOpneState);
+        sb.append(", processType=").append(processType);
+        sb.append(", processDeployTime=").append(processDeployTime);
+        sb.append(", startEventType=").append(startEventType);
+        sb.append(", note='").append(note).append('\'');
+        sb.append(", processVersion=").append(processVersion);
+        sb.append(", processXml='").append(processXml).append('\'');
+        sb.append(", processJson='").append(processJson).append('\'');
+        sb.append(", processXmlContent='").append(processXmlContent).append('\'');
+        sb.append(", processXmlPath='").append(processXmlPath).append('\'');
+        sb.append(", delFlag='").append(delFlag).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public Long getProcessId() {
+        return processId;
+    }
+
+    public void setProcessId(Long processId) {
+        this.processId = processId;
+    }
+
+    public String getProcessName() {
+        return processName;
+    }
+
+    public void setProcessName(String processName) {
+        this.processName = processName;
+    }
+
+    public String getProcessKey() {
+        return processKey;
+    }
+
+    public void setProcessKey(String processKey) {
+        this.processKey = processKey;
+    }
+
+    public Long getProcessOpneState() {
+        return processOpneState;
+    }
+
+    public void setProcessOpneState(Long processOpneState) {
+        this.processOpneState = processOpneState;
+    }
+
+    public Long getProcessType() {
+        return processType;
+    }
+
+    public void setProcessType(Long processType) {
+        this.processType = processType;
+    }
+
+    public Date getProcessDeployTime() {
+        return processDeployTime;
+    }
+
+    public void setProcessDeployTime(Date processDeployTime) {
+        this.processDeployTime = processDeployTime;
+    }
+
+    public Long getStartEventType() {
+        return startEventType;
+    }
+
+    public void setStartEventType(Long startEventType) {
+        this.startEventType = startEventType;
+    }
+
+    public String getNote() {
+        return note;
+    }
+
+    public void setNote(String note) {
+        this.note = note;
+    }
+
+    public Long getProcessVersion() {
+        return processVersion;
+    }
+
+    public void setProcessVersion(Long processVersion) {
+        this.processVersion = processVersion;
+    }
+
+    public String getProcessXml() {
+        return processXml;
+    }
+
+    public void setProcessXml(String processXml) {
+        this.processXml = processXml;
+    }
+
+    public String getProcessJson() {
+        return processJson;
+    }
+
+    public void setProcessJson(String processJson) {
+        this.processJson = processJson;
+    }
+
+    public String getProcessXmlContent() {
+        return processXmlContent;
+    }
+
+    public void setProcessXmlContent(String processXmlContent) {
+        this.processXmlContent = processXmlContent;
+    }
+
+    public String getProcessXmlPath() {
+        return processXmlPath;
+    }
+
+    public void setProcessXmlPath(String processXmlPath) {
+        this.processXmlPath = processXmlPath;
+    }
+
+    public String getDelFlag() {
+        return (delFlag == null || delFlag.isEmpty()) ? "0" : delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+
+}

+ 264 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/BpmProcessConfiguration.java

@@ -0,0 +1,264 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.core.domain.BaseEntityPlus;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.io.Serializable;
+
+/**
+ * 流程配置对象 bpm_process_configuration
+ *
+ * @author hzh
+ * @date 2023-10-20
+ */
+public class BpmProcessConfiguration extends BaseEntityPlus implements Serializable {
+
+    private static final long serialVersionUID = 123L;
+
+    /**
+     * 编号
+     */
+    private Long id;
+
+    /**
+     * 节点编号
+     */
+    private String nodeKey;
+
+    /**
+     * 节点名称
+     */
+    private String nodeName;
+
+    /**
+     * 表单编号
+     */
+    private String nodeFormKey;
+
+    /**
+     * 节点表单类型
+     */
+    private String nodeFormType;
+
+    /**
+     * 流程编号
+     */
+    private String nodeProcessKey;
+
+    /**
+     * 节点类型
+     */
+    private String nodeType;
+
+    /**
+     * 节点执行类型(0:自动执行;1:手动执行)
+     */
+    private String nodeExecuteType;
+
+    /**
+     * 节点前
+     */
+    private String nodeBefore;
+
+    /**
+     * 节点后
+     */
+    private String nodeAfter;
+
+    /**
+     * 角色权限
+     */
+    private String nodeRolePermission;
+
+    /**
+     * 备用字段1
+     */
+    private String spare1;
+
+    /**
+     * 备用字段2
+     */
+    private String spare2;
+
+    /**
+     * 备用字段3
+     */
+    private String spare3;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    private String delFlag;
+
+    public BpmProcessConfiguration() {
+    }
+
+    public BpmProcessConfiguration(String nodeProcessKey) {
+        this.nodeProcessKey = nodeProcessKey;
+    }
+
+    public BpmProcessConfiguration(Long id, String nodeKey, String nodeName, String nodeFormKey, String nodeFormType, String nodeProcessKey, String nodeType, String nodeExecuteType, String nodeBefore, String nodeAfter, String nodeRolePermission, String spare1, String spare2, String spare3, String delFlag) {
+        this.id = id;
+        this.nodeKey = nodeKey;
+        this.nodeName = nodeName;
+        this.nodeFormKey = nodeFormKey;
+        this.nodeFormType = nodeFormType;
+        this.nodeProcessKey = nodeProcessKey;
+        this.nodeType = nodeType;
+        this.nodeExecuteType = nodeExecuteType;
+        this.nodeBefore = nodeBefore;
+        this.nodeAfter = nodeAfter;
+        this.nodeRolePermission = nodeRolePermission;
+        this.spare1 = spare1;
+        this.spare2 = spare2;
+        this.spare3 = spare3;
+        this.delFlag = delFlag;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getNodeKey() {
+        return nodeKey;
+    }
+
+    public void setNodeKey(String nodeKey) {
+        this.nodeKey = nodeKey;
+    }
+
+    public String getNodeName() {
+        return nodeName;
+    }
+
+    public void setNodeName(String nodeName) {
+        this.nodeName = nodeName;
+    }
+
+    public String getNodeFormKey() {
+        return nodeFormKey;
+    }
+
+    public void setNodeFormKey(String nodeFormKey) {
+        this.nodeFormKey = nodeFormKey;
+    }
+
+    public String getNodeFormType() {
+        return nodeFormType;
+    }
+
+    public void setNodeFormType(String nodeFormType) {
+        this.nodeFormType = nodeFormType;
+    }
+
+    public String getNodeProcessKey() {
+        return nodeProcessKey;
+    }
+
+    public void setNodeProcessKey(String nodeProcessKey) {
+        this.nodeProcessKey = nodeProcessKey;
+    }
+
+    public String getNodeType() {
+        return nodeType;
+    }
+
+    public void setNodeType(String nodeType) {
+        this.nodeType = nodeType;
+    }
+
+    public String getNodeExecuteType() {
+        return nodeExecuteType;
+    }
+
+    public void setNodeExecuteType(String nodeExecuteType) {
+        this.nodeExecuteType = nodeExecuteType;
+    }
+
+    public String getNodeBefore() {
+        return nodeBefore;
+    }
+
+    public void setNodeBefore(String nodeBefore) {
+        this.nodeBefore = nodeBefore;
+    }
+
+    public String getNodeAfter() {
+        return nodeAfter;
+    }
+
+    public void setNodeAfter(String nodeAfter) {
+        this.nodeAfter = nodeAfter;
+    }
+
+    public String getNodeRolePermission() {
+        return nodeRolePermission;
+    }
+
+    public void setNodeRolePermission(String nodeRolePermission) {
+        this.nodeRolePermission = nodeRolePermission;
+    }
+
+    public String getSpare1() {
+        return spare1;
+    }
+
+    public void setSpare1(String spare1) {
+        this.spare1 = spare1;
+    }
+
+    public String getSpare2() {
+        return spare2;
+    }
+
+    public void setSpare2(String spare2) {
+        this.spare2 = spare2;
+    }
+
+    public String getSpare3() {
+        return spare3;
+    }
+
+    public void setSpare3(String spare3) {
+        this.spare3 = spare3;
+    }
+
+    public String getDelFlag() {
+        return (delFlag == null || delFlag.isEmpty()) ? "0" : delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("nodeKey", getNodeKey())
+                .append("nodeName", getNodeName())
+                .append("nodeFormKey", getNodeFormKey())
+                .append("nodeFormType", getNodeFormType())
+                .append("nodeProcessKey", getNodeProcessKey())
+                .append("nodeType", getNodeType())
+                .append("nodeExecuteType",getNodeExecuteType())
+                .append("nodeBefore", getNodeBefore())
+                .append("nodeAfter", getNodeAfter())
+                .append("nodeRolePermission", getNodeRolePermission())
+                .append("spare1", getSpare1())
+                .append("spare2", getSpare2())
+                .append("spare3", getSpare3())
+                .append("delFlag", getDelFlag())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("remark", getRemark())
+                .toString();
+    }
+}

+ 263 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/CommonEntity.java

@@ -0,0 +1,263 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.core.domain.BaseEntity;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 通用实体
+ *
+ * @author hanzihang
+ * @date 2023/7/19 4:05 PM
+ */
+public class CommonEntity extends BaseEntity implements Serializable,Cloneable {
+
+    private static final long serialVersionUID = 2938L;
+
+    /**
+     * 基本参数Map(例如tableName,pagesize。。。)
+     */
+    private Map<String, Object> basicMap;
+
+    /**
+     * 查询条件Map (查询当前表的条件字段k/v)
+     */
+    private Map<String, Object> queryMap;
+
+    /**
+     * 条件Map(例如修改时前端回传的唯一id标识,删除同理)
+     */
+    private Map<String, Object> conditionMap;
+
+    /**
+     * 回传Map(得到结果返回前端)
+     */
+    private Map<String, Object> resultMap;
+
+    /**
+     * 通用Map(新增时,修改时存放字段k/v)
+     */
+    private Map<String, Object> commMap;
+
+    /**
+     * 新增map
+     */
+    private List<Map<String, String>> addListMap;
+
+    /**
+     * excelMap
+     */
+    private String execlMap;
+
+    /**
+     * 点击按钮携带的参数
+     */
+    private Map<String, Object> btnParametersMap;
+
+    public List<Map<String, String>> getAddListMap() {
+        return addListMap;
+    }
+
+    public void setAddListMap(List<Map<String, String>> addListMap) {
+        this.addListMap = addListMap;
+    }
+
+    public Map<String, Object> getBtnParametersMap() {
+        return btnParametersMap;
+    }
+
+    public void setBtnParametersMap(Map<String, Object> btnParametersMap) {
+        this.btnParametersMap = btnParametersMap;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("CommonEntity{");
+        sb.append("basicMap=").append(basicMap);
+        sb.append(", queryMap=").append(queryMap);
+        sb.append(", conditionMap=").append(conditionMap);
+        sb.append(", resultMap=").append(resultMap);
+        sb.append(", commMap=").append(commMap);
+        sb.append(", addListMap=").append(addListMap);
+        sb.append(", execlMap='").append(execlMap).append('\'');
+        sb.append(", btnParametersMap=").append(btnParametersMap);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    @Override
+    public CommonEntity clone() throws CloneNotSupportedException {
+        return (CommonEntity) super.clone();
+    }
+
+    public CommonEntity(Map<String, Object> basicMap, Map<String, Object> queryMap, Map<String, Object> conditionMap, Map<String, Object> resultMap, Map<String, Object> commMap, List<Map<String, String>> addListMap, String execlMap, Map<String, Object> btnParametersMap) {
+        this.basicMap = basicMap;
+        this.queryMap = queryMap;
+        this.conditionMap = conditionMap;
+        this.resultMap = resultMap;
+        this.commMap = commMap;
+        this.addListMap = addListMap;
+        this.execlMap = execlMap;
+        this.btnParametersMap = btnParametersMap;
+    }
+
+    public CommonEntity() {
+        this.basicMap = new HashMap<>();
+        this.queryMap = new HashMap<>();
+        this.conditionMap = new HashMap<>();
+        this.resultMap = new HashMap<>();
+        this.commMap = new HashMap<>();
+        this.addListMap = new ArrayList<>();
+        this.execlMap = "";
+        this.btnParametersMap = new HashMap<>();
+    }
+
+
+    public Map<String, Object> getBasicMap() {
+        return basicMap;
+    }
+
+    public void setBasicMap(Map<String, Object> basicMap) {
+        this.basicMap = basicMap;
+    }
+
+    public Map<String, Object> getQueryMap() {
+        return queryMap;
+    }
+
+    public void setQueryMap(Map<String, Object> queryMap) {
+        this.queryMap = queryMap;
+    }
+
+    public Map<String, Object> getConditionMap() {
+        return conditionMap;
+    }
+
+    public void setConditionMap(Map<String, Object> conditionMap) {
+        this.conditionMap = conditionMap;
+    }
+
+    public Map<String, Object> getResultMap() {
+        return resultMap;
+    }
+
+    public void setResultMap(Map<String, Object> resultMap) {
+        this.resultMap = resultMap;
+    }
+
+    public Map<String, Object> getCommMap() {
+        return commMap;
+    }
+
+    public void setCommMap(Map<String, Object> commMap) {
+        this.commMap = commMap;
+    }
+
+    public String getExeclMap() {
+        return execlMap;
+    }
+
+    public void setExeclMap(String execlMap) {
+        this.execlMap = execlMap;
+    }
+
+}
+/*
+
+insertCommonEntitylist:[
+        {
+            "basicMap": {
+                "tableName": "student"
+            },
+            "addListMap": [
+                {
+                    "sSex": "2",
+                    "sName": "名字2",
+                    "sAge": "18",
+                    "sInsTime": ""
+                }
+            ]
+        },
+        {
+            "basicMap": {
+                "tableName": "student"
+            },
+            "addListMap": [
+                {
+                    "sSex": "2",
+                    "sName": "名字2",
+                    "sAge": "18",
+                    "sInsTime": ""
+                }
+            ]
+        }
+
+]
+
+
+          //  新增
+        let add = {
+            "basicMap": {
+                "tableName": "student"
+            },
+            "addListMap": [
+                {
+                    "sSex": "2",
+                    "sName": "名字2",
+                    "sAge": "18",
+                    "sInsTime": ""
+                }
+            ]
+        }
+       // 修改穿传参
+      let updateData = {
+        // 基本参数
+        basicMap: {
+          // 表名
+          tableName: this.tableName,
+        },
+        // 条件参数(可多个参数做条件,基本是唯一标识做条件)
+        conditionMap: {
+          k: "v",
+          ...
+        },
+        // 需要修改表的数据-》不可传输唯一标识主键等
+        commMap: {
+          k: "v",
+          ...
+        }
+      }
+    // 查询传参
+    queryParams: {
+        pageNum: 1,                  // 第几页
+        pageSize: 10,                // 每页大小
+        orderByColumn: "",  // 根据某列排序
+        isAsc: this.sortState ? "DESC" : "ASC", // desc(降序)或 asc(升序)
+        // 基本查询参数
+        basicMap: {
+          tableName: "drag_form"
+        },
+        // 当前表字段筛选参数
+        queryMap: {                   // 当前查询基本参数
+          // ... key : value         当前页面的筛选条件
+          // 超级查询的唯一值
+          queryCriteriaValue: ""
+        }
+      },
+
+queryParams: {
+        //当前页面搜索筛选参数
+        queryMap: {
+          //key : value
+        }
+}
+
+
+
+
+ */

+ 161 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/DragFormGroup.java

@@ -0,0 +1,161 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntity;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 动态单组对象 drag_form_group
+ *
+ * @author hzh
+ * @date 2024-01-26
+ */
+public class DragFormGroup extends BaseEntityPlus {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 表单组Key
+     */
+    @Excel(name = "表单组Key")
+    private String groupKey;
+
+    /**
+     * 动态组名称
+     */
+    @Excel(name = "动态组名称")
+    private String fGName;
+
+    /**
+     * 当前表单组中所绑定的表单
+     */
+    @Excel(name = "当前表单组中所绑定的表单")
+    private String formKeys;
+
+    /**
+     * 表单组主表名称(tableName:formKey)
+     */
+    @Excel(name = "表单组主表名称", readConverterExp = "t=ableName:formKey")
+    private String mainTable;
+
+    /**
+     * 各个表单之间的关系
+     */
+    @Excel(name = "各个表单之间的关系")
+    private String relationJson;
+
+    /**
+     * 回显数据sql
+     */
+    @Excel(name = "回显数据sql")
+    private String showDataSql;
+
+    /**
+     * 布局样式
+     */
+    private String layoutJson;
+
+    /**
+     * 逻辑删除
+     */
+    private String delFlag;
+
+    public String getLayoutJson() {
+        return layoutJson;
+    }
+
+    public void setLayoutJson(String layoutJson) {
+        this.layoutJson = layoutJson;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setGroupKey(String groupKey) {
+        this.groupKey = groupKey;
+    }
+
+    public String getGroupKey() {
+        return groupKey;
+    }
+
+    public void setfGName(String fGName) {
+        this.fGName = fGName;
+    }
+
+    public String getfGName() {
+        return fGName;
+    }
+
+    public void setFormKeys(String formKeys) {
+        this.formKeys = formKeys;
+    }
+
+    public String getFormKeys() {
+        return formKeys;
+    }
+
+    public void setMainTable(String mainTable) {
+        this.mainTable = mainTable;
+    }
+
+    public String getMainTable() {
+        return mainTable;
+    }
+
+    public void setRelationJson(String relationJson) {
+        this.relationJson = relationJson;
+    }
+
+    public String getRelationJson() {
+        return relationJson;
+    }
+
+    public void setShowDataSql(String showDataSql) {
+        this.showDataSql = showDataSql;
+    }
+
+    public String getShowDataSql() {
+        return showDataSql;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("groupKey", getGroupKey())
+                .append("fGName", getfGName())
+                .append("remark", getRemark())
+                .append("formKeys", getFormKeys())
+                .append("mainTable", getMainTable())
+                .append("relationJson", getRelationJson())
+                .append("showDataSql", getShowDataSql())
+                .append("updateTime", getUpdateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateById", getUpdateById())
+                .append("createTime", getCreateTime())
+                .append("createById", getCreateById())
+                .append("createBy", getCreateBy())
+                .append("delFlag", getDelFlag())
+                .toString();
+    }
+}

+ 153 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/TableSql.java

@@ -0,0 +1,153 @@
+package com.zkqy.execution.produce.dispersed.entity;
+
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntityPlus;
+
+/**
+ * table 联合查询sql存储对象 table_sql
+ *
+ * @author ruoyi
+ * @date 2023-07-19
+ */
+public class TableSql extends BaseEntityPlus {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * $column.columnComment
+     */
+    private Long tId;
+
+    /**
+     * 表查询语句
+     */
+    @Excel(name = "表查询语句")
+    private String tableSql;
+
+    /**
+     * 表查询条件
+     */
+    @Excel(name = "表查询条件")
+    private String tableCondition;
+
+    /**
+     * 表别名
+     */
+    @Excel(name = "表别名")
+    private String tableAlias;
+
+    /**
+     * sql编号,绑定tableList
+     */
+    @Excel(name = "sql编号,绑定tableList")
+    private String sqlKey;
+
+    /**
+     * 导出的字段名以及列名
+     */
+    @Excel(name = "导出的字段名以及列名")
+    private String tableExportField;
+
+    /**
+     * 逻辑删除
+     */
+    private String delFlag;
+
+
+    /**
+     * 根据某一列进行排序
+     */
+    private String orderByColumn;
+
+    /**
+     * 排序方式  boolean: desc(降序)? asc(升序)
+     */
+    private String sortOrder;
+
+    @Override
+    public String toString() {
+        return "TableSql{" +
+                "tId=" + tId +
+                ", tableSql='" + tableSql + '\'' +
+                ", tableCondition='" + tableCondition + '\'' +
+                ", tableAlias='" + tableAlias + '\'' +
+                ", sqlKey='" + sqlKey + '\'' +
+                ", tableExportField='" + tableExportField + '\'' +
+                ", delFlag='" + delFlag + '\'' +
+                ", orderByColumn='" + orderByColumn + '\'' +
+                ", sortOrder='" + sortOrder + '\'' +
+                '}';
+    }
+
+    public Long gettId() {
+        return tId;
+    }
+
+    public void settId(Long tId) {
+        this.tId = tId;
+    }
+
+    public String getTableSql() {
+        return tableSql;
+    }
+
+    public void setTableSql(String tableSql) {
+        this.tableSql = tableSql;
+    }
+
+    public String getTableCondition() {
+        return tableCondition;
+    }
+
+    public void setTableCondition(String tableCondition) {
+        this.tableCondition = tableCondition;
+    }
+
+    public String getTableAlias() {
+        return tableAlias;
+    }
+
+    public void setTableAlias(String tableAlias) {
+        this.tableAlias = tableAlias;
+    }
+
+    public String getSqlKey() {
+        return sqlKey;
+    }
+
+    public void setSqlKey(String sqlKey) {
+        this.sqlKey = sqlKey;
+    }
+
+    public String getTableExportField() {
+        return tableExportField;
+    }
+
+    public void setTableExportField(String tableExportField) {
+        this.tableExportField = tableExportField;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getOrderByColumn() {
+        return orderByColumn;
+    }
+
+    public void setOrderByColumn(String orderByColumn) {
+        this.orderByColumn = orderByColumn;
+    }
+
+    public String getSortOrder() {
+        return sortOrder;
+    }
+
+    public void setSortOrder(String sortOrder) {
+        this.sortOrder = sortOrder;
+    }
+
+}

+ 79 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmBackNodeVo.java

@@ -0,0 +1,79 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+/**
+ * 节点回退实体
+ *
+ * @author hanzihang
+ * @date 2023/12/18 3:18 PM
+ */
+public class BpmBackNodeVo {
+
+    /**
+     * 任务流程编号
+     */
+    private String taskProcessKey;
+
+    /**
+     * 任务节点编号
+     */
+    private String taskNodeKey;
+
+    /**
+     * 回退的节点表示
+     */
+    private String taskBackNodeKey;
+
+    /**
+     * 当前回退节点的类型
+     */
+    private String taskNodeType;
+
+    public BpmBackNodeVo(String taskProcessKey, String taskNodeKey, String taskBackNodeKey, String taskNodeType) {
+        this.taskProcessKey = taskProcessKey;
+        this.taskNodeKey = taskNodeKey;
+        this.taskBackNodeKey = taskBackNodeKey;
+        this.taskNodeType = taskNodeType;
+    }
+
+    public String getTaskNodeType() {
+        return taskNodeType;
+    }
+
+    public void setTaskNodeType(String taskNodeType) {
+        this.taskNodeType = taskNodeType;
+    }
+
+    public BpmBackNodeVo() {
+    }
+
+    public BpmBackNodeVo(String taskProcessKey, String taskNodeKey, String taskBackNodeKey) {
+        this.taskProcessKey = taskProcessKey;
+        this.taskNodeKey = taskNodeKey;
+        this.taskBackNodeKey = taskBackNodeKey;
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskBackNodeKey() {
+        return taskBackNodeKey;
+    }
+
+    public void setTaskBackNodeKey(String taskBackNodeKey) {
+        this.taskBackNodeKey = taskBackNodeKey;
+    }
+
+}

+ 69 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmRunNodeFormDateVo.java

@@ -0,0 +1,69 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+
+
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 处理提交表单数据
+ *
+ * @author hanzihang
+ * @date 2023/12/15 1:58 PM
+ */
+public class BpmRunNodeFormDateVo {
+    /**
+     * insertCommonEntityList 新增
+     * updateCommonEntityList 修改
+     * deleteCommonEntityList 删除
+     */
+    private List<CommonEntity> insertCommonEntityList, updateCommonEntityList, deleteCommonEntityList;
+
+    public BpmRunNodeFormDateVo() {
+        this.insertCommonEntityList = new ArrayList<>();
+        this.updateCommonEntityList = new ArrayList<>();
+        this.deleteCommonEntityList = new ArrayList<>();
+    }
+
+    public BpmRunNodeFormDateVo(List<CommonEntity> insertCommonEntityList, List<CommonEntity> updateCommonEntityList, List<CommonEntity> deleteCommonEntityList) {
+        this.insertCommonEntityList = insertCommonEntityList;
+        this.updateCommonEntityList = updateCommonEntityList;
+        this.deleteCommonEntityList = deleteCommonEntityList;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("BpmRunNodeFormDateVo{");
+        sb.append("insertCommonEntityList=").append(insertCommonEntityList);
+        sb.append(", updateCommonEntityList=").append(updateCommonEntityList);
+        sb.append(", deleteCommonEntityList=").append(deleteCommonEntityList);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public List<CommonEntity> getInsertCommonEntityList() {
+        return insertCommonEntityList;
+    }
+
+    public void setInsertCommonEntityList(List<CommonEntity> insertCommonEntityList) {
+        this.insertCommonEntityList = insertCommonEntityList;
+    }
+
+    public List<CommonEntity> getUpdateCommonEntityList() {
+        return updateCommonEntityList;
+    }
+
+    public void setUpdateCommonEntityList(List<CommonEntity> updateCommonEntityList) {
+        this.updateCommonEntityList = updateCommonEntityList;
+    }
+
+    public List<CommonEntity> getDeleteCommonEntityList() {
+        return deleteCommonEntityList;
+    }
+
+    public void setDeleteCommonEntityList(List<CommonEntity> deleteCommonEntityList) {
+        this.deleteCommonEntityList = deleteCommonEntityList;
+    }
+}

+ 134 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmRunNodeFormFilterConditionsVo.java

@@ -0,0 +1,134 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+import java.util.Map;
+
+/**
+ * @author hanzihang
+ * @date 2023/12/13 3:24 PM
+ */
+public class BpmRunNodeFormFilterConditionsVo {
+
+    /**
+     * 表名称
+     */
+    private String tableName;
+
+    /**
+     * 查询表条件
+     */
+    private Map<String, Object> condition;
+
+    /**
+     * 是否当前节点回填数据
+     * <p>
+     * 例如:下拉框是当前节点表单的回显数据,并不是回填的操作数据
+     * <p>
+     * 默认拼接当前任务、节点编码
+     * 是否带流程编码
+     */
+    private boolean isNodeOnlyData;
+
+    /**
+     *
+     */
+    //private boolean isNodeOnlyData;
+    /**
+     * 如果是数组,那么这就是返回数据的key
+     * <p>
+     * key:[
+     * {label:value},
+     * {label:value}
+     * ]
+     */
+    private String listKey;
+
+    /**
+     * 是否以表名为键
+     */
+    private boolean  isTableNameKey = true;
+
+
+    public BpmRunNodeFormFilterConditionsVo() {
+        this.isNodeOnlyData = true;
+        this.isTableNameKey= true;
+    }
+
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("BpmRunNodeFormFilterConditionsVo{");
+        sb.append("tableName='").append(tableName).append('\'');
+        sb.append(", condition=").append(condition);
+        sb.append(", isNodeOnlyData=").append(isNodeOnlyData);
+        sb.append(", listKey='").append(listKey).append('\'');
+        sb.append(", isTableNameKey=").append(isTableNameKey);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public BpmRunNodeFormFilterConditionsVo(String tableName, Map<String, Object> condition) {
+        this.tableName = tableName;
+        this.condition = condition;
+    }
+
+    public BpmRunNodeFormFilterConditionsVo(String tableName, Map<String, Object> condition, String listKey) {
+        this.tableName = tableName;
+        this.condition = condition;
+        this.listKey = listKey;
+    }
+
+    public BpmRunNodeFormFilterConditionsVo(String tableName, Map<String, Object> condition, boolean isNodeOnlyData) {
+        this.tableName = tableName;
+        this.condition = condition;
+        this.isNodeOnlyData = isNodeOnlyData;
+    }
+
+    public BpmRunNodeFormFilterConditionsVo(String tableName, Map<String, Object> condition, boolean isNodeOnlyData, String listKey) {
+        this.tableName = tableName;
+        this.condition = condition;
+        this.isNodeOnlyData = isNodeOnlyData;
+        this.listKey = listKey;
+    }
+
+    public BpmRunNodeFormFilterConditionsVo(String tableName, Map<String, Object> condition, boolean isNodeOnlyData, boolean isTableNameKey) {
+        this.tableName = tableName;
+        this.condition = condition;
+        this.isNodeOnlyData = isNodeOnlyData;
+        this.isTableNameKey = isTableNameKey;
+    }
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public Map<String, Object> getCondition() {
+        return condition;
+    }
+
+    public void setCondition(Map<String, Object> condition) {
+        this.condition = condition;
+    }
+
+    public boolean isNodeOnlyData() {
+        return isNodeOnlyData;
+    }
+
+    public void setNodeOnlyData(boolean nodeOnlyData) {
+        isNodeOnlyData = nodeOnlyData;
+    }
+
+    public String getListKey() {
+        return listKey;
+    }
+
+    public void setListKey(String listKey) {
+        this.listKey = listKey;
+    }
+
+    public boolean getIsTableNameKey() {return isTableNameKey;}
+
+    public void setIsTableNameKey(boolean isTableNameKey) {this.isTableNameKey = isTableNameKey;}
+}

+ 102 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmRunNodeFromVo.java

@@ -0,0 +1,102 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author hanzihang
+ * @date 2023/12/12 5:34 PM
+ */
+public class BpmRunNodeFromVo {
+
+    /**
+     * 流程任务编码
+     */
+    private String taskProcessKey;
+
+    /**
+     * 流程节点编码
+     */
+    private String taskNodeKey;
+
+    /**
+     * 当前节点绑定脚本
+     */
+    private String taskAutomaticScriptTriggerType;
+
+    /**
+     * 当前发起流程的计划编码
+     */
+    private String taskPlanKey;
+
+    /**
+     * 其他参数
+     */
+    private List<BpmRunNodeFormFilterConditionsVo> FormDataVoList;
+
+    public BpmRunNodeFromVo() {
+        FormDataVoList = new ArrayList<>();
+    }
+
+    public BpmRunNodeFromVo(String taskProcessKey, String taskNodeKey, String taskAutomaticScriptTriggerType, String taskPlanKey, List<BpmRunNodeFormFilterConditionsVo> formDataVoList) {
+        this.taskProcessKey = taskProcessKey;
+        this.taskNodeKey = taskNodeKey;
+        this.taskAutomaticScriptTriggerType = taskAutomaticScriptTriggerType;
+        this.taskPlanKey = taskPlanKey;
+        FormDataVoList = formDataVoList;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("BpmRunNodeFromVo{");
+        sb.append("taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", taskAutomaticScriptTriggerType='").append(taskAutomaticScriptTriggerType).append('\'');
+        sb.append(", taskPlanKey='").append(taskPlanKey).append('\'');
+        sb.append(", FormDataVoList=").append(FormDataVoList);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskAutomaticScriptTriggerType() {
+        return taskAutomaticScriptTriggerType;
+    }
+
+    public void setTaskAutomaticScriptTriggerType(String taskAutomaticScriptTriggerType) {
+        this.taskAutomaticScriptTriggerType = taskAutomaticScriptTriggerType;
+    }
+
+    public String getTaskPlanKey() {
+        return taskPlanKey;
+    }
+
+    public void setTaskPlanKey(String taskPlanKey) {
+        this.taskPlanKey = taskPlanKey;
+    }
+
+    public List<BpmRunNodeFormFilterConditionsVo> getFormDataVoList() {
+        return FormDataVoList;
+    }
+
+    public void setFormDataVoList(List<BpmRunNodeFormFilterConditionsVo> formDataVoList) {
+        FormDataVoList = formDataVoList;
+    }
+
+
+}

+ 169 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmRunNodeVo.java

@@ -0,0 +1,169 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.util.Map;
+
+/**
+ * 节点运行中间表
+ *
+ * @author hanzihang
+ * @date 2023/11/23
+ */
+public class BpmRunNodeVo {
+
+    //  当前任务流程编码
+    private String taskProcessKey;
+
+    // 当前执行节点的唯一编码
+    private String taskNodeKey;
+
+    // 当前节点的下个节点的编码
+    private String nextNodeKey;
+
+    // 当前节点绑定的脚本名称
+    private String implementationName;
+
+    // 当前节点对应的流程文件内容
+    private String taskProcessXmlContent;
+
+    // 当前节点触发时填写的表单信息
+    private Map<String, Object> formDataMap;
+
+    // 当前节点绑定表单的表名称
+    private String tableName;
+
+    // 节点类型
+    private String taskNodeType;
+
+    // 审批状态
+    private String approvalStatus;
+
+    // 审批备注
+    private String approvalRemark;
+
+
+    public String getApprovalStatus() {
+        return approvalStatus;
+    }
+
+    public void setApprovalStatus(String approvalStatus) {
+        this.approvalStatus = approvalStatus;
+    }
+
+    public String getApprovalRemark() {
+        return approvalRemark;
+    }
+
+    public void setApprovalRemark(String approvalRemark) {
+        this.approvalRemark = approvalRemark;
+    }
+
+    public String getTaskNodeType() {
+        return taskNodeType;
+    }
+
+    public void setTaskNodeType(String taskNodeType) {
+        this.taskNodeType = taskNodeType;
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getNextNodeKey() {
+        return nextNodeKey;
+    }
+
+    public void setNextNodeKey(String nextNodeKey) {
+        this.nextNodeKey = nextNodeKey;
+    }
+
+    public String getImplementationName() {
+        return implementationName;
+    }
+
+    public void setImplementationName(String implementationName) {
+        this.implementationName = implementationName;
+    }
+
+    public String getTaskProcessXmlContent() {
+        return taskProcessXmlContent;
+    }
+
+    public void setTaskProcessXmlContent(String taskProcessXmlContent) {
+
+        this.taskProcessXmlContent = taskProcessXmlContent;
+    }
+
+    public Map<String, Object> getFormDataMap() {
+        return formDataMap;
+    }
+
+    public void setFormDataMapString(String formDataMap) {
+        try {
+            ObjectMapper objectMapper = new ObjectMapper();
+            this.formDataMap = objectMapper.readValue(formDataMap, Map.class);
+        } catch (Exception e) {
+            // 处理异常,例如日志记录或抛出自定义异常
+            e.printStackTrace();
+        }
+    }
+
+    public void setFormDataMap(Map<String, Object> formDataMap) {
+        this.formDataMap = formDataMap;
+    }
+
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("BpmRunNodeVo{");
+        sb.append("taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", nextNodeKey='").append(nextNodeKey).append('\'');
+        sb.append(", implementationName='").append(implementationName).append('\'');
+        sb.append(", taskProcessXmlContent='").append(taskProcessXmlContent).append('\'');
+        sb.append(", formDataMap=").append(formDataMap);
+        sb.append(", tableName='").append(tableName).append('\'');
+        sb.append(", taskNodeType='").append(taskNodeType).append('\'');
+        sb.append(", approvalStatus='").append(approvalStatus).append('\'');
+        sb.append(", approvalRemark='").append(approvalRemark).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public BpmRunNodeVo() {
+    }
+
+
+    public BpmRunNodeVo(String taskProcessKey, String taskNodeKey, String nextNodeKey, String implementationName, String taskProcessXmlContent, Map<String, Object> formDataMap, String tableName, String taskNodeType) {
+        this.taskProcessKey = taskProcessKey;
+        this.taskNodeKey = taskNodeKey;
+        this.nextNodeKey = nextNodeKey;
+        this.implementationName = implementationName;
+        this.taskProcessXmlContent = taskProcessXmlContent;
+        this.formDataMap = formDataMap;
+        this.tableName = tableName;
+        this.taskNodeType = taskNodeType;
+    }
+}

+ 67 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/BpmUserScriptVo.java

@@ -0,0 +1,67 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeHandleUser;
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeScriptRelevance;
+
+import java.util.List;
+
+/**
+ * 当前节点的执行用户以及需要执行的脚本
+ *
+ * @author hanzihang
+ * @date 2023/11/2 4:38
+ */
+public class BpmUserScriptVo {
+
+    // 当前节点标识
+    private String nodeKey;
+
+    // 当前节点的执行用户
+    private List<BpmNodeHandleUser> bpmNodeHandleUserList;
+
+    // 当前节点绑定的脚本
+    private List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList;
+
+    public BpmUserScriptVo() {
+    }
+
+    public BpmUserScriptVo(String nodeKey, List<BpmNodeHandleUser> bpmNodeHandleUserList, List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList) {
+        this.nodeKey = nodeKey;
+        this.bpmNodeHandleUserList = bpmNodeHandleUserList;
+        this.bpmNodeScriptRelevanceList = bpmNodeScriptRelevanceList;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("BpmUserScript{");
+        sb.append("nodeKey='").append(nodeKey).append('\'');
+        sb.append(", bpmNodeHandleUserList=").append(bpmNodeHandleUserList);
+        sb.append(", bpmNodeScriptRelevanceList=").append(bpmNodeScriptRelevanceList);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public String getNodeKey() {
+        return nodeKey;
+    }
+
+    public void setNodeKey(String nodeKey) {
+        this.nodeKey = nodeKey;
+    }
+
+    public List<BpmNodeHandleUser> getBpmNodeHandleUserList() {
+        return bpmNodeHandleUserList;
+    }
+
+    public void setBpmNodeHandleUserList(List<BpmNodeHandleUser> bpmNodeHandleUserList) {
+        this.bpmNodeHandleUserList = bpmNodeHandleUserList;
+    }
+
+    public List<BpmNodeScriptRelevance> getBpmNodeScriptRelevanceList() {
+        return bpmNodeScriptRelevanceList;
+    }
+
+    public void setBpmNodeScriptRelevanceList(List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList) {
+        this.bpmNodeScriptRelevanceList = bpmNodeScriptRelevanceList;
+    }
+}

+ 91 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/IRunBPMEntity.java

@@ -0,0 +1,91 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+import java.util.Map;
+
+/**
+ * 使用脚本时通过本类承载参数
+ *
+ * @author hanzihang
+ * @date 2023/11/14
+ */
+public class IRunBPMEntity {
+
+    // 脚本实现类名称
+    private String implementationName;
+
+    // 执行流程Key
+    private String executionFlowKey;
+
+    // 执行节点Key
+    private String executionNodeKey;
+
+    // 其他执行参数
+    private Map<String, Object> executionMap;
+
+    // 当前节点绑定表单的数据表名称
+    private String tableName;
+
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("IRunBPMEntity{");
+        sb.append("implementationName='").append(implementationName).append('\'');
+        sb.append(", executionFlowKey='").append(executionFlowKey).append('\'');
+        sb.append(", executionNodeKey='").append(executionNodeKey).append('\'');
+        sb.append(", executionMap=").append(executionMap);
+        sb.append(", tableName='").append(tableName).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getImplementationName() {
+        return implementationName;
+    }
+
+    public void setImplementationName(String implementationName) {
+        this.implementationName = implementationName;
+    }
+
+    public String getExecutionFlowKey() {
+        return executionFlowKey;
+    }
+
+    public void setExecutionFlowKey(String executionFlowKey) {
+        this.executionFlowKey = executionFlowKey;
+    }
+
+    public String getExecutionNodeKey() {
+        return executionNodeKey;
+    }
+
+    public void setExecutionNodeKey(String executionNodeKey) {
+        this.executionNodeKey = executionNodeKey;
+    }
+
+    public Map<String, Object> getExecutionMap() {
+        return executionMap;
+    }
+
+    public void setExecutionMap(Map<String, Object> executionMap) {
+        this.executionMap = executionMap;
+    }
+
+    public IRunBPMEntity() {
+    }
+
+    public IRunBPMEntity(String implementationName, String executionFlowKey, String executionNodeKey, Map<String, Object> executionMap, String tableName) {
+        this.implementationName = implementationName;
+        this.executionFlowKey = executionFlowKey;
+        this.executionNodeKey = executionNodeKey;
+        this.executionMap = executionMap;
+        this.tableName = tableName;
+    }
+}

+ 57 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/IScriptEntity.java

@@ -0,0 +1,57 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+/**
+ * @author hanzihang
+ * @date 2023/11/14 2:39 PM
+ */
+public class IScriptEntity {
+    // 脚本方法名称
+    private String implementationName;
+    // 执行流程key
+    private String scriptFlowKey;
+    // 执行节点key
+    private String scriptNodeKey;
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("IScriptEntity{");
+        sb.append("implementationName='").append(implementationName).append('\'');
+        sb.append(", scriptFlowKey='").append(scriptFlowKey).append('\'');
+        sb.append(", scriptNodeKey='").append(scriptNodeKey).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public String getImplementationName() {
+        return implementationName;
+    }
+
+    public void setImplementationName(String implementationName) {
+        this.implementationName = implementationName;
+    }
+
+    public String getScriptFlowKey() {
+        return scriptFlowKey;
+    }
+
+    public void setScriptFlowKey(String scriptFlowKey) {
+        this.scriptFlowKey = scriptFlowKey;
+    }
+
+    public String getScriptNodeKey() {
+        return scriptNodeKey;
+    }
+
+    public void setScriptNodeKey(String scriptNodeKey) {
+        this.scriptNodeKey = scriptNodeKey;
+    }
+
+    public IScriptEntity() {
+    }
+
+    public IScriptEntity(String implementationName, String scriptFlowKey, String scriptNodeKey) {
+        this.implementationName = implementationName;
+        this.scriptFlowKey = scriptFlowKey;
+        this.scriptNodeKey = scriptNodeKey;
+    }
+}

+ 105 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/IntoProduction.java

@@ -0,0 +1,105 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+
+import java.util.Map;
+
+/**
+ * 共通投产实体类
+ *
+ * @author hanzihang
+ * @date 2023/11/1
+ */
+public class IntoProduction {
+
+    // 流程别名
+    private String taskProcessKey;
+
+    // 投产表名
+    private String tableName;
+
+    // 默认 state
+    private String statusKey;
+
+    // 修改状态值
+    private String statusVal;
+
+    // 当前表主键值
+    private String guid;
+
+    // 当前操作表的字段条件 状态字段等
+    private Map<String, Object> stateMap;
+
+
+    public IntoProduction() {
+    }
+
+    public IntoProduction(String taskProcessKey, String tableName, String statusKey, String statusVal, String guid, Map<String, Object> stateMap) {
+        this.taskProcessKey = taskProcessKey;
+        this.tableName = tableName;
+        this.statusKey = statusKey;
+        this.statusVal = statusVal;
+        this.guid = guid;
+        this.stateMap = stateMap;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("IntoProduction{");
+        sb.append("taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", tableName='").append(tableName).append('\'');
+        sb.append(", statusKey='").append(statusKey).append('\'');
+        sb.append(", statusVal='").append(statusVal).append('\'');
+        sb.append(", guid='").append(guid).append('\'');
+        sb.append(", stateMap=").append(stateMap);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getStatusKey() {
+        return statusKey;
+    }
+
+    public void setStatusKey(String statusKey) {
+        this.statusKey = statusKey;
+    }
+
+    public String getStatusVal() {
+        return statusVal;
+    }
+
+    public void setStatusVal(String statusVal) {
+        this.statusVal = statusVal;
+    }
+
+    public String getGuid() {
+        return guid;
+    }
+
+    public void setGuid(String guid) {
+        this.guid = guid;
+    }
+
+    public Map<String, Object> getStateMap() {
+        return stateMap;
+    }
+
+    public void setStateMap(Map<String, Object> stateMap) {
+        this.stateMap = stateMap;
+    }
+}

+ 142 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/SysBpmNodeScriptVO.java

@@ -0,0 +1,142 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.io.Serializable;
+
+/**
+ * 流程节点脚本类
+ */
+public class SysBpmNodeScriptVO  extends BaseEntity implements Serializable {
+    private static final long serialVersionUID = 43523225L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 脚本编码 */
+    private String scriptKey;
+
+    /** 脚本方法名称 */
+    private String scriptFunctionName;
+
+    /** 脚本名称 */
+    private String scriptName;
+
+    /** 脚本方法体 */
+    private String scriptFunctionCode;
+
+    /** 脚本类型 */
+    private Long scriptType;
+
+    /** 脚本描述 */
+    private String scriptDescription;
+
+    /** 行业分类 */
+    private String industryType;
+
+    /** 删除标志(0:否;1:是) */
+    private String delFlag;
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setScriptKey(String scriptKey)
+    {
+        this.scriptKey = scriptKey;
+    }
+
+    public String getScriptKey()
+    {
+        return scriptKey;
+    }
+    public void setScriptFunctionName(String scriptFunctionName)
+    {
+        this.scriptFunctionName = scriptFunctionName;
+    }
+
+    public String getScriptFunctionName()
+    {
+        return scriptFunctionName;
+    }
+    public void setScriptName(String scriptName)
+    {
+        this.scriptName = scriptName;
+    }
+
+    public String getScriptName()
+    {
+        return scriptName;
+    }
+    public void setScriptFunctionCode(String scriptFunctionCode)
+    {
+        this.scriptFunctionCode = scriptFunctionCode;
+    }
+
+    public String getScriptFunctionCode()
+    {
+        return scriptFunctionCode;
+    }
+    public void setScriptType(Long scriptType)
+    {
+        this.scriptType = scriptType;
+    }
+
+    public Long getScriptType()
+    {
+        return scriptType;
+    }
+    public void setScriptDescription(String scriptDescription)
+    {
+        this.scriptDescription = scriptDescription;
+    }
+
+    public String getScriptDescription()
+    {
+        return scriptDescription;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getIndustryType() {
+        return industryType;
+    }
+
+    public void setIndustryType(String industryType) {
+        this.industryType = industryType;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("scriptKey", getScriptKey())
+                .append("scriptFunctionName", getScriptFunctionName())
+                .append("scriptName", getScriptName())
+                .append("scriptFunctionCode", getScriptFunctionCode())
+                .append("scriptType", getScriptType())
+                .append("scriptDescription", getScriptDescription())
+                .append("industryType",getIndustryType())
+                .append("delFlag", getDelFlag())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+
+}

+ 73 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/runbpm/TriggerExceptionVO.java

@@ -0,0 +1,73 @@
+package com.zkqy.execution.produce.dispersed.entity.runbpm;
+
+/**
+ * 触发异常VO
+ */
+public class TriggerExceptionVO {
+
+    /**
+     * 执行流程任务编号
+     */
+    private String taskProcessKey;
+
+    /**
+     * 任务节点编号
+     */
+    private String taskNodeKey;
+
+    /**
+     * 当前抛出异常节点类型
+     */
+    private String taskNodeType;
+
+    /**
+     * 异常抛出异常参数,当前节点的下一个执行节点key
+     */
+    private String taskNextNodeKey;
+
+    /**
+     * 节点脚本
+     */
+    private SysBpmNodeScriptVO sysBpmNodeScriptVO;
+
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public SysBpmNodeScriptVO getSysBpmNodeScriptVO() {
+        return sysBpmNodeScriptVO;
+    }
+
+    public void setSysBpmNodeScriptVO(SysBpmNodeScriptVO sysBpmNodeScriptVO) {
+        this.sysBpmNodeScriptVO = sysBpmNodeScriptVO;
+    }
+
+    public String getTaskNodeType() {
+        return taskNodeType;
+    }
+
+    public void setTaskNodeType(String taskNodeType) {
+        this.taskNodeType = taskNodeType;
+    }
+
+    public String getTaskNextNodeKey() {
+        return taskNextNodeKey;
+    }
+
+    public void setTaskNextNodeKey(String taskNextNodeKey) {
+        this.taskNextNodeKey = taskNextNodeKey;
+    }
+}

+ 42 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/vo/FileVo.java

@@ -0,0 +1,42 @@
+package com.zkqy.execution.produce.dispersed.entity.vo;
+
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ * @author hanzihang
+ * 上传文件VO
+ */
+public class FileVo {
+
+    private boolean isBase64;
+
+    private MultipartFile file;
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("FileVo{");
+        sb.append("isBase64=").append(isBase64);
+        sb.append(", file=").append(file);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public boolean isBase64() {
+        return isBase64;
+    }
+
+    public void setBase64(boolean base64) {
+        isBase64 = base64;
+    }
+
+    public MultipartFile getFile() {
+        return file;
+    }
+
+    public void setFile(MultipartFile file) {
+        this.file = file;
+    }
+
+}

+ 66 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/entity/vo/NodeVo.java

@@ -0,0 +1,66 @@
+package com.zkqy.execution.produce.dispersed.entity.vo;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeHandleUser;
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeScriptRelevance;
+import com.zkqy.execution.produce.dispersed.entity.BpmProcessConfiguration;
+
+import java.util.List;
+
+/**
+ * @author hanzihang
+ * @date 2023/10/26 1:06PM
+ */
+public class NodeVo {
+    // 流程节点表
+    private List<BpmProcessConfiguration> bpmProcessConfigurationList;
+    // 节点脚本关系表
+    private List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList;
+    // 节点执行用户关系表
+    private List<BpmNodeHandleUser> bpmNodeHandleUserList;
+    // 需要删除的节点id
+    private Long[] removeNodeIds;
+
+    // 所有节点绑定的数据表
+    private List<String> tableNameList;
+
+    public Long[] getRemoveNodeIds() {
+        return removeNodeIds;
+    }
+
+    public void setRemoveNodeIds(Long[] removeNodeIds) {
+        this.removeNodeIds = removeNodeIds;
+    }
+
+
+    public List<BpmProcessConfiguration> getBpmProcessConfigurationList() {
+        return bpmProcessConfigurationList;
+    }
+
+    public void setBpmProcessConfigurationList(List<BpmProcessConfiguration> bpmProcessConfigurationList) {
+        this.bpmProcessConfigurationList = bpmProcessConfigurationList;
+    }
+
+    public List<BpmNodeScriptRelevance> getBpmNodeScriptRelevanceList() {
+        return bpmNodeScriptRelevanceList;
+    }
+
+    public void setBpmNodeScriptRelevanceList(List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList) {
+        this.bpmNodeScriptRelevanceList = bpmNodeScriptRelevanceList;
+    }
+
+    public List<BpmNodeHandleUser> getBpmNodeHandleUserList() {
+        return bpmNodeHandleUserList;
+    }
+
+    public void setBpmNodeHandleUserList(List<BpmNodeHandleUser> bpmNodeHandleUserList) {
+        this.bpmNodeHandleUserList = bpmNodeHandleUserList;
+    }
+
+    public List<String> getTableNameList() {
+        return tableNameList;
+    }
+
+    public void setTableNameList(List<String> tableNameList) {
+        this.tableNameList = tableNameList;
+    }
+}

+ 89 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmApprovalStatusMapper.java

@@ -0,0 +1,89 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmApprovalStatus;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 审批数据条中间Mapper接口
+ *
+ * @author hzh
+ * @date 2024-01-31
+ */
+public interface BpmApprovalStatusMapper {
+    /**
+     * 查询审批数据条中间
+     *
+     * @param id 审批数据条中间主键
+     * @return 审批数据条中间
+     */
+    public BpmApprovalStatus selectBpmApprovalStatusById(Long id);
+
+    /**
+     * 查询审批数据条中间
+     *
+     * @param taskKey 流程任务key
+     * @return 审批数据条中间
+     */
+    public BpmApprovalStatus selectBpmApprovalStatusByTaskKey(String taskKey);
+
+    /**
+     * 查询审批数据条中间列表
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 审批数据条中间集合
+     */
+    public List<BpmApprovalStatus> selectBpmApprovalStatusList(BpmApprovalStatus bpmApprovalStatus);
+
+    /**
+     * 新增审批数据条中间
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 结果
+     */
+    public int insertBpmApprovalStatus(BpmApprovalStatus bpmApprovalStatus);
+
+    /**
+     * 修改审批数据条中间
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 结果
+     */
+    public int updateBpmApprovalStatus(BpmApprovalStatus bpmApprovalStatus);
+
+    /**
+     * 删除审批数据条中间
+     *
+     * @param id 审批数据条中间主键
+     * @return 结果
+     */
+    public int deleteBpmApprovalStatusById(Long id);
+
+    /**
+     * 批量删除审批数据条中间
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmApprovalStatusByIds(Long[] ids);
+
+
+    /**
+     * 修改当前审批条状态根据任务key
+     *
+     * @param bpmApprovalStatus
+     * @return
+     */
+    public int updateBpmApprovalStatusByTaskKey(BpmApprovalStatus bpmApprovalStatus);
+
+    /**
+     * 修改用户业务表中审批数据条状态
+     *
+     * @param tableName 表名
+     * @param state     状态值
+     * @param where     条件
+     * @return
+     */
+    public int updateApprovalStatusByTableName(@Param("tableName") String tableName, @Param("approvalState") String approvalState, @Param("where") String where);
+}

+ 127 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteNodeFormMapper.java

@@ -0,0 +1,127 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeForm;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 执行节点单Mapper接口
+ *
+ * @author zkqy
+ * @date 2023-12-07
+ */
+@Mapper
+public interface BpmExecuteNodeFormMapper {
+    /**
+     * @param taskProcessKey 当前流程Key
+     * @param taskNodeKey
+     * @param taskScriptKeys 需要得到的信息的异常脚本节点Key
+     * @return
+     */
+
+    List<BpmExecuteNodeForm> selectByTaskScriptKeys(@Param("taskProcessKey") String taskProcessKey, @Param("taskScriptKeys") List<String> taskScriptKeys);
+
+    /**
+     * 查询执行节点单
+     *
+     * @param id 执行节点单主键
+     * @return 执行节点单
+     */
+    public BpmExecuteNodeForm selectBpmExecuteNodeFormById(Long id);
+
+    /**
+     * 查询执行节点单列表
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 执行节点单集合
+     */
+    public List<BpmExecuteNodeForm> selectBpmExecuteNodeFormList(BpmExecuteNodeForm bpmExecuteNodeForm);
+
+    /**
+     * 新增执行节点单
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 结果
+     */
+    public int insertBpmExecuteNodeForm(BpmExecuteNodeForm bpmExecuteNodeForm);
+
+    /**
+     * 修改执行节点单
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 结果
+     */
+    public int updateBpmExecuteNodeForm(BpmExecuteNodeForm bpmExecuteNodeForm);
+
+    /**
+     * 删除执行节点单
+     *
+     * @param id 执行节点单主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeFormById(Long id);
+
+    /**
+     * 批量删除执行节点单
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeFormByIds(Long[] ids);
+
+    /**
+     * 当前发起的流程节点的表单信息
+     *
+     * @param processKey 流程编码
+     * @return
+     */
+    public List<Map<String, String>> selectNodeFromInfos(String processKey);
+
+    /**
+     * 查询执行节点单详情
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 执行节点单集合
+     */
+    BpmExecuteNodeForm selectBpmExecuteNodeFormInfo(BpmExecuteNodeForm bpmExecuteNodeForm);
+
+    /**
+     * 根据 taskProcessKey和 taskNodeKey查询当前节点执行的表单模版信息
+     */
+    public BpmExecuteNodeForm selectBpmExecuteNodeFormByTpKAndTnkAndTsk(@Param("taskProcessKey") String taskProcessKey, @Param("taskNodeKey") String taskNodeKey, @Param("taskScriptKey") String taskScriptKey);
+
+    /**
+     * 根据tableSql查询这个sql对应的数据
+     *
+     * @param tableSql
+     * @return
+     */
+    public Map<String, String> tableSql(String tableSql);
+
+    /**
+     * 根据tableSql查询这个sql对应的数据(目前是查询表单下拉框数据在用)
+     *
+     * @param tableSql
+     * @return
+     */
+    public List<Map<String, Object>> executeSql(String tableSql);
+
+    /**
+     * 根据sqlKey查询tableSql数据
+     *
+     * @param sqlKey
+     * @return
+     */
+    public Map<String, String> getTableSqlBySqlKey(String sqlKey);
+
+    /**
+     * 根据sqlKey查询对应表单
+     */
+    public Map<String, String> getDfFormInfo();
+
+
+}

+ 94 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteNodeLogMapper.java

@@ -0,0 +1,94 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeLog;
+import io.lettuce.core.dynamic.annotation.Param;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 节点执行记录(日志)Mapper接口
+ * 
+ * @author zkqy
+ * @date 2023-12-18
+ */
+@Mapper
+public interface BpmExecuteNodeLogMapper 
+{
+    /**
+     * 查询节点执行记录(日志)
+     * 
+     * @param id 节点执行记录(日志)主键
+     * @return 节点执行记录(日志)
+     */
+    public BpmExecuteNodeLog selectBpmExecuteNodeLogById(Long id);
+
+    /**
+     * 查询流程执行任务log2
+     *
+     * @param objectMap 查询条件
+     * @return 流程执行任务集合
+     */
+    public List<BpmExecuteNodeLog> selectBpmExecuteProcessNodeListLog(@Param("objectMap") Map<String, Object> objectMap);
+
+
+    /**
+     * 查询节点执行记录(日志)列表
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 节点执行记录(日志)集合
+     */
+    public List<BpmExecuteNodeLog> selectBpmExecuteNodeLogList(BpmExecuteNodeLog bpmExecuteNodeLog);
+
+
+    /**
+     * 查询节点执行记录(日志)列表
+     *
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 节点执行记录(日志)集合
+     */
+    public List<BpmExecuteNodeLog> selectBpmExecuteNodeLogListfjqy(BpmExecuteNodeLog bpmExecuteNodeLog);
+
+    /**
+     * 新增节点执行记录(日志)
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 结果
+     */
+    public int insertBpmExecuteNodeLog(BpmExecuteNodeLog bpmExecuteNodeLog);
+
+    /**
+     * 修改节点执行记录(日志)
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 结果
+     */
+    public int updateBpmExecuteNodeLog(BpmExecuteNodeLog bpmExecuteNodeLog);
+
+    /**
+     * 修改节点执行记录(日志)
+     *
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 结果
+     */
+    public int updateBpmExecuteNodeLogfjqy(BpmExecuteNodeLog bpmExecuteNodeLog);
+
+    /**
+     * 删除节点执行记录(日志)
+     * 
+     * @param id 节点执行记录(日志)主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeLogById(Long id);
+
+    /**
+     * 批量删除节点执行记录(日志)
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeLogByIds(Long[] ids);
+}

+ 114 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteNodeMapper.java

@@ -0,0 +1,114 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNode;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+/**
+ * 节点执行(记录)Mapper接口
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@Mapper
+public interface BpmExecuteNodeMapper {
+    /**
+     * 查询节点执行(记录)
+     *
+     * @param id 节点执行(记录)主键
+     * @return 节点执行(记录)
+     */
+    public BpmExecuteNode selectBpmExecuteNodeById(Long id);
+
+    /**
+     * 查询节点执行(记录)列表
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 节点执行(记录)集合
+     */
+    public List<BpmExecuteNode> selectBpmExecuteNodeList(BpmExecuteNode bpmExecuteNode);
+
+    /**
+     * 新增节点执行(记录)
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 结果
+     */
+    public int insertBpmExecuteNode(BpmExecuteNode bpmExecuteNode);
+
+    /**
+     * 新增节点执行(记录)
+     *
+     * @param bpmExecuteNodeList 节点执行(记录)
+     * @return 结果
+     */
+    public int insertBpmExecuteNodeList(List<BpmExecuteNode> bpmExecuteNodeList);
+
+    /**
+     * 修改节点执行(记录)
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 结果
+     */
+    public int updateBpmExecuteNode(BpmExecuteNode bpmExecuteNode);
+
+    /**
+     * 删除节点执行(记录)
+     *
+     * @param id 节点执行(记录)主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeById(Long id);
+
+    /**
+     * 批量删除节点执行(记录)
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeByIds(Long[] ids);
+
+
+    /**
+     * 更新执行中的流程节点状态
+     * * @param taskProcessKey 当前流程任务key
+     * * @param taskNodeKey    当前节点key
+     * * state状态
+     *
+     * @param bpmExecuteNode
+     * @return
+     */
+    public int updateNodeState(BpmExecuteNode bpmExecuteNode);
+
+
+    /**
+     * 批量更新流程节点
+     *
+     * @param processKey
+     * @param nodeKeys
+     * @return
+     */
+    public int updateNodeStateByKeys(@Param("processKey") String processKey, @Param("nodeKeys") List<String> nodeKeys);
+
+    /**
+     * 回退流程之后删除被回退节点后的异常节点
+     *
+     * @param processKey 当前流程key
+     * @param nodeKeys
+     * @return
+     */
+    public int deleteExceptionNodeByKeys(@Param("processKey") String processKey, @Param("nodeKeys") List<String> nodeKeys);
+
+    /**
+     * 根据任务流程key、节点key 得到该节点的详细信息
+     *
+     * @param taskProcessKey // 任务流程key
+     * @param taskNodeKey    // 节点key
+     * @return
+     */
+    public BpmExecuteNode queryBpmExecuteNodeBytaskNodeKey(@Param("taskProcessKey") String taskProcessKey, @Param("taskNodeKey") String taskNodeKey);
+}

+ 83 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteNodeMiddleMapper.java

@@ -0,0 +1,83 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeMiddle;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+/**
+ * 执行流程用户、节点关联脚本中间Mapper接口
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@Mapper
+public interface BpmExecuteNodeMiddleMapper {
+    /**
+     * 查询执行流程用户、节点关联脚本中间
+     *
+     * @param id 执行流程用户、节点关联脚本中间主键
+     * @return 执行流程用户、节点关联脚本中间
+     */
+    public BpmExecuteNodeMiddle selectBpmExecuteNodeMiddleById(Long id);
+
+    /**
+     * 查询执行流程用户、节点关联脚本中间列表
+     *
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 执行流程用户、节点关联脚本中间集合
+     */
+    public List<BpmExecuteNodeMiddle> selectBpmExecuteNodeMiddleList(BpmExecuteNodeMiddle bpmExecuteNodeMiddle);
+
+    /**
+     * 新增执行流程用户、节点关联脚本中间
+     *
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 结果
+     */
+    public int insertBpmExecuteNodeMiddle(BpmExecuteNodeMiddle bpmExecuteNodeMiddle);
+
+    /**
+     * 新增执行流程用户、节点关联脚本中间
+     *
+     * @param bpmExecuteNodeMiddleList 执行流程用户、节点关联脚本中间
+     * @return 结果
+     */
+    public int insertBpmExecuteNodeMiddleList(List<BpmExecuteNodeMiddle> bpmExecuteNodeMiddleList);
+
+    /**
+     * 修改执行流程用户、节点关联脚本中间
+     *
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 结果
+     */
+    public int updateBpmExecuteNodeMiddle(BpmExecuteNodeMiddle bpmExecuteNodeMiddle);
+
+    /**
+     * 删除执行流程用户、节点关联脚本中间
+     *
+     * @param id 执行流程用户、节点关联脚本中间主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeMiddleById(Long id);
+
+    /**
+     * 批量删除执行流程用户、节点关联脚本中间
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeMiddleByIds(Long[] ids);
+
+    /**
+     * 根据执行的节点key得到当前节点的关联用户、脚本信息
+     *
+     * @param taskNodeKey 执行节点key
+     * @return
+     */
+    public BpmExecuteNodeMiddle queryBpmExecuteNodeMiddleByTaskNodeKey(@Param("taskProcessKey") String taskProcessKey, @Param("taskNodeKey") String taskNodeKey);
+
+}

+ 234 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmExecuteProcessMapper.java

@@ -0,0 +1,234 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.entity.DragFormGroup;
+import io.lettuce.core.dynamic.annotation.Param;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 流程执行任务Mapper接口
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@Mapper
+public interface BpmExecuteProcessMapper {
+    /**
+     * 查询流程执行任务
+     *
+     * @param id 流程执行任务主键
+     * @return 流程执行任务
+     */
+    public BpmExecuteProcess selectBpmExecuteProcessById(Long id);
+
+    /**
+     * 查询流程执行任务列表
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    public List<BpmExecuteProcess> selectBpmExecuteProcessList(BpmExecuteProcess bpmExecuteProcess);
+
+
+    /**
+     * 查询流程执行任务列表
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    public List<BpmExecuteProcess> selectBpmExecuteProcessListfjqy(BpmExecuteProcess bpmExecuteProcess);
+
+
+    /**
+     * 查询流程执行任务列表数量(这个查询的是审批流的数量)
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    public int selectBpmExecuteProcessListCount(BpmExecuteProcess bpmExecuteProcess);
+
+
+    /**
+     * 查询流程执行任务列表数量(这个查询的是审批流的数量)
+     * @return 流程执行任务集合
+     */
+    public List<Map> selectBpmExecuteProcessListProductionCount(BpmExecuteProcess executeProcess);
+
+
+    /**
+     * 查询流程执行任务log
+     *
+     * @param objectMap 查询条件
+     * @return 流程执行任务集合
+     */
+    public List<CommonEntity> selectBpmExecuteProcessListLog(@Param("objectMap") Map<String, Object> objectMap);
+
+
+    /**
+     * 查询流程执行任务log
+     *
+     * @param objectMap 查询条件
+     * @return 流程执行任务集合
+     */
+    public List<CommonEntity> selectBpmExecuteProcessListLogFjqy(@Param("objectMap") Map<String, Object> objectMap);
+    /**
+     * 新增流程执行任务
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 结果
+     */
+    public int insertBpmExecuteProcess(BpmExecuteProcess bpmExecuteProcess);
+
+    /**
+     * 修改流程执行任务
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 结果
+     */
+    public int updateBpmExecuteProcess(BpmExecuteProcess bpmExecuteProcess);
+
+    /**
+     * 删除流程执行任务
+     *
+     * @param id 流程执行任务主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteProcessById(Long id);
+
+    /**
+     * 批量删除流程执行任务
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteProcessByIds(Long[] ids);
+
+    /**
+     * 根据当前用户登陆信息得到当前可执行流程
+     */
+    public List<CommonEntity> queryExecuteProcess(@Param("objectMap") Map<String, Object> objectMap);
+
+    /**
+     * 根据当前用户登陆信息得到当前可执行流程
+     */
+    public List<CommonEntity> queryExecuteApproveProcess(@Param("objectMap") Map<String, Object> objectMap);
+    /**
+     * 根据当前用户登陆信息得到当前用户提交过的审批流程
+     */
+    public List<CommonEntity> selectBpmExecuteProcessApproveLogList(@Param("objectMap") Map<String, Object> objectMap);
+
+    /**
+     * 根据当前用户登陆信息得到当前可执行流程
+     */
+    public List<CommonEntity> queryExecuteProcessEnd(@Param("objectMap") Map<String, Object> objectMap);
+
+    /**
+     * 根据当前用户登陆信息得到当前可执行流程
+     */
+    public List<CommonEntity> queryExecuteProcessApprovalEnd(@Param("objectMap") Map<String, Object> objectMap);
+
+    /**
+     * 查询流程执行任务
+     *
+     * @param taskKey 流程执行任务编号唯一标识
+     * @return 流程执行任务
+     */
+    BpmExecuteProcess selectBpmExecuteProcessByTaskKey(String taskKey);
+
+    /**
+     * 结束流程
+     *
+     * @param taskKey
+     * @return
+     */
+    int endProcess(String taskKey);
+
+    /**
+     * 异常结束流程
+     *
+     * @param taskKey
+     * @return
+     */
+    int endProcessExit(String taskKey);
+
+    /**
+     * 修改当前流程执行节点
+     *
+     * @param //taskKey         任务流程标识
+     * @param //taskNodeKey     当前流程被执行的最后一个节点
+     * @param //taskNodeNextKey 下一个节点的标识
+     * @param bpmExecuteProcess
+     * @return bpmExecuteProcess
+     */
+    int updateProcessNode(BpmExecuteProcess bpmExecuteProcess);
+
+    /**
+     * 通过fid查询表单信息
+     *
+     * @param fid
+     * @return
+     */
+    Map<String, String> getFromInfo(String fid);
+
+    /**
+     * 通过formKey查询表单信息
+     *
+     * @param formKey
+     * @return
+     */
+    Map<String, String> getFromInfoByFormKey(String formKey);
+
+    /**
+     * 通过formKeys查询表单信息
+     *
+     * @param objectMap
+     * @return
+     */
+    List<CommonEntity> getFromInfoByFormKeys(String[] formKeys);
+
+
+    /**
+     * 根据groupKey查询表格组信息
+     */
+    Map<String, String> getGroupInfo(String groupKey);
+
+    /**
+     * 根据tableKey查询Table表格信息
+     */
+    Map<String, String> getTableInfo(String tableKey);
+
+    /**
+     * 根据tableKey查询Table表格信息
+     */
+    Map<String, String> getTableSqlInfo(String sqlKey);
+
+    /**
+     * 根据动态表格编号查询 drag_table_
+     */
+    List<Map<String, String>> getTableCondition(String tId);
+
+    /**
+     * 根据当前执行的流程key修改当前执行流程状态
+     *
+     * @param taskProcessState 修改的状态
+     * @param taskKey          执行流程key
+     * @return
+     */
+    public int updateProcessStateByKey(String taskKey);
+
+    /**
+     * (化纤项目)根据当前用户登陆信息得到当前可执行流程
+     */
+    List<CommonEntity> queryChemicalFibreExecuteProcessEnd(@Param("objectMap") Map<String, Object> objectMap);
+
+    /**
+     * (化纤项目)根据当前用户登陆信息得到当前可执行流程
+     */
+    List<CommonEntity> queryChemicalFibreExecuteProcess(@Param("objectMap") Map<String, Object> objectMap);
+
+}

+ 71 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmNodeHandleUserMapper.java

@@ -0,0 +1,71 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeHandleUser;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 节点处理用户Mapper接口
+ * 
+ * @author hzh
+ * @date 2023-10-26
+ */
+@Mapper
+public interface BpmNodeHandleUserMapper 
+{
+    /**
+     * 查询节点处理用户
+     * 
+     * @param id 节点处理用户主键
+     * @return 节点处理用户
+     */
+    public BpmNodeHandleUser selectBpmNodeHandleUserById(Long id);
+
+    /**
+     * 查询节点处理用户列表
+     * 
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 节点处理用户集合
+     */
+    public List<BpmNodeHandleUser> selectBpmNodeHandleUserList(BpmNodeHandleUser bpmNodeHandleUser);
+
+    /**
+     * 新增节点处理用户
+     * 
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 结果
+     */
+    public int insertBpmNodeHandleUser(List<BpmNodeHandleUser>  bpmNodeHandleUser);
+
+    /**
+     * 修改节点处理用户
+     * 
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 结果
+     */
+    public int updateBpmNodeHandleUser(BpmNodeHandleUser bpmNodeHandleUser);
+
+    /**
+     * 删除节点处理用户
+     * 
+     * @param id 节点处理用户主键
+     * @return 结果
+     */
+    public int deleteBpmNodeHandleUserById(Long id);
+
+    /**
+     * 批量删除节点处理用户
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmNodeHandleUserByIds(Long[] ids);
+
+    /**
+     * 根据虚拟角色查询节点处理用户
+     * @param virtuallyRole
+     * @return
+     */
+    BpmNodeHandleUser selectBpmNodeHandleUserByVirtuallyRole(String virtuallyRole);
+}

+ 93 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmNodeScriptRelevanceMapper.java

@@ -0,0 +1,93 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeScriptRelevance;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 流程节点脚本关联Mapper接口
+ * 
+ * @author hzh
+ * @date 2023-10-26
+ */
+@Mapper
+public interface BpmNodeScriptRelevanceMapper 
+{
+    /**
+     * 查询流程节点脚本关联
+     * 
+     * @param id 流程节点脚本关联主键
+     * @return 流程节点脚本关联
+     */
+    BpmNodeScriptRelevance selectBpmNodeScriptRelevanceById(Long id);
+
+    /**
+     * 查询流程节点脚本关联列表
+     * 
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 流程节点脚本关联集合
+     */
+    List<BpmNodeScriptRelevance> selectBpmNodeScriptRelevanceList(BpmNodeScriptRelevance bpmNodeScriptRelevance);
+
+    /**
+     * 新增流程节点脚本关联
+     * 
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 结果
+     */
+    int insertBpmNodeScriptRelevance(BpmNodeScriptRelevance bpmNodeScriptRelevance);
+
+    /**
+     * 批量新增流程节点脚本关联
+     * @param bpmNodeScriptRelevanceList 流程节点脚本关联
+     * @return
+     */
+    int insertBpmNodeScriptRelevanceList(List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList);
+
+    /**
+     * 修改流程节点脚本关联
+     * 
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 结果
+     */
+    int updateBpmNodeScriptRelevance(BpmNodeScriptRelevance  bpmNodeScriptRelevance);
+
+    /**
+     * 删除流程节点脚本关联
+     * 
+     * @param id 流程节点脚本关联主键
+     * @return 结果
+     */
+    int deleteBpmNodeScriptRelevanceById(Long id);
+
+    /**
+     * 批量删除流程节点脚本关联
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteBpmNodeScriptRelevanceByIds(Long[] ids);
+
+    /**
+     * 查询自动执行脚本
+     * @param nodeKey 节点key
+     * @return
+     */
+    BpmNodeScriptRelevance selectAutoScriptByNodeKey(String nodeKey);
+
+    /**
+     * 根据节点编码删除流程节点脚本关联
+     * @param nodeKeys 节点编码
+     * @return
+     */
+    int deleteBpmNodeScriptRelevanceByNodeKeys(List<String> nodeKeys);
+
+    /**
+     * 查询流程节点脚本关联详情
+     *
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 流程节点脚本关联集合
+     */
+    BpmNodeScriptRelevance selectBpmNodeScriptRelevanceInfo(BpmNodeScriptRelevance bpmNodeScriptRelevance);
+}

+ 72 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmProcessConfigurationMapper.java

@@ -0,0 +1,72 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmProcessConfiguration;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 流程配置Mapper接口
+ *
+ * @author hzh
+ * @date 2023-10-20
+ */
+@Mapper
+public interface BpmProcessConfigurationMapper {
+    /**
+     * 查询流程配置
+     *
+     * @param id 流程配置主键
+     * @return 流程配置
+     */
+    public BpmProcessConfiguration selectBpmProcessConfigurationById(Long id);
+
+    /**
+     * 查询流程配置列表
+     *
+     * @param bpmProcessConfiguration 流程配置
+     * @return 流程配置集合
+     */
+    public List<BpmProcessConfiguration> selectBpmProcessConfigurationList(BpmProcessConfiguration bpmProcessConfiguration);
+
+    /**
+     * 新增流程配置
+     *
+     * @param bpmProcessConfigurationList 流程配置
+     * @return 结果
+     */
+    public int insertBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList);
+
+    /**
+     * 修改流程配置批量
+     *
+     * @param bpmProcessConfiguration 流程配置
+     * @return 结果
+     */
+    public int updateBpmProcessConfiguration(BpmProcessConfiguration bpmProcessConfiguration);
+
+
+    /**
+     * 删除流程配置
+     *
+     * @param id 流程配置主键
+     * @return 结果
+     */
+    public int deleteBpmProcessConfigurationById(Long id);
+
+    /**
+     * 批量删除流程配置
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmProcessConfigurationByIds(Long[] ids);
+
+    /**
+     * 根据id查询nodeKey
+     * @param ids
+     * @return
+     */
+    List<String> selectNodeKeyByIds(List<Long> ids);
+
+}

+ 83 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/BpmProcessMapper.java

@@ -0,0 +1,83 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmProcess;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 流程定义Mapper接口
+ * 
+ * @author hzh
+ * @date 2023-10-10
+ */
+@Mapper
+public interface BpmProcessMapper 
+{
+    /**
+     * 查询流程定义
+     * 
+     * @param processId 流程定义主键
+     * @return 流程定义
+     */
+    public BpmProcess selectBpmProcessByProcessId(Long processId);
+
+    /**
+     * 查询流程定义列表
+     * 
+     * @param bpmProcess 流程定义
+     * @return 流程定义集合
+     */
+    public List<BpmProcess> selectBpmProcessList(BpmProcess bpmProcess);
+
+    /**
+     * 新增流程定义
+     * 
+     * @param bpmProcess 流程定义
+     * @return 结果
+     */
+    public int insertBpmProcess(BpmProcess bpmProcess);
+
+    /**
+     * 修改流程定义
+     * 
+     * @param bpmProcess 流程定义
+     * @return 结果
+     */
+    public int updateBpmProcess(BpmProcess bpmProcess);
+
+    /**
+     * 删除流程定义
+     * 
+     * @param processId 流程定义主键
+     * @return 结果
+     */
+    public int deleteBpmProcessByProcessId(Long processId);
+
+    /**
+     * 批量删除流程定义
+     * 
+     * @param processIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteBpmProcessByProcessIds(Long[] processIds);
+
+    /**
+     * 根据流程编号查询
+     */
+    List<BpmProcess> selectBpmProcessByProcessIds(List<Long> processIds);
+
+    /**
+     * 查询当前新版本流程定义
+     * @param processKey 流程别名
+     * @return
+     */
+    BpmProcess selectBpmProcessByProcessKey(String processKey);
+
+    /**
+     * 查询流程统计信息
+     * @return
+     */
+    List<Map> selectBpmProcessStatistics();
+}

+ 143 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/CommonMapper.java

@@ -0,0 +1,143 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+@Mapper
+public interface CommonMapper {
+
+    /**-------------------------mysql-----------------------------*/
+
+    /**
+     * 查询列表
+     */
+    List<CommonEntity> selectList(@Param("tableName") String tableName, @Param("conditions") Map<String, Object> conditions);
+
+    /**
+     * 查询列表
+     */
+    List<HashMap<String,String>> mobileSelectList(@Param("tableName") String tableName, @Param("fieldsList") List<String> fieldsList, @Param("conditions") List<String> conditionsList);
+
+    /**
+     * 查询列表
+     */
+    List<HashMap<String,String>> mobileSelectListJoin(@Param("mainTableName") String tableName,
+                                                      @Param("fieldsList") List<String> fieldsList,
+                                                      @Param("joinList") List<String> joinList,
+                                                      @Param("conditions") List<String> conditionsList);
+
+    /**
+     * 查询列表
+     *
+     * @param tableName
+     * @param conditions
+     * @return
+     */
+    List<Map<String, Object>> selectListMap(@Param("tableName") String tableName, @Param("conditions") Map<String, Object> conditions);
+
+    /**
+     * 获取详情数据
+     *
+     * @param tableName
+     * @param conditions
+     * @return
+     */
+    CommonEntity selectOne(@Param("tableName") String tableName, @Param("conditions") Map<String, Object> conditions);
+
+
+    /**
+     * 批量新增
+     */
+    int batchInsert(@Param("fieldNames") Set<String> fieldNames, @Param("tableName") String tableName, @Param("fieldValues") List<Map<String, Object>> fieldValues);
+
+    /**
+     * 批量删除
+     */
+    int batchDelete(@Param("tableName") String tableName, @Param("conditions") Map<String, Object> conditions);
+
+    /**
+     * 修改
+     */
+    int edit(@Param("fields") Map<String, Object> fields, @Param("tableName") String tableName, @Param("conditions") Map<String, Object> conditions);
+
+    /**
+     * 执行动态sql
+     *
+     * @param Sql 执行的sql
+     * @return
+     */
+    List<CommonEntity> queryTableList(String Sql);
+
+    /**
+     * 表
+     * 查询下拉框列表
+     */
+    List<Map<String, Object>> selectDropDownList(@Param("tableName") String tableName, @Param("fieldKey") String fieldKey, @Param("fieldName") String fieldName, @Param("conditions") Map<String, Object> conditions);
+
+    List<Map<String, Object>> selectDropDownListNotWhere(@Param("tableName") String tableName);
+
+
+    /**
+     * 字典
+     * 查询下拉框列表
+     */
+    List<Map<String, Object>> selectDropDownListByDict(String dictType);
+
+    /**
+     * 查询模板库建表语句
+     *
+     * @param tableName 表名
+     * @return
+     */
+    Map<String, String> selectTableSql(@Param("tableName") String tableName);
+
+    /**
+     * 执行sql
+     *
+     * @param sql sql语句
+     * @return
+     */
+    void executeSql(String sql);
+
+    /**
+     * 执行sql,直接返回map形式
+     */
+    List<Map<String, Object>> executeSqlSelectData(String sql);
+
+    /**
+     * 查询所有数据表
+     *
+     * @param databaseName 数据库
+     * @return
+     */
+    List<String> selectTableName(String databaseName);
+
+    /**
+     * 获取详情
+     */
+    CommonEntity getInfoById(@Param("tableName") String tableName, @Param("conditions") Map<String, Object> conditions);
+
+    /**
+     * 查询数据
+     *
+     * @param tableName  表名
+     * @param conditions key表字段 value字段值集合
+     * @return
+     */
+    List<Map<String, Object>> queryDropDownBoxData(@Param("tableName") String tableName, @Param("conditions") Map<String, Object> conditions);
+
+    /**
+     * 直接执行sql语句返回结果
+     *
+     * @param sql
+     * @return
+     */
+    List<Map<String, Object>> executeMysql(String sql);
+
+}

+ 71 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/DragFormGroupMapper.java

@@ -0,0 +1,71 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+import com.zkqy.execution.produce.dispersed.entity.DragFormGroup;
+
+import java.util.List;
+
+
+/**
+ * 动态表单组Mapper接口
+ * 
+ * @author hzh
+ * @date 2024-01-26
+ */
+public interface DragFormGroupMapper 
+{
+    /**
+     * 查询动态表单组
+     * 
+     * @param id 动态表单组主键
+     * @return 动态表单组
+     */
+    public DragFormGroup selectDragFormGroupById(Long id);
+
+    /**
+     * 查询动态表单组
+     *
+     * @param groupKey 动态表单组key
+     * @return 动态表单组
+     */
+    public DragFormGroup selectDragFormGroupByKey(String groupKey);
+
+    /**
+     * 查询动态表单组列表
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 动态表单组集合
+     */
+    public List<DragFormGroup> selectDragFormGroupList(DragFormGroup dragFormGroup);
+
+    /**
+     * 新增动态表单组
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 结果
+     */
+    public int insertDragFormGroup(DragFormGroup dragFormGroup);
+
+    /**
+     * 修改动态表单组
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 结果
+     */
+    public int updateDragFormGroup(DragFormGroup dragFormGroup);
+
+    /**
+     * 删除动态表单组
+     * 
+     * @param id 动态表单组主键
+     * @return 结果
+     */
+    public int deleteDragFormGroupById(Long id);
+
+    /**
+     * 批量删除动态表单组
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDragFormGroupByIds(Long[] ids);
+}

+ 96 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/mapper/TableSqlMapper.java

@@ -0,0 +1,96 @@
+package com.zkqy.execution.produce.dispersed.mapper;
+
+
+import com.zkqy.execution.produce.dispersed.entity.TableSql;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+
+/**
+ * table 联合查询sql存储Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-07-19
+ */
+@Mapper
+public interface TableSqlMapper {
+    /**
+     * 查询table 联合查询sql存储
+     *
+     * @param tId table 联合查询sql存储主键
+     * @return table 联合查询sql存储
+     */
+    public TableSql selectTableSqlByTId(Long tId);
+
+    /**
+     * 查询table 联合查询sql存储
+     *
+     * @param SQLKEY 绑定table唯一标识
+     * @return table 联合查询sql存储
+     */
+    public TableSql selectTableSqlByTSqlKey(String SQLKEY);
+
+    /**
+     * 查询table 联合查询sql存储列表
+     *
+     * @param tableSql table 联合查询sql存储
+     * @return table 联合查询sql存储集合
+     */
+    public List<TableSql> selectTableSqlList(TableSql tableSql);
+
+    /**
+     * 新增table 联合查询sql存储
+     *
+     * @param tableSql table 联合查询sql存储
+     * @return 结果
+     */
+    public int insertTableSql(TableSql tableSql);
+
+    /**
+     * 修改table 联合查询sql存储
+     *
+     * @param tableSql table 联合查询sql存储
+     * @return 结果
+     */
+    public int updateTableSql(TableSql tableSql);
+
+    /**
+     * 删除table 联合查询sql存储
+     *
+     * @param tId table 联合查询sql存储主键
+     * @return 结果
+     */
+    public int deleteTableSqlByTId(Long tId);
+
+    /**
+     * 批量删除table 联合查询sql存储
+     *
+     * @param tIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTableSqlByTIds(Long[] tIds);
+
+    /**
+     * 修改table 联合查询sql存储
+     *
+     * @param tableSql table 联合查询sql存储
+     * @return 结果
+     */
+    int updateTableSqlBySqlKey(TableSql tableSql);
+
+    /**
+     * 批量删除
+     */
+    int deleteTableSqlBySqlKeys(List<String> sqlKeys);
+
+    /**
+     * 新增table 联合查询sql存储
+     *
+     * @param tableSqlList table 联合查询sql存储
+     * @return 结果
+     */
+    int batchInsertTableSql(List<TableSql> tableSqlList);
+
+
+}

+ 936 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/runbpm/PreExecutionToolClass.java

@@ -0,0 +1,936 @@
+package com.zkqy.execution.produce.dispersed.runbpm;
+
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.zkqy.common.constant.HttpStatus;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.common.utils.StringUtils;
+import com.zkqy.common.utils.bpm.XmlDataParserUtils;
+import com.zkqy.common.utils.uuid.IdUtils;
+import com.zkqy.execution.produce.dispersed.entity.*;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.*;
+import com.zkqy.execution.produce.dispersed.mapper.*;
+import com.zkqy.execution.produce.dispersed.service.*;
+import com.zkqy.execution.produce.utils.VerifyExecutionProcess;
+import lombok.val;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+
+/**
+ * 预备执行流程工具类
+ *
+ * @author hanzihang
+ * @date 2023/11/15
+ */
+@Component
+@EnableAsync  // 异步
+public class PreExecutionToolClass<R> {
+
+    @Autowired // 执行流程
+    private BpmExecuteProcessMapper runBpmExecuteProcessMapper;
+
+    @Autowired  // 执行流程中间表
+    private BpmExecuteNodeMiddleMapper runBpmExecuteNodeMiddleMapper;
+
+    @Autowired  // 执行流程节点表
+    private BpmExecuteNodeMapper runBpmExecuteNodeMapper;
+
+    @Autowired // 节点脚本表单中间表
+    private IBpmExecuteNodeFormService iBpmExecuteNodeFormService;
+
+    @Autowired // 执行流程service
+    private IBpmExecuteProcessService iBpmExecuteProcessService;
+
+    @Autowired  // 定义流程
+    private BpmProcessMapper bpmProcessMapper;
+
+    @Autowired  // 定义流程节点详细信息
+    private BpmProcessConfigurationMapper bpmProcessConfigurationMapper;
+
+    @Autowired  // 节点执行用户
+    private BpmNodeHandleUserMapper bpmNodeHandleUserMapper;
+
+    @Autowired  // 节点执行脚本
+    private BpmNodeScriptRelevanceMapper bpmNodeScriptRelevanceMapper;
+
+    @Autowired  // 真正执行脚本
+    private RunImplementationClass iRunImplementationClass;
+
+    @Autowired // 校验执行流程的数据
+    private VerifyExecutionProcess iVerifyExecutionProcess;
+
+    @Autowired  // 节点
+    private BpmExecuteNodeFormMapper executeNodeFormMapper;
+
+    @Autowired  // 节点日志
+    private IBpmExecuteNodeLogService iBpmExecuteNodeLogService;
+
+    @Autowired  // 审批流程中间表
+    private IBpmApprovalStatusService iBpmApprovalStatusService;
+
+    @Autowired // 通用查询
+    private ICommonService commonService;
+
+    @Autowired // 表单组
+    private IDragFormGroupService iDragFormGroupService;
+
+
+    /**
+     * 预执行流程、自动执行开始节点
+     *
+     * @param commonEntity
+     * @return
+     */
+    @Transactional
+    public AjaxResult ReadyToExecute(CommonEntity commonEntity) {
+        // 获取发起流程所需数据
+        IntoProduction intoProduction = this.obtainData(commonEntity);
+        /**
+         * 根据流程key校验当前流程数据的完整性,是否可以运行
+         */
+        // if (!iVerifyExecutionProcess.VerifyProcessData(intoProduction.getTaskProcessKey())) {
+        // return AjaxResult.error(HttpStatus.EXECUTEPROCESS, "流程数据验证失败!");
+        // }
+        /**1️⃣1️⃣1️⃣ 得到当前投产需要执行的流程详细信息*/
+        //--得到当前流程的详细信息
+        BpmProcess bpmProcess = bpmProcessMapper.selectBpmProcessByProcessKey(
+                intoProduction.getTaskProcessKey());
+
+        String taskKey = IdUtils.fastSimpleUUID(); // 得到流程的唯一标识
+        if (bpmProcess.getProcessType().toString().equals("1")) { // 当前被发起的流程是审批类型
+            //  发起审批类型的流程逻辑
+            BpmApprovalStatus bpmApprovalStatus = new BpmApprovalStatus();
+            bpmApprovalStatus.setTableName(intoProduction.getTableName());
+            bpmApprovalStatus.setTableId(intoProduction.getGuid());
+            bpmApprovalStatus.setApprovalState("5");// 当前流程发起后更改数据条状态
+            bpmApprovalStatus.setTaskKey(taskKey);
+            // 新增审批关系表
+            iBpmApprovalStatusService.insertBpmApprovalStatus(bpmApprovalStatus);
+        }
+        //---根据流程key得到当前流程的所有节点信息
+        List<BpmProcessConfiguration> bpmProcessConfigurationList =
+                bpmProcessConfigurationMapper.selectBpmProcessConfigurationList(
+                        new BpmProcessConfiguration(intoProduction.getTaskProcessKey()));
+        //----根据节点得到所有节点执行用户以及执行脚本的数据 ⬇⬇⬇⬇⬇⬇
+        List<String> nodekeyList = new ArrayList<>(); // 当前流程所有节点
+        // 根据节点表示得到所有脚本以及所有执行用户信息
+        bpmProcessConfigurationList.forEach(item -> nodekeyList.add(item.getNodeKey()));
+        // 当前流程的所有节点详细信息
+        List<BpmUserScriptVo> bpmUserScriptVoList = new ArrayList<>();
+        // 得到当前流程所有脚本数据
+        List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList = new ArrayList<>();
+        bpmProcessConfigurationList.forEach(item -> {
+            BpmUserScriptVo bpmUserScriptVo = new BpmUserScriptVo();
+            bpmUserScriptVo.setNodeKey(item.getNodeKey());
+            if (item.getNodeRolePermission() != null) {
+                bpmUserScriptVo.setBpmNodeHandleUserList(bpmNodeHandleUserMapper.selectBpmNodeHandleUserList(new BpmNodeHandleUser(item.getNodeRolePermission())));
+            }
+            // 判断流程类型是否是审批类型
+            // 审批类型默认是没有脚本的
+            // if (bpmProcess.getProcessType().equals("1")) {
+            // bpmNodeScriptRelevanceList.addAll(bpmUserScriptVo.getBpmNodeScriptRelevanceList());
+            // bpmUserScriptVoList.add(bpmUserScriptVo);
+            // } else if (bpmProcess.getProcessType().equals("0")) {
+            //
+            // }、
+
+            // -- 流程节点脚本关联表(一个节点可能会同时存在多个脚本-正常脚本、多个异常脚本)
+            bpmUserScriptVo.setBpmNodeScriptRelevanceList(bpmNodeScriptRelevanceMapper.selectBpmNodeScriptRelevanceList(new BpmNodeScriptRelevance(item.getNodeKey())));
+            bpmNodeScriptRelevanceList.addAll(bpmUserScriptVo.getBpmNodeScriptRelevanceList());
+            bpmUserScriptVoList.add(bpmUserScriptVo);
+        });
+        Map<String, String> shunxu = XmlDataParserUtils.getStartNodeAndNextNode(bpmProcess.getProcessXmlContent());
+        /**2️⃣2️⃣2️⃣ 新增执行流程表数据*/
+        BpmExecuteProcess runBpmExecuteProcess = new BpmExecuteProcess();
+        // 当前流程启动的唯一标识
+        runBpmExecuteProcess.setTaskKey(taskKey);
+        // 当前流程名称
+        runBpmExecuteProcess.setTaskProcessName(bpmProcess.getProcessName());
+        // 投产数据条的唯一标识
+        runBpmExecuteProcess.setTaskPlanKey(intoProduction.getGuid().split("=")[1]);
+        // 当前流程任务名称
+        runBpmExecuteProcess.setTaskName("");
+        // 定义表中的流程别名
+        runBpmExecuteProcess.setTaskProcessKey(bpmProcess.getProcessKey());
+        // 定义表中的流程xml标签内容
+        runBpmExecuteProcess.setTaskProcessXmlContent(bpmProcess.getProcessXmlContent());
+        // 启动流程的状态 默认:0 正常 1暂停 2弃用
+        runBpmExecuteProcess.setTaskProcessState(0L);
+        // 当前任务流程的版本注释
+        runBpmExecuteProcess.setTaskProcessNote(bpmProcess.getNote());
+        // 流程类型
+        runBpmExecuteProcess.setTaskProcessType(bpmProcess.getProcessType().toString());
+        // 当前流程执行节点
+        runBpmExecuteProcess.setTaskNodeKey(shunxu.get("startNode"));
+        // 当前流程需要执行的下一个节点
+        runBpmExecuteProcess.setTaskNodeNextKey(shunxu.get("nextNode"));
+        // 执行默认值
+        runBpmExecuteProcess.setDelFlag("0");
+        // *****替换当前执行流程的任务唯一标识
+        intoProduction.setTaskProcessKey(runBpmExecuteProcess.getTaskKey());
+        runBpmExecuteProcess.setCreateById(SecurityUtils.getUserId());
+        runBpmExecuteProcess.setCreateTime(new Date());
+        runBpmExecuteProcess.setCreateBy(SecurityUtils.getUsername());
+        // 执行新增方法
+        runBpmExecuteProcessMapper.insertBpmExecuteProcess(runBpmExecuteProcess);
+        // 新增计划表中绑定任务key编码
+
+
+        /**3️⃣3️⃣3️⃣ 插入所有预执行节点*/
+        List<BpmExecuteNode> runBpmExecuteNodeList = new ArrayList<>();
+        bpmProcessConfigurationList.forEach(item -> {
+            BpmExecuteNode bpmExecuteNode = new BpmExecuteNode();
+            bpmExecuteNode.setTaskProcessKey(runBpmExecuteProcess.getTaskKey());
+            bpmExecuteNode.setTaskNodeKey(item.getNodeKey());
+            bpmExecuteNode.setTaskNodeName(item.getNodeName());
+            bpmExecuteNode.setTaskNodeFormType(item.getNodeFormType());
+            bpmExecuteNode.setTaskNodeFormKey(item.getNodeFormKey()); // 单前节点绑定的表单
+            bpmExecuteNode.setTaskNodeType(item.getNodeType());
+            bpmExecuteNode.setTaskNodeBefore(item.getNodeBefore());
+            bpmExecuteNode.setTaskNodeAfter(item.getNodeAfter());
+            bpmExecuteNode.setTaskNodeRolePermission(item.getNodeRolePermission());
+            bpmExecuteNode.setTaskRemark(item.getRemark());
+            bpmExecuteNode.setTaskNodeState("0");  // 状态默认未执行
+            bpmExecuteNode.setTaskPriority("1");   // 任务优先级 设计是从排产操作时选中的任务优先级
+            bpmExecuteNode.setTaskNodeExecuteType(item.getNodeExecuteType());  // 当前节点上是手动执行还是自动执行 true || false
+            bpmExecuteNode.setTask3(item.getSpare3());  // 审批节点后操作列
+            runBpmExecuteNodeList.add(bpmExecuteNode);
+        });
+        runBpmExecuteNodeMapper.insertBpmExecuteNodeList(runBpmExecuteNodeList);
+        /**3️⃣3️⃣3️⃣ 执行流程任务所有关联数据执行用户、执行脚本等*/
+        List<BpmExecuteNodeMiddle> runBpmExecuteNodeMiddleList = new ArrayList<>();
+        int index = 0;
+        // bpmUserScriptVoList  当前节点的所有执行用户脚本
+        bpmUserScriptVoList.forEach(item -> {
+            BpmExecuteNodeMiddle bpmExecuteNodeMiddle = new BpmExecuteNodeMiddle();
+            // 任务流程编码
+            bpmExecuteNodeMiddle.setTaskProcessKey(runBpmExecuteProcess.getTaskKey());
+            // 节点标识
+            bpmExecuteNodeMiddle.setTaskNodeKey(item.getNodeKey());
+            // 节点执行角色编码
+            if (item.getBpmNodeHandleUserList() != null) {
+                bpmExecuteNodeMiddle.setTaskRealRole(item.getBpmNodeHandleUserList().get(index).getRealRole());
+            }
+            // 节点执行用户id
+            if (item.getBpmNodeHandleUserList() != null) {
+                bpmExecuteNodeMiddle.setTaskExecuteUserNo(item.getBpmNodeHandleUserList().get(index).getExecuteUserNo());
+            }
+            // 节点手动触发脚本
+            List<String> script0 = new ArrayList<>(), script1 = new ArrayList<>(), script2 = new ArrayList<>();// 异常手动触发 // 正常自动触发 // 节点前后自动触发
+            item.getBpmNodeScriptRelevanceList().forEach(stem -> {
+                if (stem.getNodeKey().contains(item.getNodeKey())) {
+                    // ⚠️⚠️⚠️ 0L 异常手动触发 1L 正常自动触发 2L 节点前后自动触发
+                    if (stem.getScriptTriggerType() == 0L) {
+                        script0.add(stem.getScriptKey());
+                    } else if (stem.getScriptTriggerType() == 1L) {
+                        script1.add(stem.getScriptKey());
+                    } else if (stem.getScriptTriggerType() == 2L) {
+                        script1.add(stem.getScriptKey());
+                    }
+                }
+            });
+            // 手动异常触发脚本
+            bpmExecuteNodeMiddle.setTaskArtificialScriptKey(script0.toString().replaceAll("\\[", "").replaceAll("\\]", ""));
+            // 正常节点自动触发脚本
+            bpmExecuteNodeMiddle.setTaskAutomaticScriptTriggerType(script1.toString().replaceAll("\\[", "").replaceAll("\\]", ""));
+            // 节点前后触发脚本
+            bpmExecuteNodeMiddle.setTaskNodeAroundScriptKey(script2.toString().replaceAll("\\[", "").replaceAll("\\]", ""));
+            // 追加节点中间表list
+            runBpmExecuteNodeMiddleList.add(bpmExecuteNodeMiddle);
+        });
+        List<BpmExecuteNodeMiddle> endrunBpmExecuteNodeMiddleList = new ArrayList<>();
+        runBpmExecuteNodeMiddleList.forEach(item -> {
+            String taskArtificialScriptKey = "";
+            String asd[] = item.getTaskArtificialScriptKey().split(",");
+            for (String s : asd) {
+                taskArtificialScriptKey += s.trim() + ",";
+            }
+            item.setTaskArtificialScriptKey(taskArtificialScriptKey.substring(0, taskArtificialScriptKey.lastIndexOf(",")));
+            endrunBpmExecuteNodeMiddleList.add(item);
+        });
+        runBpmExecuteNodeMiddleMapper.insertBpmExecuteNodeMiddleList(endrunBpmExecuteNodeMiddleList);
+        //**3️⃣⚡️5️⃣ 流程任务当中的所有节点关联的表单信息 得到当前流程的所有节点以及当前节点脚本绑定的异常脚本-》处理当前节点脚本、异常脚本绑定的表单到中间表信息 */
+        List<BpmExecuteNodeForm> bpmExecuteNodeFormList = new ArrayList<>();
+        // 当前流程的正常节点、异常节点(理论上无论什么节点都会绑定一个表单)
+        Map<String, String> nodeMap = new HashMap<>();
+        Map<String, BpmProcessConfiguration> nodeInfo = new HashMap<>();
+        bpmProcessConfigurationList.forEach(item -> {
+            if (item.getNodeType().equals("startEvent")) {
+                nodeMap.put("startNodeKey", item.getNodeKey());
+            } else if (item.getNodeType().equals("endEvent")) {
+                nodeMap.put("endNodeKey", item.getNodeKey());
+            }
+            nodeInfo.put(item.getNodeKey(), item);
+        });
+        bpmNodeScriptRelevanceList.forEach(item -> {
+            if (item.getNodeKey().equals(nodeMap.get("startNodeKey")) || item.getNodeKey().equals(nodeMap.get("endNodeKey"))) {
+                //  开始结束节点不做记录
+            } else
+                // 0=:异常脚本;1:正常脚本 2:节点前后自动  节点前后执行的脚本是没有表单的
+                if (item.getScriptTriggerType() != 2L) {
+                    BpmExecuteNodeForm bpmExecuteNodeForm = new BpmExecuteNodeForm();
+                    bpmExecuteNodeForm.setTaskProcessKey(intoProduction.getTaskProcessKey());
+                    bpmExecuteNodeForm.setTaskNodeKey(item.getNodeKey());
+                    bpmExecuteNodeForm.setTaskScriptKey(item.getScriptKey());
+                    bpmExecuteNodeForm.setTaskNodeName(item.getScriptNodeName());
+                    if (item.getScriptTriggerType() == 1L) { // 正常节点脚本
+                        // bpmProcessConfigurationList
+                        bpmExecuteNodeForm.setTaskNodeFormKey(nodeInfo.get(item.getNodeKey()).getNodeFormKey());
+                        bpmExecuteNodeForm.setTaskNodeFormType(nodeInfo.get(item.getNodeKey()).getNodeFormType());
+                        // bpmExecuteNodeForm.setTaskNodeFromContent();
+                    } else if (item.getScriptTriggerType() == 0L) { // 异常脚本
+                        bpmExecuteNodeForm.setTaskNodeFormKey(item.getFormKey());
+                        bpmExecuteNodeForm.setTaskNodeFormType(item.getScriptNodeFormType());
+                        // bpmExecuteNodeForm.setTaskNodeFromContent();
+                    }
+                    bpmExecuteNodeFormList.add(bpmExecuteNodeForm);
+                }
+        });
+        // 得到当前流程所有的表单类型
+        Map<String, String> nodeFrom = iBpmExecuteNodeFormService.selectNodeFromInfos(commonEntity.getCommMap().get("process_key").toString());
+        // 得到当前表单的所有信息
+        Map<String, Object> nodeFromInfoMap = this.getNodeFormInfos(nodeFrom);
+
+        bpmExecuteNodeFormList.forEach(item -> {
+            item.setTaskNodeFormContent(nodeFromInfoMap.get(item.getTaskNodeFormKey()).toString());
+        });
+        // 最终提交新增 bpmExecuteNodeFormList
+        bpmExecuteNodeFormList.forEach(item -> {
+            iBpmExecuteNodeFormService.insertBpmExecuteNodeForm(item);
+        });
+        // iBpmExecuteNodeFormService
+        /**4️⃣4️⃣4️⃣ 调用执行节点接口 预执行当前投产流程的开始节点,执行开始节点*/
+        // bpmUserScriptVoList  节点key对应的脚本
+        // 根据节点类型startEvent 筛选得到当前流程的开始节点,进行自动执行    // startEvent  开始节点类型
+        Optional<BpmProcessConfiguration> optionalStartNode = bpmProcessConfigurationList.stream().filter(item -> item.getNodeType().equals("startEvent")).findFirst();
+        // 找到开始节点进行记录
+        runBpmExecuteNodeList.forEach(itme -> {
+            if (itme.getTaskNodeType().equals("startEvent")) {
+                BpmExecuteNodeLog bpmExecuteNodeLog = new BpmExecuteNodeLog(itme);
+                iBpmExecuteNodeLogService.insertBpmExecuteNodeLog(bpmExecuteNodeLog);
+            }
+        });
+        // 0L:表示工业类型 1L表示审批类型
+        if (bpmProcess.getProcessType() == 1L) return AjaxResult.success();
+        if (optionalStartNode.isPresent()) {
+            // optionalStartNode.get().getNodeKey();  当前流程开始节点key
+            Optional<BpmUserScriptVo> optionalBpmUserScriptVo = bpmUserScriptVoList.stream().filter(item -> item.getNodeKey().equals(optionalStartNode.get().getNodeKey())).findFirst();
+            if (optionalBpmUserScriptVo.isPresent()) {
+                // 得到当前节点需要执行的脚本  只需执行自动执行的脚本即可
+                List<BpmNodeScriptRelevance> scriptAutoList = optionalBpmUserScriptVo.get().getBpmNodeScriptRelevanceList();
+                scriptAutoList.removeIf(item -> item.getScriptTriggerType() == 0L);  // 删除异常脚本
+                IScriptEntity iScriptEntity = new IScriptEntity();
+                iScriptEntity.setImplementationName(scriptAutoList.get(0).getScriptKey());
+                iScriptEntity.setScriptNodeKey(optionalBpmUserScriptVo.get().getNodeKey());
+                if (!iRunImplementationClass.RunScriptImplementationClassLogicCode(iScriptEntity, intoProduction)) {
+                    // 判断脚本执行状态
+                    return AjaxResult.error(HttpStatus.SCRIPTEXCEPTION, "脚本执行异常!");
+                }
+            }
+        } else {
+            // 数据出现问题
+            return AjaxResult.error(HttpStatus.EXECUTEPROCESS, "流程开始节点数据异常!");
+        }
+        /**5️⃣5️⃣5️⃣ 执行结果返回前端*/
+        return AjaxResult.success();
+    }
+
+
+    /**
+     * 执行流程节点共通接口
+     *
+     * @param bpmRunNodeVo
+     * @return
+     */
+    @Transactional
+    public AjaxResult executionNode(BpmRunNodeVo bpmRunNodeVo) {
+        String taskProcessKey = bpmRunNodeVo.getTaskProcessKey(); // 任务流程编码
+        String taskNodeKey = bpmRunNodeVo.getTaskNodeKey(); // 任务节点编码
+        // 得到当前节点的所有信息-》用于执行节点前后绑定的自动运行的脚本
+        BpmExecuteNode currentBpmExecuteNode = runBpmExecuteNodeMapper.queryBpmExecuteNodeBytaskNodeKey(taskProcessKey, taskNodeKey);
+
+        // 在执行节时得到除当前节点绑定的正常脚本外,有可能会绑定自动执行的脚本(这些自动执行的脚本参数不能确定,无法传递)
+        BpmExecuteNodeMiddle bpmExecuteNodeMiddle = runBpmExecuteNodeMiddleMapper.queryBpmExecuteNodeMiddleByTaskNodeKey(taskProcessKey, taskNodeKey);
+        String script[] = bpmExecuteNodeMiddle.getTaskNodeAroundScriptKey().split(",");  // 得到当前节点需要自动执行的脚本
+        //--- 1️⃣1️⃣1️⃣执行节点前绑定的脚本🚀🚀🚀~!!!
+        System.err.println("--- 1️⃣1️⃣1️⃣执行节点前绑定的脚本🚀🚀🚀~!!!");
+        if (currentBpmExecuteNode.getTaskNodeBefore().equals("true")) {
+            // 调用执行脚本接口
+            if (script != null && script.length != 0 && !script[0].isEmpty()) {
+                for (int i = 0; i < script.length; i++) {
+                    //  节点执行必要的参数
+                    IScriptEntity iScriptEntity = new IScriptEntity();
+                    iScriptEntity.setScriptFlowKey(taskProcessKey);
+                    iScriptEntity.setScriptNodeKey(taskNodeKey);
+                    iScriptEntity.setImplementationName(script[i]);
+                    // 调用执行脚本方法
+                    if (!iRunImplementationClass.RunScriptImplementationClassLogicCode(iScriptEntity, bpmRunNodeVo)) {
+                        // 判断脚本执行状态
+                        return AjaxResult.error(HttpStatus.SCRIPTEXCEPTION, "节点前脚本执行失败!");
+                    }
+                }
+            }
+        }
+        //--- 2️⃣2️⃣2️⃣执行节点绑定的正常脚本🚀🚀🚀~!!!
+        System.err.println("--- 2️⃣2️⃣2️⃣执行节点绑定的正常脚本🚀🚀🚀~!!!");
+        IRunBPMEntity iRunBPMEntity = new IRunBPMEntity();
+        iRunBPMEntity.setImplementationName(bpmRunNodeVo.getImplementationName());
+        iRunBPMEntity.setExecutionFlowKey(taskProcessKey);
+        iRunBPMEntity.setExecutionNodeKey(taskNodeKey);
+        iRunBPMEntity.setExecutionMap(bpmRunNodeVo.getFormDataMap());
+        iRunBPMEntity.setTableName(bpmRunNodeVo.getTableName());
+        AjaxResult ajaxResult = iRunImplementationClass.RunBPMImplementationClassLogicCode(iRunBPMEntity);  //  调用节点绑定逻辑代码
+        if (!ajaxResult.get("code").toString().equals("200")) {
+            return ajaxResult;
+        }else { //只有执行成功的情况下再让他插入日志信息
+            // ⚠️⚠️⚠️ 新增节点执行记录
+            BpmExecuteNodeLog bpmExecuteNodeLog = new BpmExecuteNodeLog(currentBpmExecuteNode);
+            iBpmExecuteNodeLogService.insertBpmExecuteNodeLog(bpmExecuteNodeLog);
+        }
+        //--- 2️⃣⚡️5️⃣ 当节点执行完成后修改节点的状态
+        System.err.println("--- 2️⃣⚡️5️⃣ 当节点执行完成后修改节点的状态");
+        BpmExecuteNode updateNodeStateEn = new BpmExecuteNode();
+        updateNodeStateEn.setTaskProcessKey(taskProcessKey);
+        updateNodeStateEn.setTaskNodeKey(taskNodeKey);
+        updateNodeStateEn.setTaskNodeState("1");      // 状态标识已经执行
+        // 修改当前节点的状态
+        runBpmExecuteNodeMapper.updateNodeState(updateNodeStateEn);
+        //--- 3️⃣3️⃣3️⃣执行节点后绑定的脚本🚀🚀🚀~!!!
+        System.err.println("--- 3️⃣3️⃣3️⃣执行节点后绑定的脚本🚀🚀🚀~!!!");
+        if (currentBpmExecuteNode.getTaskNodeAfter().equals("true")) {
+            // 调用执行脚本接口
+            if (script != null && script.length != 0 && !script[0].isEmpty()) {
+                for (int i = 0; i < script.length; i++) {
+                    //  节点执行必要的参数
+                    IScriptEntity iScriptEntity = new IScriptEntity();
+                    iScriptEntity.setScriptFlowKey(taskProcessKey);
+                    iScriptEntity.setScriptNodeKey(taskNodeKey);
+                    iScriptEntity.setImplementationName(script[i]);
+                    // 调用执行节点
+                    if (!iRunImplementationClass.RunScriptImplementationClassLogicCode(iScriptEntity, bpmRunNodeVo)) {
+                        // 判断脚本执行状态
+                        return AjaxResult.error(HttpStatus.SCRIPTEXCEPTION, "节点后执行脚本失败!");
+                    }
+                }
+            }
+        }
+        BpmExecuteNode bpmExecuteNode = runBpmExecuteNodeMapper.queryBpmExecuteNodeBytaskNodeKey(bpmRunNodeVo.getTaskProcessKey(), bpmRunNodeVo.getNextNodeKey());
+        //---3️⃣⚡️5️⃣ 添加节点执行记录  -》当前执行的节点详细信息
+        // ⚠️⚠️⚠️ 当前节点执行完成新增日志数据,
+        // 理论讲当前节点一旦点击运行操作就要新增日志,最后修改日志的状态
+        // BpmExecuteNodeLog bpmExecuteNodeLog1 = new BpmExecuteNodeLog(currentBpmExecuteNode);
+        // iBpmExecuteNodeLogService.insertBpmExecuteNodeLog(bpmExecuteNodeLog1);
+        // 4️⃣4️⃣4️⃣ 校验当前节点是否为结束节点
+        System.err.println("--- 4️⃣4️⃣4️⃣ 校验当前节点是否为结束节点");
+        if (bpmExecuteNode.getTaskNodeType().equals("endEvent")) {
+            //  节点执行必要的参数
+            IScriptEntity iScriptEntity = new IScriptEntity();
+            iScriptEntity.setScriptFlowKey(taskProcessKey);
+            iScriptEntity.setScriptNodeKey(taskNodeKey);
+            iScriptEntity.setImplementationName("commonEndEvent");  // 直接调用结束节点执行逻辑
+            // 调用执行结束节点
+            if (!iRunImplementationClass.RunScriptImplementationClassLogicCode(iScriptEntity, iScriptEntity)) {
+                // 判断脚本执行状态
+                return AjaxResult.error(HttpStatus.SCRIPTEXCEPTION, "流程结束失败!");
+            }
+            // 记录结束节点
+            BpmExecuteNodeLog bpmExecuteNodeLog11 = new BpmExecuteNodeLog(bpmExecuteNode);
+            iBpmExecuteNodeLogService.insertBpmExecuteNodeLog(bpmExecuteNodeLog11);
+            // 结束当前流程 更新流程状态
+            if (runBpmExecuteProcessMapper.endProcess(bpmRunNodeVo.getTaskProcessKey()) > 1) {
+                AjaxResult.success("流程执行成功!");
+            } else {
+                AjaxResult.error(HttpStatus.PROCESSERROR, "流程结束失败!");
+            }
+        }
+        /**
+         * *** ⤴️🔄♾️❗️校验下一个节点是否需要自动执行
+         *  主动调用的执行接口一定是手动触发的节点
+         *  当手动触发节点后的下一个节点需要判断节点类型是否是自动执行的节点
+         *
+         *
+         *  自动执行节点程序自己调用 自动执行节点绑定的脚本。(递归执行)
+         *  !!! 调用自动执行的脚本无法传递除特定参数外的其他用户业务表中的参数
+         */
+        System.err.println("*** ⤴️🔄♾️❗️校验下一个节点是否需要自动执行");
+        if (bpmExecuteNode.getTaskNodeExecuteType().equals("true")) {  // 当前节点的下一个节点,。。。。。。,,。是自动执行
+            // 处理数据
+            BpmRunNodeVo bpmRunNodeVo1 = new BpmRunNodeVo();
+            bpmRunNodeVo1.setTaskNodeKey(bpmExecuteNode.getTaskNodeKey());
+            bpmRunNodeVo1.setTaskProcessKey(bpmExecuteNode.getTaskProcessKey());
+            bpmRunNodeVo1.setTaskProcessXmlContent(bpmRunNodeVo.getTaskProcessXmlContent());
+            // 当前节点的下一个节点的编码
+            bpmRunNodeVo1.setNextNodeKey(XmlDataParserUtils.getNextNodeKey(bpmRunNodeVo.getTaskProcessXmlContent(), bpmRunNodeVo.getNextNodeKey()));
+            // 当前节点执行的脚本
+            BpmExecuteNodeMiddle nextBpmExecuteNodeMiddle = runBpmExecuteNodeMiddleMapper.queryBpmExecuteNodeMiddleByTaskNodeKey(bpmRunNodeVo.getTaskProcessKey(), bpmRunNodeVo.getNextNodeKey());
+            // 节点如果是自动的执行方式,那么节点类型一定是正常的(或者单独的节点类型等)
+            bpmRunNodeVo1.setTaskNodeType("userTask");
+            bpmRunNodeVo1.setImplementationName(nextBpmExecuteNodeMiddle.getTaskAutomaticScriptTriggerType());
+            BpmExecuteProcess bpmExecuteProcess = new BpmExecuteProcess();
+            // bug位置,流程节点执行key
+            bpmExecuteProcess.setTaskKey(bpmRunNodeVo.getTaskProcessKey());
+            bpmExecuteProcess.setTaskNodeKey(bpmRunNodeVo.getTaskNodeKey());
+            bpmExecuteProcess.setTaskNodeNextKey(bpmRunNodeVo.getNextNodeKey());
+            runBpmExecuteProcessMapper.updateProcessNode(bpmExecuteProcess);
+            this.executionNode(bpmRunNodeVo1);
+        } else if (bpmExecuteNode.getTaskNodeExecuteType().equals("false")) {
+            System.err.println("✅✅✅节点执行完成!!!");
+            // 判断当前执行的节点是否为回退类型的异常节点
+            // 回退类型的异常节点一定是的任务执行节点的编码是不能被改变的,其他类型的异常可以进行更改
+            if (bpmRunNodeVo.getTaskNodeType().equals("backExceptionTask")) {
+                return AjaxResult.success();
+            }
+            BpmExecuteProcess bpmExecuteProcess = new BpmExecuteProcess();
+            bpmExecuteProcess.setTaskKey(bpmRunNodeVo.getTaskProcessKey());
+            bpmExecuteProcess.setTaskNodeKey(bpmRunNodeVo.getTaskNodeKey());
+            bpmExecuteProcess.setTaskNodeNextKey(bpmRunNodeVo.getNextNodeKey());
+            runBpmExecuteProcessMapper.updateProcessNode(bpmExecuteProcess);
+            return AjaxResult.success();
+        }
+        return AjaxResult.success();
+    }
+
+    /**
+     * 获取发起流程数据
+     *
+     * @param commonEntity
+     * @return
+     */
+    public IntoProduction obtainData(CommonEntity commonEntity) {
+        IntoProduction intoProduction = new IntoProduction();  // 启动流程所需参数实体
+        commonEntity.getConditionMap().entrySet().forEach(item -> {
+            // 得到当前表的主键字段 // 得到当前表的主键值
+            intoProduction.setGuid(item.getKey() + "=" + item.getValue().toString());
+        });
+        // 得到当前表名
+        intoProduction.setTableName(commonEntity.getBasicMap().get("tableName").toString());
+        // 得到需要执行的流程编码
+        intoProduction.setTaskProcessKey(commonEntity.getCommMap().get("process_key").toString());
+        // 得到单前表所需的状态字段,启动流程所需kv
+        intoProduction.setStateMap(commonEntity.getConditionMap());
+        intoProduction.getStateMap().putAll(commonEntity.getBtnParametersMap());
+        return intoProduction;
+    }
+
+    /**
+     * * 执行表单查询详情接口,得到当前节点展示表单的数据
+     */
+    public CommonEntity processNodeFormInfoData(BpmRunNodeFromVo bpmRunNodeFromVo) {
+        return iRunImplementationClass.getNodeFormData(bpmRunNodeFromVo);
+    }
+
+
+    /**
+     * 共通执行节点表单模版接口
+     * * 目前只有审批节点在调用这个接口
+     */
+    public List<Map> getProcessNodeFormTemplate(BpmRunNodeFromVo bpmRunNodeFromVo) {
+        //任务流程key
+        String taskProcessKey = bpmRunNodeFromVo.getTaskProcessKey();
+        //任务节点key
+        String taskNodeKey = bpmRunNodeFromVo.getTaskNodeKey();
+        //脚本名称
+        // String taskScriptKey = bpmRunNodeFromVo.getTaskScriptKey();
+        //根据流程key和节点key查询节点表单关系表【bpm_execute_node_form】
+        BpmExecuteNodeForm bpmExecuteNodeForm = iBpmExecuteNodeFormService.getBpmExecuteNodeForm(taskProcessKey, taskNodeKey, null);
+        //存放返回结果
+        List<Map> mapList = new ArrayList<>();
+        //节点对应的表单信息不能为空
+        if (bpmExecuteNodeForm != null) {
+            String taskNodeFormContent = bpmExecuteNodeForm.getTaskNodeFormContent();
+            //拿到当前节点对应的表单类型
+            String taskNodeFormType = bpmExecuteNodeForm.getTaskNodeFormType();
+            if (taskNodeFormType.equals("dragForm")) {
+                HashMap hashMap = new HashMap();
+                //解析存进去的表单信息【task_node_from_content】
+                JSONObject taskNodeFromContentJson = JSONObject.parseObject(taskNodeFormContent);
+                //得到sqlKey
+                String sqlKey = taskNodeFromContentJson.get("sqlKey").toString();
+                //根据sqlKey查询表单数据
+
+                // if (!sqlKey.isEmpty()) {
+                // Map<String, String> tableSqlBySqlKey = executeNodeFormMapper.getTableSqlBySqlKey(sqlKey);
+                // hashMap.put("resultMap", tableSqlBySqlKey);
+                // }
+
+                //得到【df_form_sql】
+                String dfFormSql = taskNodeFromContentJson.get("dfFormSql").toString();
+                ObjectMapper objectMapper = new ObjectMapper();
+                Map<String, Object> sqlMap = null;
+                try {
+                    sqlMap = objectMapper.readValue(dfFormSql, Map.class);
+                    //循环得到每一个sql语句返回结果
+                    for (Map.Entry<String, Object> entry : sqlMap.entrySet()) {
+                        List<Map<String, Object>> resultMap = executeNodeFormMapper.executeSql(entry.getValue().toString());
+                        sqlMap.put(entry.getKey(), resultMap);
+                    }
+                    //把原来的sql语句替换成下拉框数据
+                    taskNodeFromContentJson.put("dfFormSql", JSONObject.toJSONString(sqlMap));
+                } catch (JsonProcessingException e) {
+                    e.printStackTrace();
+                }
+                // 获取当前流程审批的表单数据关系
+                BpmApprovalStatus bpmApprovalStatus = iBpmApprovalStatusService.selectBpmApprovalStatusByTaskKey(bpmRunNodeFromVo.getTaskProcessKey());
+                // 通用查询方法
+                CommonEntity common = new CommonEntity();
+                common.getBasicMap().put("tableName", bpmApprovalStatus.getTableName());
+                common.getQueryMap().put(bpmApprovalStatus.getTableId().split("=")[0], bpmApprovalStatus.getTableId().split("=")[1]);
+                // 添加结果当前回显表单的数据信息
+                taskNodeFromContentJson.put("resultMap", commonService.selectList(common));
+                //表单结构信息
+                hashMap.put("template", taskNodeFromContentJson);
+                //添加到返回集合中
+                mapList.add(hashMap);
+            } else if (taskNodeFormType.equals("dragFormGroup")) {  // 当前节点绑定的是表单组类型
+                // 查询表单组信息、
+                HashMap hashMap = new HashMap();
+                //解析存进去的表单信息【task_node_from_content】
+                JSONObject taskNodeFromContentJson = JSONObject.parseObject(taskNodeFormContent);
+
+                // 主表单逻辑
+                if (taskNodeFromContentJson.get("mainForm") != null) {
+                    Map<String, Object> mianFormMap = (Map<String, Object>) ((Map) taskNodeFromContentJson.get("mainForm")).get("showTemplate");
+                    //得到sqlKey
+                    String sqlKey = mianFormMap.get("sqlKey").toString();
+                    //根据sqlKey查询表单数据
+                    if (!sqlKey.isEmpty()) {
+                        Map<String, String> tableSqlBySqlKey = executeNodeFormMapper.getTableSqlBySqlKey(sqlKey);
+                        hashMap.put("resultMap", tableSqlBySqlKey);
+                    }
+                    //得到【df_form_sql】
+                    String dfFormSql = mianFormMap.get("dfFormSql").toString();
+                    ObjectMapper objectMapper = new ObjectMapper();
+                    Map<String, Object> sqlMap = null;
+                    try {
+                        sqlMap = objectMapper.readValue(dfFormSql, Map.class);
+                        //循环得到每一个sql语句返回结果
+                        for (Map.Entry<String, Object> entry : sqlMap.entrySet()) {
+                            List<Map<String, Object>> resultMap = executeNodeFormMapper.executeSql(entry.getValue().toString());
+                            sqlMap.put(entry.getKey(), resultMap);
+                        }
+                        //把原来的sql语句替换成下拉框数据
+                        mianFormMap.put("dfFormSql", JSONObject.toJSONString(sqlMap));
+                    } catch (JsonProcessingException e) {
+                        e.printStackTrace();
+                    }
+                }
+
+                // 从表单逻辑
+                if (taskNodeFromContentJson.get("subFormList") != null) {
+                    ((ArrayList) taskNodeFromContentJson.get("subFormList")).forEach(item -> {
+                        Map<String, Object> itemMap = (Map<String, Object>) ((Map) item).get("showTemplate");
+
+                        //得到sqlKey
+                        String sqlKey = itemMap.get("sqlKey").toString();
+
+                        //根据sqlKey查询表单数据
+                        if (!sqlKey.isEmpty()) {
+                            Map<String, String> tableSqlBySqlKey = executeNodeFormMapper.getTableSqlBySqlKey(sqlKey);
+                            hashMap.put("resultMap", tableSqlBySqlKey);
+                        }
+                        //得到【df_form_sql】
+                        String dfFormSql = itemMap.get("dfFormSql").toString();
+                        ObjectMapper objectMapper = new ObjectMapper();
+                        Map<String, Object> sqlMap = null;
+                        try {
+                            sqlMap = objectMapper.readValue(dfFormSql, Map.class);
+                            //循环得到每一个sql语句返回结果
+                            for (Map.Entry<String, Object> entry : sqlMap.entrySet()) {
+                                List<Map<String, Object>> resultMap = executeNodeFormMapper.executeSql(entry.getValue().toString());
+                                sqlMap.put(entry.getKey(), resultMap);
+                            }
+                            //把原来的sql语句替换成下拉框数据
+                            itemMap.put("dfFormSql", JSONObject.toJSONString(sqlMap));
+                        } catch (JsonProcessingException e) {
+                            e.printStackTrace();
+                        }
+                    });
+                }
+                // 获取当前流程审批的表单数据关系
+                BpmApprovalStatus bpmApprovalStatus = iBpmApprovalStatusService.selectBpmApprovalStatusByTaskKey(bpmRunNodeFromVo.getTaskProcessKey());
+                // 通用查询方法
+                CommonEntity common = new CommonEntity();
+                common.getBasicMap().put("tableName", bpmApprovalStatus.getTableName());
+                common.getQueryMap().put(bpmApprovalStatus.getTableId().split("=")[0], bpmApprovalStatus.getTableId().split("=")[1]);
+                // 添加结果当前回显表单的数据信息
+
+                //  主
+                List<CommonEntity> retCommonEntityList = commonService.selectList(common);
+
+                ((Map) taskNodeFromContentJson.get("mainForm")).put("showValue", retCommonEntityList);
+
+                // 从
+                ((ArrayList) taskNodeFromContentJson.get("subFormList")).forEach(item -> {
+                    String[] congTableOInfo = ((Map) item).get("formItem").toString().split("\\.");
+                    String[] zhuTableOWhere = ((Map) item).get("relateMainItem").toString().split("\\.");
+                    CommonEntity congCommon = new CommonEntity();
+                    congCommon.getBasicMap().put("tableName", congTableOInfo[0]);
+                    Object val = retCommonEntityList.get(0).getResultMap().get(StringUtils.toCamelCase(zhuTableOWhere[1]));
+                    congCommon.getQueryMap().put(congTableOInfo[1], val);
+                    commonService.selectList(congCommon);
+                    ((Map) item).put("showValue", commonService.selectList(congCommon));
+                });
+                taskNodeFromContentJson.put("resultMap", retCommonEntityList);
+                //表单结构信息
+                hashMap.put("template", taskNodeFromContentJson);
+                //添加到返回集合中
+                mapList.add(hashMap);
+            } else if (taskNodeFormType.equals("composeForm")) {
+                //参数为一个数组
+                JSONArray objects = JSON.parseArray(taskNodeFormContent);
+
+                //循环数组元素
+                objects.forEach(item -> {
+                    String s = item.toString();
+                    JSONObject jsonObject = JSONObject.parseObject(s);
+                    String tableSql = jsonObject.get("tableSql").toString();
+                    String conditionArrayJson = jsonObject.get("condition").toString();
+                    JSONArray jsonArray = JSON.parseArray(conditionArrayJson);
+
+                    jsonArray.forEach(conditionItem -> {
+                        //处理下这个条件 去掉 #{ 去掉.
+                        String conditionString = conditionItem.toString().replace("#{", "").replace(".", "_");
+                        //转驼峰
+                        String CamelConditionString = StringUtils.toCamelCase(conditionString);
+                        //
+                    });
+
+                    Map<String, String> stringHashMap = executeNodeFormMapper.tableSql(tableSql);
+                    jsonObject.put("tableList", stringHashMap);
+                    mapList.add(jsonObject);
+                });
+            } else if (taskNodeFormContent.equals("designForm")) {
+                HashMap hashMap = new HashMap();
+                hashMap.put("resultMap", "");
+                hashMap.put("template", "");
+                mapList.add(hashMap);
+            }
+        }
+        return mapList;
+    }
+
+    /**
+     * 查询节点对应的表单信息
+     *
+     * @param nodeForm
+     * @return
+     */
+    public Map<String, Object> getNodeFormInfos(Map<String, String> nodeForm) {
+        Set<String> nodeKey = nodeForm.keySet();
+        Map resultMap = new HashMap();
+        nodeKey.forEach(item -> {
+            if (nodeForm.get(item).equals("dragForm")) {  // 拖拽类型的表单
+                String fromInfo = iBpmExecuteProcessService.getFromInfoByFormKey(item);
+                resultMap.put(item, fromInfo);
+            } else if (nodeForm.get(item).equals("dragFormGroup")) { // 拖拽的表单组
+                // 得到当前表格组的信息
+                DragFormGroup dragFormGroup = iDragFormGroupService.selectDragFormGroupByKey(item);
+                // 根据表单组中的keys信息 获取对应动态表单的信息
+                String[] formKeys = JSON.parseArray(dragFormGroup.getFormKeys()).toArray(String.class);
+                List<CommonEntity> commonEntityList = iBpmExecuteProcessService.getFromInfoByFormKeys(formKeys);
+                // 当前表单组关系
+                Map<String, Object> relationJsonMap = (Map<String, Object>) JSON.parse(dragFormGroup.getRelationJson());
+                // 得到当前主表单key
+                ((Map) relationJsonMap.get("mainForm")).get("formKey");
+                // 主表单增加模版信息
+                commonEntityList.forEach(ctem -> {
+                    if (ctem.getResultMap().get("formKey").equals(((Map) relationJsonMap.get("mainForm")).get("formKey"))) {
+                        ((Map) relationJsonMap.get("mainForm")).put("showTemplate", ctem.getResultMap());
+                    }
+                });
+                // 从表单增加模版信息
+                ((ArrayList) relationJsonMap.get("subFormList")).forEach(rtem -> {
+                    ((Map) rtem).put("showTemplate", commonEntityList.stream().filter(ctem -> ctem.getResultMap().get("formKey").equals(((Map) rtem).get("formKey"))).findFirst().get().getResultMap());
+                });
+                // 添加表单组模版布局
+                relationJsonMap.put("layoutJson", dragFormGroup.getLayoutJson());
+                resultMap.put(item, relationJsonMap.toString());
+            } else if (nodeForm.get(item).equals("composeForm")) { // 组合类型的表单
+                String groupTableInfo = iBpmExecuteProcessService.getGroupTableInfo(item);
+                resultMap.put(item, groupTableInfo);
+            } else if (nodeForm.get(item).equals("designForm")) {  // 自定义类型表单
+                resultMap.put(item, "");
+            }
+        });
+        return resultMap;
+    }
+
+    /**
+     * 回退流程节点
+     *
+     * @param bpmBackNodeVo
+     * @return
+     */
+    public AjaxResult backProcessNode(BpmBackNodeVo bpmBackNodeVo) {
+        BpmExecuteProcess bpmExecuteProcess = runBpmExecuteProcessMapper.selectBpmExecuteProcessByTaskKey(bpmBackNodeVo.getTaskProcessKey());
+        bpmExecuteProcess.getTaskProcessXmlContent(); // 当前流程xml内容
+        Map<String, Object> bpmInfoOrder = XmlDataParserUtils.getAllNodeKey(bpmExecuteProcess.getTaskProcessXmlContent());
+        // 修改流程-> 流程执行的xml文件
+        bpmExecuteProcess.setTaskProcessXmlContent(XmlDataParserUtils.clearExceptionTask(bpmExecuteProcess.getTaskProcessXmlContent(), bpmBackNodeVo.getTaskBackNodeKey()));
+        // 如果触发回退操作的节点是一个异常节点(需要更改当前流程绑定的执行节点)
+        bpmExecuteProcess.setTaskNodeNextKey(bpmBackNodeVo.getTaskBackNodeKey());
+        runBpmExecuteProcessMapper.updateBpmExecuteProcess(bpmExecuteProcess);
+        // 得到当前流程的详细信息
+        Map<String, Object> nodeMap = (Map<String, Object>) bpmInfoOrder.get("nodeMap");
+        List<String> nodeList = (List<String>) bpmInfoOrder.get("nodeList");
+        int index = (int) nodeMap.get(bpmBackNodeVo.getTaskBackNodeKey()); // 得到被回退的节点下标
+        List<String> nodeKeys = new ArrayList<>();
+        for (int i = index; i < nodeList.size(); i++) {
+            nodeKeys.add(nodeList.get(i));
+        }
+        // 修改当前流程节点状态
+        runBpmExecuteNodeMapper.updateNodeStateByKeys(bpmBackNodeVo.getTaskProcessKey(), nodeKeys);
+        BpmExecuteNodeLog bpmExecuteNodeLog = new BpmExecuteNodeLog();
+        bpmExecuteNodeLog.setTaskProcessKey(bpmBackNodeVo.getTaskProcessKey());
+        bpmExecuteNodeLog.setTaskNodeKey(bpmBackNodeVo.getTaskNodeKey());
+        List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteNodeLogList(bpmExecuteNodeLog);
+        if (bpmExecuteNodeLogList.size() == 1) {
+            // 问题:当前修改回退节点日志,在此当前回退节点并未执行完成。
+            //      所以并没有日志数据,无法完成修改操作
+            BpmExecuteNodeLog bpmExecuteNodeLog1 = bpmExecuteNodeLogList.get(0);
+            bpmExecuteNodeLog1.setTaskParentNodeKey(bpmBackNodeVo.getTaskNodeKey());
+            iBpmExecuteNodeLogService.updateBpmExecuteNodeLog(bpmExecuteNodeLog1);
+        }
+        nodeKeys.add(bpmBackNodeVo.getTaskBackNodeKey());
+        // 修改回退节点后的所有异常节点信息
+        runBpmExecuteNodeMapper.deleteExceptionNodeByKeys(bpmBackNodeVo.getTaskProcessKey(), nodeKeys);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 执行审批流程节点
+     *
+     * @param bpmRunNodeVo 当前节点信息
+     * @return
+     */
+    public AjaxResult approvalNode(BpmRunNodeVo bpmRunNodeVo) {
+        /**
+         * 不能确定某张表可以发起流程,也就是发起审批的这个条数据需要回传后台标识
+         *
+         * 表名以及当前数据条的主键,
+         */
+        /**
+         * 1️⃣1️⃣1️⃣  准备执行节点所需数据
+         * * 审批节点不过是通过、未通过、驳回等状态信息
+         * * 审批备注与通过、不通过等状态是同一列数据,
+         * * 如果轮回审批,那么备注字段也会是同列,之前审批的状态以及审批备注,需要从日志表中获取
+         * * 把当前流程节点的完整执行记录到日志表中,审批流程的执行只修改状态
+         */
+        String taskProcessKey = bpmRunNodeVo.getTaskProcessKey(); // 任务流程编码
+        String taskNodeKey = bpmRunNodeVo.getTaskNodeKey(); // 任务节点编码
+        String taskNextNodeKey = XmlDataParserUtils.getNextNodeKey(bpmRunNodeVo.getTaskProcessXmlContent(), taskNodeKey);
+        // 获取当前节点的下个节点类型
+        String taskNextNodeType = XmlDataParserUtils.getNodeType(bpmRunNodeVo.getTaskProcessXmlContent(), taskNextNodeKey);
+        // 得到当前执行的流程信息
+        BpmExecuteProcess currentBpmExecuteProcess = runBpmExecuteProcessMapper.selectBpmExecuteProcessByTaskKey(taskProcessKey);
+        // 得到当前节点的所有信息-》审批类型节点会出现节点后给某张表插入数据
+        BpmExecuteNode currentBpmExecuteNode = runBpmExecuteNodeMapper.queryBpmExecuteNodeBytaskNodeKey(taskProcessKey, taskNodeKey);
+        // 审批备注
+        String approvalRemark = bpmRunNodeVo.getApprovalRemark();
+        // 审批状态 pass:通过、noPass:不通过、reject:驳回
+        String approvalStatus = bpmRunNodeVo.getApprovalStatus();
+        // 当前执行的节点全部信息
+        currentBpmExecuteNode.setTaskNodeOtherState(approvalStatus);
+        currentBpmExecuteNode.setTaskRemark(approvalRemark);
+
+        // 当前执行的流程
+        currentBpmExecuteProcess.setTaskNodeKey(taskNodeKey);
+        currentBpmExecuteProcess.setTaskNodeNextKey(taskNextNodeKey);
+
+        // 2️⃣2️⃣2️⃣  开始执行当前节点
+        // 补充流程节点信息(如若驳回操作,会显示上次审批记录)
+        runBpmExecuteNodeMapper.updateBpmExecuteNode(currentBpmExecuteNode);
+        // --- 修改当前流程执行节点
+        runBpmExecuteProcessMapper.updateProcessNode(currentBpmExecuteProcess);
+        // --- 修改当前审批的数据条状态
+
+
+        // 3️⃣3️⃣3️⃣  判断当前节点是否存在给其他表插入数据
+        // currentBpmExecuteNode.getTask
+
+        // ⚠️⚠️⚠️ 新增节点执行记录
+        BpmExecuteNodeLog bpmExecuteNodeLog = new BpmExecuteNodeLog(currentBpmExecuteNode);
+        iBpmExecuteNodeLogService.insertBpmExecuteNodeLog(bpmExecuteNodeLog);
+
+        // 4️⃣4️⃣4️⃣  判断是否结束审批流程  || 不通过流程直接结束 || 驳回流程直接结束
+        if (approvalStatus.equals("noPass") || approvalStatus.equals("reject") || taskNextNodeType.equals("endEvent")) {
+            // 得到当前数据条的表信息,修改当前数据条的审批状态值
+            BpmApprovalStatus bpmApprovalStatus = iBpmApprovalStatusService.selectBpmApprovalStatusByTaskKey(taskProcessKey);
+            // 当前节点是改流程的最后一个节点,默认执行结束节点
+
+            // 审批流程结束,修改当前审批关联数据条的关联数据条的状态(bpm_approval_status)
+            // 具体修改数据条的状态应当是根据结束节点的上个节点的状态来判断
+            String status = getuApprovalStatus(approvalStatus);
+
+            // 更新审批的数据条状态
+            iBpmApprovalStatusService.updateBpmApprovalStatusByTaskKey(new BpmApprovalStatus(status, bpmRunNodeVo.getTaskProcessKey()));
+            // 更新审批主数据条审批状态
+
+            iBpmApprovalStatusService.updateApprovalStatusByTableName(bpmApprovalStatus.getTableName(), status, bpmApprovalStatus.getTableId());
+
+            // 结束当前流程
+            return AjaxResult.success(runBpmExecuteProcessMapper.endProcess(bpmRunNodeVo.getTaskProcessKey()));
+
+        }
+
+        /* 审批的发起操作,相当于这个流程的开始
+           那么用户首次调用当前接口,都会就是一级审批
+           需要当前操作的状态以及审批过后的备注信息 两列数据。
+           修改节点状态,添加审批的数据,修改流程执行节点的key。
+           如何当前节点有节点后需要插入的其他表数据则执行。
+
+           理论上来讲每一个节点的表单都是一样的,都是审批数据条是否通过,以及审批意见
+           如果需要审批的数据条是多表中的数据,也看作为一条数据来处理。
+
+           流程发起时的表单数据开始存在用户的表中,所以同生产流程逻辑一样。
+           在发起这个流程的时候记录当前的数据条的表名以及表主键
+        */
+
+
+        return AjaxResult.success();
+    }
+
+
+    // 当前节点在操作最后一个审批节点时根据审批的节点状态来更改当前审批数据条的状态
+    public String getuApprovalStatus(String code) {
+        // 审批状态 pass:通过、noPass:不通过、reject:驳回
+        // '审批状态 (0:已提交、1:已通过、2:不通过、4:驳回、5:审批中)'
+        if ("pass".equals(code)) return "1";
+        if ("noPass".equals(code)) return "2";
+        if ("reject".equals(code)) return "4";
+        return "5";
+    }
+
+    // 撤销申请数据条操作
+    @Transactional
+    public AjaxResult revokeApplication(BpmRunNodeVo bpmRunNodeVo) {
+        // 当前执行流程编号
+        String taskKey = bpmRunNodeVo.getTaskProcessKey();
+        // 得到当前数据条的表信息,修改当前数据条的审批状态值
+        BpmApprovalStatus bpmApprovalStatus = iBpmApprovalStatusService.selectBpmApprovalStatusByTaskKey(taskKey);
+        // 删除申请流程(修改申请数据条的状态)
+        // 在流程状态中4 表示撤销
+        iBpmExecuteProcessService.updateProcessStateByKey("4", taskKey);
+        // 修改提交审批的数据条状态-》 调用共通接口执行
+        // 数据条审批状态(默认字段 0:未提交 1:已提交 2:已撤销 3:已通过)
+        iBpmApprovalStatusService.updateApprovalStatusByTableName(bpmApprovalStatus.getTableName(), "2", bpmApprovalStatus.getTableId());
+        // 修改中间表状态:撤回
+        iBpmApprovalStatusService.updateBpmApprovalStatusByTaskKey(new BpmApprovalStatus("3", taskKey));
+
+        return AjaxResult.success();
+    }
+
+
+}

+ 187 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/runbpm/RunImplementationClass.java

@@ -0,0 +1,187 @@
+package com.zkqy.execution.produce.dispersed.runbpm;
+
+
+import cn.hutool.core.util.ObjectUtil;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.BpmRunNodeFromVo;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.IRunBPMEntity;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.IScriptEntity;
+import com.zkqy.execution.produce.dispersed.service.DynamicJavaService;
+import com.zkqy.execution.produce.dispersed.service.IRunBPMService;
+import com.zkqy.execution.produce.dispersed.service.IScriptService;
+import com.zkqy.system.domain.SysBpmNodeScript;
+import com.zkqy.system.mapper.SysBpmNodeScriptMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.NoSuchBeanDefinitionException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+
+/**
+ * 调用脚本逻辑执行类
+ * * 执行所有脚本类
+ * * 将IScriptService的实现类的Spring Bean的作用域设置为prototype,
+ * * 这样每次调用applicationContext.getBean()时都会返回一个新的实例。
+ * * 这样可以避免多线程环境下共享实例的问题
+ * <p>
+ * 节点逻辑代码根脚本不同的是 节点脚本是有表单数据的,单独的脚本是并没有表单数据的
+ *
+ * @author hanzihang
+ * @date 2023/11/13
+ */
+@Component
+public class RunImplementationClass<J> {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+
+    private static final Logger log = LoggerFactory.getLogger(RunImplementationClass.class);
+
+    @Autowired
+    private SysBpmNodeScriptMapper sysBpmNodeScriptMapper;
+
+    @Autowired
+    private DynamicJavaService dynamicJavaService;
+
+    /**
+     * @param iRunBPMEntity 节点执行参数
+     * @return
+     */
+    @Transactional
+    public AjaxResult RunBPMImplementationClassLogicCode(IRunBPMEntity iRunBPMEntity) {
+        //脚本动态加载逻辑(判断当前脚本是否存在于Spring容器当中)---如果不存在就进行编译+注入
+        if(!applicationContext.containsBean(iRunBPMEntity.getImplementationName())){
+            //查询当前节点数据库是否存在当前节点信息
+            SysBpmNodeScript sysBpmNodeScript = sysBpmNodeScriptMapper.selectSysBpmNodeScriptByScriptKey(iRunBPMEntity.getImplementationName());
+            //找到了对应的节点列表
+            if(ObjectUtil.isNotNull(sysBpmNodeScript)){
+                //调用动态加载脚本信息
+                String s = dynamicJavaService.loadAndRegisterJavaFile(iRunBPMEntity.getImplementationName());
+                if(s.equals(iRunBPMEntity.getImplementationName()+"注册失败")){
+                    return AjaxResult.error("脚本编译失败");
+                }else {
+                    System.out.println("成功");
+                }
+            }
+        }
+        AjaxResult ajaxResult = new AjaxResult(); // 节点逻辑执行完成返回提示
+        if (applicationContext.containsBean(iRunBPMEntity.getImplementationName())) {
+            IRunBPMService iRunBPMService = (IRunBPMService) applicationContext.getBean(iRunBPMEntity.getImplementationName(), IRunBPMService.class);
+            // 校验当前需要执行的脚本是否存在
+            if (iRunBPMService.isVerificationMethod()) {
+                // 脚本执行前验证
+                AjaxResult preValidationAjaxResult = iRunBPMService.preValidation(iRunBPMEntity);
+                if (preValidationAjaxResult.get("code").toString().equals("200")) {
+                    iRunBPMService.executeNode(iRunBPMEntity);
+                    // 节点后置验证
+                    ajaxResult = iRunBPMService.afterValidation(iRunBPMEntity);
+                } else {
+                    // 执行清理操作
+                    iRunBPMService.preDestroy();
+                    return preValidationAjaxResult;
+                }
+                // 执行清理操作
+                iRunBPMService.preDestroy();
+            }
+            log.info("Service execution successful:" + iRunBPMEntity.getImplementationName());
+            return ajaxResult;
+        } else {
+            log.error("Service not found for name: " + iRunBPMEntity.getImplementationName());
+            return AjaxResult.error("系统中未找到当前脚本信息请联系管理员!!!");
+        }
+    }
+
+
+    /**
+     * @param iScriptEntity 定位执行脚本所需参数
+     * @param parameter     脚本实现逻辑其他参数
+     * @return
+     */
+    @Transactional
+    public boolean RunScriptImplementationClassLogicCode(IScriptEntity iScriptEntity, J parameter) {
+        //脚本动态加载逻辑(判断当前脚本是否存在于Spring容器当中)---如果不存在就进行编译+注入
+        if(!applicationContext.containsBean(iScriptEntity.getImplementationName())){
+            //查询当前节点数据库是否存在当前节点信息
+            SysBpmNodeScript sysBpmNodeScript = sysBpmNodeScriptMapper.selectSysBpmNodeScriptByScriptKey(iScriptEntity.getImplementationName());
+            //找到了对应的节点列表
+            if(ObjectUtil.isNotNull(sysBpmNodeScript)){
+                //调用动态加载脚本信息
+                String s = dynamicJavaService.loadAndRegisterJavaFile(iScriptEntity.getImplementationName());
+                if(s.equals(iScriptEntity.getImplementationName()+"注册失败")){
+                    return false;
+                }else {
+                    System.out.println("成功");
+                }
+            }
+        }
+        //原本的判断逻辑如果存在就执行当去业务逻辑脚本
+        if (applicationContext.containsBean(iScriptEntity.getImplementationName())) {
+            //
+            IScriptService iScriptService = (IScriptService) applicationContext.getBean(iScriptEntity.getImplementationName(), IScriptService.class);
+            // 校验当前需要执行的脚本是否存在
+            if (iScriptService.isVerificationMethod()) {
+                // 脚本执行前验证
+                if ((Boolean) iScriptService.preExecutionScript(parameter)) {
+                    iScriptService.executionScript(parameter);
+                    iScriptService.afterExecutionScript(parameter);
+                }
+                // 执行清理操作
+                return iScriptService.preDestroy();
+            }
+            log.info("Service execution successful:" + iScriptEntity.getImplementationName());
+            return true;
+        } else {
+            log.error("Service not found for name: " + iScriptEntity.getImplementationName());
+            return false;
+        }
+    }
+
+    /**
+     * 获取当前节点的表单回显数据
+     *
+     * @param bpmRunNodeFromVo
+     * @return
+     */
+    public CommonEntity getNodeFormData(BpmRunNodeFromVo bpmRunNodeFromVo) {
+        // 首先检查容器当中是否存在当前JavaBean
+        if (applicationContext.containsBean(bpmRunNodeFromVo.getTaskAutomaticScriptTriggerType())) {
+            IRunBPMService iRunBPMService = applicationContext.getBean(bpmRunNodeFromVo.getTaskAutomaticScriptTriggerType(), IRunBPMService.class);
+            // 二次验证节点bean是否存在,无需校验节点前验证是否通过
+            if (iRunBPMService.isVerificationMethod()) {
+                // 调用当前节点回显表单数据处理逻辑
+                return iRunBPMService.getNodeFormData(bpmRunNodeFromVo);
+            }
+            return new CommonEntity();
+        } else {
+            return new CommonEntity();
+        }
+    }
+
+
+    /**
+     * 根据脚本名称校验脚本是否存在
+     *
+     * @param implementationName 脚本名称
+     * @return
+     */
+    public boolean isVerificationMethod(String implementationName) {
+        if (applicationContext.containsBean(implementationName)) {
+            boolean state = false;
+            try {
+                // 尝试获取bean
+                applicationContext.getBean(implementationName);
+                state = true;
+            } catch (NoSuchBeanDefinitionException e) {
+                state = false;
+            } finally {
+                return state;
+            }
+        } else {
+            return false;
+        }
+    }
+}

+ 5 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/DynamicJavaService.java

@@ -0,0 +1,5 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+public interface DynamicJavaService {
+    public String loadAndRegisterJavaFile(String javaScriptKey);
+}

+ 87 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmApprovalStatusService.java

@@ -0,0 +1,87 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmApprovalStatus;
+
+import java.util.List;
+
+/**
+ * 审批数据条中间Service接口
+ *
+ * @author hzh
+ * @date 2024-01-31
+ */
+public interface IBpmApprovalStatusService {
+    /**
+     * 查询审批数据条中间
+     *
+     * @param id 审批数据条中间主键
+     * @return 审批数据条中间
+     */
+    public BpmApprovalStatus selectBpmApprovalStatusById(Long id);
+
+    /**
+     * 查询审批数据条中间
+     *
+     * @param taskKey 流程任务key
+     * @return 审批数据条中间
+     */
+    public BpmApprovalStatus selectBpmApprovalStatusByTaskKey(String taskKey);
+
+    /**
+     * 查询审批数据条中间列表
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 审批数据条中间集合
+     */
+    public List<BpmApprovalStatus> selectBpmApprovalStatusList(BpmApprovalStatus bpmApprovalStatus);
+
+    /**
+     * 新增审批数据条中间
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 结果
+     */
+    public int insertBpmApprovalStatus(BpmApprovalStatus bpmApprovalStatus);
+
+    /**
+     * 修改审批数据条中间
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 结果
+     */
+    public int updateBpmApprovalStatus(BpmApprovalStatus bpmApprovalStatus);
+
+    /**
+     * 批量删除审批数据条中间
+     *
+     * @param ids 需要删除的审批数据条中间主键集合
+     * @return 结果
+     */
+    public int deleteBpmApprovalStatusByIds(Long[] ids);
+
+    /**
+     * 删除审批数据条中间信息
+     *
+     * @param id 审批数据条中间主键
+     * @return 结果
+     */
+    public int deleteBpmApprovalStatusById(Long id);
+
+    /**
+     * 修改当前审批条状态根据任务key
+     *
+     * @param bpmApprovalStatus
+     * @return
+     */
+    public int updateBpmApprovalStatusByTaskKey(BpmApprovalStatus bpmApprovalStatus);
+
+    /**
+     * 修改用户业务表中审批数据条状态
+     *
+     * @param tableName 表名
+     * @param state     状态值
+     * @param where     条件
+     * @return
+     */
+    public int updateApprovalStatusByTableName(String tableName, String state, String where);
+}

+ 79 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteNodeFormService.java

@@ -0,0 +1,79 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeForm;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 执行节点单Service接口
+ *
+ * @author zkqy
+ * @date 2023-12-07
+ */
+public interface IBpmExecuteNodeFormService {
+    /**
+     * 查询执行节点单
+     *
+     * @param id 执行节点单主键
+     * @return 执行节点单
+     */
+    public BpmExecuteNodeForm selectBpmExecuteNodeFormById(Long id);
+
+    /**
+     * 查询执行节点单列表
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 执行节点单集合
+     */
+    public List<BpmExecuteNodeForm> selectBpmExecuteNodeFormList(BpmExecuteNodeForm bpmExecuteNodeForm);
+
+    /**
+     * 新增执行节点单
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 结果
+     */
+    public int insertBpmExecuteNodeForm(BpmExecuteNodeForm bpmExecuteNodeForm);
+
+    /**
+     * 修改执行节点单
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 结果
+     */
+    public int updateBpmExecuteNodeForm(BpmExecuteNodeForm bpmExecuteNodeForm);
+
+    /**
+     * 批量删除执行节点单
+     *
+     * @param ids 需要删除的执行节点单主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeFormByIds(Long[] ids);
+
+    /**
+     * 删除执行节点单信息
+     *
+     * @param id 执行节点单主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeFormById(Long id);
+
+    /**
+     * 当前发起的流程节点的表单信息
+     *
+     * @param processKey 流程编码
+     * @return
+     */
+    public Map<String, String> selectNodeFromInfos(String processKey);
+
+    /**
+     *  根据 taskProcessKey和 taskNodeKey查询当前节点执行的表单模版信息
+     */
+    public BpmExecuteNodeForm getBpmExecuteNodeForm(String taskProcessKey,String taskNodeKey,String taskScriptKey);
+}

+ 75 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteNodeLogService.java

@@ -0,0 +1,75 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeLog;
+import io.lettuce.core.dynamic.annotation.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 节点执行记录(日志)Service接口
+ * 
+ * @author zkqy
+ * @date 2023-12-18
+ */
+public interface IBpmExecuteNodeLogService 
+{
+    /**
+     * 查询节点执行记录(日志)
+     * 
+     * @param id 节点执行记录(日志)主键
+     * @return 节点执行记录(日志)
+     */
+    public BpmExecuteNodeLog selectBpmExecuteNodeLogById(Long id);
+
+    /**
+     * 查询流程执行任务log2
+     *
+     * @param objectMap 查询条件
+     * @return 流程执行任务集合
+     */
+    public List<BpmExecuteNodeLog> selectBpmExecuteProcessNodeListLog(@Param("objectMap") Map<String, Object> objectMap);
+
+
+    /**
+     * 查询节点执行记录(日志)列表
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 节点执行记录(日志)集合
+     */
+    public List<BpmExecuteNodeLog> selectBpmExecuteNodeLogList(BpmExecuteNodeLog bpmExecuteNodeLog);
+
+    /**
+     * 新增节点执行记录(日志)
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 结果
+     */
+    public int insertBpmExecuteNodeLog(BpmExecuteNodeLog bpmExecuteNodeLog);
+
+    /**
+     * 修改节点执行记录(日志)
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 结果
+     */
+    public int updateBpmExecuteNodeLog(BpmExecuteNodeLog bpmExecuteNodeLog);
+
+    /**
+     * 批量删除节点执行记录(日志)
+     * 
+     * @param ids 需要删除的节点执行记录(日志)主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeLogByIds(Long[] ids);
+
+    /**
+     * 删除节点执行记录(日志)信息
+     * 
+     * @param id 节点执行记录(日志)主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeLogById(Long id);
+}

+ 73 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteNodeMiddleService.java

@@ -0,0 +1,73 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeMiddle;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+
+import java.util.List;
+
+/**
+ * 执行流程用户、节点关联脚本中间Service接口
+ * 
+ * @author hzh
+ * @date 2023-11-01
+ */
+public interface IBpmExecuteNodeMiddleService 
+{
+    /**
+     * 查询执行流程用户、节点关联脚本中间
+     * 
+     * @param id 执行流程用户、节点关联脚本中间主键
+     * @return 执行流程用户、节点关联脚本中间
+     */
+    public BpmExecuteNodeMiddle selectBpmExecuteNodeMiddleById(Long id);
+
+    /**
+     * 查询执行流程用户、节点关联脚本中间列表
+     * 
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 执行流程用户、节点关联脚本中间集合
+     */
+    public List<BpmExecuteNodeMiddle> selectBpmExecuteNodeMiddleList(BpmExecuteNodeMiddle bpmExecuteNodeMiddle);
+
+    /**
+     * 新增执行流程用户、节点关联脚本中间
+     * 
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 结果
+     */
+    public int insertBpmExecuteNodeMiddle(BpmExecuteNodeMiddle bpmExecuteNodeMiddle);
+
+    /**
+     * 修改执行流程用户、节点关联脚本中间
+     * 
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 结果
+     */
+    public int updateBpmExecuteNodeMiddle(BpmExecuteNodeMiddle bpmExecuteNodeMiddle);
+
+    /**
+     * 批量删除执行流程用户、节点关联脚本中间
+     * 
+     * @param ids 需要删除的执行流程用户、节点关联脚本中间主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeMiddleByIds(Long[] ids);
+
+    /**
+     * 删除执行流程用户、节点关联脚本中间信息
+     * 
+     * @param id 执行流程用户、节点关联脚本中间主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeMiddleById(Long id);
+
+    /**
+     * 添加异常脚本信息
+     * @param commonEntityList
+     * @return
+     */
+    List<CommonEntity> addExceptionScript(List<CommonEntity> commonEntityList) throws Exception;
+
+}

+ 80 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteNodeService.java

@@ -0,0 +1,80 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNode;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.TriggerExceptionVO;
+
+import java.util.List;
+
+/**
+ * 节点执行(记录)Service接口
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+public interface IBpmExecuteNodeService {
+    /**
+     * 查询节点执行(记录)
+     *
+     * @param id 节点执行(记录)主键
+     * @return 节点执行(记录)
+     */
+    public BpmExecuteNode selectBpmExecuteNodeById(Long id);
+
+    /**
+     * 查询节点执行(记录)列表
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 节点执行(记录)集合
+     */
+    public List<BpmExecuteNode> selectBpmExecuteNodeList(BpmExecuteNode bpmExecuteNode);
+
+    /**
+     * 新增节点执行(记录)
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 结果
+     */
+    public int insertBpmExecuteNode(BpmExecuteNode bpmExecuteNode);
+
+    /**
+     * 修改节点执行(记录)
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 结果
+     */
+    public int updateBpmExecuteNode(BpmExecuteNode bpmExecuteNode);
+
+    /**
+     * 批量删除节点执行(记录)
+     *
+     * @param ids 需要删除的节点执行(记录)主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeByIds(Long[] ids);
+
+    /**
+     * 删除节点执行(记录)信息
+     *
+     * @param id 节点执行(记录)主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteNodeById(Long id);
+
+    /**
+     * 更新执行中的流程节点状态
+     * * @param taskProcessKey 当前流程任务key
+     * * @param taskNodeKey    当前节点key
+     * * state状态
+     *
+     * @param bpmExecuteNode
+     * @return
+     */
+    public int updateNodeState(BpmExecuteNode bpmExecuteNode);
+
+    /**
+     * 触发异常节点
+     */
+    int triggerExceptionNode(TriggerExceptionVO vo) throws Exception;
+
+}

+ 157 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmExecuteProcessService.java

@@ -0,0 +1,157 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 流程执行任务Service接口
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+public interface IBpmExecuteProcessService {
+    /**
+     * 查询流程执行任务
+     *
+     * @param id 流程执行任务主键
+     * @return 流程执行任务
+     */
+    public BpmExecuteProcess selectBpmExecuteProcessById(Long id);
+
+    /**
+     * 查询流程执行任务列表
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    List<CommonEntity> selectBpmExecuteProcessList(BpmExecuteProcess bpmExecuteProcess) throws Exception;
+
+
+    /**
+     * 查询待执行的审批任务有多少条
+     * @return
+     */
+    public int  selectBpmExecuteProcessListCount();
+
+    /**
+     * 查询当前用户提交的审批流程记录
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    List<CommonEntity> selectBpmExecuteProcessApproveLogList(BpmExecuteProcess bpmExecuteProcess) throws Exception;
+
+    /**
+     * 近12个月的生产任务统计
+     *
+     * @return 流程执行任务集合
+     */
+    public List<Map> selectBpmExecuteProcessListProductionCount(BpmExecuteProcess bpmExecuteProcess);
+
+    /**
+     * 查询流程执行记录log列表
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    List<CommonEntity> selectBpmExecuteProcessListLog(BpmExecuteProcess bpmExecuteProcess);
+
+    /**
+     * 查询流程执行记录log列表
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    List<CommonEntity> selectBpmExecuteProcessListLogFjqy(BpmExecuteProcess bpmExecuteProcess);
+    /**
+     * 新增流程执行任务
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 结果
+     */
+    public int insertBpmExecuteProcess(BpmExecuteProcess bpmExecuteProcess);
+
+    /**
+     * 修改流程执行任务
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 结果
+     */
+    public int updateBpmExecuteProcess(BpmExecuteProcess bpmExecuteProcess);
+
+    /**
+     * 批量删除流程执行任务
+     *
+     * @param ids 需要删除的流程执行任务主键集合
+     * @return 结果
+     */
+    public int deleteBpmExecuteProcessByIds(Long[] ids);
+
+    /**
+     * 删除流程执行任务信息
+     *
+     * @param id 流程执行任务主键
+     * @return 结果
+     */
+    public int deleteBpmExecuteProcessById(Long id);
+
+
+    /**
+     * 共通投产流程接口
+     *
+     * @param commonEntity 预执行流程任务实体
+     * @return
+     */
+    public AjaxResult productionScheduling(CommonEntity commonEntity);
+
+    /**
+     * 根据formId查询form表单信息
+     */
+    public String getFromInfo(String fid);
+
+
+    /**
+     * 通过formKey查询表单信息
+     *
+     * @param formKey
+     * @return
+     */
+    String getFromInfoByFormKey(String formKey);
+
+    /**
+     * 通过formKeys查询表单信息
+     *
+     * @param
+     * @param formKeys
+     * @return
+     */
+    List<CommonEntity> getFromInfoByFormKeys(String[] formKeys);
+
+    /**
+     * 根据groupKey查询表格组对应的表格信息
+     */
+    public String getGroupTableInfo(String groupKey);
+
+    /**
+     * 根据当前执行的流程key修改当前执行流程状态
+     *
+     * @param taskProcessState 修改的状态
+     * @param taskKey          执行流程key
+     * @return
+     */
+    public int updateProcessStateByKey(String taskProcessState, String taskKey);
+
+    /**
+     * 查询流程执行任务列表
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务集合
+     */
+    List<CommonEntity> selectChemicalFibreBpmExecuteProcessList(BpmExecuteProcess bpmExecuteProcess) throws Exception;
+
+}

+ 69 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmNodeHandleUserService.java

@@ -0,0 +1,69 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeHandleUser;
+
+import java.util.List;
+
+/**
+ * 节点处理用户Service接口
+ * 
+ * @author hzh
+ * @date 2023-10-26
+ */
+public interface IBpmNodeHandleUserService 
+{
+    /**
+     * 查询节点处理用户
+     * 
+     * @param id 节点处理用户主键
+     * @return 节点处理用户
+     */
+    public BpmNodeHandleUser selectBpmNodeHandleUserById(Long id);
+
+    /**
+     * 查询节点处理用户列表
+     * 
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 节点处理用户集合
+     */
+    public List<BpmNodeHandleUser> selectBpmNodeHandleUserList(BpmNodeHandleUser bpmNodeHandleUser);
+
+    /**
+     * 新增节点处理用户
+     * 
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 结果
+     */
+    public int insertBpmNodeHandleUser(List<BpmNodeHandleUser> bpmNodeHandleUser);
+
+    /**
+     * 修改节点处理用户
+     * 
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 结果
+     */
+    public int updateBpmNodeHandleUser(List<BpmNodeHandleUser> bpmNodeHandleUser);
+
+    /**
+     * 批量删除节点处理用户
+     * 
+     * @param ids 需要删除的节点处理用户主键集合
+     * @return 结果
+     */
+    public int deleteBpmNodeHandleUserByIds(Long[] ids);
+
+    /**
+     * 删除节点处理用户信息
+     * 
+     * @param id 节点处理用户主键
+     * @return 结果
+     */
+    public int deleteBpmNodeHandleUserById(Long id);
+
+    /**
+     * 根据虚拟角色查询节点处理用户
+     * @param virtuallyRole
+     * @return
+     */
+    BpmNodeHandleUser selectBpmNodeHandleUserByVirtuallyRole(String virtuallyRole);
+}

+ 83 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmNodeScriptRelevanceService.java

@@ -0,0 +1,83 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeScriptRelevance;
+
+import java.util.List;
+
+/**
+ * 流程节点脚本关联Service接口
+ *
+ * @author hzh
+ * @date 2023-10-26
+ */
+public interface IBpmNodeScriptRelevanceService {
+    /**
+     * 查询流程节点脚本关联
+     *
+     * @param id 流程节点脚本关联主键
+     * @return 流程节点脚本关联
+     */
+    BpmNodeScriptRelevance selectBpmNodeScriptRelevanceById(Long id);
+
+    /**
+     * 查询流程节点脚本关联列表
+     *
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 流程节点脚本关联集合
+     */
+    List<BpmNodeScriptRelevance> selectBpmNodeScriptRelevanceList(BpmNodeScriptRelevance bpmNodeScriptRelevance);
+
+    /**
+     * 新增流程节点脚本关联
+     *
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 结果
+     */
+    int insertBpmNodeScriptRelevance(List<BpmNodeScriptRelevance> bpmNodeScriptRelevance);
+
+    /**
+     * 修改流程节点脚本关联
+     *
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 结果
+     */
+    int updateBpmNodeScriptRelevance(List<BpmNodeScriptRelevance>  bpmNodeScriptRelevance);
+
+    /**
+     * 批量删除流程节点脚本关联
+     *
+     * @param ids 需要删除的流程节点脚本关联主键集合
+     * @return 结果
+     */
+    int deleteBpmNodeScriptRelevanceByIds(Long[] ids);
+
+    /**
+     * 删除流程节点脚本关联信息
+     *
+     * @param id 流程节点脚本关联主键
+     * @return 结果
+     */
+    int deleteBpmNodeScriptRelevanceById(Long id);
+
+    /**
+     * 查询自动执行脚本
+     * @param nodeKey 节点key
+     * @return
+     */
+    BpmNodeScriptRelevance selectAutoScriptByNodeKey(String nodeKey);
+
+    /**
+     * 根据节点编码删除流程节点脚本关联
+     * @param nodeKeys 节点编码
+     * @return
+     */
+    int deleteBpmNodeScriptRelevanceByNodeKeys(List<String> nodeKeys);
+
+    /**
+     * 查询流程节点脚本关联详情
+     *
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 流程节点脚本关联集合
+     */
+    BpmNodeScriptRelevance selectBpmNodeScriptRelevanceInfo(BpmNodeScriptRelevance bpmNodeScriptRelevance);
+}

+ 87 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmProcessConfigurationService.java

@@ -0,0 +1,87 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmProcessConfiguration;
+import com.zkqy.execution.produce.dispersed.entity.vo.NodeVo;
+
+import java.util.List;
+
+/**
+ * 流程配置Service接口
+ *
+ * @author hzh
+ * @date 2023-10-20
+ */
+public interface IBpmProcessConfigurationService {
+    /**
+     * 查询流程配置
+     *
+     * @param id 流程配置主键
+     * @return 流程配置
+     */
+    public BpmProcessConfiguration selectBpmProcessConfigurationById(Long id);
+
+    /**
+     * 查询流程配置列表
+     *
+     * @param bpmProcessConfiguration 流程配置
+     * @return 流程配置集合
+     */
+    public List<BpmProcessConfiguration> selectBpmProcessConfigurationList(BpmProcessConfiguration bpmProcessConfiguration);
+
+    /**
+     * 新增流程配置
+     *
+     * @param bpmProcessConfigurationList 流程配置
+     * @return 结果
+     */
+    public int insertBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList);
+
+    /**
+     * 修改流程配置
+     *
+     * @param bpmProcessConfigurationList 流程配置
+     * @return 结果
+     */
+    public int updateBpmProcessConfiguration(BpmProcessConfiguration bpmProcessConfigurationList);
+
+    /**
+     * 批量删除流程配置
+     *
+     * @param ids 需要删除的流程配置主键集合
+     * @return 结果
+     */
+    public int deleteBpmProcessConfigurationByIds(Long[] ids);
+
+    /**
+     * 删除流程配置信息
+     *
+     * @param id 流程配置主键
+     * @return 结果
+     */
+    public int deleteBpmProcessConfigurationById(Long id);
+
+    /**
+     * 新增流程节点配置详细信息
+     *
+     * @param nodeVo
+     * @return
+     */
+    public int insertBpmProcessNodeConfig(NodeVo nodeVo);
+
+    /**
+     * 修改流程节点配置详细信息
+     *
+     * @param nodeVo
+     * @return
+     */
+    public int updateBpmProcessNodeConfig(NodeVo nodeVo);
+
+    /**
+     * 查询流程节点的详细信息
+     *
+     * @param nodeProcessKey  流程别名
+     * @return
+     */
+    public NodeVo selectByProcessByKey(String nodeProcessKey);
+}

+ 91 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IBpmProcessService.java

@@ -0,0 +1,91 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmProcess;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 流程定义Service接口
+ *
+ * @author hzh
+ * @date 2023-10-10
+ */
+public interface IBpmProcessService {
+    /**
+     * 查询流程定义
+     *
+     * @param processId 流程定义主键
+     * @return 流程定义
+     */
+    public BpmProcess selectBpmProcessByProcessId(Long processId);
+
+    /**
+     * 查询流程定义列表
+     *
+     * @param bpmProcess 流程定义
+     * @return 流程定义集合
+     */
+    public List<BpmProcess> selectBpmProcessList(BpmProcess bpmProcess);
+
+    /**
+     * 查询流程统计信息
+     * @return
+     */
+    public List<Map> selectBpmProcessStatistics();
+    /**
+     * 新增流程定义
+     *
+     * @param bpmProcess 流程定义
+     * @return 结果
+     */
+    public int insertBpmProcess(BpmProcess bpmProcess, MultipartFile fileXML);
+
+    /**
+     * 修改流程定义
+     *
+     * @param bpmProcess 流程定义
+     * @return 结果
+     */
+    public int updateBpmProcess(BpmProcess bpmProcess, MultipartFile fileXML);
+
+    /**
+     * 批量删除流程定义
+     *
+     * @param processIds 需要删除的流程定义主键集合
+     * @return 结果
+     */
+    public int deleteBpmProcessByProcessIds(Long[] processIds);
+
+    /**
+     * 删除流程定义信息
+     *
+     * @param processId 流程定义主键
+     * @return 结果
+     */
+    public int deleteBpmProcessByProcessId(Long processId);
+
+    /**
+     * 备份流程
+     *
+     * @param bpmProcess
+     * @return
+     */
+    public int bpmBackups(BpmProcess bpmProcess);
+
+    /**
+     * 导出流程文件
+     */
+    void exportProcessFile(List<Long> processIds, HttpServletRequest request, HttpServletResponse response) throws Exception;
+
+    /**
+     * 启用流程
+     */
+    int enableProcess(BpmProcess bpmProcess);
+
+
+
+}

+ 102 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/ICommonService.java

@@ -0,0 +1,102 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.entity.TableSql;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+public interface ICommonService {
+
+
+    /**
+     * 单表查询列表
+     */
+    List<CommonEntity> selectList(CommonEntity commonEntity);
+
+    /**
+     * 批量新增
+     */
+    int batchInsert(CommonEntity commonEntity);
+
+    int batchInsertNoUserInfo (CommonEntity commonEntity);
+    /**
+     * 修改
+     */
+    int edit(CommonEntity commonEntity);
+
+
+    int editNoUserInfo(CommonEntity commonEntity);
+
+
+    /**
+     * 批量删除
+     */
+    int batchDelete(CommonEntity commonEntity);
+
+    /**
+     * 根据sqlkey 执行sql并返回结果
+     */
+    List<CommonEntity> queryTableList(CommonEntity commonEntity, TableSql tableSql);
+
+    /**
+     * 导出列表
+     */
+    void export(HttpServletResponse response, CommonEntity commonEntity) throws Exception;
+
+    /**
+     * 导出模版
+     */
+    void exportTemplate(HttpServletResponse response, String tableName, String sqlKey) throws Exception;
+
+    /**
+     * 动态表单预览接口
+     */
+    List<CommonEntity> dragTablePreview(CommonEntity commonEntity);
+
+    /**
+     * 查询模板库建表语句
+     */
+    Map<String, String> selectTableSql(String tableName);
+
+    /**
+     * 执行sql
+     */
+    void executeSql(String sql);
+
+    /**
+     * 查询业务库所有数据表
+     */
+    List<String> selectTableName(String databaseName);
+
+    /**
+     * 获取详情
+     */
+    CommonEntity getInfoById(CommonEntity commonEntity);
+
+
+    /**
+     * 表格组查询表格信息
+     * @param commonEntity
+     * @param tableSql
+     * @return
+     */
+    List<CommonEntity> queryGroupTableList(CommonEntity commonEntity, TableSql tableSql,String tableFormat);
+
+    /**
+     * 化纤厂订单管理数据筛选接口
+     * @param commonEntity
+     * @param tableSql
+     * @return
+     */
+    List<CommonEntity> queryGroupTableList1(CommonEntity commonEntity, TableSql tableSql,String tableFormat);
+
+    /**
+     * 通用批量查询下拉框数据接口
+     */
+    CommonEntity queryDropDownBoxData(List<CommonEntity> commonEntityList);
+
+
+}

+ 71 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IDragFormGroupService.java

@@ -0,0 +1,71 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+import com.zkqy.execution.produce.dispersed.entity.DragFormGroup;
+
+import java.util.List;
+
+/**
+ * 动态表单组Service接口
+ * 
+ * @author hzh
+ * @date 2024-01-26
+ */
+public interface IDragFormGroupService 
+{
+    /**
+     * 查询动态表单组
+     * 
+     * @param id 动态表单组主键
+     * @return 动态表单组
+     */
+    public DragFormGroup selectDragFormGroupById(Long id);
+
+    /**
+     * 查询动态表单组
+     *
+     * @param groupKey 动态表单组key
+     * @return 动态表单组
+     */
+    public DragFormGroup selectDragFormGroupByKey(String groupKey);
+
+    /**
+     * 查询动态表单组列表
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 动态表单组集合
+     */
+    public List<DragFormGroup> selectDragFormGroupList(DragFormGroup dragFormGroup);
+
+    /**
+     * 新增动态表单组
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 结果
+     */
+    public int insertDragFormGroup(DragFormGroup dragFormGroup);
+
+    /**
+     * 修改动态表单组
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 结果
+     */
+    public int updateDragFormGroup(DragFormGroup dragFormGroup);
+
+    /**
+     * 批量删除动态表单组
+     * 
+     * @param ids 需要删除的动态表单组主键集合
+     * @return 结果
+     */
+    public int deleteDragFormGroupByIds(Long[] ids);
+
+    /**
+     * 删除动态表单组信息
+     * 
+     * @param id 动态表单组主键
+     * @return 结果
+     */
+    public int deleteDragFormGroupById(Long id);
+}

+ 70 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IRunBPMService.java

@@ -0,0 +1,70 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+
+
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.BpmRunNodeFromVo;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.IRunBPMEntity;
+
+
+/**
+ * 执行流程节点接口
+ * 作用: 仅为一个标识接口,实现类可以直接被注入到流程执行引擎。
+ *
+ * @author hzh
+ */
+public interface IRunBPMService {
+
+    /**
+     * 当前节点表单的回显数据
+     *
+     * @param bpmRunNodeFromVo
+     * @return
+     */
+    CommonEntity getNodeFormData(BpmRunNodeFromVo bpmRunNodeFromVo);
+
+
+
+    /**
+     * 前置验证节点
+     *
+     * @param iRunBPMEntity 节点执行参数
+     * @return
+     */
+    AjaxResult preValidation(IRunBPMEntity iRunBPMEntity);
+
+
+    /**
+     * 节点执行流程
+     *
+     * @param iRunBPMEntity 节点执行参数
+     * @return
+     */
+    AjaxResult executeNode(IRunBPMEntity iRunBPMEntity);
+
+    /**
+     * 后置验证节点
+     *
+     * @param iRunBPMEntity 节点执行参数
+     * @return
+     */
+    AjaxResult afterValidation(IRunBPMEntity iRunBPMEntity);
+
+    /**
+     * 验证脚本bean是否存在 在流程执行前会验证当前流程所绑定的节点脚本等
+     * 或其他验证使用
+     *
+     * @return
+     */
+    boolean isVerificationMethod();
+
+    /**
+     * 用来清理prototype作用域bean 因spring不会帮助清理
+     * 注:定义成prototype类型的bean,可以避免并发的操作。applicationContext.getBean() 每次都会返回一个新的实例
+     */
+    boolean preDestroy();
+
+
+}

+ 53 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/IScriptService.java

@@ -0,0 +1,53 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+/**
+ * 脚本接口
+ * 作用: 仅为一个标识接口,实现类可以直接被注入到脚本执行引擎,进行计算。
+ * 参数: 一般采用map形式传输参数,例如表名、参数、条件等等
+ *
+ * @author hzh
+ */
+public interface IScriptService<J> {
+
+    /**
+     * 执行脚本前验证
+     *
+     * @param parameter
+     * @return
+     */
+    J preExecutionScript(J parameter);
+
+    /**
+     * 执行脚本
+     *
+     * @param parameter
+     * @return
+     */
+    J executionScript(J parameter)  ;
+
+    /**
+     * 执行脚本后验证
+     *
+     * @param parameter
+     * @return
+     */
+    J afterExecutionScript(J parameter);
+
+    /**
+     * 验证脚本bean是否存在 在流程执行前会验证当前流程所绑定的节点脚本等
+     * 或其他验证使用
+     *
+     * @return
+     */
+    boolean isVerificationMethod();
+
+    /**
+     * 用来清理prototype作用域bean 因spring不会帮助清理
+     * 注:定义成prototype类型的bean,可以避免并发的操作。applicationContext.getBean() 每次都会返回一个新的实例
+     *
+     * @return
+     */
+    boolean preDestroy();
+
+}

+ 41 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/ITableSqlService.java

@@ -0,0 +1,41 @@
+package com.zkqy.execution.produce.dispersed.service;
+
+
+
+
+import com.zkqy.execution.produce.dispersed.entity.TableSql;
+
+import java.util.List;
+
+/**
+ * table 联合查询sql存储Service接口
+ * @author ruoyi
+ * @date 2023-07-19
+ */
+public interface ITableSqlService {
+
+    /**
+     * 查询table 联合查询sql存储
+     *
+     * @param tId table 联合查询sql存储主键
+     * @return table 联合查询sql存储
+     */
+    public TableSql selectTableSqlByTId(Long tId);
+
+    /**
+     * 查询table 联合查询sql存储
+     *
+     * @param SQLKEY 绑定table唯一标识
+     * @return table 联合查询sql存储
+     */
+    public TableSql selectTableSqlByTSqlKey(String SQLKEY);
+
+    /**
+     * 查询table 联合查询sql存储列表
+     *
+     * @param tableSql table 联合查询sql存储
+     * @return table 联合查询sql存储集合
+     */
+    public List<TableSql> selectTableSqlList(TableSql tableSql);
+
+}

+ 104 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmApprovalStatusServiceImpl.java

@@ -0,0 +1,104 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+import java.util.List;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmApprovalStatus;
+import com.zkqy.execution.produce.dispersed.mapper.BpmApprovalStatusMapper;
+import com.zkqy.execution.produce.dispersed.service.IBpmApprovalStatusService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 审批数据条中间Service业务层处理
+ *
+ * @author hzh
+ * @date 2024-01-31
+ */
+@Service
+public class BpmApprovalStatusServiceImpl implements IBpmApprovalStatusService {
+    @Autowired
+    private BpmApprovalStatusMapper bpmApprovalStatusMapper;
+
+    /**
+     * 查询审批数据条中间
+     *
+     * @param id 审批数据条中间主键
+     * @return 审批数据条中间
+     */
+    @Override
+    public BpmApprovalStatus selectBpmApprovalStatusById(Long id) {
+        return bpmApprovalStatusMapper.selectBpmApprovalStatusById(id);
+    }
+
+    @Override
+    public BpmApprovalStatus selectBpmApprovalStatusByTaskKey(String taskKey) {
+        return bpmApprovalStatusMapper.selectBpmApprovalStatusByTaskKey(taskKey);
+    }
+
+    /**
+     * 查询审批数据条中间列表
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 审批数据条中间
+     */
+    @Override
+    public List<BpmApprovalStatus> selectBpmApprovalStatusList(BpmApprovalStatus bpmApprovalStatus) {
+        return bpmApprovalStatusMapper.selectBpmApprovalStatusList(bpmApprovalStatus);
+    }
+
+    /**
+     * 新增审批数据条中间
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 结果
+     */
+    @Override
+    public int insertBpmApprovalStatus(BpmApprovalStatus bpmApprovalStatus) {
+        return bpmApprovalStatusMapper.insertBpmApprovalStatus(bpmApprovalStatus);
+    }
+
+    /**
+     * 修改审批数据条中间
+     *
+     * @param bpmApprovalStatus 审批数据条中间
+     * @return 结果
+     */
+    @Override
+    public int updateBpmApprovalStatus(BpmApprovalStatus bpmApprovalStatus) {
+        return bpmApprovalStatusMapper.updateBpmApprovalStatus(bpmApprovalStatus);
+    }
+
+    /**
+     * 批量删除审批数据条中间
+     *
+     * @param ids 需要删除的审批数据条中间主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmApprovalStatusByIds(Long[] ids) {
+        return bpmApprovalStatusMapper.deleteBpmApprovalStatusByIds(ids);
+    }
+
+    /**
+     * 删除审批数据条中间信息
+     *
+     * @param id 审批数据条中间主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmApprovalStatusById(Long id) {
+        return bpmApprovalStatusMapper.deleteBpmApprovalStatusById(id);
+    }
+
+    @Override
+    public int updateBpmApprovalStatusByTaskKey(BpmApprovalStatus bpmApprovalStatus) {
+        return bpmApprovalStatusMapper.updateBpmApprovalStatusByTaskKey(bpmApprovalStatus);
+    }
+
+    @Override
+    public int updateApprovalStatusByTableName(String tableName, String state, String where) {
+        // 如果ID为不规则数字或编号需要使用‘’表示整体,否则会被截断
+        String endWhere = where.split("=")[0] + "=\'" + where.split("=")[1] + "\'";
+        return bpmApprovalStatusMapper.updateApprovalStatusByTableName(tableName, state, endWhere);
+    }
+}

+ 110 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteNodeFormServiceImpl.java

@@ -0,0 +1,110 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeForm;
+import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteNodeFormMapper;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeFormService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 执行节点单Service业务层处理
+ *
+ * @author zkqy
+ * @date 2023-12-07
+ */
+@Service
+public class BpmExecuteNodeFormServiceImpl implements IBpmExecuteNodeFormService {
+
+    @Autowired
+    private BpmExecuteNodeFormMapper bpmExecuteNodeFormMapper;
+
+    /**
+     * 查询执行节点单
+     *
+     * @param id 执行节点单主键
+     * @return 执行节点单
+     */
+    @Override
+    public BpmExecuteNodeForm selectBpmExecuteNodeFormById(Long id) {
+        return bpmExecuteNodeFormMapper.selectBpmExecuteNodeFormById(id);
+    }
+
+    /**
+     * 查询执行节点单列表
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 执行节点单
+     */
+    @Override
+    public List<BpmExecuteNodeForm> selectBpmExecuteNodeFormList(BpmExecuteNodeForm bpmExecuteNodeForm) {
+        return bpmExecuteNodeFormMapper.selectBpmExecuteNodeFormList(bpmExecuteNodeForm);
+    }
+
+    /**
+     * 新增执行节点单
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 结果
+     */
+    @Override
+    public int insertBpmExecuteNodeForm(BpmExecuteNodeForm bpmExecuteNodeForm) {
+        return bpmExecuteNodeFormMapper.insertBpmExecuteNodeForm(bpmExecuteNodeForm);
+    }
+
+    /**
+     * 修改执行节点单
+     *
+     * @param bpmExecuteNodeForm 执行节点单
+     * @return 结果
+     */
+    @Override
+    public int updateBpmExecuteNodeForm(BpmExecuteNodeForm bpmExecuteNodeForm) {
+        return bpmExecuteNodeFormMapper.updateBpmExecuteNodeForm(bpmExecuteNodeForm);
+    }
+
+    /**
+     * 批量删除执行节点单
+     *
+     * @param ids 需要删除的执行节点单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteNodeFormByIds(Long[] ids) {
+        return bpmExecuteNodeFormMapper.deleteBpmExecuteNodeFormByIds(ids);
+    }
+
+    /**
+     * 删除执行节点单信息
+     *
+     * @param id 执行节点单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteNodeFormById(Long id) {
+        return bpmExecuteNodeFormMapper.deleteBpmExecuteNodeFormById(id);
+    }
+
+    /**
+     * 获取当前流程所有节点的表单编码以及表单类型
+     *
+     * @param processKey 流程编码
+     * @return
+     */
+    @Override
+    public Map<String, String> selectNodeFromInfos(String processKey) {
+        Map<String, String> map = new HashMap<>();
+        List<Map<String, String>> infos = bpmExecuteNodeFormMapper.selectNodeFromInfos(processKey);
+        infos.forEach(item -> map.put(item.get("formKey"), item.get("formType")));
+        return map;
+    }
+
+    @Override
+    public BpmExecuteNodeForm getBpmExecuteNodeForm(String taskProcessKey, String taskNodeKey, String taskScriptKey) {
+        return bpmExecuteNodeFormMapper.selectBpmExecuteNodeFormByTpKAndTnkAndTsk(taskProcessKey, taskNodeKey, taskScriptKey);
+    }
+}

+ 103 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteNodeLogServiceImpl.java

@@ -0,0 +1,103 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeLog;
+import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteNodeLogMapper;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 节点执行记录(日志)Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2023-12-18
+ */
+@Service
+public class BpmExecuteNodeLogServiceImpl implements IBpmExecuteNodeLogService
+{
+    @Autowired
+    private BpmExecuteNodeLogMapper bpmExecuteNodeLogMapper;
+
+    /**
+     * 查询节点执行记录(日志)
+     * 
+     * @param id 节点执行记录(日志)主键
+     * @return 节点执行记录(日志)
+     */
+    @Override
+    public BpmExecuteNodeLog selectBpmExecuteNodeLogById(Long id)
+    {
+        return bpmExecuteNodeLogMapper.selectBpmExecuteNodeLogById(id);
+    }
+
+    @Override
+    public List<BpmExecuteNodeLog> selectBpmExecuteProcessNodeListLog(Map<String, Object> objectMap) {
+        return bpmExecuteNodeLogMapper.selectBpmExecuteProcessNodeListLog(objectMap);
+    }
+
+    /**
+     * 查询节点执行记录(日志)列表
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 节点执行记录(日志)
+     */
+    @Override
+    public List<BpmExecuteNodeLog> selectBpmExecuteNodeLogList(BpmExecuteNodeLog bpmExecuteNodeLog)
+    {
+        return bpmExecuteNodeLogMapper.selectBpmExecuteNodeLogList(bpmExecuteNodeLog);
+    }
+
+    /**
+     * 新增节点执行记录(日志)
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 结果
+     */
+    @Override
+    public int insertBpmExecuteNodeLog(BpmExecuteNodeLog bpmExecuteNodeLog)
+    {
+        bpmExecuteNodeLog.setCreateTime(DateUtils.getNowDate());
+        return bpmExecuteNodeLogMapper.insertBpmExecuteNodeLog(bpmExecuteNodeLog);
+    }
+
+    /**
+     * 修改节点执行记录(日志)
+     * 
+     * @param bpmExecuteNodeLog 节点执行记录(日志)
+     * @return 结果
+     */
+    @Override
+    public int updateBpmExecuteNodeLog(BpmExecuteNodeLog bpmExecuteNodeLog)
+    {
+        return bpmExecuteNodeLogMapper.updateBpmExecuteNodeLog(bpmExecuteNodeLog);
+    }
+
+    /**
+     * 批量删除节点执行记录(日志)
+     * 
+     * @param ids 需要删除的节点执行记录(日志)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteNodeLogByIds(Long[] ids)
+    {
+        return bpmExecuteNodeLogMapper.deleteBpmExecuteNodeLogByIds(ids);
+    }
+
+    /**
+     * 删除节点执行记录(日志)信息
+     * 
+     * @param id 节点执行记录(日志)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteNodeLogById(Long id)
+    {
+        return bpmExecuteNodeLogMapper.deleteBpmExecuteNodeLogById(id);
+    }
+}

+ 168 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteNodeMiddleServiceImpl.java

@@ -0,0 +1,168 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+
+import com.zkqy.common.utils.StringUtils;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeForm;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeMiddle;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.SysBpmNodeScriptVO;
+import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteNodeFormMapper;
+import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteNodeMiddleMapper;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeMiddleService;
+import com.zkqy.execution.produce.utils.Sending;
+import com.zkqy.system.domain.SysBpmNodeScript;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 执行流程用户、节点关联脚本中间Service业务层处理
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@Service
+public class BpmExecuteNodeMiddleServiceImpl implements IBpmExecuteNodeMiddleService {
+
+    @Autowired
+    private BpmExecuteNodeMiddleMapper bpmExecuteNodeMiddleMapper;
+
+
+    @Autowired
+    private BpmExecuteNodeFormMapper bpmExecuteNodeFormMapper;
+
+    @Autowired
+    private Sending sending;
+
+    // 创建RestTemplate实例
+    RestTemplate restTemplate = new RestTemplate();
+
+    /**
+     * 查询执行流程用户、节点关联脚本中间
+     *
+     * @param id 执行流程用户、节点关联脚本中间主键
+     * @return 执行流程用户、节点关联脚本中间
+     */
+    @Override
+    public BpmExecuteNodeMiddle selectBpmExecuteNodeMiddleById(Long id) {
+        return bpmExecuteNodeMiddleMapper.selectBpmExecuteNodeMiddleById(id);
+    }
+
+    /**
+     * 查询执行流程用户、节点关联脚本中间列表
+     *
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 执行流程用户、节点关联脚本中间
+     */
+    @Override
+    public List<BpmExecuteNodeMiddle> selectBpmExecuteNodeMiddleList(BpmExecuteNodeMiddle bpmExecuteNodeMiddle) {
+        return bpmExecuteNodeMiddleMapper.selectBpmExecuteNodeMiddleList(bpmExecuteNodeMiddle);
+    }
+
+    /**
+     * 新增执行流程用户、节点关联脚本中间
+     *
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 结果
+     */
+    @Override
+    public int insertBpmExecuteNodeMiddle(BpmExecuteNodeMiddle bpmExecuteNodeMiddle) {
+        return bpmExecuteNodeMiddleMapper.insertBpmExecuteNodeMiddle(bpmExecuteNodeMiddle);
+    }
+
+    /**
+     * 修改执行流程用户、节点关联脚本中间
+     *
+     * @param bpmExecuteNodeMiddle 执行流程用户、节点关联脚本中间
+     * @return 结果
+     */
+    @Override
+    public int updateBpmExecuteNodeMiddle(BpmExecuteNodeMiddle bpmExecuteNodeMiddle) {
+        return bpmExecuteNodeMiddleMapper.updateBpmExecuteNodeMiddle(bpmExecuteNodeMiddle);
+    }
+
+    /**
+     * 批量删除执行流程用户、节点关联脚本中间
+     *
+     * @param ids 需要删除的执行流程用户、节点关联脚本中间主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteNodeMiddleByIds(Long[] ids) {
+        return bpmExecuteNodeMiddleMapper.deleteBpmExecuteNodeMiddleByIds(ids);
+    }
+
+    /**
+     * 删除执行流程用户、节点关联脚本中间信息
+     *
+     * @param id 执行流程用户、节点关联脚本中间主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteNodeMiddleById(Long id) {
+        return bpmExecuteNodeMiddleMapper.deleteBpmExecuteNodeMiddleById(id);
+    }
+
+    @Override
+    public List<CommonEntity> addExceptionScript(List<CommonEntity> commonEntityList) throws Exception {
+        //循环得到所有异常脚本key
+        Set<String> scriptKeys = new LinkedHashSet<>();
+        List<BpmExecuteNodeForm> bpmExecuteNodeFormList = new ArrayList<>();
+        commonEntityList.forEach(m -> {
+            List<String> keys = Arrays.asList(m.getResultMap().get("benmTaskArtificialScriptKey").toString().split(","));
+            scriptKeys.addAll(keys);
+            if (keys.size() > 0) {
+                bpmExecuteNodeFormList.addAll(bpmExecuteNodeFormMapper.selectByTaskScriptKeys(m.getResultMap().get("bepTaskKey").toString(), keys));
+            }
+        });
+        if (scriptKeys.size() == 0) {
+            return commonEntityList;
+        }
+        //根据异常脚本key得到所有异常脚本信息
+        //ResponseEntity responseEntity;
+        //try {
+        //     responseEntity = sending.sendGetScriptInfo(scriptKeys);
+        //}catch (Exception e){
+        //    throw new Exception("网络错误");
+        //}
+        //Set集合转换成List集合
+        List<String> scriptKeysCollect = scriptKeys.stream().collect(Collectors.toList());
+
+
+        List<SysBpmNodeScript> sysBpmNodeScripts = sending.sendGetScriptInfo(scriptKeysCollect);
+        //if (responseEntity.getStatusCode().is2xxSuccessful()) {
+        if (StringUtils.isNotEmpty(sysBpmNodeScripts)) {
+            //ObjectMapper objectMapper = new ObjectMapper();
+            //Map<String, Object> map = objectMapper.readValue(responseEntity.getBody().toString(),Map.class);
+            //List<Object> sysBpmNodeScriptVOList = (List<Object>) map.get("data");
+            return commonEntityList.stream().map(m -> {
+                List<String> scriptKeyList = Arrays.asList(m.getResultMap().get("benmTaskArtificialScriptKey").toString().split(","));
+                List<SysBpmNodeScriptVO> exceptionScriptList = new ArrayList<>();
+                //sysBpmNodeScriptVOList.forEach(s -> {
+                sysBpmNodeScripts.forEach(item -> {
+                    //SysBpmNodeScriptVO sysBpmNodeScriptVO= JSONObject.parseObject(JSON.toJSONString(s),SysBpmNodeScriptVO.class);
+                    SysBpmNodeScriptVO sysBpmNodeScriptVO = new SysBpmNodeScriptVO();
+                    BeanUtils.copyProperties(item, sysBpmNodeScriptVO);
+                    if (scriptKeyList.contains(sysBpmNodeScriptVO.getScriptKey())) {
+
+                        String name = bpmExecuteNodeFormList.stream().filter(bpm -> bpm.getTaskProcessKey().equals(m.getResultMap().get("bepTaskKey")) && bpm.getTaskScriptKey().equals(sysBpmNodeScriptVO.getScriptKey())).findFirst().get().getTaskNodeName();
+
+                        sysBpmNodeScriptVO.setScriptName(name);
+
+
+                        exceptionScriptList.add(sysBpmNodeScriptVO);
+                    }
+                });
+                m.getResultMap().put("exceptionScriptList", exceptionScriptList);
+                return m;
+            }).collect(Collectors.toList());
+        } else {
+            return commonEntityList;
+        }
+
+    }
+}

+ 194 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmExecuteNodeServiceImpl.java

@@ -0,0 +1,194 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+
+import com.zkqy.common.constant.BpmNodeTypeConstants;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.bpm.XmlDataParserUtils;
+import com.zkqy.common.utils.uuid.IdUtils;
+import com.zkqy.execution.produce.dispersed.entity.*;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.SysBpmNodeScriptVO;
+import com.zkqy.execution.produce.dispersed.entity.runbpm.TriggerExceptionVO;
+import com.zkqy.execution.produce.dispersed.mapper.*;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 节点执行(记录)Service业务层处理
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@Service
+public class BpmExecuteNodeServiceImpl implements IBpmExecuteNodeService {
+
+    @Autowired
+    private BpmExecuteNodeMapper bpmExecuteNodeMapper;
+
+    @Autowired
+    private BpmExecuteNodeLogMapper bpmExecuteNodeLogMapper;
+
+    @Resource
+    private BpmExecuteProcessMapper bpmExecuteProcessMapper;
+
+    @Resource
+    private BpmExecuteNodeMiddleMapper bpmExecuteNodeMiddleMapper;
+
+    @Autowired
+    private BpmExecuteNodeFormMapper bpmExecuteNodeFormMapper;
+
+    /**
+     * 查询节点执行(记录)
+     *
+     * @param id 节点执行(记录)主键
+     * @return 节点执行(记录)
+     */
+    @Override
+    public BpmExecuteNode selectBpmExecuteNodeById(Long id) {
+        return bpmExecuteNodeMapper.selectBpmExecuteNodeById(id);
+    }
+
+    /**
+     * 查询节点执行(记录)列表
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 节点执行(记录)
+     */
+    @Override
+    public List<BpmExecuteNode> selectBpmExecuteNodeList(BpmExecuteNode bpmExecuteNode) {
+        return bpmExecuteNodeMapper.selectBpmExecuteNodeList(bpmExecuteNode);
+    }
+
+    /**
+     * 新增节点执行(记录)
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 结果
+     */
+    @Override
+    public int insertBpmExecuteNode(BpmExecuteNode bpmExecuteNode) {
+        bpmExecuteNode.setCreateTime(DateUtils.getNowDate());
+        return bpmExecuteNodeMapper.insertBpmExecuteNode(bpmExecuteNode);
+    }
+
+    /**
+     * 修改节点执行(记录)
+     *
+     * @param bpmExecuteNode 节点执行(记录)
+     * @return 结果
+     */
+    @Override
+    public int updateBpmExecuteNode(BpmExecuteNode bpmExecuteNode) {
+        return bpmExecuteNodeMapper.updateBpmExecuteNode(bpmExecuteNode);
+    }
+
+    /**
+     * 批量删除节点执行(记录)
+     *
+     * @param ids 需要删除的节点执行(记录)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteNodeByIds(Long[] ids) {
+        return bpmExecuteNodeMapper.deleteBpmExecuteNodeByIds(ids);
+    }
+
+    /**
+     * 删除节点执行(记录)信息
+     *
+     * @param id 节点执行(记录)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteNodeById(Long id) {
+        return bpmExecuteNodeMapper.deleteBpmExecuteNodeById(id);
+    }
+
+    @Override
+    public int updateNodeState(BpmExecuteNode bpmExecuteNode) {
+        return bpmExecuteNodeMapper.updateNodeState(bpmExecuteNode);
+    }
+
+    @Override
+    @Transactional
+    public int triggerExceptionNode(TriggerExceptionVO vo) throws Exception {
+        //新增节点标签ID
+        String newUserTaskTagId = "Activity_" + IdUtils.fastUUID();
+        //select bpm_execute_process
+        BpmExecuteProcess bpmExecuteProcess = bpmExecuteProcessMapper.selectBpmExecuteProcessByTaskKey(vo.getTaskProcessKey());
+
+        //得到当前节点信息
+        BpmExecuteNode bpmExecuteNode = bpmExecuteNodeMapper.queryBpmExecuteNodeBytaskNodeKey(vo.getTaskProcessKey(), vo.getTaskNodeKey());
+
+
+        //sys_bpm_node_script 得到异常脚本info
+        SysBpmNodeScriptVO sysBpmNodeScriptVO = vo.getSysBpmNodeScriptVO();
+
+        //select bpm_execute_node_form  查询节点表单(插入的异常节点所需的表单)
+        BpmExecuteNodeForm bpmExecuteNodeForm = new BpmExecuteNodeForm();
+        bpmExecuteNodeForm.setTaskProcessKey(vo.getTaskProcessKey());
+        String afterAnalysis;
+        //修改当前执行流程xml内容,在当前节点前增加异常节点,调整xml线指向
+        if (vo.getTaskNodeType().equals("exceptionTask")) {  // 异常节点抛出异常节点,在当前异常节点后插入新的异常节点
+            afterAnalysis = XmlDataParserUtils.addUserTaskTag(bpmExecuteProcess.getTaskProcessXmlContent(), newUserTaskTagId, sysBpmNodeScriptVO.getScriptName(), vo.getTaskNextNodeKey());
+
+            bpmExecuteNodeForm.setTaskNodeKey(vo.getTaskNextNodeKey());  // 追溯到正常节点抛出异常的节点key
+            // ?是否需要记录节点日志——》如不做记录管道展示不会展示没有执行过的异常!
+            if (true) {
+                // 新增节点日志记录
+                bpmExecuteNodeLogMapper.insertBpmExecuteNodeLog(new BpmExecuteNodeLog(bpmExecuteNode));
+            }
+
+        } else {
+            afterAnalysis = XmlDataParserUtils.addUserTaskTag(bpmExecuteProcess.getTaskProcessXmlContent(), newUserTaskTagId, sysBpmNodeScriptVO.getScriptName(), vo.getTaskNodeKey());
+            bpmExecuteNodeForm.setTaskNodeKey(vo.getTaskNodeKey());
+        }
+        bpmExecuteNodeForm.setTaskScriptKey(vo.getSysBpmNodeScriptVO().getScriptKey());
+        BpmExecuteNodeForm bpmExecuteNodeForm1 = bpmExecuteNodeFormMapper.selectBpmExecuteNodeFormInfo(bpmExecuteNodeForm);
+        //insert bpm_execute_node_form  节点运行表单
+        bpmExecuteNodeForm1.setTaskNodeKey(newUserTaskTagId);
+        bpmExecuteNodeFormMapper.insertBpmExecuteNodeForm(bpmExecuteNodeForm1);
+        bpmExecuteProcess.setTaskProcessXmlContent(afterAnalysis);
+
+//        bpmExecuteProcess.setTaskNodeKey(newUserTaskTagId);
+//        bpmExecuteProcess.setTaskNodeNextKey(bpmExecuteProcess.getTaskNodeKey());
+        bpmExecuteProcess.setTaskNodeNextKey(newUserTaskTagId);
+
+        bpmExecuteProcessMapper.updateBpmExecuteProcess(bpmExecuteProcess);
+
+        //生成虚拟角色编码
+        String taskNodeRolePermission = IdUtils.fastSimpleUUID();
+
+        //添加异常节点信息
+        bpmExecuteNode.setId(null);
+        bpmExecuteNode.setTaskNodeKey(newUserTaskTagId);
+        bpmExecuteNode.setTaskNodeName(bpmExecuteNodeForm1.getTaskNodeName());
+        bpmExecuteNode.setTaskNodeType(BpmNodeTypeConstants.EXCEPTION_TASK);
+        bpmExecuteNode.setTaskRemark(sysBpmNodeScriptVO.getScriptDescription());
+        bpmExecuteNode.setTaskNodeState("0");
+        bpmExecuteNode.setTaskNodeNumber("");
+        bpmExecuteNode.setTaskNodeWeight("");
+        bpmExecuteNode.setTaskNodeFormKey(bpmExecuteNodeForm1.getTaskNodeFormKey());
+        bpmExecuteNode.setTaskNodeFormType(bpmExecuteNodeForm1.getTaskNodeFormType());
+        bpmExecuteNode.setTaskNodeExecuteType(bpmExecuteNode.getTaskNodeExecuteType());
+        bpmExecuteNode.setTaskNodeFormKey(bpmExecuteNodeForm1.getTaskNodeFormKey());
+        bpmExecuteNode.setTaskNodeRolePermission(taskNodeRolePermission);
+        bpmExecuteNodeMapper.insertBpmExecuteNode(bpmExecuteNode);
+
+        //得到当前节点用户关联表信息,添加异常节点用户关联表信息
+        BpmExecuteNodeMiddle bpmExecuteNodeMiddle = bpmExecuteNodeMiddleMapper.queryBpmExecuteNodeMiddleByTaskNodeKey(vo.getTaskProcessKey(), vo.getTaskNodeKey());
+        List<String> list = Arrays.asList(bpmExecuteNodeMiddle.getTaskArtificialScriptKey().split(","));
+        bpmExecuteNodeMiddle.setId(null);
+        bpmExecuteNodeMiddle.setTaskNodeKey(newUserTaskTagId);
+        bpmExecuteNodeMiddle.setTaskAutomaticScriptTriggerType(sysBpmNodeScriptVO.getScriptKey());
+        bpmExecuteNodeMiddle.setTaskVirtuallyRole(taskNodeRolePermission);
+        bpmExecuteNodeMiddle.setTaskArtificialScriptKey(String.join(",", list.stream().filter(f -> !f.equals(vo.getSysBpmNodeScriptVO().getScriptKey())).collect(Collectors.toList())));
+        return bpmExecuteNodeMiddleMapper.insertBpmExecuteNodeMiddle(bpmExecuteNodeMiddle);
+    }
+}

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

@@ -0,0 +1,552 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.core.domain.entity.SysDictData;
+import com.zkqy.common.core.domain.entity.SysRole;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.common.utils.StringUtils;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeLog;
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.entity.DragFormGroup;
+import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteProcessMapper;
+import com.zkqy.execution.produce.dispersed.runbpm.PreExecutionToolClass;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeLogService;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteNodeMiddleService;
+import com.zkqy.execution.produce.dispersed.service.IBpmExecuteProcessService;
+import com.zkqy.execution.produce.utils.Sending;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.lang.reflect.Field;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 流程执行任务Service业务层处理
+ *
+ * @author hzh
+ * @date 2023-11-01
+ */
+@Service
+public class BpmExecuteProcessServiceImpl implements IBpmExecuteProcessService {
+
+    @Autowired // 执行流程
+    private BpmExecuteProcessMapper runBpmExecuteProcessMapper;
+
+    @Autowired  //预备执行流程工具类
+    private PreExecutionToolClass ipreExecutionToolClass;
+
+    @Autowired //执行流程用户、节点关联脚本中间Service接口
+    private IBpmExecuteNodeMiddleService bpmExecuteNodeMiddleService;
+
+
+    @Autowired
+    private IBpmExecuteNodeLogService iBpmExecuteNodeLogService;
+
+
+    @Autowired
+    private Sending sending;
+
+    /**
+     * 查询流程执行任务
+     *
+     * @param id 流程执行任务主键
+     * @return 流程执行任务
+     */
+    @Override
+    public BpmExecuteProcess selectBpmExecuteProcessById(Long id) {
+        return runBpmExecuteProcessMapper.selectBpmExecuteProcessById(id);
+    }
+
+    /**
+     * 查询流程执行任务列表
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 流程执行任务
+     */
+    @Override
+    public List<CommonEntity> selectBpmExecuteProcessList(BpmExecuteProcess bpmExecuteProcess) throws Exception {
+        // 得到当前执行管道的列表关联信息
+        //Map<String, Object> params = new HashMap<>();
+        //params.put("isEnablePaging", "false");  // 不弃启用分页
+        //params.put("dictType", "plan_execution_data"); // 排需要的必要参数
+        //ResponseEntity tenantDict = sending.sendGetTenantDict(params);
+        SysDictData dictData = new SysDictData();
+        dictData.setDictType("plan_execution_data");
+        List<SysDictData> dictDataList = sending.sendGetTenantDict(dictData);
+        //if (tenantDict.getStatusCodeValue() == 200) {
+        if (StringUtils.isNotEmpty(dictDataList)) {
+            Map<String, Object> objectMap = new HashMap<>();  // 查询执行管道的参数
+            objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
+            if (!bpmExecuteProcess.getTaskProcessType().equals("1")) {  // 审批类型
+                dictDataList.forEach(item -> {
+                    objectMap.put(item.getDictLabel(), item.getDictValue());
+                });
+            }
+            if (bpmExecuteProcess.getTaskProcessState() == 3L) {
+                // 首先根据当前登陆用户得到他可以执行的所有节点
+                List<CommonEntity> commonEntities;
+                if (bpmExecuteProcess.getTaskProcessType().equals("1")) {  //审批类型
+                    commonEntities = runBpmExecuteProcessMapper.queryExecuteProcessApprovalEnd(objectMap);
+                } else {
+                    commonEntities = runBpmExecuteProcessMapper.queryExecuteProcessEnd(objectMap);
+                }
+
+
+                if (bpmExecuteProcess.getTaskProcessType().equals("1")) {
+                    // 审批类型得到当前节点前所执行过的日志
+                    commonEntities.forEach(item -> {
+                        List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteNodeLogList(new BpmExecuteNodeLog(item.getResultMap().get("bepTaskKey").toString()));
+                        item.getResultMap().put("nodeLog", bpmExecuteNodeLogList);
+                    });
+                }
+                return commonEntities;
+            } else {
+                List<SysRole> sysRoles = SecurityUtils.getLoginUser().getUser().getRoles();
+                List<String> roles = new ArrayList<>();
+                if (sysRoles.size() != 0) {
+                    roles.addAll(sysRoles.stream().map(SysRole::getRoleKey).collect(Collectors.toList()));
+                }
+                // 根据当前的用户id得到可以执行的流程节点
+                objectMap.put("userId", SecurityUtils.getUserId());
+                // 得到当前发起请求的用户角色列表
+                objectMap.put("taskRealRoleList", roles);
+                // 首先根据当前登陆用户得到他可以执行的所有节点
+                List<CommonEntity> commonEntities;
+                if (bpmExecuteProcess.getTaskProcessType().equals("1")) {
+                    commonEntities = runBpmExecuteProcessMapper.queryExecuteApproveProcess(objectMap);
+                } else {
+                    commonEntities = runBpmExecuteProcessMapper.queryExecuteProcess(objectMap);
+                }
+                // 0 工业类型 1 审批类型
+                if (bpmExecuteProcess.getTaskProcessType().equals("1")) {
+                    // 审批类型得到当前节点前所执行过的日志
+                    commonEntities.forEach(item -> {
+                        List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteNodeLogList(new BpmExecuteNodeLog(item.getResultMap().get("bepTaskKey").toString()));
+                        item.getResultMap().put("nodeLog", bpmExecuteNodeLogList);
+                    });
+                } else if (bpmExecuteProcess.getTaskProcessType().equals("0")) {
+                    // 查询异常脚本信息
+                    List<CommonEntity> commonEntities1 = bpmExecuteNodeMiddleService.addExceptionScript(commonEntities);
+                    commonEntities.forEach(item -> {
+                        String keyName = item.getResultMap().get("benTaskNodeKey").toString();
+                        String taskKey = item.getResultMap().get("bepTaskKey").toString();
+                        item.getResultMap().putAll(
+                                commonEntities1.stream()
+                                        .filter(ctem ->
+                                                ctem.getResultMap().get("benTaskNodeKey").equals(keyName)
+                                                        && ctem.getResultMap().get("bepTaskKey").equals(taskKey))
+                                        .findFirst()
+                                        .get()
+                                        .getResultMap()
+                        );
+                    });
+                }
+                return commonEntities;
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * 查询流程执行任务列表 审批流
+     *
+     * @return 流程执行任务
+     */
+    @Override
+    public int  selectBpmExecuteProcessListCount(){
+        // 得到当前执行管道的列表关联信息d
+        BpmExecuteProcess bpmExecuteProcess=new BpmExecuteProcess();
+        return runBpmExecuteProcessMapper.selectBpmExecuteProcessListCount(bpmExecuteProcess);
+    }
+
+
+    @Override
+    public List<CommonEntity> selectBpmExecuteProcessApproveLogList(BpmExecuteProcess bpmExecuteProcess) {
+        Map<String, Object> objectMap = new HashMap<>();  // 查询执行管道的参数
+        objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
+        objectMap.put("createById", SecurityUtils.getUserId());
+        List<CommonEntity> commonEntities = runBpmExecuteProcessMapper.selectBpmExecuteProcessApproveLogList(objectMap);
+        // 审批类型得到当前节点前所执行过的日志
+        commonEntities.forEach(item -> {
+            List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteNodeLogList(new BpmExecuteNodeLog(item.getResultMap().get("bepTaskKey").toString()));
+            item.getResultMap().put("nodeLog", bpmExecuteNodeLogList);
+        });
+        return commonEntities;
+    }
+
+    @Override
+    public List<Map> selectBpmExecuteProcessListProductionCount(BpmExecuteProcess bpmExecuteProcess){
+        List<Map> maps = runBpmExecuteProcessMapper.selectBpmExecuteProcessListProductionCount(bpmExecuteProcess);
+        return maps;
+    }
+
+    @Override
+    public List<CommonEntity> selectBpmExecuteProcessListLog(BpmExecuteProcess bpmExecuteProcess) {
+        SysDictData dictData = new SysDictData();
+        dictData.setDictType("plan_execution_data");
+        List<SysDictData> dictDataList = sending.sendGetTenantDict(dictData);
+        if (StringUtils.isNotEmpty(dictDataList)) {
+            Map<String, Object> objectMap = new HashMap<>();
+            dictDataList.forEach(item -> {
+                objectMap.put(item.getDictLabel(), item.getDictValue());
+            });
+            List<SysRole> sysRoles = SecurityUtils.getLoginUser().getUser().getRoles();
+            List<String> roles = new ArrayList<>();
+            if (sysRoles.size() != 0) {
+                roles.addAll(sysRoles.stream().map(SysRole::getRoleKey).collect(Collectors.toList()));
+            }
+            // 根据当前的用户id得到可以执行的流程节点
+            objectMap.put("userId", SecurityUtils.getUserId());
+            // 得到当前发起请求的用户角色列表
+            objectMap.put("taskRealRoleList", roles);
+            objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
+            List<CommonEntity> commonEntityList = runBpmExecuteProcessMapper.selectBpmExecuteProcessListLog(objectMap); // 得到当前用户可以查看的流程
+            // 根据用户可以查看的流程任务编码,查询当前流程的详细信息
+            String[] taksKey = new String[commonEntityList.size()];
+            final int[] index = {0};
+            commonEntityList.forEach(item -> {
+                taksKey[index[0]] = item.getResultMap().get("taskKey").toString();
+                index[0]++;
+            });
+            if (taksKey.length <= 0) {
+                return commonEntityList;
+            }
+            objectMap.put("taskProcessList", taksKey);
+            // 当前用户可以看到流程的所有节点信息
+            List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteProcessNodeListLog(objectMap);
+            // 循环添加流程的详细信息
+            commonEntityList.forEach(item -> {
+                // 根据流程key筛选得到当前流程的所有执行过的节点信息
+                item.getResultMap().put("nodeLogList",
+                        bpmExecuteNodeLogList
+                                .stream()
+                                .filter(e -> e.getTaskProcessKey().equals(item.getResultMap().get("taskKey").toString()))
+                                .collect(Collectors.toList()));
+            });
+            return commonEntityList;
+        }
+        return null;
+    }
+
+
+    @Override
+    public List<CommonEntity> selectBpmExecuteProcessListLogFjqy(BpmExecuteProcess bpmExecuteProcess) {
+        SysDictData dictData = new SysDictData();
+        dictData.setDictType("plan_execution_data");
+        List<SysDictData> dictDataList = sending.sendGetTenantDict(dictData);
+        if (StringUtils.isNotEmpty(dictDataList)) {
+            Map<String, Object> objectMap = new HashMap<>();
+            dictDataList.forEach(item -> {
+                objectMap.put(item.getDictLabel(), item.getDictValue());
+            });
+            objectMap.put("quantity","quantity");
+            List<SysRole> sysRoles = SecurityUtils.getLoginUser().getUser().getRoles();
+            List<String> roles = new ArrayList<>();
+            if (sysRoles.size() != 0) {
+                roles.addAll(sysRoles.stream().map(SysRole::getRoleKey).collect(Collectors.toList()));
+            }
+            // 根据当前的用户id得到可以执行的流程节点
+            objectMap.put("userId", SecurityUtils.getUserId());
+            // 得到当前发起请求的用户角色列表
+            objectMap.put("taskRealRoleList", roles);
+            objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
+            List<CommonEntity> commonEntityList = runBpmExecuteProcessMapper.selectBpmExecuteProcessListLogFjqy(objectMap); // 得到当前用户可以查看的流程
+            // 根据用户可以查看的流程任务编码,查询当前流程的详细信息
+            String[] taksKey = new String[commonEntityList.size()];
+            final int[] index = {0};
+            commonEntityList.forEach(item -> {
+                taksKey[index[0]] = item.getResultMap().get("taskKey").toString();
+                index[0]++;
+            });
+            if (taksKey.length <= 0) {
+                return commonEntityList;
+            }
+            objectMap.put("taskProcessList", taksKey);
+            // 当前用户可以看到流程的所有节点信息
+            List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteProcessNodeListLog(objectMap);
+            // 循环添加流程的详细信息
+            commonEntityList.forEach(item -> {
+                // 根据流程key筛选得到当前流程的所有执行过的节点信息
+                item.getResultMap().put("nodeLogList",
+                        bpmExecuteNodeLogList
+                                .stream()
+                                .filter(e -> e.getTaskProcessKey().equals(item.getResultMap().get("taskKey").toString()))
+                                .collect(Collectors.toList()));
+            });
+            return commonEntityList;
+        }
+        return null;
+    }
+
+    /**
+     * 新增流程执行任务
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 结果
+     */
+    @Override
+    public int insertBpmExecuteProcess(BpmExecuteProcess bpmExecuteProcess) {
+        return runBpmExecuteProcessMapper.insertBpmExecuteProcess(bpmExecuteProcess);
+    }
+
+    /**
+     * 修改流程执行任务
+     *
+     * @param bpmExecuteProcess 流程执行任务
+     * @return 结果
+     */
+    @Override
+    public int updateBpmExecuteProcess(BpmExecuteProcess bpmExecuteProcess) {
+        return runBpmExecuteProcessMapper.updateBpmExecuteProcess(bpmExecuteProcess);
+    }
+
+    /**
+     * 批量删除流程执行任务
+     *
+     * @param ids 需要删除的流程执行任务主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteProcessByIds(Long[] ids) {
+        return runBpmExecuteProcessMapper.deleteBpmExecuteProcessByIds(ids);
+    }
+
+    /**
+     * 删除流程执行任务信息
+     *
+     * @param id 流程执行任务主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmExecuteProcessById(Long id) {
+        return runBpmExecuteProcessMapper.deleteBpmExecuteProcessById(id);
+    }
+
+    /**
+     * 共通投产流程接口
+     *
+     * @param commonEntity 共通实体 ->预执行流程任务实体
+     * @return
+     */
+    @Override
+    public AjaxResult productionScheduling(CommonEntity commonEntity) {
+        // 得到流程key 和 投产数据条的id  (做关联查询)
+        // intoProduction.getTaskProcessKey();
+        return AjaxResult.success(ipreExecutionToolClass.ReadyToExecute(commonEntity));
+    }
+
+    /**
+     * 根据FormId查询表单结构信息
+     *
+     * @param fid
+     * @return
+     */
+    @Override
+    public String getFromInfo(String fid) {
+        Map<String, String> fromInfo = runBpmExecuteProcessMapper.getFromInfo(fid);
+        return JSONObject.toJSONString(fromInfo);
+    }
+
+    @Override
+    public String getFromInfoByFormKey(String formKey) {
+        Map<String, String> fromInfo = runBpmExecuteProcessMapper.getFromInfoByFormKey(formKey);
+        return JSONObject.toJSONString(fromInfo);
+    }
+
+    @Override
+    public List<CommonEntity> getFromInfoByFormKeys(String[] formKeys) {
+        return runBpmExecuteProcessMapper.getFromInfoByFormKeys(formKeys);
+    }
+
+
+    /**
+     * 根据groupKey查询表格组对应的表格信息
+     *
+     * @param groupKey
+     * @return
+     */
+    @Override
+    public String getGroupTableInfo(String groupKey) {
+        //存tableInfo信息的Arraylist数组
+        List<HashMap> mapList = new ArrayList<>();
+        //查询表格组信息
+        Map<String, String> groupInfo = runBpmExecuteProcessMapper.getGroupInfo(groupKey);
+        //拿到表格组的TableInfo信息
+        String groupTableInfo = groupInfo.get("groupTableInfo");
+        //json字符传转数组
+        JSONArray jsonArray = JSON.parseArray(groupTableInfo);
+        //循环表格组里的tableInfo信息
+        jsonArray.forEach(item -> {
+            JSONObject jsonObject = JSONObject.parseObject(item.toString());
+            HashMap hashMap = new HashMap();
+            jsonObject.forEach((k, v) -> {
+                hashMap.put(k, v);
+            });
+            String tableKey = jsonObject.get("tableKey").toString();
+            //根据TableKey查询tableInfo
+            Map<String, String> tableInfo = runBpmExecuteProcessMapper.getTableInfo(tableKey);
+            //根据tableInfo信息拿到sqlKey信息
+            String sqlKey = tableInfo.get("sqlKey");
+            //根据sqlKey查询tableSQL信息
+            Map<String, String> tableSqlInfo = runBpmExecuteProcessMapper.getTableSqlInfo(sqlKey);
+            String tableSql = tableSqlInfo.get("tableSql").toString();
+            String tableCondition = tableSqlInfo.get("tableCondition").toString();
+            //拿到动态表格编号
+            String tId = String.valueOf(tableInfo.get("tId"));
+            List<Map<String, String>> tableConditionMap = runBpmExecuteProcessMapper.getTableCondition(tId);
+            List<String> tableConditionList = new ArrayList<>();
+            tableConditionMap.forEach(e -> {
+                tableConditionList.add(e.get("conditionDefaultValue"));
+            });
+            //根据动态表格编号查询这个表格的条件信息
+            //tableInfo转JSON
+            hashMap.put("tableInfo", JSONObject.toJSONString(tableInfo));
+            hashMap.put("tableSql", tableSql + " where " + tableCondition);
+            hashMap.put("condition", JSONObject.toJSONString(tableConditionList));
+            //添加到集合里
+            mapList.add(hashMap);
+        });
+        return JSONObject.toJSONString(mapList);
+    }
+
+    @Override
+    public int updateProcessStateByKey(String taskProcessState, String taskKey) {
+        return runBpmExecuteProcessMapper.updateProcessStateByKey(taskKey);
+    }
+
+    @Override
+    public List<CommonEntity> selectChemicalFibreBpmExecuteProcessList(BpmExecuteProcess bpmExecuteProcess) throws Exception {
+        // 得到当前执行管道的列表关联信息
+        //Map<String, Object> params = new HashMap<>();
+        //params.put("isEnablePaging", "false");  // 不弃启用分页
+        //params.put("dictType", "plan_execution_data"); // 排需要的必要参数
+        //ResponseEntity tenantDict = sending.sendGetTenantDict(params);
+        SysDictData dictData = new SysDictData();
+        dictData.setDictType("plan_execution_data");
+        List<SysDictData> dictDataList = sending.sendGetTenantDict(dictData);
+        //if (tenantDict.getStatusCodeValue() == 200) {
+        if (StringUtils.isNotEmpty(dictDataList)) {
+            Map<String, Object> objectMap = new HashMap<>();  // 查询执行管道的参数
+            objectMap.putAll(convertEntityToMap(bpmExecuteProcess));
+
+            if (!bpmExecuteProcess.getTaskProcessType().equals("1")) {  // 审批类型
+                dictDataList.forEach(item -> {
+                    objectMap.put(item.getDictLabel(), item.getDictValue());
+                });
+            }
+            if (bpmExecuteProcess.getTaskProcessState() == 3L) {
+                // 首先根据当前登陆用户得到他可以执行的所有节点
+                List<CommonEntity> commonEntities;
+                if (bpmExecuteProcess.getTaskProcessType().equals("1")) {  //审批类型
+                    commonEntities = runBpmExecuteProcessMapper.queryExecuteProcessApprovalEnd(objectMap);
+                } else {
+                    // 完成展示数据
+                    System.err.println("数据:"+objectMap.toString());
+                    commonEntities = runBpmExecuteProcessMapper.queryChemicalFibreExecuteProcessEnd(objectMap);
+                }
+
+                if (bpmExecuteProcess.getTaskProcessType().equals("1")) {
+                    // 审批类型得到当前节点前所执行过的日志
+                    commonEntities.forEach(item -> {
+                        List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteNodeLogList(new BpmExecuteNodeLog(item.getResultMap().get("bepTaskKey").toString()));
+                        item.getResultMap().put("nodeLog", bpmExecuteNodeLogList);
+                    });
+                }
+                return commonEntities;
+                // 进行中展示数据列表
+            } else {
+                List<SysRole> sysRoles = SecurityUtils.getLoginUser().getUser().getRoles();
+                List<String> roles = new ArrayList<>();
+                if (sysRoles.size() != 0) {
+                    roles.addAll(sysRoles.stream().map(SysRole::getRoleKey).collect(Collectors.toList()));
+                }
+                // 根据当前的用户id得到可以执行的流程节点
+                objectMap.put("userId", SecurityUtils.getUserId());
+                // 得到当前发起请求的用户角色列表
+                objectMap.put("taskRealRoleList", roles);
+                // 首先根据当前登陆用户得到他可以执行的所有节点
+                List<CommonEntity> commonEntities;
+                if (bpmExecuteProcess.getTaskProcessType().equals("1")) {
+                    commonEntities = runBpmExecuteProcessMapper.queryExecuteApproveProcess(objectMap);
+                } else {
+                    // 进行中展示数据列表
+                    commonEntities = runBpmExecuteProcessMapper.queryChemicalFibreExecuteProcess(objectMap);
+                }
+                // 0 工业类型 1 审批类型
+                if (bpmExecuteProcess.getTaskProcessType().equals("1")) {
+                    // 审批类型得到当前节点前所执行过的日志
+                    commonEntities.forEach(item -> {
+                        List<BpmExecuteNodeLog> bpmExecuteNodeLogList = iBpmExecuteNodeLogService.selectBpmExecuteNodeLogList(new BpmExecuteNodeLog(item.getResultMap().get("bepTaskKey").toString()));
+                        item.getResultMap().put("nodeLog", bpmExecuteNodeLogList);
+                    });
+                } else if (bpmExecuteProcess.getTaskProcessType().equals("0")) {
+                    // 查询异常脚本信息
+                    List<CommonEntity> commonEntities1 = bpmExecuteNodeMiddleService.addExceptionScript(commonEntities);
+                    commonEntities.forEach(item -> {
+                        String keyName = item.getResultMap().get("benTaskNodeKey").toString();
+                        String taskKey = item.getResultMap().get("bepTaskKey").toString();
+                        item.getResultMap().putAll(
+                                commonEntities1.stream()
+                                        .filter(ctem ->
+                                                ctem.getResultMap().get("benTaskNodeKey").equals(keyName)
+                                                        && ctem.getResultMap().get("bepTaskKey").equals(taskKey))
+                                        .findFirst()
+                                        .get()
+                                        .getResultMap()
+                        );
+                    });
+                }
+                return commonEntities;
+            }
+        }
+        return null;
+    }
+
+    // 将实体对象转换为Map的方法
+    public static Map<String, Object> convertEntityToMap(Object entity) {
+        Map<String, Object> map = new HashMap<>();
+
+        // 获取实体对象的所有字段
+        Field[] fields = entity.getClass().getDeclaredFields();
+
+        // 遍历字段并将字段名和对应的值放入Map中
+        for (Field field : fields) {
+            try {
+                field.setAccessible(true); // 设置字段为可访问
+                Object value = field.get(entity);
+                map.put(field.getName(), value);
+            } catch (IllegalAccessException e) {
+                e.printStackTrace();
+            }
+        }
+        return map;
+    }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 99 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmNodeHandleUserServiceImpl.java

@@ -0,0 +1,99 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeHandleUser;
+import com.zkqy.execution.produce.dispersed.mapper.BpmNodeHandleUserMapper;
+import com.zkqy.execution.produce.dispersed.service.IBpmNodeHandleUserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 节点处理用户Service业务层处理
+ *
+ * @author hzh
+ * @date 2023-10-26
+ */
+@Service
+public class BpmNodeHandleUserServiceImpl implements IBpmNodeHandleUserService {
+
+    @Autowired
+    private BpmNodeHandleUserMapper bpmNodeHandleUserMapper;
+
+    /**
+     * 查询节点处理用户
+     *
+     * @param id 节点处理用户主键
+     * @return 节点处理用户
+     */
+    @Override
+    public BpmNodeHandleUser selectBpmNodeHandleUserById(Long id) {
+        return bpmNodeHandleUserMapper.selectBpmNodeHandleUserById(id);
+    }
+
+    /**
+     * 查询节点处理用户列表
+     *
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 节点处理用户
+     */
+    @Override
+    public List<BpmNodeHandleUser> selectBpmNodeHandleUserList(BpmNodeHandleUser bpmNodeHandleUser) {
+        return bpmNodeHandleUserMapper.selectBpmNodeHandleUserList(bpmNodeHandleUser);
+    }
+
+    /**
+     * 新增节点处理用户
+     *
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public int insertBpmNodeHandleUser(List<BpmNodeHandleUser> bpmNodeHandleUser) {
+        return bpmNodeHandleUserMapper.insertBpmNodeHandleUser(bpmNodeHandleUser);
+    }
+
+    /**
+     * 修改节点处理用户
+     *
+     * @param bpmNodeHandleUser 节点处理用户
+     * @return 结果
+     */
+    @Override
+    public int updateBpmNodeHandleUser(List<BpmNodeHandleUser> bpmNodeHandleUser) {
+        // 批量修改
+        bpmNodeHandleUser.forEach(item -> {
+            bpmNodeHandleUserMapper.updateBpmNodeHandleUser(item);
+        });
+        return 1;
+    }
+
+    /**
+     * 批量删除节点处理用户
+     *
+     * @param ids 需要删除的节点处理用户主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmNodeHandleUserByIds(Long[] ids) {
+        return bpmNodeHandleUserMapper.deleteBpmNodeHandleUserByIds(ids);
+    }
+
+    /**
+     * 删除节点处理用户信息
+     *
+     * @param id 节点处理用户主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmNodeHandleUserById(Long id) {
+        return bpmNodeHandleUserMapper.deleteBpmNodeHandleUserById(id);
+    }
+
+    @Override
+    public BpmNodeHandleUser selectBpmNodeHandleUserByVirtuallyRole(String virtuallyRole) {
+        return bpmNodeHandleUserMapper.selectBpmNodeHandleUserByVirtuallyRole(virtuallyRole);
+    }
+}

+ 115 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmNodeScriptRelevanceServiceImpl.java

@@ -0,0 +1,115 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeScriptRelevance;
+import com.zkqy.execution.produce.dispersed.mapper.BpmNodeScriptRelevanceMapper;
+import com.zkqy.execution.produce.dispersed.service.IBpmNodeScriptRelevanceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 流程节点脚本关联Service业务层处理
+ *
+ * @author hzh
+ * @date 2023-10-26
+ */
+@Service
+public class BpmNodeScriptRelevanceServiceImpl implements IBpmNodeScriptRelevanceService {
+
+    @Autowired
+    private BpmNodeScriptRelevanceMapper bpmNodeScriptRelevanceMapper;
+
+    /**
+     * 查询流程节点脚本关联
+     *
+     * @param id 流程节点脚本关联主键
+     * @return 流程节点脚本关联
+     */
+    @Override
+    public BpmNodeScriptRelevance selectBpmNodeScriptRelevanceById(Long id) {
+        return bpmNodeScriptRelevanceMapper.selectBpmNodeScriptRelevanceById(id);
+    }
+
+    /**
+     * 查询流程节点脚本关联列表
+     *
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 流程节点脚本关联
+     */
+    @Override
+    public List<BpmNodeScriptRelevance> selectBpmNodeScriptRelevanceList(BpmNodeScriptRelevance bpmNodeScriptRelevance) {
+        return bpmNodeScriptRelevanceMapper.selectBpmNodeScriptRelevanceList(bpmNodeScriptRelevance);
+    }
+
+    /**
+     * 新增流程节点脚本关联
+     *
+     * @param bpmNodeScriptRelevanceList 流程节点脚本关联
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public int insertBpmNodeScriptRelevance(List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList) {
+//        bpmNodeScriptRelevanceList.forEach(item -> {
+//            if (item.getId() == null) {
+//                bpmNodeScriptRelevanceMapper.insertBpmNodeScriptRelevance(item);
+//            } else {
+//                bpmNodeScriptRelevanceMapper.updateBpmNodeScriptRelevance(item);
+//            }
+//        });
+        return bpmNodeScriptRelevanceMapper.insertBpmNodeScriptRelevanceList(bpmNodeScriptRelevanceList);
+    }
+
+    /**
+     * 修改流程节点脚本关联
+     *
+     * @param bpmNodeScriptRelevance 流程节点脚本关联
+     * @return 结果
+     */
+    @Override
+    public int updateBpmNodeScriptRelevance(List<BpmNodeScriptRelevance> bpmNodeScriptRelevance) {
+        bpmNodeScriptRelevance.forEach(item -> {
+            bpmNodeScriptRelevanceMapper.updateBpmNodeScriptRelevance(item);
+        });
+        return 1;
+    }
+
+    /**
+     * 批量删除流程节点脚本关联
+     *
+     * @param ids 需要删除的流程节点脚本关联主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmNodeScriptRelevanceByIds(Long[] ids) {
+        return bpmNodeScriptRelevanceMapper.deleteBpmNodeScriptRelevanceByIds(ids);
+    }
+
+    /**
+     * 删除流程节点脚本关联信息
+     *
+     * @param id 流程节点脚本关联主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmNodeScriptRelevanceById(Long id) {
+        return bpmNodeScriptRelevanceMapper.deleteBpmNodeScriptRelevanceById(id);
+    }
+
+    @Override
+    public BpmNodeScriptRelevance selectAutoScriptByNodeKey(String nodeKey) {
+        return bpmNodeScriptRelevanceMapper.selectAutoScriptByNodeKey(nodeKey);
+    }
+
+    @Override
+    public int deleteBpmNodeScriptRelevanceByNodeKeys(List<String> nodeKeys) {
+        return bpmNodeScriptRelevanceMapper.deleteBpmNodeScriptRelevanceByNodeKeys(nodeKeys);
+    }
+
+    @Override
+    public BpmNodeScriptRelevance selectBpmNodeScriptRelevanceInfo(BpmNodeScriptRelevance bpmNodeScriptRelevance) {
+        return bpmNodeScriptRelevanceMapper.selectBpmNodeScriptRelevanceInfo(bpmNodeScriptRelevance);
+    }
+}

+ 278 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmProcessConfigurationServiceImpl.java

@@ -0,0 +1,278 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+
+
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeHandleUser;
+import com.zkqy.execution.produce.dispersed.entity.BpmNodeScriptRelevance;
+import com.zkqy.execution.produce.dispersed.entity.BpmProcessConfiguration;
+import com.zkqy.execution.produce.dispersed.entity.vo.NodeVo;
+import com.zkqy.execution.produce.dispersed.mapper.BpmProcessConfigurationMapper;
+import com.zkqy.execution.produce.dispersed.service.IBpmNodeHandleUserService;
+import com.zkqy.execution.produce.dispersed.service.IBpmNodeScriptRelevanceService;
+import com.zkqy.execution.produce.dispersed.service.IBpmProcessConfigurationService;
+import com.zkqy.execution.produce.dispersed.service.ICommonService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 流程配置Service业务层处理
+ *
+ * @author hzh
+ * @date 2023-10-20
+ */
+@Service
+public class BpmProcessConfigurationServiceImpl implements IBpmProcessConfigurationService {
+
+    @Autowired  // 流程节点配置
+    private BpmProcessConfigurationMapper bpmProcessConfigurationMapper;
+    @Autowired  // 节点执行用户
+    private IBpmNodeHandleUserService iBpmNodeHandleUserService;
+    @Autowired  // 节点执行脚本
+    private IBpmNodeScriptRelevanceService iBpmNodeScriptRelevanceService;
+
+    @Autowired
+    private ICommonService commonService;
+
+
+    /**
+     * 查询流程配置
+     *
+     * @param id 流程配置主键
+     * @return 流程配置
+     */
+    @Override
+    public BpmProcessConfiguration selectBpmProcessConfigurationById(Long id) {
+        return bpmProcessConfigurationMapper.selectBpmProcessConfigurationById(id);
+    }
+
+    /**
+     * 查询流程配置列表
+     *
+     * @param bpmProcessConfiguration 流程配置
+     * @return 流程配置
+     */
+    @Override
+    public List<BpmProcessConfiguration> selectBpmProcessConfigurationList(BpmProcessConfiguration bpmProcessConfiguration) {
+        return bpmProcessConfigurationMapper.selectBpmProcessConfigurationList(bpmProcessConfiguration);
+    }
+
+    /**
+     * 新增流程配置
+     *
+     * @param bpmProcessConfigurationList 流程配置
+     * @return 结果
+     */
+    @Override
+    public int insertBpmProcessConfiguration(List<BpmProcessConfiguration> bpmProcessConfigurationList) {
+        return bpmProcessConfigurationMapper.insertBpmProcessConfiguration(bpmProcessConfigurationList);
+    }
+
+    /**
+     * 修改流程配置
+     *
+     * @param bpmProcessConfigurationList 流程配置
+     * @return 结果
+     */
+    @Override
+    public int updateBpmProcessConfiguration(BpmProcessConfiguration bpmProcessConfigurationList) {
+        //bpmProcessConfigurationList.forEach(node -> node.setUpdateTime(DateUtils.getNowDate()));
+        return bpmProcessConfigurationMapper.updateBpmProcessConfiguration(bpmProcessConfigurationList);
+    }
+
+    /**
+     * 批量删除流程配置
+     *
+     * @param ids 需要删除的流程配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmProcessConfigurationByIds(Long[] ids) {
+        return bpmProcessConfigurationMapper.deleteBpmProcessConfigurationByIds(ids);
+    }
+
+    /**
+     * 删除流程配置信息
+     *
+     * @param id 流程配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmProcessConfigurationById(Long id) {
+        return bpmProcessConfigurationMapper.deleteBpmProcessConfigurationById(id);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int insertBpmProcessNodeConfig(NodeVo nodeVo) {
+        //查询当前业务库所有表
+        List<String> tableNameList = commonService.selectTableName(SecurityUtils.getDatabaseName());
+        //当前流程需要创建的表
+        List<String> list = nodeVo.getTableNameList();
+        list = list.stream().filter(l -> !tableNameList.contains(l)).collect(Collectors.toList());
+        String addField = ",task_key varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '任务编码'," +
+                "task_node_key varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '任务节点编码') ENGINE=InnoDB";
+        // 新建流程节点所需数据表
+        for (String tableName : list){
+            try {
+                String createTableSql = commonService.selectTableSql(tableName).get("create table");
+                createTableSql = createTableSql.replace("CREATE TABLE","CREATE TABLE IF NOT EXISTS {DBNAME}.");
+                if(!createTableSql.contains("task_key") && !createTableSql.contains("task_node_key")){
+                    createTableSql = createTableSql.replace(") ENGINE=InnoDB",addField);
+                }
+                commonService.executeSql(createTableSql);
+            }catch (Exception e){
+                return 0;
+            }
+        }
+        // 新增节点配置
+        if (nodeVo.getBpmProcessConfigurationList().size() != 0) {
+            nodeVo.getBpmProcessConfigurationList().stream().forEach(e -> {
+                e.setCreateById(SecurityUtils.getUserId());
+                e.setCreateBy(SecurityUtils.getUsername());
+                e.setCreateTime(DateUtils.getNowDate());
+            });
+        }
+        bpmProcessConfigurationMapper.insertBpmProcessConfiguration(nodeVo.getBpmProcessConfigurationList());
+        // 新增节点执行用户
+        if (nodeVo.getBpmNodeHandleUserList().size() != 0) {
+            iBpmNodeHandleUserService.insertBpmNodeHandleUser(nodeVo.getBpmNodeHandleUserList());
+        }
+        // 新增节点脚本关系
+        if (nodeVo.getBpmNodeScriptRelevanceList().size() != 0) {
+            iBpmNodeScriptRelevanceService.insertBpmNodeScriptRelevance(nodeVo.getBpmNodeScriptRelevanceList());
+        }
+        return 1;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int updateBpmProcessNodeConfig(NodeVo nodeVo) {
+        //查询当前业务库所有表
+        List<String> tableNameList = commonService.selectTableName(SecurityUtils.getDatabaseName());
+        //当前流程需要创建的表
+        List<String> list = nodeVo.getTableNameList();
+        list = list.stream().filter(l -> !tableNameList.contains(l)).collect(Collectors.toList());
+        String addField = ",task_key varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '任务编码'," +
+                "task_node_key varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '' COMMENT '任务节点编码') ENGINE=InnoDB";
+        // 新建流程节点所需数据表
+        for (String tableName : list){
+            try {
+                String createTableSql = commonService.selectTableSql(tableName).get("create table");
+                createTableSql = createTableSql.replace("CREATE TABLE","CREATE TABLE IF NOT EXISTS {DBNAME}.");
+                createTableSql = createTableSql.replace(") ENGINE=InnoDB",addField);
+                commonService.executeSql(createTableSql);
+            }catch (Exception e){
+                return 0;
+            }
+        }
+        // 修改节点配置
+        if (nodeVo.getBpmProcessConfigurationList().size() != 0) {
+            // 定义存储修改操作中新增节点,根据id为null来判断是否新增数据条
+            List<BpmProcessConfiguration> addList = new ArrayList<>();
+            // List<BpmProcessConfiguration> removeList = new ArrayList<>();
+            nodeVo.getBpmProcessConfigurationList().forEach(item -> {
+                if (item.getId() == null) {
+                    // 把需要新增的数据添加到addList集合里边
+                    addList.add(item);
+                }
+            });
+
+            // 从大集合里边移除需要添加的节点
+            nodeVo.getBpmProcessConfigurationList().removeAll(addList);
+
+            //修改操作(一共四个节点、)
+            nodeVo.getBpmProcessConfigurationList().forEach(item -> {
+                item.setUpdateTime(DateUtils.getNowDate());
+                item.setUpdateById(SecurityUtils.getUserId());
+                item.setUpdateBy(SecurityUtils.getUsername());
+                bpmProcessConfigurationMapper.updateBpmProcessConfiguration(item);
+            });
+
+            // 新增操作
+            if (addList.size() != 0) {
+//                addList.parallelStream().forEach(item->{
+//                    item.setCreateTime(DateUtils.getNowDate());
+//                    item.setCreateBy(SecurityUtils.getUsername());
+//                    item.setCreateById(SecurityUtils.getUserId());
+//                });
+                bpmProcessConfigurationMapper.insertBpmProcessConfiguration(addList);
+            }
+        }
+
+        // 修改节点执行用户
+        if (nodeVo.getBpmNodeHandleUserList().size() != 0) {
+            List<BpmNodeHandleUser> addList1 = new ArrayList<>();
+            Iterator<BpmNodeHandleUser> iterator = nodeVo.getBpmNodeHandleUserList().iterator();
+            while (iterator.hasNext()) {
+                BpmNodeHandleUser item = iterator.next();
+                if (item.getId() == null) {
+                    addList1.add(item);
+                    iterator.remove();
+                }
+            }
+            iBpmNodeHandleUserService.updateBpmNodeHandleUser(nodeVo.getBpmNodeHandleUserList());
+            if (addList1.size() != 0) {
+                iBpmNodeHandleUserService.insertBpmNodeHandleUser(addList1);
+            }
+        }
+
+        // 修改节点脚本关系
+        if (nodeVo.getBpmNodeScriptRelevanceList().size() != 0) {
+            //删除节点脚本关系
+            List<String> nodeKeys = nodeVo.getBpmNodeScriptRelevanceList().stream().map(BpmNodeScriptRelevance::getNodeKey).collect(Collectors.toList());
+            if (nodeVo.getRemoveNodeIds().length > 0) {
+                nodeKeys.addAll(bpmProcessConfigurationMapper.selectNodeKeyByIds(Arrays.asList(nodeVo.getRemoveNodeIds())));
+            }
+            iBpmNodeScriptRelevanceService.deleteBpmNodeScriptRelevanceByNodeKeys(nodeKeys);
+            //新增节点脚本关系
+            iBpmNodeScriptRelevanceService.insertBpmNodeScriptRelevance(nodeVo.getBpmNodeScriptRelevanceList());
+        }
+        // 删除废弃的节点
+        if (nodeVo.getRemoveNodeIds().length > 0) {
+            //要删除的节点更新状态
+            for (Long removeNodeId : nodeVo.getRemoveNodeIds()) {
+                BpmProcessConfiguration bpmProcessConfiguration = new BpmProcessConfiguration();
+                bpmProcessConfiguration.setUpdateBy(SecurityUtils.getUsername());
+                bpmProcessConfiguration.setUpdateById(SecurityUtils.getUserId());
+                bpmProcessConfiguration.setUpdateTime(DateUtils.getNowDate());
+                bpmProcessConfiguration.setId(removeNodeId);
+                bpmProcessConfiguration.setDelFlag("2");
+                bpmProcessConfigurationMapper.updateBpmProcessConfiguration(bpmProcessConfiguration);
+            }
+            //bpmProcessConfigurationMapper.deleteBpmProcessConfigurationByIds(nodeVo.getRemoveNodeIds());
+        }
+        return 1;
+    }
+
+    @Override
+    public NodeVo selectByProcessByKey(String nodeProcessKey) {
+        // 根据流程别名的到所有节点信息
+        List<BpmProcessConfiguration> bpmProcessConfigurationList = bpmProcessConfigurationMapper.selectBpmProcessConfigurationList(new BpmProcessConfiguration(nodeProcessKey));
+        // 根据节点别名得到所有脚本信息
+        List<BpmNodeScriptRelevance> bpmNodeScriptRelevanceList = new ArrayList<>();
+        // 根据节点别名得到所有执行用户信息
+        List<BpmNodeHandleUser> bpmNodeHandleUserList = new ArrayList<>();
+        bpmProcessConfigurationList.forEach(item -> {
+            if (item.getNodeKey() != null) {
+                bpmNodeScriptRelevanceList.addAll(iBpmNodeScriptRelevanceService.selectBpmNodeScriptRelevanceList(new BpmNodeScriptRelevance(item.getNodeKey())));
+            }
+            if (item.getNodeRolePermission() != null) {
+                bpmNodeHandleUserList.addAll(iBpmNodeHandleUserService.selectBpmNodeHandleUserList(new BpmNodeHandleUser(item.getNodeRolePermission())));
+            }
+        });
+        NodeVo nodeVo = new NodeVo();
+        nodeVo.setBpmNodeHandleUserList(bpmNodeHandleUserList);
+        nodeVo.setBpmProcessConfigurationList(bpmProcessConfigurationList);
+        nodeVo.setBpmNodeScriptRelevanceList(bpmNodeScriptRelevanceList);
+        return nodeVo;
+    }
+}

+ 364 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmProcessServiceImpl.java

@@ -0,0 +1,364 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+import com.zkqy.common.config.ZkqyConfig;
+import com.zkqy.common.constant.Constants;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.common.utils.StringUtils;
+import com.zkqy.common.utils.file.FileUploadUtils;
+import com.zkqy.common.utils.file.FileUtils;
+import com.zkqy.execution.produce.dispersed.entity.BpmProcess;
+import com.zkqy.execution.produce.dispersed.mapper.BpmProcessMapper;
+import com.zkqy.execution.produce.dispersed.service.IBpmProcessService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+/**
+ * 流程定义Service业务层处理
+ *
+ * @author hzh
+ * @date 2023-10-10
+ */
+@Service
+public class BpmProcessServiceImpl implements IBpmProcessService {
+
+    private static final Logger log = LoggerFactory.getLogger(BpmProcessServiceImpl.class);
+
+    @Autowired
+    private BpmProcessMapper bpmProcessMapper;
+
+    /**
+     * 查询流程定义
+     *
+     * @param processId 流程定义主键
+     * @return 流程定义
+     */
+    @Override
+    public BpmProcess selectBpmProcessByProcessId(Long processId) {
+        return bpmProcessMapper.selectBpmProcessByProcessId(processId);
+    }
+
+    /**
+     * 查询流程定义列表
+     *
+     * @param bpmProcess 流程定义
+     * @return 流程定义
+     */
+    @Override
+    public List<BpmProcess> selectBpmProcessList(BpmProcess bpmProcess) {
+        return bpmProcessMapper.selectBpmProcessList(bpmProcess);
+    }
+
+    /**
+     * 查询流程统计信息
+     * @param
+     * @return
+     */
+    @Override
+    public List<Map> selectBpmProcessStatistics() {
+        return bpmProcessMapper.selectBpmProcessStatistics();
+    }
+
+    /**
+     * 新增流程定义
+     *
+     * @param bpmProcess 流程定义
+     * @return 结果
+     */
+    @Override
+    public int insertBpmProcess(BpmProcess bpmProcess, MultipartFile fileXML) {
+        String filePath = "";  // 文件存放路径
+        if (!fileXML.isEmpty()) {
+            try {
+                // 解析得到当前文件中的内容
+                byte[] bytes = fileXML.getBytes();
+                String xmlContent = new String(bytes);
+                // 存储标签内容
+                bpmProcess.setProcessXmlContent(xmlContent);
+                // 指定文件路径上传
+                filePath = FileUploadUtils.upload(ZkqyConfig.getUploadXMLPath(), fileXML);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        bpmProcess.setProcessXmlPath(filePath);
+        bpmProcess.setCreateTime(DateUtils.getNowDate());
+        bpmProcess.setCreateById(SecurityUtils.getUserId());
+        bpmProcess.setCreateBy(SecurityUtils.getUsername());
+        bpmProcess.setProcessVersion(0L);
+        bpmProcess.setProcessType(0L);
+        bpmProcess.setStartEventType(0L);
+        return bpmProcessMapper.insertBpmProcess(bpmProcess);
+    }
+
+    /**
+     * 修改流程定义
+     *
+     * @param bpmProcess 流程定义
+     * @return 结果
+     */
+    @Override
+    public int updateBpmProcess(BpmProcess bpmProcess, MultipartFile fileXML) {
+        String filePath = "";  // 新的文件存放路径
+        if (!fileXML.isEmpty()) {
+            // 修改流程删除流程文件后重新生成
+            FileUtils.deleteFile(ZkqyConfig.getProfile() + StringUtils.substringAfter(bpmProcess.getProcessXmlPath(), Constants.RESOURCE_PREFIX));
+            try {
+                // 解析得到当前文件中的内容
+                byte[] bytes = fileXML.getBytes();
+                String xmlContent = new String(bytes);
+                // 存储标签内容
+                bpmProcess.setProcessXmlContent(xmlContent);
+                // 指定文件路径上传
+                filePath = FileUploadUtils.upload(ZkqyConfig.getUploadXMLPath(), fileXML);
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        bpmProcess.setProcessXmlPath(filePath);
+        bpmProcess.setUpdateTime(DateUtils.getNowDate());
+        bpmProcess.setUpdateBy(SecurityUtils.getUsername());
+        bpmProcess.setUpdateById(SecurityUtils.getUserId());
+        return bpmProcessMapper.updateBpmProcess(bpmProcess);
+    }
+
+    /**
+     * 批量删除流程定义
+     *
+     * @param processIds 需要删除的流程定义主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmProcessByProcessIds(Long[] processIds) {
+        return bpmProcessMapper.deleteBpmProcessByProcessIds(processIds);
+    }
+
+    /**
+     * 删除流程定义信息
+     *
+     * @param processId 流程定义主键
+     * @return 结果
+     */
+    @Override
+    public int deleteBpmProcessByProcessId(Long processId) {
+        return bpmProcessMapper.deleteBpmProcessByProcessId(processId);
+    }
+
+    /**
+     * 备份
+     * 需要实现历史版本功能 每次进行修改时就是一次版本的更新
+     * 备份可以导出xml文件理论上实现复制流程
+     *
+     * @param bpmProcess
+     * @return
+     */
+    @Override
+    public int bpmBackups(BpmProcess bpmProcess) {
+        String remark = bpmProcess.getRemark(); // 存储备份操作信息
+        bpmProcess = bpmProcessMapper.selectBpmProcessByProcessId(bpmProcess.getProcessId());
+        bpmProcess.setCreateTime(DateUtils.getNowDate());
+        bpmProcess.setCreateBy(SecurityUtils.getUsername());
+        bpmProcess.setProcessVersion(1L);  // 设置为历史版本,备份状态
+        bpmProcess.setRemark(remark);
+        String filePath = ZkqyConfig.getProfile() + StringUtils.substringAfter(bpmProcess.getProcessXmlPath(), Constants.RESOURCE_PREFIX);
+        // 复制流程文件
+        Path fileInfo = Paths.get(filePath);
+        // 定义目标文件路径,注意这里我们只是改变了文件的名字,路径还是原来的路径
+        Path destinationFile = Paths.get(filePath).resolveSibling("备份:" + fileInfo.getFileName().toString());
+        try {
+            Files.copy(fileInfo, destinationFile, StandardCopyOption.REPLACE_EXISTING);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        return bpmProcessMapper.insertBpmProcess(bpmProcess);
+    }
+
+    @Override
+    public void exportProcessFile(List<Long> processIds, HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+        List<BpmProcess> bpmProcessList = bpmProcessMapper.selectBpmProcessByProcessIds(processIds);
+        String localPath = ZkqyConfig.getProfile();
+//        List<String> list = bpmProcessList.stream().map(m ->localPath + StringUtils.substringAfter(m.getProcessXmlPath(), Constants.RESOURCE_PREFIX)).collect(Collectors.toList());
+        List<String> list = new ArrayList<>();
+        bpmProcessList.forEach(item -> {
+            list.add(localPath + StringUtils.substringAfter(item.getProcessXmlPath(), Constants.RESOURCE_PREFIX));
+        });
+        if (CollectionUtils.isEmpty(list)) {
+            throw new Exception("请选择要下载文件/图片");
+        }
+        //设置响应头信息
+        response.reset();
+        response.setCharacterEncoding("utf-8");
+        response.setContentType("multipart/form-data");
+        response.setHeader("Access-Control-Allow-Origin", "*");
+        //设置压缩包的名字,date为时间戳
+        String date = String.valueOf(System.currentTimeMillis());
+        String downloadName = date + ".zip";
+        //返回客户端浏览器的版本号、类型
+        String agent = request.getHeader("USER-AGENT");
+        try {
+            //针对IE或者以IE为内核的浏览器:
+            if (agent.contains("MSIE") || agent.contains("Trident")) {
+                downloadName = URLEncoder.encode(downloadName, "UTF-8");
+            } else {
+                //非IE浏览器的处理:
+                downloadName = new String(downloadName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
+            }
+        } catch (Exception e) {
+            log.error("系统异常", e);
+        }
+
+        if (list.size() > 1) {
+            //多文件/图压缩下载
+            batchFileDownLoad(list, downloadName, response);
+        } else {
+            //单文件/图直接下载
+            singleFileDownLoad(list, bpmProcessList.get(0).getProcessName(), response);
+
+        }
+
+    }
+
+    @Override
+    @Transactional
+    public int enableProcess(BpmProcess bpmProcess) {
+        //查询最新版本流程
+        BpmProcess process = bpmProcessMapper.selectBpmProcessByProcessKey(bpmProcess.getProcessKey());
+        //当前最新版本流程改为流程备份
+        BpmProcess process1 = new BpmProcess();
+        process1.setProcessId(process.getProcessId());
+        process1.setProcessVersion(1L);
+        bpmProcessMapper.updateBpmProcess(process1);
+        //历史版本改为最新版本流程
+        bpmProcess.setProcessVersion(0L);
+        return bpmProcessMapper.updateBpmProcess(bpmProcess);
+    }
+
+    private void batchFileDownLoad(List<String> list, String downloadName, HttpServletResponse response) {
+        //设置压缩包名称
+        response.setHeader("Content-Disposition", "attachment;fileName=\"" + downloadName + "\"");
+        //设置压缩流:直接写入response,实现边压缩边下载
+        ZipOutputStream zipOs = null;
+        //循环将文件写入压缩流
+        DataOutputStream os = null;
+
+        try {
+            zipOs = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
+            //设置压缩方法
+            zipOs.setMethod(ZipOutputStream.DEFLATED);
+            //遍历文件信息(主要获取文件名/文件路径等)
+            for (String t : list) {
+                try {
+                    //文件存储路径
+                    String path = t;
+                    //压缩文件中每个文件的文件名称
+                    String name = t.substring(t.lastIndexOf("\\") + 1);
+                    log.info("batchDownloadFile:[filePath:{}]", path);
+                    File file = new File(path);
+                    if (!file.exists()) {
+                        throw new RuntimeException("文件不存在");
+                    }
+                    FileInputStream fs = null;
+                    try {
+                        //添加ZipEntry,并将ZipEntry中写入文件流
+                        zipOs.putNextEntry(new ZipEntry(URLEncoder.encode(name, StandardCharsets.UTF_8.toString()) + ".bpmn"));
+                        os = new DataOutputStream(zipOs);
+                        fs = new FileInputStream(file);
+                        byte[] b = new byte[100];
+                        int length;
+                        //读入需要下载的文件的内容,打包到zip文件
+                        while ((length = fs.read(b)) != -1) {
+                            os.write(b, 0, length);
+                        }
+                    } catch (Exception e) {
+                        log.error("系统异常", e);
+                    } finally {
+                        //关闭流
+                        assert fs != null;
+                        fs.close();
+                        zipOs.closeEntry();
+                    }
+
+                } catch (Exception e) {
+                    log.error("下载文件出错![{}]", e.getMessage());
+                }
+            }
+        } catch (Exception e) {
+            log.error("系统异常", e);
+        } finally {
+            //关闭流
+            try {
+                if (os != null) {
+                    os.flush();
+                    os.close();
+                }
+                if (zipOs != null) {
+                    zipOs.close();
+                }
+            } catch (IOException e) {
+                log.error("系统异常", e);
+            }
+        }
+    }
+
+    /**
+     * 单文件直接下载
+     *
+     * @param list     文件/图片路径
+     * @param response
+     */
+    private void singleFileDownLoad(List<String> list, String processName, HttpServletResponse response) throws UnsupportedEncodingException {
+
+        FileInputStream fis = null;
+        OutputStream out = null;
+        String path = list.get(0);
+        String name = path.substring(path.lastIndexOf("\\") + 1);
+        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(processName, StandardCharsets.UTF_8.toString()) + ".bpmn");
+        try {
+            fis = new FileInputStream(path);
+            out = response.getOutputStream();
+            byte[] b = new byte[1024];
+            int len = 0;
+            while ((len = fis.read(b)) != -1) {
+                out.write(b, 0, len);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (out != null) {
+                    out.flush();
+                    out.close();
+                }
+                if (fis != null) {
+                    fis.close();
+                }
+            } catch (IOException ex) {
+                log.error("系统异常", ex);
+            }
+        }
+
+    }
+
+
+}

+ 555 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/CommonServiceImpl.java

@@ -0,0 +1,555 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import com.zkqy.common.core.redis.RedisCache;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.common.utils.StringUtils;
+import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
+import com.zkqy.execution.produce.dispersed.entity.TableSql;
+import com.zkqy.execution.produce.dispersed.mapper.CommonMapper;
+import com.zkqy.execution.produce.dispersed.mapper.TableSqlMapper;
+import com.zkqy.execution.produce.dispersed.service.ICommonService;
+import org.apache.poi.xssf.usermodel.XSSFRow;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicReference;
+
+import static com.zkqy.common.utils.StringUtils.*;
+
+
+@Service
+public class CommonServiceImpl implements ICommonService {
+
+    @Resource
+    private CommonMapper commonMapper;
+
+    @Resource
+    private TableSqlMapper tableSqlMapper;
+    @Autowired
+    private RedisCache redisCache;
+
+
+    @Override
+    public List<CommonEntity> selectList(CommonEntity commonEntity) {
+        String tableName = (String) commonEntity.getBasicMap().get("tableName");
+        Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getQueryMap()));
+        return commonMapper.selectList(tableName, conditions);
+    }
+
+    @Override
+    public int batchInsert(CommonEntity commonEntity) {
+        String tableName = (String) commonEntity.getBasicMap().get("tableName");
+        List<Map<String, String>> list = commonEntity.getAddListMap();
+        List<LinkedHashMap<String, String>> listAsd = new ArrayList<>();
+        list.forEach(item -> {  // 批量导入数据给导入数据增加默认值
+            Map<String, String> asd = new LinkedHashMap<>();
+            asd.putAll(item);
+            asd.put("create_time", DateUtils.getTime());
+            asd.put("create_by", SecurityUtils.getUsername());
+            asd.put("create_by_id", SecurityUtils.getUserId().toString());
+            if (asd.get("delFlag") == null && asd.get("del_flag") == null) {
+                asd.put("del_flag", "0");
+            }
+            listAsd.add((LinkedHashMap<String, String>) asd);
+//            list.stream().filter(del -> del.get("del_flag") != null && del.get("del_flag").equals("0")).findFirst().get().remove("del_flag");
+        });
+
+        List<Map<String, Object>> mapList = new ArrayList<>();
+        LinkedHashMap<String, String> linkedHashMap = listAsd.get(0);  // 得到当前需要处理的第一条数据
+        for (Object obj : listAsd) {
+            Map<String, Object> map1 = (Map<String, Object>) obj;
+            mapList.add(map1);
+        }
+        Set<String> fieldNames = new LinkedHashSet<>();
+        mapList.stream().forEach(map1 -> {
+            map1.forEach((key, value) -> {
+                fieldNames.add(toUnderScoreCase(key));
+                if (value != null && value.toString().indexOf("file:base64:") != -1) {
+                    // 更新数据
+                    value = redisCache.getCacheList(value.toString().replace("file:base64:", ""));
+                }
+            });
+        });
+        List<String> sequenceMap = new ArrayList<>(linkedHashMap.keySet());
+        for (int e = 0; e < sequenceMap.size(); e++) {
+            // 交换键值对位置
+            for (int i = 0; i < mapList.size(); i++) {
+                String entry = sequenceMap.get(e);
+                Object val = mapList.get(i).get(entry);
+                mapList.get(i).remove(entry);
+                mapList.get(i).put(entry, val);
+            }
+        }
+        // file:base64:cc61a700-94d0-46c8-b3f3-7485c4a886fd
+        return commonMapper.batchInsert(fieldNames, tableName, mapList);
+    }
+
+    @Override
+    public int batchInsertNoUserInfo(CommonEntity commonEntity) {
+        String tableName = (String) commonEntity.getBasicMap().get("tableName");
+        List<Map<String, String>> list = commonEntity.getAddListMap();
+        List<LinkedHashMap<String, String>> listAsd = new ArrayList<>();
+        list.forEach(item -> {  // 批量导入数据给导入数据增加默认值
+            Map<String, String> asd = new LinkedHashMap<>();
+            asd.putAll(item);
+            if (asd.get("delFlag") == null && asd.get("del_flag") == null) {
+                asd.put("del_flag", "0");
+            }
+            listAsd.add((LinkedHashMap<String, String>) asd);
+        });
+
+        List<Map<String, Object>> mapList = new ArrayList<>();
+        for (Object obj : listAsd) {
+            Map<String, Object> map1 = (Map<String, Object>) obj;
+            mapList.add(map1);
+        }
+        Set<String> fieldNames = new LinkedHashSet<>();
+        mapList.stream().forEach(map1 -> {
+            map1.forEach((key, value) -> {
+                fieldNames.add(toUnderScoreCase(key));
+            });
+        });
+
+        return commonMapper.batchInsert(fieldNames, tableName, mapList);
+    }
+
+    @Override
+    public int edit(CommonEntity commonEntity) {
+        String tableName = (String) commonEntity.getBasicMap().get("tableName");
+        Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
+        Map<String, Object> fields = JSONObject.parseObject(JSON.toJSONString(commonEntity.getCommMap()));
+        Map<String, Object> endfields = new HashMap<>();
+        fields.keySet().forEach(item -> {
+            if (fields.get(item).equals("A")) {
+                endfields.put(toUnderScoreCase(item), SecurityUtils.getUsername());
+            } else {
+                endfields.put(toUnderScoreCase(item), fields.get(item));
+            }
+            //endfields.put(toUnderScoreCase(item), fields.get(item));
+        });
+        Map<String, Object> endConditions = new HashMap<>();
+        conditions.keySet().forEach(item -> {
+            endConditions.put(toUnderScoreCase(item), conditions.get(item));
+        });
+        endfields.put("update_by", SecurityUtils.getUsername());
+        endfields.put("update_time", DateUtils.getTime());
+        endfields.put("update_by_id", SecurityUtils.getUserId());
+//        return  1;
+        return commonMapper.edit(endfields, tableName, endConditions);
+    }
+
+    @Override
+    public int editNoUserInfo(CommonEntity commonEntity) {
+        String tableName = (String) commonEntity.getBasicMap().get("tableName");
+        Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
+        Map<String, Object> fields = JSONObject.parseObject(JSON.toJSONString(commonEntity.getCommMap()));
+        Map<String, Object> endfields = new HashMap<>();
+        fields.keySet().forEach(item -> {
+            if (fields.get(item).equals("A")) {
+                endfields.put(toUnderScoreCase(item), SecurityUtils.getUsername());
+            } else {
+                endfields.put(toUnderScoreCase(item), fields.get(item));
+            }
+            //endfields.put(toUnderScoreCase(item), fields.get(item));
+        });
+        Map<String, Object> endConditions = new HashMap<>();
+        conditions.keySet().forEach(item -> {
+            endConditions.put(toUnderScoreCase(item), conditions.get(item));
+        });
+        return commonMapper.edit(endfields, tableName, endConditions);
+    }
+
+    @Override
+    public int batchDelete(CommonEntity commonEntity) {
+        String tableName = (String) commonEntity.getBasicMap().get("tableName");
+        Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
+        Map<String, Object> endConditions = new HashMap<>();
+        conditions.keySet().forEach(item -> {
+            Object value = conditions.get(item);
+            // 判断value是否为String类型且非JSON数组格式
+            if (!String.valueOf(value).startsWith("[")) {
+                // 将单个值转换成JSON数组
+                JSONArray jsonArray = new JSONArray(Arrays.asList(String.valueOf(value)));
+                endConditions.put(toUnderScoreCase(item), jsonArray);
+            } else {
+                endConditions.put(toUnderScoreCase(item), value);
+            }
+        });
+        return commonMapper.batchDelete(tableName, endConditions);
+    }
+
+    @Override
+    public List<CommonEntity> queryTableList(CommonEntity commonEntity, TableSql tableSql) {
+        // 根据sqlkey查询得到当前表单对应的sql
+        Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getQueryMap()));
+        // 得到查询条件的值
+        String queryCriteriaValue =
+                conditions.containsKey("queryCriteriaValue") == true
+                        ? conditions.get("queryCriteriaValue").toString() : "";
+        // 得到需要执行的sql条件语句
+        String endSQL = tableSql.getTableCondition().replace("#{val}", queryCriteriaValue);
+        return commonMapper.queryTableList(tableSql.getTableSql() + " where " + endSQL);
+    }
+
+    @Override
+    public void export(HttpServletResponse response, CommonEntity commonEntity) throws Exception {
+        String sqlKey = commonEntity.getQueryMap().get("sqlkey").toString();
+        //String tableName = commonEntity.getQueryMap().get("tableName").toString();
+        //查询标题信息
+        TableSql tableSql = tableSqlMapper.selectTableSqlByTSqlKey(sqlKey);
+        //查询列表信息
+        List<Map<String, Object>> mapList = null;
+        //根据条件获取列表信息
+        if (commonEntity.getExeclMap() != null && !commonEntity.getExeclMap().equals("")) {
+            ObjectMapper mapper = new ObjectMapper();
+            try {
+                mapList = mapper.readValue(commonEntity.getExeclMap(), new TypeReference<List<Map<String, Object>>>() {
+                });
+            } catch (JsonProcessingException e) {
+                throw new RuntimeException(e);
+            }
+            //mapList = commonEntity.getExeclMap();
+        } else {
+            List<Map<String, Object>> maps = new ArrayList<>();
+            List<CommonEntity> commonEntities = queryTableList(commonEntity, tableSql);
+            commonEntities.stream().forEach(c -> maps.add(c.getResultMap()));
+            mapList = maps;
+        }
+
+        //获取列表标题和字段
+        Map<String, String> map = (Map) JSONObject.parseObject(tableSql.getTableExportField());
+        // 创建Excel文档
+        XSSFWorkbook workbook = new XSSFWorkbook();
+        XSSFSheet sheet = workbook.createSheet("Sheet1");
+        //标题
+        List<String> titleList = new ArrayList<>();
+        //字段
+        List<String> fieldList = new ArrayList<>();
+        for (Map.Entry<String, String> entry : map.entrySet()) {
+            fieldList.add(entry.getKey().replace("@", "_"));
+            titleList.add(entry.getValue() == null ? "" : entry.getValue());
+        }
+        // 创建表头
+        XSSFRow header = sheet.createRow(0);
+        for (int q = 0; q < titleList.size(); q++) {
+            header.createCell(q).setCellValue(titleList.get(q));
+        }
+        int rowIndex = 1;
+        //获取列表信息
+        for (int w = 0; w < mapList.size(); w++) {
+            XSSFRow row = sheet.createRow(rowIndex++);
+            for (int e = 0; e < fieldList.size(); e++) {
+                Object val = mapList.get(w).get(toCamelCase(fieldList.get(e)));
+                row.createCell(e).setCellValue((val == null ? "" : val).toString());
+            }
+        }
+        response.setContentType("application/vnd.ms-excel");
+        response.setHeader("Content-Disposition", "attachment; filename=" + DateUtils.dateTimeNow() + ".xlsx");
+        // 将Excel文档写入响应流中
+        ServletOutputStream outputStream = response.getOutputStream();
+        workbook.write(outputStream);
+        outputStream.flush();
+        outputStream.close();
+    }
+
+    @Override
+    public void exportTemplate(HttpServletResponse response, String tableName, String sqlKey) throws Exception {
+        //查询标题信息
+        TableSql tableSql = tableSqlMapper.selectTableSqlByTSqlKey(sqlKey);
+        //获取列表标题和字段
+        Map<String, String> map = (Map) JSONObject.parseObject(tableSql.getTableExportField());
+        // 创建Excel文档
+        XSSFWorkbook workbook = new XSSFWorkbook();
+        XSSFSheet sheet = workbook.createSheet("Sheet1");
+        List<String> titleList = new ArrayList<>();
+        for (Map.Entry<String, String> entry : map.entrySet()) {
+            if (!entry.getKey().contains("@")) {
+                titleList.add(entry.getValue() == null ? "" : entry.getValue());
+            }
+        }
+        // 创建表头
+        XSSFRow header = sheet.createRow(0);
+        for (int q = 0; q < titleList.size(); q++) {
+            header.createCell(q).setCellValue(titleList.get(q));
+        }
+        response.setContentType("application/vnd.ms-excel");
+        response.setHeader("Content-Disposition", "attachment; filename=" + DateUtils.dateTimeNow() + ".xlsx");
+        // 将Excel文档写入响应流中
+        ServletOutputStream outputStream = response.getOutputStream();
+        workbook.write(outputStream);
+        outputStream.flush();
+        outputStream.close();
+    }
+
+    @Override
+    public List<CommonEntity> dragTablePreview(CommonEntity commonEntity) {
+        String sql = commonEntity.getBasicMap().get("sql").toString();
+        return commonMapper.queryTableList(sql);
+    }
+
+    @Override
+    public Map<String, String> selectTableSql(String tableName) {
+        return commonMapper.selectTableSql(tableName);
+    }
+
+    @Override
+    public void executeSql(String sql) {
+        commonMapper.executeSql(sql);
+    }
+
+    @Override
+    public List<String> selectTableName(String databaseName) {
+        return commonMapper.selectTableName(databaseName);
+    }
+
+    @Override
+    public CommonEntity getInfoById(CommonEntity commonEntity) {
+        String tableName = (String) commonEntity.getBasicMap().get("tableName");
+        Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
+        CommonEntity common = new CommonEntity();
+        CommonEntity commonEntity1 = commonMapper.getInfoById(tableName, conditions);
+        if (commonEntity1 == null) {
+            return common;
+        }
+        Map<String, Object> retMap = commonEntity1.getResultMap();
+        Map<String, Object> retMap1 = new HashMap<>();
+        retMap.keySet().forEach(item -> {
+            retMap1.put(toUnderScoreCase(item), retMap.get(item));
+        });
+        common.setResultMap(retMap1);
+        return common;
+    }
+
+    @Override
+    public List<CommonEntity> queryGroupTableList(CommonEntity commonEntity, TableSql tableSql, String tableFormat) {
+        //前端传递过来的参数
+        Map<String, Object> queryMap = commonEntity.getQueryMap();
+        //是否存在
+        //循环前端传过来的参数 跳过 sqlkey
+        AtomicReference<String> replaceSql = new AtomicReference<>(tableSql.getTableCondition());
+        Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getQueryMap()));
+        //正常的查询
+        String queryCriteriaValue = conditions.containsKey("queryCriteriaValue") ? conditions.get("queryCriteriaValue").toString() : "";
+        String endSQL = replaceSql.get().replace("#{val}", queryCriteriaValue);
+        queryMap.remove("sqlkey");
+        queryMap.remove("queryCriteriaValue");
+        AtomicReference<String> equivalent = new AtomicReference<>("");
+        // 首先处理时间范围查询
+        // 处理时间 开始时间-结束时间
+        // 可能会存在多个时间范围的查询,根据查询字段名称做筛选条件
+        Map<String, Object> timeMap = JSONObject.parseObject(queryMap.get("timehorizon") != null ? queryMap.get("timehorizon").toString() : String.valueOf(new HashMap<String, Object>()));
+
+
+        String beginTimeSql = " AND date_format(#{field},'%Y%m%d%H%i%s') >= date_format('#{beginTime}','%Y%m%d%H%i%s')";
+        String endTimeSql = " AND date_format(#{field},'%Y%m%d%H%i%s') <= date_format('#{endTime}','%Y%m%d%H%i%s')";
+
+
+        //		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+        //			AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+        //		</if>
+        //		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+        //			AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+        //		</if>
+
+
+        //  处理时间sql拼接
+        timeMap.keySet().forEach(item -> {
+            Map<String, Object> endtime = (Map) timeMap.get(item);
+            String executeBeginTimesql = beginTimeSql.replace("#{field}", item).replace("#{beginTime}", endtime.get("beginTime").toString());
+            String executeEndTimeSql = endTimeSql.replace("#{field}", item).replace("#{endTime}", endtime.get("endTime").toString());
+            equivalent.set(executeBeginTimesql + executeEndTimeSql);
+        });
+        // 删除时间范围查询
+        queryMap.remove("timehorizon");
+        // 其他查询条件拼接
+        queryMap.forEach((k, v) -> {
+            String querySqlWhere = equivalent.get() + " and " + k + " = " + v;
+            equivalent.set(querySqlWhere);
+        });
+        //联动表格查询
+        AtomicReference<String> stringAtomicReference = new AtomicReference<>(endSQL);
+        if (endSQL.contains("#{")) {
+            queryMap.forEach((k, v) -> {
+                //是否包含这个条件
+                boolean contains = stringAtomicReference.get().contains(k.toString());
+                if (contains) {
+                    //#{ck.id 替换成具体的值
+                    stringAtomicReference.set(stringAtomicReference.get().replace(k.toString(), v.toString()));
+                }
+            });
+            endSQL = stringAtomicReference.get();
+            equivalent.set("");
+        }
+        String sqlString = tableSql.getTableSql() + " where " + endSQL + equivalent.get();
+        List<CommonEntity> commonEntities = commonMapper.queryTableList(sqlString);
+        //根据sqlKey查询表格数据
+        commonEntities.forEach(item -> {
+            Map<String, Object> resultMap = item.getResultMap();
+            resultMap.forEach((k, v) -> {
+                if (isNotNull(v) && !v.toString().isEmpty()) {
+                    //正则匹配成功
+                    boolean validDateTimeFormat = isValidDateTimeFormat(v.toString());
+                    if (validDateTimeFormat) {
+                        if (v.toString().indexOf("T") > 0) {
+                            DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME; // 默认支持这种格式
+                            LocalDateTime dateTime = LocalDateTime.parse(v.toString(), formatter);
+                            DateTimeFormatter fmt = DateTimeFormatter.ofPattern(tableFormat);
+                            String dateStr = dateTime.format(fmt);
+                            resultMap.put(k, dateStr);
+                        } else {
+                            LocalDateTime localDateTime = DateUtils.toLocalDateTime(v.toString(), "yyyy-MM-dd HH:mm:ss");
+                            DateTimeFormatter fmt = DateTimeFormatter.ofPattern(tableFormat);
+                            String dateStr = localDateTime.format(fmt);
+                            resultMap.put(k, dateStr);
+                        }
+                    }
+                }
+            });
+        });
+        return commonEntities;
+    }
+
+    @Override
+    public List<CommonEntity> queryGroupTableList1(CommonEntity commonEntity, TableSql tableSql, String tableFormat) {
+        //前端传递过来的参数
+        Map<String, Object> queryMap = commonEntity.getQueryMap();
+        //是否存在
+        AtomicReference<Boolean> isExist = new AtomicReference<>(true);
+        //循环前端传过来的参数 跳过 sqlkey
+        AtomicReference<String> replaceSql = new AtomicReference<>(tableSql.getTableCondition());
+        queryMap.forEach((k, v) -> {
+            if (!k.equals("sqlkey") && !k.equals("queryCriteriaValue") && !k.equals("timehorizon")) { //查询第一个表的数据是不会进行任何替换的
+                int isExistIndex = tableSql.getTableCondition().indexOf(k);
+                replaceSql.set(tableSql.getTableCondition().replace(k, v.toString()));
+                if (isExistIndex < 0) {
+                    isExist.set(false);
+                }
+            }
+        });
+        //证明条件不对应不能让他进行查询
+        if (!isExist.get()) {
+            List<CommonEntity> commonEntityList = new ArrayList<>();
+            CommonEntity common = new CommonEntity();
+            HashMap<String, Object> hashMap = new HashMap();
+            hashMap.put("err", "查询条件不匹配查询失败");
+            common.setResultMap(hashMap);
+            commonEntityList.add(common);
+            return commonEntityList;
+        }
+        Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getQueryMap()));
+        //正常的查询
+        String queryCriteriaValue =
+                conditions.containsKey("queryCriteriaValue") == true
+                        ? conditions.get("queryCriteriaValue").toString() : "";
+        String endSQL = replaceSql.get().replace("#{val}", queryCriteriaValue);
+
+        String columnName = commonEntity.getConditionMap().get("columnName").toString();
+        String columnValue = commonEntity.getConditionMap().get("columnValue").toString();
+
+        String sqlString = tableSql.getTableSql() + " where " + endSQL + " and sale_order." +
+                columnName + " in (" + columnValue + ")";
+        Map<String, Object> conditionMap = commonEntity.getConditionMap();
+        if (conditionMap.containsKey("columnValue1") && conditionMap.containsKey("columnName1")) {
+            // 键存在于 Map 中
+            String columnName1 = commonEntity.getConditionMap().get("columnName1").toString();
+            String columnValue1 = commonEntity.getConditionMap().get("columnValue1").toString();
+            sqlString = sqlString + " and sale_order." + columnName1 + " " + columnValue1;
+        }
+        sqlString += " and sale_order.sale_order_technology_no != 'retailOrder' ";
+        List<CommonEntity> commonEntities = commonMapper.queryTableList(sqlString);
+        //根据sqlKey查询表格数据
+        commonEntities.forEach(item -> {
+            Map<String, Object> resultMap = item.getResultMap();
+            resultMap.forEach((k, v) -> {
+                if (isNotNull(v) && !v.toString().isEmpty()) {
+                    //正则匹配成功
+                    boolean validDateTimeFormat = isValidDateTimeFormat(v.toString());
+                    if (validDateTimeFormat) {
+                        if (v.toString().indexOf("T") > 0) {
+                            DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME; // 默认支持这种格式
+                            LocalDateTime dateTime = LocalDateTime.parse(v.toString(), formatter);
+                            DateTimeFormatter fmt = DateTimeFormatter.ofPattern(tableFormat);
+                            String dateStr = dateTime.format(fmt);
+                            resultMap.put(k, dateStr);
+                        } else {
+                            LocalDateTime localDateTime = DateUtils.toLocalDateTime(v.toString(), "yyyy-MM-dd HH:mm:ss");
+                            DateTimeFormatter fmt = DateTimeFormatter.ofPattern(tableFormat);
+                            String dateStr = localDateTime.format(fmt);
+                            resultMap.put(k, dateStr);
+                        }
+                    }
+                }
+            });
+        });
+        return commonEntities;
+    }
+
+    @Override
+    public CommonEntity queryDropDownBoxData(List<CommonEntity> commonEntityList) {
+        Map<String, Object> retMap = new HashMap<>();
+        for (CommonEntity commonEntity : commonEntityList) {
+            String tableName = (String) commonEntity.getBasicMap().get("tableName");
+            Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
+            List<Long> list = new ArrayList<>();
+            list.add(0L);
+            conditions.put("del_flag", list);
+            List<Map<String, Object>> mapList = commonMapper.queryDropDownBoxData(tableName, conditions);
+            retMap.put(tableName, mapList);
+        }
+        CommonEntity commonEntity = new CommonEntity();
+        commonEntity.setResultMap(retMap);
+        return commonEntity;
+    }
+
+    public static String extractSubstring(String input, String identifier) {
+        int startIndex = input.indexOf(identifier);
+        if (startIndex == -1) {
+            return null; // 如果找不到指定的标识符,则返回空
+        }
+
+        int endIndex = input.indexOf(" ", startIndex);
+        if (endIndex == -1) {
+            endIndex = input.length(); // 如果找不到空格,则截取到字符串末尾
+        }
+        String sqlColumn = input.substring(startIndex + identifier.length() + 1, endIndex);
+        return convertToCamelCase(sqlColumn);
+    }
+}
+
+/*
+network:
+  ethernets:
+    ens5f1:
+      dhcp4: no
+      addresses: [192.168.0.17/24]
+      optional: true
+      gateway4: 192.168.0.1
+      nameservers:
+        addresses: [114.114.114.114, 8.8.8.8]
+  version: 2
+  renderer: NetworkManager
+
+
+  # Let NetworkManager manage all devices on this system
+
+network:
+  version: 2
+  renderer: NetworkManager
+
+ */

+ 102 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/DragFormGroupServiceImpl.java

@@ -0,0 +1,102 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.execution.produce.dispersed.entity.DragFormGroup;
+import com.zkqy.execution.produce.dispersed.mapper.DragFormGroupMapper;
+import com.zkqy.execution.produce.dispersed.service.IDragFormGroupService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 动态表单组Service业务层处理
+ * 
+ * @author hzh
+ * @date 2024-01-26
+ */
+@Service
+public class DragFormGroupServiceImpl implements IDragFormGroupService
+{
+    @Autowired
+    private DragFormGroupMapper dragFormGroupMapper;
+
+    /**
+     * 查询动态表单组
+     * 
+     * @param id 动态表单组主键
+     * @return 动态表单组
+     */
+    @Override
+    public DragFormGroup selectDragFormGroupById(Long id)
+    {
+        return dragFormGroupMapper.selectDragFormGroupById(id);
+    }
+
+    @Override
+    public DragFormGroup selectDragFormGroupByKey(String groupKey) {
+        return dragFormGroupMapper.selectDragFormGroupByKey(groupKey);
+    }
+
+    /**
+     * 查询动态表单组列表
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 动态表单组
+     */
+    @Override
+    public List<DragFormGroup> selectDragFormGroupList(DragFormGroup dragFormGroup)
+    {
+        return dragFormGroupMapper.selectDragFormGroupList(dragFormGroup);
+    }
+
+    /**
+     * 新增动态表单组
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 结果
+     */
+    @Override
+    public int insertDragFormGroup(DragFormGroup dragFormGroup)
+    {
+        dragFormGroup.setCreateTime(DateUtils.getNowDate());
+        return dragFormGroupMapper.insertDragFormGroup(dragFormGroup);
+    }
+
+    /**
+     * 修改动态表单组
+     * 
+     * @param dragFormGroup 动态表单组
+     * @return 结果
+     */
+    @Override
+    public int updateDragFormGroup(DragFormGroup dragFormGroup)
+    {
+        dragFormGroup.setUpdateTime(DateUtils.getNowDate());
+        return dragFormGroupMapper.updateDragFormGroup(dragFormGroup);
+    }
+
+    /**
+     * 批量删除动态表单组
+     * 
+     * @param ids 需要删除的动态表单组主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDragFormGroupByIds(Long[] ids)
+    {
+        return dragFormGroupMapper.deleteDragFormGroupByIds(ids);
+    }
+
+    /**
+     * 删除动态表单组信息
+     * 
+     * @param id 动态表单组主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDragFormGroupById(Long id)
+    {
+        return dragFormGroupMapper.deleteDragFormGroupById(id);
+    }
+}

+ 64 - 0
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/DynamicJavaServiceImpl.java

@@ -0,0 +1,64 @@
+package com.zkqy.execution.produce.dispersed.service.impl;
+
+import com.zkqy.execution.produce.dispersed.service.DynamicJavaService;
+import com.zkqy.execution.produce.utilsPlus.DefaultPackageClassLoader;
+import com.zkqy.execution.produce.utilsPlus.DefaultPackageCompiler;
+import com.zkqy.execution.produce.utilsPlus.SpringBeanRegistrar;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import java.io.File;
+
+@Service
+@Slf4j
+public class DynamicJavaServiceImpl  implements DynamicJavaService {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+
+    @Value("${template.urluPload}")
+    private  String  javaFilePath;
+
+    /**
+     * 这里到到时候会传递java脚本的Key
+     * @param javaScriptKey
+     * @throws Exception
+     */
+    @Override
+    public String loadAndRegisterJavaFile(String javaScriptKey){
+        try {
+            //根据固定路径+ScriptKey来固定的编译对应Java脚本文件
+            StringBuffer stringBuffer=new StringBuffer();
+            stringBuffer.append(javaFilePath).append(javaScriptKey).append(".java");
+            String newJavaFilePath = stringBuffer.toString();
+            System.out.println(newJavaFilePath+"新路径");
+
+            // 1. 路径替换找到对应的class文件
+            String classFilePath = newJavaFilePath.replace(".java", ".class");
+            // 2.判断有我没有我对应的编译class文件
+            // 2. 动态加载编译后的类
+            DefaultPackageClassLoader classLoader = new DefaultPackageClassLoader(this.getClass().getClassLoader());
+            Class<?> dynamicClass = classLoader.loadClassFromFile(classFilePath);
+            String beanName="";
+            // 检查类上是否有 @Component 注解
+            if (dynamicClass.isAnnotationPresent(Component.class)) {
+                Component componentAnnotation = dynamicClass.getAnnotation(Component.class);
+                beanName= componentAnnotation.value().isEmpty() ? dynamicClass.getSimpleName() : componentAnnotation.value();
+            }else {
+                // 3. 注册到 Spring 容器
+                beanName = dynamicClass.getSimpleName(); // 默认包中,类名就是简单名称
+            }
+            //注解bean到Spring容器中
+            SpringBeanRegistrar.registerBean(applicationContext, beanName, dynamicClass);
+            log.info("动态的Bean已经被注册了");
+            return javaScriptKey+"注册成功";
+        } catch (Exception e) {
+            return javaScriptKey+"注册失败";
+        }
+    }
+
+}

Some files were not shown because too many files changed in this diff