parent
a72aa13edb
commit
ceebba3286
9 changed files with 290 additions and 0 deletions
@ -0,0 +1,81 @@ |
|||||||
|
package org.springblade.plugin.workflow.process.entity; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||||
|
import com.baomidou.mybatisplus.annotation.KeySequence; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||||
|
import lombok.Data; |
||||||
|
import org.springblade.core.mp.base.BaseEntity; |
||||||
|
|
||||||
|
import java.util.Date; |
||||||
|
|
||||||
|
/** |
||||||
|
* @version 1.0 |
||||||
|
* @program: jonhon-mes-svr |
||||||
|
* @ClassName FormData |
||||||
|
* @description: |
||||||
|
* @autor: WuSiYu |
||||||
|
* @create 2025-09-12 16:02 |
||||||
|
**/ |
||||||
|
|
||||||
|
@Data |
||||||
|
@TableName("blade_wf_form_data") // 表名遵循BladeX命名规范
|
||||||
|
@KeySequence("SEQ_BLADE_WF_FORM_DATA") // 指定 Oracle 序列名
|
||||||
|
public class FormData extends BaseEntity { |
||||||
|
|
||||||
|
/** |
||||||
|
* 主键ID |
||||||
|
*/ |
||||||
|
@TableId(type = IdType.AUTO) |
||||||
|
private Long id; |
||||||
|
|
||||||
|
/** |
||||||
|
* 业务主键(与工作流businessKey关联) |
||||||
|
*/ |
||||||
|
private String businessKey; |
||||||
|
|
||||||
|
/** |
||||||
|
* 流程实例ID(与工作流processInstanceId关联) |
||||||
|
*/ |
||||||
|
private String processInstanceId; |
||||||
|
|
||||||
|
/** |
||||||
|
* 表单标识(关联表单设计表的key) |
||||||
|
*/ |
||||||
|
private String formKey; |
||||||
|
|
||||||
|
/** |
||||||
|
* 表单内容(JSON格式存储) |
||||||
|
*/ |
||||||
|
private String content; |
||||||
|
|
||||||
|
/** |
||||||
|
* 表单版本 |
||||||
|
*/ |
||||||
|
private Integer version; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建人 |
||||||
|
*/ |
||||||
|
private Long createUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建时间 |
||||||
|
*/ |
||||||
|
private Date createTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新人 |
||||||
|
*/ |
||||||
|
private Long updateUser; |
||||||
|
|
||||||
|
/** |
||||||
|
* 更新时间 |
||||||
|
*/ |
||||||
|
private Date updateTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* 逻辑删除标识(0-未删除,1-已删除) |
||||||
|
*/ |
||||||
|
private Integer isDeleted; |
||||||
|
} |
||||||
@ -0,0 +1,39 @@ |
|||||||
|
package org.springblade.plugin.workflow.process.mapper; |
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||||
|
import org.apache.ibatis.annotations.Mapper; |
||||||
|
import org.apache.ibatis.annotations.Param; |
||||||
|
import org.springblade.plugin.workflow.process.entity.FormData; |
||||||
|
|
||||||
|
/** |
||||||
|
* @version 1.0 |
||||||
|
* @program: jonhon-mes-svr |
||||||
|
* @ClassName FormDataMapper |
||||||
|
* @description: |
||||||
|
* @autor: WuSiYu |
||||||
|
* @create 2025-09-12 15:51 |
||||||
|
**/ |
||||||
|
|
||||||
|
/** |
||||||
|
* 表单数据Mapper接口 |
||||||
|
* 用于表单数据与工作流数据分离存储 |
||||||
|
*/ |
||||||
|
@Mapper |
||||||
|
public interface FormDataMapper extends BaseMapper<FormData> { |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据业务主键查询表单数据 |
||||||
|
* |
||||||
|
* @param businessKey 业务主键(与工作流关联) |
||||||
|
* @return 表单数据实体 |
||||||
|
*/ |
||||||
|
FormData selectByBusinessKey(@Param("businessKey") String businessKey); |
||||||
|
|
||||||
|
/** |
||||||
|
* 根据流程实例ID查询表单数据 |
||||||
|
* |
||||||
|
* @param processInstanceId 流程实例ID |
||||||
|
* @return 表单数据实体 |
||||||
|
*/ |
||||||
|
FormData selectByProcessInstanceId(@Param("processInstanceId") String processInstanceId); |
||||||
|
} |
||||||
@ -0,0 +1,34 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="org.springblade.plugin.workflow.process.mapper.FormDataMapper"> |
||||||
|
|
||||||
|
<!-- 通用查询映射结果 --> |
||||||
|
<resultMap id="formDataResultMap" type="org.springblade.plugin.workflow.process.entity.FormData"> |
||||||
|
<result column="id" property="id"/> |
||||||
|
<result column="business_key" property="businessKey"/> |
||||||
|
<result column="process_instance_id" property="processInstanceId"/> |
||||||
|
<result column="form_key" property="formKey"/> |
||||||
|
<result column="content" property="content"/> |
||||||
|
<result column="version" property="version"/> |
||||||
|
<result column="create_user" property="createUser"/> |
||||||
|
<result column="create_time" property="createTime"/> |
||||||
|
<result column="update_user" property="updateUser"/> |
||||||
|
<result column="update_time" property="updateTime"/> |
||||||
|
<result column="is_deleted" property="isDeleted"/> |
||||||
|
</resultMap> |
||||||
|
|
||||||
|
<!-- 根据业务主键查询 --> |
||||||
|
<select id="selectByBusinessKey" resultMap="formDataResultMap"> |
||||||
|
SELECT * FROM blade_wf_form_data |
||||||
|
WHERE business_key = #{businessKey} |
||||||
|
AND is_deleted = 0 |
||||||
|
</select> |
||||||
|
|
||||||
|
<!-- 根据流程实例ID查询 --> |
||||||
|
<select id="selectByProcessInstanceId" resultMap="formDataResultMap"> |
||||||
|
SELECT * FROM blade_wf_form_data |
||||||
|
WHERE process_instance_id = #{processInstanceId} |
||||||
|
AND is_deleted = 0 |
||||||
|
</select> |
||||||
|
|
||||||
|
</mapper> |
||||||
@ -0,0 +1,24 @@ |
|||||||
|
<?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> |
||||||
|
<groupId>org.springblade</groupId> |
||||||
|
<artifactId>blade-service-api</artifactId> |
||||||
|
<version>4.6.0.RELEASE</version> |
||||||
|
</parent> |
||||||
|
|
||||||
|
<groupId>org.springblade.meter</groupId> |
||||||
|
<artifactId>blade-meter-api</artifactId> |
||||||
|
<name>${project.artifactId}</name> |
||||||
|
<version>${blade.project.version}</version> |
||||||
|
<packaging>jar</packaging> |
||||||
|
|
||||||
|
<properties> |
||||||
|
<maven.compiler.source>17</maven.compiler.source> |
||||||
|
<maven.compiler.target>17</maven.compiler.target> |
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||||
|
</properties> |
||||||
|
|
||||||
|
</project> |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
<?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> |
||||||
|
<groupId>org.springblade</groupId> |
||||||
|
<artifactId>blade-service</artifactId> |
||||||
|
<version>4.6.0.RELEASE</version> |
||||||
|
</parent> |
||||||
|
|
||||||
|
<groupId>org.springblade.meter</groupId> |
||||||
|
<artifactId>blade-meter</artifactId> |
||||||
|
<name>${project.artifactId}</name> |
||||||
|
<version>${blade.project.version}</version> |
||||||
|
<packaging>jar</packaging> |
||||||
|
|
||||||
|
<dependencies> |
||||||
|
<dependency> |
||||||
|
<groupId>org.springblade</groupId> |
||||||
|
<artifactId>blade-core-boot</artifactId> |
||||||
|
</dependency> |
||||||
|
<dependency> |
||||||
|
<groupId>org.springblade.meter</groupId> |
||||||
|
<artifactId>blade-meter-api</artifactId> |
||||||
|
<version>${blade.project.version}</version> |
||||||
|
</dependency> |
||||||
|
</dependencies> |
||||||
|
|
||||||
|
<properties> |
||||||
|
<maven.compiler.source>17</maven.compiler.source> |
||||||
|
<maven.compiler.target>17</maven.compiler.target> |
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||||
|
</properties> |
||||||
|
|
||||||
|
</project> |
||||||
@ -0,0 +1,45 @@ |
|||||||
|
/** |
||||||
|
* BladeX Commercial License Agreement |
||||||
|
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||||
|
* <p> |
||||||
|
* Use of this software is governed by the Commercial License Agreement |
||||||
|
* obtained after purchasing a license from BladeX. |
||||||
|
* <p> |
||||||
|
* 1. This software is for development use only under a valid license |
||||||
|
* from BladeX. |
||||||
|
* <p> |
||||||
|
* 2. Redistribution of this software's source code to any third party |
||||||
|
* without a commercial license is strictly prohibited. |
||||||
|
* <p> |
||||||
|
* 3. Licensees may copyright their own code but cannot use segments |
||||||
|
* from this software for such purposes. Copyright of this software |
||||||
|
* remains with BladeX. |
||||||
|
* <p> |
||||||
|
* Using this software signifies agreement to this License, and the software |
||||||
|
* must not be used for illegal purposes. |
||||||
|
* <p> |
||||||
|
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is |
||||||
|
* not liable for any claims arising from secondary or illegal development. |
||||||
|
* <p> |
||||||
|
* Author: Chill Zhuang (bladejava@qq.com) |
||||||
|
*/ |
||||||
|
package org.springblade.meter; |
||||||
|
|
||||||
|
import org.springblade.core.cloud.client.BladeCloudApplication; |
||||||
|
import org.springblade.core.launch.BladeApplication; |
||||||
|
import org.springblade.core.launch.constant.AppConstant; |
||||||
|
|
||||||
|
/** |
||||||
|
* Desk启动器 |
||||||
|
* |
||||||
|
* @author Chill |
||||||
|
*/ |
||||||
|
@BladeCloudApplication |
||||||
|
public class MeterApplication { |
||||||
|
|
||||||
|
public static void main(String[] args) { |
||||||
|
BladeApplication.run(AppConstant.APPLICATION_DESK_NAME, MeterApplication.class, args); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
@ -0,0 +1,11 @@ |
|||||||
|
#服务器端口 |
||||||
|
server: |
||||||
|
port: 8109 |
||||||
|
|
||||||
|
#数据源配置 |
||||||
|
spring: |
||||||
|
datasource: |
||||||
|
url: ${blade.datasource.dev.url} |
||||||
|
username: ${blade.datasource.dev.username} |
||||||
|
password: ${blade.datasource.dev.password} |
||||||
|
|
||||||
@ -0,0 +1,10 @@ |
|||||||
|
#服务器端口 |
||||||
|
server: |
||||||
|
port: 8109 |
||||||
|
|
||||||
|
#数据源配置 |
||||||
|
spring: |
||||||
|
datasource: |
||||||
|
url: ${blade.datasource.prod.url} |
||||||
|
username: ${blade.datasource.prod.username} |
||||||
|
password: ${blade.datasource.prod.password} |
||||||
@ -0,0 +1,10 @@ |
|||||||
|
#服务器端口 |
||||||
|
server: |
||||||
|
port: 8109 |
||||||
|
|
||||||
|
#数据源配置 |
||||||
|
spring: |
||||||
|
datasource: |
||||||
|
url: ${blade.datasource.test.url} |
||||||
|
username: ${blade.datasource.test.username} |
||||||
|
password: ${blade.datasource.test.password} |
||||||
Loading…
Reference in new issue