mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:更新样例数据
This commit is contained in:
@@ -2,12 +2,14 @@ package com.orangeforms.common.core.util;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.orangeforms.common.core.exception.InvalidDataFieldException;
|
||||
import com.orangeforms.common.core.annotation.*;
|
||||
import com.orangeforms.common.core.exception.MyRuntimeException;
|
||||
import com.orangeforms.common.core.object.TokenData;
|
||||
import com.orangeforms.common.core.object.Tuple2;
|
||||
import com.orangeforms.common.core.upload.UploadResponseInfo;
|
||||
import com.orangeforms.common.core.upload.UploadStoreInfo;
|
||||
import com.google.common.base.CaseFormat;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -707,6 +709,46 @@ public class MyModelUtil {
|
||||
ReflectUtil.setFieldValue(data, fieldName, defaultValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前数据对象中,所有上传文件字段的数据,并将上传后的文件名存到集合中并返回。
|
||||
*
|
||||
* @param data 数据对象。
|
||||
* @param clazz 数据对象的Class类型。
|
||||
* @param <M> 数据对象类型。
|
||||
* @return 当前数据对象中,所有上传文件字段中,文件名属性的集合。
|
||||
*/
|
||||
public static <M> Set<String> extractDownloadFileName(M data, Class<M> clazz) {
|
||||
Set<String> resultSet = new HashSet<>();
|
||||
Field[] fields = ReflectUtil.getFields(clazz);
|
||||
for (Field field : fields) {
|
||||
if (field.isAnnotationPresent(UploadFlagColumn.class)) {
|
||||
String v = (String) ReflectUtil.getFieldValue(data, field);
|
||||
List<UploadResponseInfo> fileInfoList = JSON.parseArray(v, UploadResponseInfo.class);
|
||||
if (CollectionUtils.isNotEmpty(fileInfoList)) {
|
||||
fileInfoList.forEach(fileInfo -> resultSet.add(fileInfo.getFilename()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前数据对象列表中,所有上传文件字段的数据,并将上传后的文件名存到集合中并返回。
|
||||
*
|
||||
* @param dataList 数据对象。
|
||||
* @param clazz 数据对象的Class类型。
|
||||
* @param <M> 数据对象类型。
|
||||
* @return 当前数据对象中,所有上传文件字段中,文件名属性的集合。
|
||||
*/
|
||||
public static <M> Set<String> extractDownloadFileName(List<M> dataList, Class<M> clazz) {
|
||||
if (CollectionUtils.isEmpty(dataList)) {
|
||||
return null;
|
||||
}
|
||||
Set<String> resultSet = new HashSet<>();
|
||||
dataList.forEach(data -> resultSet.addAll(extractDownloadFileName(data, clazz)));
|
||||
return resultSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* 私有构造函数,明确标识该常量类的作用。
|
||||
|
||||
@@ -276,10 +276,11 @@ public class MybatisDataFilterInterceptor implements Interceptor {
|
||||
return;
|
||||
}
|
||||
String dataPermSessionKey = RedisKeyUtil.makeSessionDataPermIdKey(tokenData.getSessionId());
|
||||
String dataPermData = redissonClient.getBucket(dataPermSessionKey).get().toString();
|
||||
if (StringUtils.isBlank(dataPermData)) {
|
||||
Object cachedData = redissonClient.getBucket(dataPermSessionKey).get();
|
||||
if (cachedData == null) {
|
||||
throw new NoDataPermException("No Related DataPerm found for SQL_ID [ " + sqlId + " ].");
|
||||
}
|
||||
String dataPermData = cachedData.toString();
|
||||
Map<Integer, String> dataPermMap = new HashMap<>(8);
|
||||
for (Map.Entry<String, Object> entry : JSON.parseObject(dataPermData).entrySet()) {
|
||||
dataPermMap.put(Integer.valueOf(entry.getKey()), entry.getValue().toString());
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
<artifactId>common-online</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orangeforms</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.orangeforms.common.flow.online.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
@@ -8,6 +9,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orangeforms.common.core.annotation.DisableDataFilter;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
import com.orangeforms.common.core.object.*;
|
||||
@@ -53,6 +55,7 @@ import java.util.stream.Collectors;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "在线标案流程操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-flow.urlPrefix}/flowOnlineOperation")
|
||||
@@ -81,6 +84,7 @@ public class FlowOnlineOperationController {
|
||||
|
||||
/**
|
||||
* 根据指定流程的主版本,发起一个流程实例,同时作为第一个任务节点的执行人,执行第一个用户任务。
|
||||
* 该接口无需数据权限过滤,因此用DisableDataFilter注解标注。如果当前系统没有支持数据权限过滤,该注解不会有任何影响。
|
||||
*
|
||||
* @param processDefinitionKey 流程定义标识。
|
||||
* @param flowTaskCommentDto 审批意见。
|
||||
@@ -89,6 +93,7 @@ public class FlowOnlineOperationController {
|
||||
* @param slaveData 流程审批相关的多个从表数据。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@DisableDataFilter
|
||||
@PostMapping("/startAndTakeUserTask/{processDefinitionKey}")
|
||||
public ResponseResult<Void> startAndTakeUserTask(
|
||||
@PathVariable("processDefinitionKey") String processDefinitionKey,
|
||||
@@ -156,6 +161,7 @@ public class FlowOnlineOperationController {
|
||||
|
||||
/**
|
||||
* 提交流程的用户任务。
|
||||
* 该接口无需数据权限过滤,因此用DisableDataFilter注解标注。如果当前系统没有支持数据权限过滤,该注解不会有任何影响。
|
||||
*
|
||||
* @param processInstanceId 流程实例Id。
|
||||
* @param taskId 流程任务Id。
|
||||
@@ -165,6 +171,7 @@ public class FlowOnlineOperationController {
|
||||
* @param slaveData 流程审批相关的多个从表数据。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@DisableDataFilter
|
||||
@PostMapping("/submitUserTask")
|
||||
public ResponseResult<Void> submitUserTask(
|
||||
@MyRequestBody(required = true) String processInstanceId,
|
||||
@@ -217,11 +224,13 @@ public class FlowOnlineOperationController {
|
||||
|
||||
/**
|
||||
* 获取当前流程实例的详情数据。包括主表数据、一对一从表数据、一对多从表数据列表等。
|
||||
* 该接口无需数据权限过滤,因此用DisableDataFilter注解标注。如果当前系统没有支持数据权限过滤,该注解不会有任何影响。
|
||||
*
|
||||
* @param processInstanceId 当前运行时的流程实例Id。
|
||||
* @param taskId 流程任务Id。
|
||||
* @return 当前流程实例的详情数据。
|
||||
*/
|
||||
@DisableDataFilter
|
||||
@GetMapping("/viewUserTask")
|
||||
public ResponseResult<JSONObject> viewUserTask(@RequestParam String processInstanceId, @RequestParam String taskId) {
|
||||
String errorMessage;
|
||||
@@ -254,11 +263,13 @@ public class FlowOnlineOperationController {
|
||||
|
||||
/**
|
||||
* 获取已经结束的流程实例的详情数据。包括主表数据、一对一从表数据、一对多从表数据列表等。
|
||||
* 该接口无需数据权限过滤,因此用DisableDataFilter注解标注。如果当前系统没有支持数据权限过滤,该注解不会有任何影响。
|
||||
*
|
||||
* @param processInstanceId 历史流程实例Id。
|
||||
* @param taskId 历史任务Id。如果该值为null,仅有发起人可以查看当前流程数据,否则只有任务的指派人才能查看。
|
||||
* @return 历史流程实例的详情数据。
|
||||
*/
|
||||
@DisableDataFilter
|
||||
@GetMapping("/viewHistoricProcessInstance")
|
||||
public ResponseResult<JSONObject> viewHistoricProcessInstance(
|
||||
@RequestParam String processInstanceId, @RequestParam(required = false) String taskId) {
|
||||
@@ -333,6 +344,8 @@ public class FlowOnlineOperationController {
|
||||
List<FlowWorkOrder> flowWorkOrderList = flowWorkOrderService.getFlowWorkOrderList(flowWorkOrderFilter, orderBy);
|
||||
MyPageData<FlowWorkOrderVo> resultData =
|
||||
MyPageUtil.makeResponseData(flowWorkOrderList, FlowWorkOrder.INSTANCE);
|
||||
// 工单自身的查询中可以受到数据权限的过滤,但是工单集成业务数据时,则无需再对业务数据进行数据权限过滤了。
|
||||
GlobalThreadLocal.setDataFilter(false);
|
||||
ResponseResult<Void> responseResult = this.makeWorkOrderTaskInfo(resultData.getDataList());
|
||||
if (!responseResult.isSuccess()) {
|
||||
return ResponseResult.errorFrom(responseResult);
|
||||
@@ -382,6 +395,7 @@ public class FlowOnlineOperationController {
|
||||
* 越权访问限制说明:
|
||||
* taskId为空,当前用户必须为当前流程的发起人,否则必须为当前任务的指派人或候选人。
|
||||
* relationId为空,下载数据为主表字段,否则为关联的从表字段。
|
||||
* 该接口无需数据权限过滤,因此用DisableDataFilter注解标注。如果当前系统没有支持数据权限过滤,该注解不会有任何影响。
|
||||
*
|
||||
* @param processDefinitionKey 流程引擎流程定义标识。
|
||||
* @param processInstanceId 流程实例Id。
|
||||
@@ -393,6 +407,7 @@ public class FlowOnlineOperationController {
|
||||
* @param asImage 是否为图片文件。
|
||||
* @param response Http 应答对象。
|
||||
*/
|
||||
@DisableDataFilter
|
||||
@GetMapping("/download")
|
||||
public void download(
|
||||
@RequestParam String processDefinitionKey,
|
||||
|
||||
@@ -30,6 +30,11 @@
|
||||
<artifactId>common-log</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orangeforms</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.activiti</groupId>
|
||||
<artifactId>activiti-spring-boot-starter</artifactId>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
@@ -31,6 +33,7 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "工作流分类操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-flow.urlPrefix}/flowCategory")
|
||||
@@ -47,6 +50,7 @@ public class FlowCategoryController {
|
||||
* @param flowCategoryDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"flowCategoryDto.categoryId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody FlowCategoryDto flowCategoryDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(flowCategoryDto);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -39,6 +41,7 @@ import java.util.*;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "工作流操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-flow.urlPrefix}/flowEntry")
|
||||
@@ -59,6 +62,7 @@ public class FlowEntryController {
|
||||
* @param flowEntryDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"flowEntryDto.entryId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody FlowEntryDto flowEntryDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(flowEntryDto);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orangeforms.common.flow.vo.*;
|
||||
import com.orangeforms.common.flow.dto.*;
|
||||
@@ -23,6 +25,7 @@ import javax.validation.groups.Default;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "工作流变量操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-flow.urlPrefix}/flowEntryVariable")
|
||||
@@ -37,6 +40,7 @@ public class FlowEntryVariableController {
|
||||
* @param flowEntryVariableDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"flowEntryVariableDto.variableId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody FlowEntryVariableDto flowEntryVariableDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(flowEntryVariableDto);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.orangeforms.common.flow.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.object.*;
|
||||
import com.orangeforms.common.core.util.MyPageUtil;
|
||||
@@ -19,6 +20,7 @@ import java.util.List;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "工作流消息操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-flow.urlPrefix}/flowMessage")
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.orangeforms.common.flow.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.orangeforms.common.core.annotation.DisableDataFilter;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
import com.orangeforms.common.core.object.*;
|
||||
@@ -46,6 +48,7 @@ import java.util.stream.Collectors;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "通用流程操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-flow.urlPrefix}/flowOperation")
|
||||
@@ -466,10 +469,14 @@ public class FlowOperationController {
|
||||
|
||||
/**
|
||||
* 催办工单,只有流程发起人才可以催办工单。
|
||||
* 催办场景必须要取消数据权限过滤,因为流程的指派很可能是跨越部门的。
|
||||
* 既然被指派和催办了,这里就应该禁用工单表的数据权限过滤约束。
|
||||
* 如果您的系统没有支持数据权限过滤,DisableDataFilter不会有任何影响,建议保留。
|
||||
*
|
||||
* @param workOrderId 工单Id。
|
||||
* @return 应答结果。
|
||||
*/
|
||||
@DisableDataFilter
|
||||
@PostMapping("/remindRuntimeTask")
|
||||
public ResponseResult<Void> remindRuntimeTask(@MyRequestBody(required = true) Long workOrderId) {
|
||||
FlowWorkOrder flowWorkOrder = flowWorkOrderService.getById(workOrderId);
|
||||
@@ -496,6 +503,7 @@ public class FlowOperationController {
|
||||
* @param cancelReason 取消原因。
|
||||
* @return 应答结果。
|
||||
*/
|
||||
@DisableDataFilter
|
||||
@PostMapping("/cancelWorkOrder")
|
||||
public ResponseResult<Void> cancelWorkOrder(
|
||||
@MyRequestBody(required = true) Long workOrderId,
|
||||
@@ -528,6 +536,7 @@ public class FlowOperationController {
|
||||
* @param stopReason 停止原因。
|
||||
* @return 执行结果应答。
|
||||
*/
|
||||
@DisableDataFilter
|
||||
@PostMapping("/stopProcessInstance")
|
||||
public ResponseResult<Void> stopProcessInstance(
|
||||
@MyRequestBody(required = true) String processInstanceId,
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<mapper namespace="com.orangeforms.common.flow.dao.FlowMessageMapper">
|
||||
<resultMap id="BaseResultMap" type="com.orangeforms.common.flow.model.FlowMessage">
|
||||
<id column="message_id" jdbcType="BIGINT" property="messageId"/>
|
||||
<id column="message_type" jdbcType="TINYINT" property="messageType"/>
|
||||
<id column="message_content" jdbcType="VARCHAR" property="messageContent"/>
|
||||
<id column="remind_count" jdbcType="INTEGER" property="remindCount"/>
|
||||
<result column="message_type" jdbcType="TINYINT" property="messageType"/>
|
||||
<result column="message_content" jdbcType="VARCHAR" property="messageContent"/>
|
||||
<result column="remind_count" jdbcType="INTEGER" property="remindCount"/>
|
||||
<result column="work_order_id" jdbcType="BIGINT" property="workOrderId"/>
|
||||
<result column="process_definition_id" jdbcType="VARCHAR" property="processDefinitionId"/>
|
||||
<result column="process_definition_key" jdbcType="VARCHAR" property="processDefinitionKey"/>
|
||||
@@ -18,6 +18,7 @@
|
||||
<result column="task_start_time" jdbcType="TIMESTAMP" property="taskStartTime"/>
|
||||
<result column="task_assignee" jdbcType="VARCHAR" property="taskAssignee"/>
|
||||
<result column="task_finished" jdbcType="BIT" property="taskFinished"/>
|
||||
<result column="business_data_shot" jdbcType="LONGVARCHAR" property="businessDataShot"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="update_user_id" jdbcType="BIGINT" property="updateUserId"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -12,30 +14,35 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程分类的Dto对象")
|
||||
@Data
|
||||
public class FlowCategoryDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 显示名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "显示名称")
|
||||
@NotBlank(message = "数据验证失败,显示名称不能为空!")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 分类编码。
|
||||
*/
|
||||
@ApiModelProperty(value = "分类编码")
|
||||
@NotBlank(message = "数据验证失败,分类编码不能为空!")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 实现顺序。
|
||||
*/
|
||||
@ApiModelProperty(value = "实现顺序")
|
||||
@NotNull(message = "数据验证失败,实现顺序不能为空!")
|
||||
private Integer showOrder;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import com.orangeforms.common.flow.model.constant.FlowBindFormType;
|
||||
@@ -15,47 +17,55 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程的Dto对象")
|
||||
@Data
|
||||
public class FlowEntryDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键不能为空!", groups = {UpdateGroup.class})
|
||||
private Long entryId;
|
||||
|
||||
/**
|
||||
* 流程名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
@NotBlank(message = "数据验证失败,流程名称不能为空!")
|
||||
private String processDefinitionName;
|
||||
|
||||
/**
|
||||
* 流程标识Key。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程标识Key")
|
||||
@NotBlank(message = "数据验证失败,流程标识Key不能为空!")
|
||||
private String processDefinitionKey;
|
||||
|
||||
/**
|
||||
* 流程分类。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程分类")
|
||||
@NotNull(message = "数据验证失败,流程分类不能为空!")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 流程状态。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
@ConstDictRef(constDictClass = FlowEntryStatus.class, message = "数据验证失败,工作流状态为无效值!")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 流程定义的xml。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义的xml")
|
||||
private String bpmnXml;
|
||||
|
||||
/**
|
||||
* 绑定表单类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定表单类型")
|
||||
@ConstDictRef(constDictClass = FlowBindFormType.class, message = "数据验证失败,工作流绑定表单类型为无效值!")
|
||||
@NotNull(message = "数据验证失败,工作流绑定表单类型不能为空!")
|
||||
private Integer bindFormType;
|
||||
@@ -63,15 +73,18 @@ public class FlowEntryDto {
|
||||
/**
|
||||
* 在线表单的页面Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "在线表单的页面Id")
|
||||
private Long pageId;
|
||||
|
||||
/**
|
||||
* 在线表单Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "在线表单Id")
|
||||
private Long defaultFormId;
|
||||
|
||||
/**
|
||||
* 在线表单的缺省路由名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "在线表单的缺省路由名称")
|
||||
private String defaultRouterName;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import com.orangeforms.common.flow.model.constant.FlowVariableType;
|
||||
@@ -13,36 +15,42 @@ import javax.validation.constraints.*;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程变量Dto对象")
|
||||
@Data
|
||||
public class FlowEntryVariableDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long variableId;
|
||||
|
||||
/**
|
||||
* 流程Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程Id")
|
||||
@NotNull(message = "数据验证失败,流程Id不能为空!")
|
||||
private Long entryId;
|
||||
|
||||
/**
|
||||
* 变量名。
|
||||
*/
|
||||
@ApiModelProperty(value = "变量名")
|
||||
@NotBlank(message = "数据验证失败,变量名不能为空!")
|
||||
private String variableName;
|
||||
|
||||
/**
|
||||
* 显示名。
|
||||
*/
|
||||
@ApiModelProperty(value = "显示名")
|
||||
@NotBlank(message = "数据验证失败,显示名不能为空!")
|
||||
private String showName;
|
||||
|
||||
/**
|
||||
* 流程变量类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程变量类型")
|
||||
@ConstDictRef(constDictClass = FlowVariableType.class, message = "数据验证失败,流程变量类型为无效值!")
|
||||
@NotNull(message = "数据验证失败,流程变量类型不能为空!")
|
||||
private Integer variableType;
|
||||
@@ -50,21 +58,25 @@ public class FlowEntryVariableDto {
|
||||
/**
|
||||
* 绑定数据源Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定数据源Id")
|
||||
private Long bindDatasourceId;
|
||||
|
||||
/**
|
||||
* 绑定数据源关联Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定数据源关联Id")
|
||||
private Long bindRelationId;
|
||||
|
||||
/**
|
||||
* 绑定字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定字段Id")
|
||||
private Long bindColumnId;
|
||||
|
||||
/**
|
||||
* 是否内置。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否内置")
|
||||
@NotNull(message = "数据验证失败,是否内置不能为空!")
|
||||
private Boolean builtin;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -8,36 +10,43 @@ import lombok.Data;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("工作流通知消息Dto对象")
|
||||
@Data
|
||||
public class FlowMessageDto {
|
||||
|
||||
/**
|
||||
* 消息类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "消息类型")
|
||||
private Integer messageType;
|
||||
|
||||
/**
|
||||
* 工单Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "工单Id")
|
||||
private Long workOrderId;
|
||||
|
||||
/**
|
||||
* 流程名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processDefinitionName;
|
||||
|
||||
/**
|
||||
* 流程任务名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务名称")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 更新时间范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "updateTime 范围过滤起始值")
|
||||
private String updateTimeStart;
|
||||
|
||||
/**
|
||||
* 更新时间范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "updateTime 范围过滤结束值")
|
||||
private String updateTimeEnd;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -11,23 +13,27 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程任务的批注")
|
||||
@Data
|
||||
public class FlowTaskCommentDto {
|
||||
|
||||
/**
|
||||
* 流程任务触发按钮类型,内置值可参考FlowTaskButton。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务触发按钮类型")
|
||||
@NotNull(message = "数据验证失败,任务的审批类型不能为空!")
|
||||
private String approvalType;
|
||||
|
||||
/**
|
||||
* 流程任务的批注内容。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务的批注内容")
|
||||
@NotBlank(message = "数据验证失败,任务审批内容不能为空!")
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 委托指定人,比如加签、转办等。
|
||||
*/
|
||||
@ApiModelProperty(value = "委托指定人,比如加签、转办等")
|
||||
private String delegateAssginee;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -8,21 +10,25 @@ import lombok.Data;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("工作流工单Dto对象")
|
||||
@Data
|
||||
public class FlowWorkOrderDto {
|
||||
|
||||
/**
|
||||
* 流程状态。参考FlowTaskStatus常量值对象。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private Integer flowStatus;
|
||||
|
||||
/**
|
||||
* createTime 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "createTime 范围过滤起始值")
|
||||
private String createTimeStart;
|
||||
|
||||
/**
|
||||
* createTime 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "createTime 范围过滤结束值")
|
||||
private String createTimeEnd;
|
||||
}
|
||||
|
||||
@@ -117,6 +117,12 @@ public class FlowMessage {
|
||||
@TableField(value = "task_finished")
|
||||
private Boolean taskFinished;
|
||||
|
||||
/**
|
||||
* 业务数据快照。
|
||||
*/
|
||||
@TableField(value = "business_data_shot")
|
||||
private String businessDataShot;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
|
||||
@@ -175,9 +175,9 @@ public class FlowApiServiceImpl implements FlowApiService {
|
||||
this.handleMultiInstanceApprovalType(
|
||||
task.getExecutionId(), flowTaskComment.getApprovalType(), taskVariableData);
|
||||
taskVariableData.put(FlowConstant.OPERATION_TYPE_VAR, flowTaskComment.getApprovalType());
|
||||
taskService.complete(task.getId(), taskVariableData, true);
|
||||
flowTaskComment.fillWith(task);
|
||||
flowTaskCommentService.saveNew(flowTaskComment);
|
||||
taskService.complete(task.getId(), taskVariableData, true);
|
||||
} else {
|
||||
taskService.complete(task.getId(), taskVariableData, true);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -10,46 +12,55 @@ import java.util.Date;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程分类的Vo对象")
|
||||
@Data
|
||||
public class FlowCategoryVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 显示名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "显示名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 分类编码。
|
||||
*/
|
||||
@ApiModelProperty(value = "分类编码")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 实现顺序。
|
||||
*/
|
||||
@ApiModelProperty(value = "实现顺序")
|
||||
private Integer showOrder;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新者Id")
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者Id")
|
||||
private Long createUserId;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -10,41 +12,49 @@ import java.util.Date;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程发布信息的Vo对象")
|
||||
@Data
|
||||
public class FlowEntryPublishVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long entryPublishId;
|
||||
|
||||
/**
|
||||
* 发布版本。
|
||||
*/
|
||||
@ApiModelProperty(value = "发布版本")
|
||||
private Integer publishVersion;
|
||||
|
||||
/**
|
||||
* 流程引擎中的流程定义Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程引擎中的流程定义Id")
|
||||
private String processDefinitionId;
|
||||
|
||||
/**
|
||||
* 激活状态。
|
||||
*/
|
||||
@ApiModelProperty(value = "激活状态")
|
||||
private Boolean activeStatus;
|
||||
|
||||
/**
|
||||
* 是否为主版本。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否为主版本")
|
||||
private Boolean mainVersion;
|
||||
|
||||
/**
|
||||
* 创建者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者Id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 发布时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "发布时间")
|
||||
private Date publishTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -10,56 +12,67 @@ import java.util.Date;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程变量Vo对象")
|
||||
@Data
|
||||
public class FlowEntryVariableVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long variableId;
|
||||
|
||||
/**
|
||||
* 流程Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程Id")
|
||||
private Long entryId;
|
||||
|
||||
/**
|
||||
* 变量名。
|
||||
*/
|
||||
@ApiModelProperty(value = "变量名")
|
||||
private String variableName;
|
||||
|
||||
/**
|
||||
* 显示名。
|
||||
*/
|
||||
@ApiModelProperty(value = "显示名")
|
||||
private String showName;
|
||||
|
||||
/**
|
||||
* 变量类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "变量类型")
|
||||
private Integer variableType;
|
||||
|
||||
/**
|
||||
* 绑定数据源Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定数据源Id")
|
||||
private Long bindDatasourceId;
|
||||
|
||||
/**
|
||||
* 绑定数据源关联Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定数据源关联Id")
|
||||
private Long bindRelationId;
|
||||
|
||||
/**
|
||||
* 绑定字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定字段Id")
|
||||
private Long bindColumnId;
|
||||
|
||||
/**
|
||||
* 是否内置。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否内置")
|
||||
private Boolean builtin;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -12,101 +14,121 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程的Vo对象")
|
||||
@Data
|
||||
public class FlowEntryVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long entryId;
|
||||
|
||||
/**
|
||||
* 流程名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processDefinitionName;
|
||||
|
||||
/**
|
||||
* 流程标识Key。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程标识Key")
|
||||
private String processDefinitionKey;
|
||||
|
||||
/**
|
||||
* 流程分类。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程分类")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 工作流部署的发布主版本Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "工作流部署的发布主版本Id")
|
||||
private Long mainEntryPublishId;
|
||||
|
||||
/**
|
||||
* 最新发布时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "最新发布时间")
|
||||
private Date lastestPublishTime;
|
||||
|
||||
/**
|
||||
* 流程状态。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 流程定义的xml。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义的xml")
|
||||
private String bpmnXml;
|
||||
|
||||
/**
|
||||
* 绑定表单类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "绑定表单类型")
|
||||
private Integer bindFormType;
|
||||
|
||||
/**
|
||||
* 在线表单的页面Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "在线表单的页面Id")
|
||||
private Long pageId;
|
||||
|
||||
/**
|
||||
* 在线表单Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "在线表单Id")
|
||||
private Long defaultFormId;
|
||||
|
||||
/**
|
||||
* 在线表单的缺省路由名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "在线表单的缺省路由名称")
|
||||
private String defaultRouterName;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新者Id")
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者Id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* categoryId 的一对一关联数据对象,数据对应类型为FlowCategoryVo。
|
||||
*/
|
||||
@ApiModelProperty(value = "categoryId 的一对一关联数据对象")
|
||||
private Map<String, Object> flowCategory;
|
||||
|
||||
/**
|
||||
* mainEntryPublishId 的一对一关联数据对象,数据对应类型为FlowEntryPublishVo。
|
||||
*/
|
||||
@ApiModelProperty(value = "mainEntryPublishId 的一对一关联数据对象")
|
||||
private Map<String, Object> mainFlowEntryPublish;
|
||||
|
||||
/**
|
||||
* 关联的在线表单列表。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联的在线表单列表")
|
||||
private List<Map<String, Object>> formList;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -10,101 +12,127 @@ import java.util.Date;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("工作流通知消息Vo对象")
|
||||
@Data
|
||||
public class FlowMessageVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long messageId;
|
||||
|
||||
/**
|
||||
* 消息类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "消息类型")
|
||||
private Integer messageType;
|
||||
|
||||
/**
|
||||
* 消息内容。
|
||||
*/
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
private String messageContent;
|
||||
|
||||
/**
|
||||
* 催办次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "催办次数")
|
||||
private Integer remindCount;
|
||||
|
||||
/**
|
||||
* 工单Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "工单Id")
|
||||
private Long workOrderId;
|
||||
|
||||
/**
|
||||
* 流程定义Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义Id")
|
||||
private String processDefinitionId;
|
||||
|
||||
/**
|
||||
* 流程定义标识。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义标识")
|
||||
private String processDefinitionKey;
|
||||
|
||||
/**
|
||||
* 流程名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processDefinitionName;
|
||||
|
||||
/**
|
||||
* 流程实例Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例Id")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 流程实例发起者。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例发起者")
|
||||
private String processInstanceInitiator;
|
||||
|
||||
/**
|
||||
* 流程任务Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务Id")
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 流程任务定义标识。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务定义标识")
|
||||
private String taskDefinitionKey;
|
||||
|
||||
/**
|
||||
* 流程任务名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务名称")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date taskStartTime;
|
||||
|
||||
/**
|
||||
* 业务数据快照。
|
||||
*/
|
||||
@ApiModelProperty(value = "业务数据快照")
|
||||
private String businessDataShot;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新者Id")
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者Id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建者显示名。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者显示名")
|
||||
private String createUsername;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -10,61 +12,73 @@ import java.util.Date;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("FlowTaskCommentVO对象")
|
||||
@Data
|
||||
public class FlowTaskCommentVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 流程实例Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例Id")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 任务Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "任务Id")
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 任务标识。
|
||||
*/
|
||||
@ApiModelProperty(value = "任务标识")
|
||||
private String taskKey;
|
||||
|
||||
/**
|
||||
* 任务名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "任务名称")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 审批类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "审批类型")
|
||||
private String approvalType;
|
||||
|
||||
/**
|
||||
* 批注内容。
|
||||
*/
|
||||
@ApiModelProperty(value = "批注内容")
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 委托指定人,比如加签、转办等。
|
||||
*/
|
||||
@ApiModelProperty(value = "委托指定人,比如加签、转办等")
|
||||
private String delegateAssginee;
|
||||
|
||||
/**
|
||||
* 创建者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者Id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建者显示名。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者显示名")
|
||||
private String createUsername;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -10,71 +12,85 @@ import java.util.Date;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程任务Vo对象")
|
||||
@Data
|
||||
public class FlowTaskVo {
|
||||
|
||||
/**
|
||||
* 流程任务Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务Id")
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 流程任务名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务名称")
|
||||
private String taskName;
|
||||
|
||||
/**
|
||||
* 流程任务标识。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程任务标识")
|
||||
private String taskKey;
|
||||
|
||||
/**
|
||||
* 任务的表单信息。
|
||||
*/
|
||||
@ApiModelProperty(value = "任务的表单信息")
|
||||
private String taskFormKey;
|
||||
|
||||
/**
|
||||
* 流程Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程Id")
|
||||
private Long entryId;
|
||||
|
||||
/**
|
||||
* 流程定义Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义Id")
|
||||
private String processDefinitionId;
|
||||
|
||||
/**
|
||||
* 流程定义名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义名称")
|
||||
private String processDefinitionName;
|
||||
|
||||
/**
|
||||
* 流程定义标识。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义标识")
|
||||
private String processDefinitionKey;
|
||||
|
||||
/**
|
||||
* 流程定义版本。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义版本")
|
||||
private Integer processDefinitionVersion;
|
||||
|
||||
/**
|
||||
* 流程实例Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例Id")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 流程实例发起人。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例发起人")
|
||||
private String processInstanceInitiator;
|
||||
|
||||
/**
|
||||
* 流程实例创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例创建时间")
|
||||
private Date processInstanceStartTime;
|
||||
|
||||
/**
|
||||
* 流程实例主表业务数据主键。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例主表业务数据主键")
|
||||
private String businessKey;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -12,97 +14,116 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("工作流工单Vo对象")
|
||||
@Data
|
||||
public class FlowWorkOrderVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long workOrderId;
|
||||
|
||||
/**
|
||||
* 流程定义标识。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程定义标识")
|
||||
private String processDefinitionKey;
|
||||
|
||||
/**
|
||||
* 流程名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processDefinitionName;
|
||||
|
||||
/**
|
||||
* 流程引擎的定义Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程引擎的定义Id")
|
||||
private String processDefinitionId;
|
||||
|
||||
/**
|
||||
* 流程实例Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例Id")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 在线表单的主表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "在线表单的主表Id")
|
||||
private Long onlineTableId;
|
||||
|
||||
/**
|
||||
* 业务主键值。
|
||||
*/
|
||||
@ApiModelProperty(value = "业务主键值")
|
||||
private String businessKey;
|
||||
|
||||
/**
|
||||
* 流程状态。参考FlowTaskStatus常量值对象。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程状态")
|
||||
private Integer flowStatus;
|
||||
|
||||
/**
|
||||
* 提交用户登录名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "提交用户登录名称")
|
||||
private String submitUsername;
|
||||
|
||||
/**
|
||||
* 提交用户所在部门Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "提交用户所在部门Id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新者Id")
|
||||
private Long updateUserId;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建者Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建者Id")
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* flowStatus 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "flowStatus 常量字典关联数据")
|
||||
private Map<String, Object> flowStatusDictMap;
|
||||
|
||||
/**
|
||||
* FlowEntryPublish对象中的同名字段。
|
||||
*/
|
||||
@ApiModelProperty(value = "FlowEntryPublish对象中的同名字段")
|
||||
private String initTaskInfo;
|
||||
|
||||
/**
|
||||
* 当前实例的运行时任务列表。
|
||||
* 正常情况下只有一个,在并行网关下可能存在多个。
|
||||
*/
|
||||
@ApiModelProperty(value = "实例的运行时任务列表")
|
||||
private JSONArray runtimeTaskInfoList;
|
||||
|
||||
/**
|
||||
* 业务主表数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "业务主表数据")
|
||||
private Map<String, Object> masterData;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.flow.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -11,57 +13,68 @@ import java.util.List;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("流程任务信息Vo对象")
|
||||
@Data
|
||||
public class TaskInfoVo {
|
||||
|
||||
/**
|
||||
* 流程节点任务类型。具体值可参考FlowTaskType常量值。
|
||||
*/
|
||||
@ApiModelProperty(value = "流程节点任务类型")
|
||||
private Integer taskType;
|
||||
|
||||
/**
|
||||
* 指定人。
|
||||
*/
|
||||
@ApiModelProperty(value = "指定人")
|
||||
private String assignee;
|
||||
|
||||
/**
|
||||
* 任务标识。
|
||||
*/
|
||||
@ApiModelProperty(value = "任务标识")
|
||||
private String taskKey;
|
||||
|
||||
/**
|
||||
* 是否分配给当前登录用户的标记。
|
||||
* 当该值为true时,登录用户启动流程时,就自动完成了第一个用户任务。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否分配给当前登录用户的标记")
|
||||
private Boolean assignedMe;
|
||||
|
||||
/**
|
||||
* 动态表单Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "动态表单Id")
|
||||
private Long formId;
|
||||
|
||||
/**
|
||||
* 静态表单路由。
|
||||
*/
|
||||
@ApiModelProperty(value = "静态表单路由")
|
||||
private String routerName;
|
||||
|
||||
/**
|
||||
* 候选组类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "候选组类型")
|
||||
private String groupType;
|
||||
|
||||
/**
|
||||
* 只读标记。
|
||||
*/
|
||||
@ApiModelProperty(value = "只读标记")
|
||||
private Boolean readOnly;
|
||||
|
||||
/**
|
||||
* 前端所需的操作列表。
|
||||
*/
|
||||
@ApiModelProperty(value = "前端所需的操作列表")
|
||||
List<JSONObject> operationList;
|
||||
|
||||
/**
|
||||
* 任务节点的自定义变量列表。
|
||||
*/
|
||||
@ApiModelProperty(value = "任务节点的自定义变量列表")
|
||||
List<JSONObject> variableList;
|
||||
}
|
||||
|
||||
@@ -116,6 +116,10 @@ public class OperationLogAspect {
|
||||
if (saveOperationLog) {
|
||||
this.operationLogPostProcess(operationLogAnnotation, respData, operationLog, result);
|
||||
}
|
||||
if (elapse > properties.getSlowLogMs()) {
|
||||
log.warn("耗时较长的请求完成警告, url={},elapse={}ms reqData={} respData={}",
|
||||
request.getRequestURI(), elapse, params, respData);
|
||||
}
|
||||
log.info("请求完成, url={},elapse={}ms, respData={}", request.getRequestURI(), elapse, respData);
|
||||
} catch (Exception e) {
|
||||
if (saveOperationLog) {
|
||||
|
||||
@@ -17,4 +17,8 @@ public class OperationLogProperties {
|
||||
* 是否采集操作日志。
|
||||
*/
|
||||
private boolean enabled = true;
|
||||
/**
|
||||
* 接口调用的毫秒数大于该值后,将输出慢日志警告。
|
||||
*/
|
||||
private long slowLogMs = 50000;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,11 @@
|
||||
<artifactId>common-online</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orangeforms</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
@@ -35,6 +36,7 @@ import java.util.stream.Collectors;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "字段数据操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineColumn")
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
@@ -30,6 +32,7 @@ import java.util.List;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "数据模型操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineDatasource")
|
||||
@@ -53,6 +56,7 @@ public class OnlineDatasourceController {
|
||||
* @param pageId 关联的页面Id。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"onlineDatasourceDto.datasourceId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(
|
||||
@MyRequestBody OnlineDatasourceDto onlineDatasourceDto,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
@@ -29,6 +31,7 @@ import java.util.List;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "数据源关联操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineDatasourceRelation")
|
||||
@@ -51,6 +54,7 @@ public class OnlineDatasourceRelationController {
|
||||
* @param onlineDatasourceRelationDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"onlineDatasourceRelationDto.relationId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody OnlineDatasourceRelationDto onlineDatasourceRelationDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
import com.orangeforms.common.core.object.MyOrderParam;
|
||||
@@ -27,6 +28,7 @@ import java.util.List;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "数据库链接操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineDblink")
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
import com.orangeforms.common.core.object.*;
|
||||
@@ -25,6 +27,7 @@ import java.util.List;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "在线表单字典操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineDict")
|
||||
@@ -39,6 +42,7 @@ public class OnlineDictController {
|
||||
* @param onlineDictDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"onlineDictDto.dictId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody OnlineDictDto onlineDictDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(onlineDictDto);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
@@ -30,6 +32,7 @@ import java.util.stream.Collectors;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "在线表单操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineForm")
|
||||
@@ -58,6 +61,7 @@ public class OnlineFormController {
|
||||
* @param onlineFormDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"onlineFormDto.formId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody OnlineFormDto onlineFormDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(onlineFormDto);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
@@ -37,6 +39,7 @@ import java.util.stream.Collectors;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "在线表单页面操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlinePage")
|
||||
@@ -55,6 +58,7 @@ public class OnlinePageController {
|
||||
* @param onlinePageDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"onlinePageDto.pageId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody OnlinePageDto onlinePageDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(onlinePageDto);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
import com.orangeforms.common.core.object.*;
|
||||
@@ -25,6 +27,7 @@ import java.util.List;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "验证规则操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineRule")
|
||||
@@ -39,6 +42,7 @@ public class OnlineRuleController {
|
||||
* @param onlineRuleDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"onlineRuleDto.ruleId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody OnlineRuleDto onlineRuleDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(onlineRuleDto);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.orangeforms.common.core.constant.ErrorCodeEnum;
|
||||
@@ -27,6 +28,7 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "数据表操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineTable")
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.api.controller;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orangeforms.common.core.object.*;
|
||||
import com.orangeforms.common.core.util.*;
|
||||
@@ -24,6 +26,7 @@ import javax.validation.groups.Default;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "虚拟字段操作接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("${common-online-api.urlPrefix}/onlineVirtualColumn")
|
||||
@@ -38,6 +41,7 @@ public class OnlineVirtualColumnController {
|
||||
* @param onlineVirtualColumnDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {"onlineVirtualColumnDto.virtualColumnId"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody OnlineVirtualColumnDto onlineVirtualColumnDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(onlineVirtualColumnDto);
|
||||
|
||||
@@ -40,6 +40,11 @@
|
||||
<artifactId>common-log</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orangeforms</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.orangeforms.common.online.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.CharUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -36,6 +37,7 @@ import java.util.stream.Collectors;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Api(tags = "在线操作接口接口")
|
||||
@Slf4j
|
||||
@RestController
|
||||
@ConditionalOnProperty(name = "common-online.operationEnabled", havingValue = "true")
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import com.orangeforms.common.online.model.constant.FieldFilterType;
|
||||
import com.orangeforms.common.online.model.constant.FieldKind;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -15,88 +17,103 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据表字段Dto对象")
|
||||
@Data
|
||||
public class OnlineColumnDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long columnId;
|
||||
|
||||
/**
|
||||
* 字段名。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段名")
|
||||
@NotBlank(message = "数据验证失败,字段名不能为空!")
|
||||
private String columnName;
|
||||
|
||||
/**
|
||||
* 数据表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据表Id")
|
||||
@NotNull(message = "数据验证失败,数据表Id不能为空!")
|
||||
private Long tableId;
|
||||
|
||||
/**
|
||||
* 数据表中的字段类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据表中的字段类型")
|
||||
@NotBlank(message = "数据验证失败,数据表中的字段类型不能为空!")
|
||||
private String columnType;
|
||||
|
||||
/**
|
||||
* 数据表中的完整字段类型(包括了精度和刻度)。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据表中的完整字段类型")
|
||||
@NotBlank(message = "数据验证失败,数据表中的完整字段类型(包括了精度和刻度)不能为空!")
|
||||
private String fullColumnType;
|
||||
|
||||
/**
|
||||
* 是否为主键。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否为主键")
|
||||
@NotNull(message = "数据验证失败,是否为主键不能为空!")
|
||||
private Boolean primaryKey;
|
||||
|
||||
/**
|
||||
* 是否是自增主键(0: 不是 1: 是)。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否是自增主键")
|
||||
@NotNull(message = "数据验证失败,是否是自增主键(0: 不是 1: 是)不能为空!")
|
||||
private Boolean autoIncrement;
|
||||
|
||||
/**
|
||||
* 是否可以为空 (0: 不可以为空 1: 可以为空)。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否可以为空")
|
||||
@NotNull(message = "数据验证失败,是否可以为空 (0: 不可以为空 1: 可以为空)不能为空!")
|
||||
private Boolean nullable;
|
||||
|
||||
/**
|
||||
* 缺省值。
|
||||
*/
|
||||
@ApiModelProperty(value = "缺省值")
|
||||
private String columnDefault;
|
||||
|
||||
/**
|
||||
* 字段在数据表中的显示位置。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段在数据表中的显示位置")
|
||||
@NotNull(message = "数据验证失败,字段在数据表中的显示位置不能为空!")
|
||||
private Integer columnShowOrder;
|
||||
|
||||
/**
|
||||
* 数据表中的字段注释。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据表中的字段注释")
|
||||
private String columnComment;
|
||||
|
||||
/**
|
||||
* 对象映射字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "对象映射字段名称")
|
||||
@NotBlank(message = "数据验证失败,对象映射字段名称不能为空!")
|
||||
private String objectFieldName;
|
||||
|
||||
/**
|
||||
* 对象映射字段类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "对象映射字段类型")
|
||||
@NotBlank(message = "数据验证失败,对象映射字段类型不能为空!")
|
||||
private String objectFieldType;
|
||||
|
||||
/**
|
||||
* 过滤类型字段。
|
||||
*/
|
||||
@ApiModelProperty(value = "过滤类型字段")
|
||||
@NotNull(message = "数据验证失败,过滤类型字段不能为空!", groups = {UpdateGroup.class})
|
||||
@ConstDictRef(constDictClass = FieldFilterType.class, message = "数据验证失败,过滤类型字段为无效值!")
|
||||
private Integer filterType;
|
||||
@@ -104,34 +121,40 @@ public class OnlineColumnDto {
|
||||
/**
|
||||
* 是否是主键的父Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否是主键的父Id")
|
||||
@NotNull(message = "数据验证失败,是否是主键的父Id不能为空!")
|
||||
private Boolean parentKey;
|
||||
|
||||
/**
|
||||
* 是否部门过滤字段。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否部门过滤字段")
|
||||
@NotNull(message = "数据验证失败,是否部门过滤字段标记不能为空!")
|
||||
private Boolean deptFilter;
|
||||
|
||||
/**
|
||||
* 是否用户过滤字段。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否用户过滤字段")
|
||||
@NotNull(message = "数据验证失败,是否用户过滤字段标记不能为空!")
|
||||
private Boolean userFilter;
|
||||
|
||||
/**
|
||||
* 字段类别。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段类别")
|
||||
@ConstDictRef(constDictClass = FieldKind.class, message = "数据验证失败,字段类别为无效值!")
|
||||
private Integer fieldKind;
|
||||
|
||||
/**
|
||||
* 包含的文件文件数量,0表示无限制。
|
||||
*/
|
||||
@ApiModelProperty(value = "包含的文件文件数量,0表示无限制")
|
||||
private Integer maxFileCount;
|
||||
|
||||
/**
|
||||
* 字典Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典Id")
|
||||
private Long dictId;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.orangeforms.common.online.dto;
|
||||
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -11,23 +13,27 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据表字段规则和字段多对多关联Dto对象")
|
||||
@Data
|
||||
public class OnlineColumnRuleDto {
|
||||
|
||||
/**
|
||||
* 字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段Id")
|
||||
@NotNull(message = "数据验证失败,字段Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long columnId;
|
||||
|
||||
/**
|
||||
* 规则Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "规则Id")
|
||||
@NotNull(message = "数据验证失败,规则Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long ruleId;
|
||||
|
||||
/**
|
||||
* 规则属性数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "规则属性数据")
|
||||
private String propDataJson;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.orangeforms.common.online.dto;
|
||||
|
||||
import com.orangeforms.common.core.validator.AddGroup;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -13,42 +15,49 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单的数据源Dto对象")
|
||||
@Data
|
||||
public class OnlineDatasourceDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long datasourceId;
|
||||
|
||||
/**
|
||||
* 数据源名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据源名称")
|
||||
@NotBlank(message = "数据验证失败,数据源名称不能为空!")
|
||||
private String datasourceName;
|
||||
|
||||
/**
|
||||
* 数据源变量名,会成为数据访问url的一部分。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据源变量名,会成为数据访问url的一部分")
|
||||
@NotBlank(message = "数据验证失败,数据源变量名不能为空!")
|
||||
private String variableName;
|
||||
|
||||
/**
|
||||
* 主表所在的数据库链接Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主表所在的数据库链接Id")
|
||||
@NotNull(message = "数据验证失败,数据库链接Id不能为空!")
|
||||
private Long dblinkId;
|
||||
|
||||
/**
|
||||
* 主表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主表Id")
|
||||
@NotNull(message = "数据验证失败,主表Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long masterTableId;
|
||||
|
||||
/**
|
||||
* 主表表名。
|
||||
*/
|
||||
@ApiModelProperty(value = "主表表名")
|
||||
@NotBlank(message = "数据验证失败,主表名不能为空!", groups = {AddGroup.class})
|
||||
private String masterTableName;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.orangeforms.common.core.validator.AddGroup;
|
||||
import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import com.orangeforms.common.online.model.constant.RelationType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -15,36 +17,42 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单的数据源关联Dto对象")
|
||||
@Data
|
||||
public class OnlineDatasourceRelationDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 关联名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联名称")
|
||||
@NotBlank(message = "数据验证失败,关联名称不能为空!")
|
||||
private String relationName;
|
||||
|
||||
/**
|
||||
* 变量名。
|
||||
*/
|
||||
@ApiModelProperty(value = "变量名")
|
||||
@NotBlank(message = "数据验证失败,变量名不能为空!")
|
||||
private String variableName;
|
||||
|
||||
/**
|
||||
* 主数据源Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主数据源Id")
|
||||
@NotNull(message = "数据验证失败,主数据源Id不能为空!")
|
||||
private Long datasourceId;
|
||||
|
||||
/**
|
||||
* 关联类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联类型")
|
||||
@NotNull(message = "数据验证失败,关联类型不能为空!")
|
||||
@ConstDictRef(constDictClass = RelationType.class, message = "数据验证失败,关联类型为无效值!")
|
||||
private Integer relationType;
|
||||
@@ -52,42 +60,49 @@ public class OnlineDatasourceRelationDto {
|
||||
/**
|
||||
* 主表关联字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主表关联字段Id")
|
||||
@NotNull(message = "数据验证失败,主表关联字段Id不能为空!")
|
||||
private Long masterColumnId;
|
||||
|
||||
/**
|
||||
* 从表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "从表Id")
|
||||
@NotNull(message = "数据验证失败,从表Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long slaveTableId;
|
||||
|
||||
/**
|
||||
* 从表名。
|
||||
*/
|
||||
@ApiModelProperty(value = "从表名")
|
||||
@NotBlank(message = "数据验证失败,从表名不能为空!", groups = {AddGroup.class})
|
||||
private String slaveTableName;
|
||||
|
||||
/**
|
||||
* 从表关联字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "从表关联字段Id")
|
||||
@NotNull(message = "数据验证失败,从表关联字段Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long slaveColumnId;
|
||||
|
||||
/**
|
||||
* 从表字段名。
|
||||
*/
|
||||
@ApiModelProperty(value = "从表字段名")
|
||||
@NotBlank(message = "数据验证失败,从表字段名不能为空!", groups = {AddGroup.class})
|
||||
private String slaveColumnName;
|
||||
|
||||
/**
|
||||
* 是否级联删除标记。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否级联删除标记")
|
||||
@NotNull(message = "数据验证失败,是否级联删除标记不能为空!")
|
||||
private Boolean cascadeDelete;
|
||||
|
||||
/**
|
||||
* 是否左连接标记。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否左连接标记")
|
||||
@NotNull(message = "数据验证失败,是否左连接标记不能为空!")
|
||||
private Boolean leftJoin;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.orangeforms.common.online.dto;
|
||||
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -12,35 +14,41 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据表所在数据库链接Dto对象")
|
||||
@Data
|
||||
public class OnlineDblinkDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long dblinkId;
|
||||
|
||||
/**
|
||||
* 链接中文名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "链接中文名称")
|
||||
@NotBlank(message = "数据验证失败,链接中文名称不能为空!")
|
||||
private String dblinkName;
|
||||
|
||||
/**
|
||||
* 链接英文名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "链接英文名称")
|
||||
@NotBlank(message = "数据验证失败,链接英文名称不能为空!")
|
||||
private String variableName;
|
||||
|
||||
/**
|
||||
* 链接描述。
|
||||
*/
|
||||
@ApiModelProperty(value = "链接描述")
|
||||
private String dblinkDesc;
|
||||
|
||||
/**
|
||||
* 数据源配置常量。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据源配置常量")
|
||||
@NotNull(message = "数据验证失败,数据源配置常量不能为空!")
|
||||
private Integer dblinkConfigConstant;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.orangeforms.common.online.dto;
|
||||
import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import com.orangeforms.common.online.model.constant.DictType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -14,24 +16,28 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单关联的字典Dto对象")
|
||||
@Data
|
||||
public class OnlineDictDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long dictId;
|
||||
|
||||
/**
|
||||
* 字典名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典名称")
|
||||
@NotBlank(message = "数据验证失败,字典名称不能为空!")
|
||||
private String dictName;
|
||||
|
||||
/**
|
||||
* 字典类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典类型")
|
||||
@NotNull(message = "数据验证失败,字典类型不能为空!")
|
||||
@ConstDictRef(constDictClass = DictType.class, message = "数据验证失败,字典类型为无效值!")
|
||||
private Integer dictType;
|
||||
@@ -39,66 +45,79 @@ public class OnlineDictDto {
|
||||
/**
|
||||
* 数据库链接Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据库链接Id")
|
||||
private Long dblinkId;
|
||||
|
||||
/**
|
||||
* 字典表名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典表名称")
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 字典表键字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典表键字段名称")
|
||||
private String keyColumnName;
|
||||
|
||||
/**
|
||||
* 字典表父键字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典表父键字段名称")
|
||||
private String parentKeyColumnName;
|
||||
|
||||
/**
|
||||
* 字典值字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典值字段名称")
|
||||
private String valueColumnName;
|
||||
|
||||
/**
|
||||
* 逻辑删除字段。
|
||||
*/
|
||||
@ApiModelProperty(value = "逻辑删除字段")
|
||||
private String deletedColumnName;
|
||||
|
||||
/**
|
||||
* 用户过滤滤字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "用户过滤滤字段名称")
|
||||
private String userFilterColumnName;
|
||||
|
||||
/**
|
||||
* 部门过滤字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "部门过滤字段名称")
|
||||
private String deptFilterColumnName;
|
||||
|
||||
/**
|
||||
* 租户过滤字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "租户过滤字段名称")
|
||||
private String tenantFilterColumnName;
|
||||
|
||||
/**
|
||||
* 是否树形标记。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否树形标记")
|
||||
@NotNull(message = "数据验证失败,是否树形标记不能为空!")
|
||||
private Boolean treeFlag;
|
||||
|
||||
/**
|
||||
* 获取字典数据的url。
|
||||
*/
|
||||
@ApiModelProperty(value = "获取字典数据的url")
|
||||
private String dictListUrl;
|
||||
|
||||
/**
|
||||
* 根据主键id批量获取字典数据的url。
|
||||
*/
|
||||
@ApiModelProperty(value = "根据主键id批量获取字典数据的url")
|
||||
private String dictIdsUrl;
|
||||
|
||||
/**
|
||||
* 字典的JSON数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典的JSON数据")
|
||||
private String dictDataJson;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.orangeforms.common.online.dto;
|
||||
|
||||
import com.orangeforms.common.online.model.constant.FieldFilterType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Set;
|
||||
@@ -11,41 +13,49 @@ import java.util.Set;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据过滤参数对象")
|
||||
@Data
|
||||
public class OnlineFilterDto {
|
||||
|
||||
/**
|
||||
* 表名。
|
||||
*/
|
||||
@ApiModelProperty(value = "表名")
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 过滤字段名。
|
||||
*/
|
||||
@ApiModelProperty(value = "过滤字段名")
|
||||
private String columnName;
|
||||
|
||||
/**
|
||||
* 过滤值。
|
||||
*/
|
||||
@ApiModelProperty(value = "过滤值")
|
||||
private Object columnValue;
|
||||
|
||||
/**
|
||||
* 范围比较的最小值。
|
||||
*/
|
||||
@ApiModelProperty(value = "范围比较的最小值")
|
||||
private Object columnValueStart;
|
||||
|
||||
/**
|
||||
* 范围比较的最大值。
|
||||
*/
|
||||
@ApiModelProperty(value = "范围比较的最大值")
|
||||
private Object columnValueEnd;
|
||||
|
||||
/**
|
||||
* 仅当操作符为IN的时候使用。
|
||||
*/
|
||||
@ApiModelProperty(value = "仅当操作符为IN的时候使用")
|
||||
private Set<Object> columnValueList;
|
||||
|
||||
/**
|
||||
* 过滤类型,参考FieldFilterType常量对象。缺省值就是等于过滤了。
|
||||
*/
|
||||
@ApiModelProperty(value = "过滤类型")
|
||||
private Integer filterType = FieldFilterType.EQUAL_FILTER;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import com.orangeforms.common.online.model.constant.FormKind;
|
||||
import com.orangeforms.common.online.model.constant.FormType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -16,35 +18,41 @@ import java.util.List;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单Dto对象")
|
||||
@Data
|
||||
public class OnlineFormDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long formId;
|
||||
|
||||
/**
|
||||
* 页面id。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面id")
|
||||
@NotNull(message = "数据验证失败,页面id不能为空!")
|
||||
private Long pageId;
|
||||
|
||||
/**
|
||||
* 表单编码。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单编码")
|
||||
private String formCode;
|
||||
|
||||
/**
|
||||
* 表单名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单名称")
|
||||
@NotBlank(message = "数据验证失败,表单名称不能为空!")
|
||||
private String formName;
|
||||
|
||||
/**
|
||||
* 表单类别。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单类别")
|
||||
@NotNull(message = "数据验证失败,表单类别不能为空!")
|
||||
@ConstDictRef(constDictClass = FormKind.class, message = "数据验证失败,表单类别为无效值!")
|
||||
private Integer formKind;
|
||||
@@ -52,6 +60,7 @@ public class OnlineFormDto {
|
||||
/**
|
||||
* 表单类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单类型")
|
||||
@NotNull(message = "数据验证失败,表单类型不能为空!")
|
||||
@ConstDictRef(constDictClass = FormType.class, message = "数据验证失败,表单类型为无效值!")
|
||||
private Integer formType;
|
||||
@@ -59,21 +68,25 @@ public class OnlineFormDto {
|
||||
/**
|
||||
* 表单主表id。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单主表id")
|
||||
@NotNull(message = "数据验证失败,表单主表id不能为空!")
|
||||
private Long masterTableId;
|
||||
|
||||
/**
|
||||
* 当前表单关联的数据源Id集合。
|
||||
*/
|
||||
@ApiModelProperty(value = "当前表单关联的数据源Id集合")
|
||||
private List<Long> datasourceIdList;
|
||||
|
||||
/**
|
||||
* 表单组件JSON。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单组件JSON")
|
||||
private String widgetJson;
|
||||
|
||||
/**
|
||||
* 表单参数JSON。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单参数JSON")
|
||||
private String paramsJson;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.orangeforms.common.online.dto;
|
||||
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -11,24 +13,28 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单页面和数据源多对多关联Dto对象")
|
||||
@Data
|
||||
public class OnlinePageDatasourceDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 页面主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面主键Id")
|
||||
@NotNull(message = "数据验证失败,页面主键Id不能为空!")
|
||||
private Long pageId;
|
||||
|
||||
/**
|
||||
* 数据源主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据源主键Id")
|
||||
@NotNull(message = "数据验证失败,数据源主键Id不能为空!")
|
||||
private Long datasourceId;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import com.orangeforms.common.online.model.constant.PageStatus;
|
||||
import com.orangeforms.common.online.model.constant.PageType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -15,29 +17,34 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单所在页面Dto对象")
|
||||
@Data
|
||||
public class OnlinePageDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long pageId;
|
||||
|
||||
/**
|
||||
* 页面编码。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面编码")
|
||||
private String pageCode;
|
||||
|
||||
/**
|
||||
* 页面名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面名称")
|
||||
@NotBlank(message = "数据验证失败,页面名称不能为空!")
|
||||
private String pageName;
|
||||
|
||||
/**
|
||||
* 页面类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面类型")
|
||||
@NotNull(message = "数据验证失败,页面类型不能为空!")
|
||||
@ConstDictRef(constDictClass = PageType.class, message = "数据验证失败,页面类型为无效值!")
|
||||
private Integer pageType;
|
||||
@@ -45,6 +52,7 @@ public class OnlinePageDto {
|
||||
/**
|
||||
* 页面编辑状态。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面编辑状态")
|
||||
@NotNull(message = "数据验证失败,状态不能为空!")
|
||||
@ConstDictRef(constDictClass = PageStatus.class, message = "数据验证失败,状态为无效值!")
|
||||
private Integer status;
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.orangeforms.common.online.dto;
|
||||
import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import com.orangeforms.common.online.model.constant.RuleType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -14,24 +16,28 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据表字段验证规则Dto对象")
|
||||
@Data
|
||||
public class OnlineRuleDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long ruleId;
|
||||
|
||||
/**
|
||||
* 规则名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "规则名称")
|
||||
@NotBlank(message = "数据验证失败,规则名称不能为空!")
|
||||
private String ruleName;
|
||||
|
||||
/**
|
||||
* 规则类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "规则类型")
|
||||
@NotNull(message = "数据验证失败,规则类型不能为空!")
|
||||
@ConstDictRef(constDictClass = RuleType.class, message = "数据验证失败,规则类型为无效值!")
|
||||
private Integer ruleType;
|
||||
@@ -39,11 +45,13 @@ public class OnlineRuleDto {
|
||||
/**
|
||||
* 内置规则标记。
|
||||
*/
|
||||
@ApiModelProperty(value = "内置规则标记")
|
||||
@NotNull(message = "数据验证失败,内置规则标记不能为空!")
|
||||
private Boolean builtin;
|
||||
|
||||
/**
|
||||
* 自定义规则的正则表达式。
|
||||
*/
|
||||
@ApiModelProperty(value = "自定义规则的正则表达式")
|
||||
private String pattern;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.orangeforms.common.online.dto;
|
||||
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
@@ -12,30 +14,35 @@ import javax.validation.constraints.NotNull;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单的数据表Dto对象")
|
||||
@Data
|
||||
public class OnlineTableDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long tableId;
|
||||
|
||||
/**
|
||||
* 表名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "表名称")
|
||||
@NotBlank(message = "数据验证失败,表名称不能为空!")
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 实体名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "实体名称")
|
||||
@NotBlank(message = "数据验证失败,实体名称不能为空!")
|
||||
private String modelName;
|
||||
|
||||
/**
|
||||
* 数据库链接Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据库链接Id")
|
||||
@NotNull(message = "数据验证失败,数据库链接Id不能为空!")
|
||||
private Long dblinkId;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.orangeforms.common.online.dto;
|
||||
import com.orangeforms.common.core.constant.AggregationType;
|
||||
import com.orangeforms.common.core.validator.ConstDictRef;
|
||||
import com.orangeforms.common.core.validator.UpdateGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import com.orangeforms.common.online.model.constant.VirtualType;
|
||||
import lombok.Data;
|
||||
@@ -15,41 +17,48 @@ import javax.validation.constraints.*;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线数据表虚拟字段Dto对象")
|
||||
@Data
|
||||
public class OnlineVirtualColumnDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long virtualColumnId;
|
||||
|
||||
/**
|
||||
* 所在表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "所在表Id")
|
||||
private Long tableId;
|
||||
|
||||
/**
|
||||
* 字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段名称")
|
||||
@NotBlank(message = "数据验证失败,字段名称不能为空!")
|
||||
private String objectFieldName;
|
||||
|
||||
/**
|
||||
* 属性类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "属性类型")
|
||||
@NotBlank(message = "数据验证失败,属性类型不能为空!")
|
||||
private String objectFieldType;
|
||||
|
||||
/**
|
||||
* 字段提示名。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段提示名")
|
||||
@NotBlank(message = "数据验证失败,字段提示名不能为空!")
|
||||
private String columnPrompt;
|
||||
|
||||
/**
|
||||
* 虚拟字段类型(0: 聚合)。
|
||||
*/
|
||||
@ApiModelProperty(value = "虚拟字段类型(0: 聚合)")
|
||||
@ConstDictRef(constDictClass = VirtualType.class, message = "数据验证失败,虚拟字段类型为无效值!")
|
||||
@NotNull(message = "数据验证失败,虚拟字段类型(0: 聚合)不能为空!")
|
||||
private Integer virtualType;
|
||||
@@ -57,32 +66,38 @@ public class OnlineVirtualColumnDto {
|
||||
/**
|
||||
* 关联数据源Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联数据源Id")
|
||||
@NotNull(message = "数据验证失败,关联数据源Id不能为空!")
|
||||
private Long datasourceId;
|
||||
|
||||
/**
|
||||
* 关联Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联Id")
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 聚合字段所在关联表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "聚合字段所在关联表Id")
|
||||
private Long aggregationTableId;
|
||||
|
||||
/**
|
||||
* 关联表聚合字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联表聚合字段Id")
|
||||
private Long aggregationColumnId;
|
||||
|
||||
/**
|
||||
* 聚合类型(0: sum 1: count 2: avg 3: min 4: max)。
|
||||
*/
|
||||
@ApiModelProperty(value = "聚合类型(0: sum 1: count 2: avg 3: min 4: max)")
|
||||
@ConstDictRef(constDictClass = AggregationType.class, message = "数据验证失败,虚拟字段聚合计算类型为无效值!")
|
||||
private Integer aggregationType;
|
||||
|
||||
/**
|
||||
* 存储过滤条件的json。
|
||||
*/
|
||||
@ApiModelProperty(value = "存储过滤条件的json")
|
||||
private String whereClauseJson;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -8,21 +10,25 @@ import lombok.Data;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据表字段规则和字段多对多关联VO对象")
|
||||
@Data
|
||||
public class OnlineColumnRuleVo {
|
||||
|
||||
/**
|
||||
* 字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段Id")
|
||||
private Long columnId;
|
||||
|
||||
/**
|
||||
* 规则Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "规则Id")
|
||||
private Long ruleId;
|
||||
|
||||
/**
|
||||
* 规则属性数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "规则属性数据")
|
||||
private String propDataJson;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -11,126 +13,151 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据表字段规则和字段多对多关联VO对象")
|
||||
@Data
|
||||
public class OnlineColumnVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long columnId;
|
||||
|
||||
/**
|
||||
* 字段名。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段名")
|
||||
private String columnName;
|
||||
|
||||
/**
|
||||
* 数据表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据表Id")
|
||||
private Long tableId;
|
||||
|
||||
/**
|
||||
* 数据表中的字段类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据表中的字段类型")
|
||||
private String columnType;
|
||||
|
||||
/**
|
||||
* 数据表中的完整字段类型(包括了精度和刻度)。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据表中的完整字段类型")
|
||||
private String fullColumnType;
|
||||
|
||||
/**
|
||||
* 是否为主键。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否为主键")
|
||||
private Boolean primaryKey;
|
||||
|
||||
/**
|
||||
* 是否是自增主键(0: 不是 1: 是)。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否是自增主键")
|
||||
private Boolean autoIncrement;
|
||||
|
||||
/**
|
||||
* 是否可以为空 (0: 不可以为空 1: 可以为空)。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否可以为空")
|
||||
private Boolean nullable;
|
||||
|
||||
/**
|
||||
* 缺省值。
|
||||
*/
|
||||
@ApiModelProperty(value = "缺省值")
|
||||
private String columnDefault;
|
||||
|
||||
/**
|
||||
* 字段在数据表中的显示位置。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段在数据表中的显示位置")
|
||||
private Integer columnShowOrder;
|
||||
|
||||
/**
|
||||
* 数据表中的字段注释。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据表中的字段注释")
|
||||
private String columnComment;
|
||||
|
||||
/**
|
||||
* 对象映射字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "对象映射字段名称")
|
||||
private String objectFieldName;
|
||||
|
||||
/**
|
||||
* 对象映射字段类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "对象映射字段类型")
|
||||
private String objectFieldType;
|
||||
|
||||
/**
|
||||
* 过滤类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "过滤类型")
|
||||
private Integer filterType;
|
||||
|
||||
/**
|
||||
* 是否是主键的父Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否是主键的父Id")
|
||||
private Boolean parentKey;
|
||||
|
||||
/**
|
||||
* 是否部门过滤字段。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否部门过滤字段")
|
||||
private Boolean deptFilter;
|
||||
|
||||
/**
|
||||
* 是否用户过滤字段。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否用户过滤字段")
|
||||
private Boolean userFilter;
|
||||
|
||||
/**
|
||||
* 字段类别。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段类别")
|
||||
private Integer fieldKind;
|
||||
|
||||
/**
|
||||
* 包含的文件文件数量,0表示无限制。
|
||||
*/
|
||||
@ApiModelProperty(value = "包含的文件文件数量,0表示无限制")
|
||||
private Integer maxFileCount;
|
||||
|
||||
/**
|
||||
* 字典Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典Id")
|
||||
private Long dictId;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* fieldKind 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "常量字典关联数据")
|
||||
private Map<String, Object> fieldKindDictMap;
|
||||
|
||||
/**
|
||||
* dictId 的一对一关联。
|
||||
*/
|
||||
@ApiModelProperty(value = "dictId 的一对一关联")
|
||||
private Map<String, Object> dictInfo;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -11,101 +13,121 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单的数据源关联VO对象")
|
||||
@Data
|
||||
public class OnlineDatasourceRelationVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 关联名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联名称")
|
||||
private String relationName;
|
||||
|
||||
/**
|
||||
* 变量名。
|
||||
*/
|
||||
@ApiModelProperty(value = "变量名")
|
||||
private String variableName;
|
||||
|
||||
/**
|
||||
* 主数据源Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主数据源Id")
|
||||
private Long datasourceId;
|
||||
|
||||
/**
|
||||
* 关联类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联类型")
|
||||
private Integer relationType;
|
||||
|
||||
/**
|
||||
* 主表关联字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主表关联字段Id")
|
||||
private Long masterColumnId;
|
||||
|
||||
/**
|
||||
* 从表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "从表Id")
|
||||
private Long slaveTableId;
|
||||
|
||||
/**
|
||||
* 从表关联字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "从表关联字段Id")
|
||||
private Long slaveColumnId;
|
||||
|
||||
/**
|
||||
* 删除主表的时候是否级联删除一对一和一对多的从表数据,多对多只是删除关联,不受到这个标记的影响。。
|
||||
*/
|
||||
@ApiModelProperty(value = "一对多从表级联删除标记")
|
||||
private Boolean cascadeDelete;
|
||||
|
||||
/**
|
||||
* 是否左连接。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否左连接")
|
||||
private Boolean leftJoin;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* masterColumnId 的一对一关联数据对象,数据对应类型为OnlineColumnVo。
|
||||
*/
|
||||
@ApiModelProperty(value = "masterColumnId字段的一对一关联数据对象")
|
||||
private Map<String, Object> masterColumn;
|
||||
|
||||
/**
|
||||
* slaveTableId 的一对一关联数据对象,数据对应类型为OnlineTableVo。
|
||||
*/
|
||||
@ApiModelProperty(value = "slaveTableId字段的一对一关联数据对象")
|
||||
private Map<String, Object> slaveTable;
|
||||
|
||||
/**
|
||||
* slaveColumnId 的一对一关联数据对象,数据对应类型为OnlineColumnVo。
|
||||
*/
|
||||
@ApiModelProperty(value = "slaveColumnId字段的一对一关联数据对象")
|
||||
private Map<String, Object> slaveColumn;
|
||||
|
||||
/**
|
||||
* masterColumnId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "masterColumnId的字典关联数据")
|
||||
private Map<String, Object> masterColumnIdDictMap;
|
||||
|
||||
/**
|
||||
* slaveTableId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "slaveTableId的字典关联数据")
|
||||
private Map<String, Object> slaveTableIdDictMap;
|
||||
|
||||
/**
|
||||
* slaveColumnId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "slaveColumnId的字典关联数据")
|
||||
private Map<String, Object> slaveColumnIdDictMap;
|
||||
|
||||
/**
|
||||
* relationType 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "常量字典关联数据")
|
||||
private Map<String, Object> relationTypeDictMap;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -12,56 +14,67 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单的数据源VO对象")
|
||||
@Data
|
||||
public class OnlineDatasourceVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long datasourceId;
|
||||
|
||||
/**
|
||||
* 数据源名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据源名称")
|
||||
private String datasourceName;
|
||||
|
||||
/**
|
||||
* 数据源变量名,会成为数据访问url的一部分。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据源变量名")
|
||||
private String variableName;
|
||||
|
||||
/**
|
||||
* 数据库链接Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据库链接Id")
|
||||
private Long dblinkId;
|
||||
|
||||
/**
|
||||
* 主表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主表Id")
|
||||
private Long masterTableId;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* datasourceId 的多对多关联表数据对象,数据对应类型为OnlinePageDatasourceVo。
|
||||
*/
|
||||
@ApiModelProperty(value = "datasourceId 的多对多关联表数据对象")
|
||||
private Map<String, Object> onlinePageDatasource;
|
||||
|
||||
/**
|
||||
* masterTableId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "masterTableId 字典关联数据")
|
||||
private Map<String, Object> masterTableIdDictMap;
|
||||
|
||||
/**
|
||||
* 当前数据源及其关联,引用的数据表对象列表。
|
||||
*/
|
||||
@ApiModelProperty(value = "当前数据源及其关联,引用的数据表对象列表")
|
||||
private List<OnlineTableVo> tableList;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -10,36 +12,43 @@ import java.util.Date;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据表所在数据库链接VO对象")
|
||||
@Data
|
||||
public class OnlineDblinkVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long dblinkId;
|
||||
|
||||
/**
|
||||
* 链接中文名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "链接中文名称")
|
||||
private String dblinkName;
|
||||
|
||||
/**
|
||||
* 链接英文名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "链接英文名称")
|
||||
private String variableName;
|
||||
|
||||
/**
|
||||
* 链接描述。
|
||||
*/
|
||||
@ApiModelProperty(value = "链接描述")
|
||||
private String dblinkDesc;
|
||||
|
||||
/**
|
||||
* 数据源配置常量。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据源配置常量")
|
||||
private Integer dblinkConfigConstant;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -11,106 +13,127 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单关联的字典VO对象")
|
||||
@Data
|
||||
public class OnlineDictVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long dictId;
|
||||
|
||||
/**
|
||||
* 字典名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典名称")
|
||||
private String dictName;
|
||||
|
||||
/**
|
||||
* 字典类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典类型")
|
||||
private Integer dictType;
|
||||
|
||||
/**
|
||||
* 数据库链接Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据库链接Id")
|
||||
private Long dblinkId;
|
||||
|
||||
/**
|
||||
* 字典表名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典表名称")
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 字典表键字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典表键字段名称")
|
||||
private String keyColumnName;
|
||||
|
||||
/**
|
||||
* 字典表父键字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典表父键字段名称")
|
||||
private String parentKeyColumnName;
|
||||
|
||||
/**
|
||||
* 字典值字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典值字段名称")
|
||||
private String valueColumnName;
|
||||
|
||||
/**
|
||||
* 逻辑删除字段。
|
||||
*/
|
||||
@ApiModelProperty(value = "逻辑删除字段")
|
||||
private String deletedColumnName;
|
||||
|
||||
/**
|
||||
* 用户过滤滤字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "用户过滤滤字段名称")
|
||||
private String userFilterColumnName;
|
||||
|
||||
/**
|
||||
* 部门过滤字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "部门过滤字段名称")
|
||||
private String deptFilterColumnName;
|
||||
|
||||
/**
|
||||
* 租户过滤字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "租户过滤字段名称")
|
||||
private String tenantFilterColumnName;
|
||||
|
||||
/**
|
||||
* 是否树形标记。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否树形标记")
|
||||
private Boolean treeFlag;
|
||||
|
||||
/**
|
||||
* 获取字典数据的url。
|
||||
*/
|
||||
@ApiModelProperty(value = "获取字典数据的url")
|
||||
private String dictListUrl;
|
||||
|
||||
/**
|
||||
* 根据主键id批量获取字典数据的url。
|
||||
*/
|
||||
@ApiModelProperty(value = "根据主键id批量获取字典数据的url")
|
||||
private String dictIdsUrl;
|
||||
|
||||
/**
|
||||
* 字典的JSON数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "字典的JSON数据")
|
||||
private String dictDataJson;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* dictType 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "dictType 常量字典关联数据")
|
||||
private Map<String, Object> dictTypeDictMap;
|
||||
|
||||
/**
|
||||
* 数据库链接Id字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据库链接Id字典关联数据")
|
||||
private Map<String, Object> dblinkIdDictMap;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -12,81 +14,97 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单VO对象")
|
||||
@Data
|
||||
public class OnlineFormVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long formId;
|
||||
|
||||
/**
|
||||
* 页面Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面Id")
|
||||
private Long pageId;
|
||||
|
||||
/**
|
||||
* 表单编码。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单编码")
|
||||
private String formCode;
|
||||
|
||||
/**
|
||||
* 表单名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单名称")
|
||||
private String formName;
|
||||
|
||||
/**
|
||||
* 表单类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单类型")
|
||||
private Integer formType;
|
||||
|
||||
/**
|
||||
* 表单类别。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单类别")
|
||||
private Integer formKind;
|
||||
|
||||
/**
|
||||
* 表单主表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单主表Id")
|
||||
private Long masterTableId;
|
||||
|
||||
/**
|
||||
* 表单组件JSON。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单组件JSON")
|
||||
private String widgetJson;
|
||||
|
||||
/**
|
||||
* 表单参数JSON。
|
||||
*/
|
||||
@ApiModelProperty(value = "表单参数JSON")
|
||||
private String paramsJson;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* masterTableId 的一对一关联数据对象,数据对应类型为OnlineTableVo。
|
||||
*/
|
||||
@ApiModelProperty(value = "asterTableId 的一对一关联数据对象")
|
||||
private Map<String, Object> onlineTable;
|
||||
|
||||
/**
|
||||
* masterTableId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "masterTableId 字典关联数据")
|
||||
private Map<String, Object> masterTableIdDictMap;
|
||||
|
||||
/**
|
||||
* formType 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "formType 常量字典关联数据")
|
||||
private Map<String, Object> formTypeDictMap;
|
||||
|
||||
/**
|
||||
* 当前表单关联的数据源Id集合。
|
||||
*/
|
||||
@ApiModelProperty(value = "当前表单关联的数据源Id集合")
|
||||
private List<Long> datasourceIdList;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -8,21 +10,25 @@ import lombok.Data;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单页面和数据源多对多关联VO对象")
|
||||
@Data
|
||||
public class OnlinePageDatasourceVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 页面主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面主键Id")
|
||||
private Long pageId;
|
||||
|
||||
/**
|
||||
* 数据源主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据源主键Id")
|
||||
private Long datasourceId;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -11,56 +13,67 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单所在页面VO对象")
|
||||
@Data
|
||||
public class OnlinePageVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long pageId;
|
||||
|
||||
/**
|
||||
* 页面编码。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面编码")
|
||||
private String pageCode;
|
||||
|
||||
/**
|
||||
* 页面名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面名称")
|
||||
private String pageName;
|
||||
|
||||
/**
|
||||
* 页面类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面类型")
|
||||
private Integer pageType;
|
||||
|
||||
/**
|
||||
* 页面编辑状态。
|
||||
*/
|
||||
@ApiModelProperty(value = "页面编辑状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否发布。
|
||||
*/
|
||||
@ApiModelProperty(value = "是否发布")
|
||||
private Boolean published;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* pageType 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "pageType 常量字典关联数据")
|
||||
private Map<String, Object> pageTypeDictMap;
|
||||
|
||||
/**
|
||||
* status 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "status 常量字典关联数据")
|
||||
private Map<String, Object> statusDictMap;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -11,51 +13,61 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单数据表字段验证规则VO对象")
|
||||
@Data
|
||||
public class OnlineRuleVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long ruleId;
|
||||
|
||||
/**
|
||||
* 规则名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "规则名称")
|
||||
private String ruleName;
|
||||
|
||||
/**
|
||||
* 规则类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "规则类型")
|
||||
private Integer ruleType;
|
||||
|
||||
/**
|
||||
* 内置规则标记。
|
||||
*/
|
||||
@ApiModelProperty(value = "内置规则标记")
|
||||
private Boolean builtin;
|
||||
|
||||
/**
|
||||
* 自定义规则的正则表达式。
|
||||
*/
|
||||
@ApiModelProperty(value = "自定义规则的正则表达式")
|
||||
private String pattern;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* ruleId 的多对多关联表数据对象,数据对应类型为OnlineColumnRuleVo。
|
||||
*/
|
||||
@ApiModelProperty(value = "ruleId 的多对多关联表数据对象")
|
||||
private Map<String, Object> onlineColumnRule;
|
||||
|
||||
/**
|
||||
* ruleType 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(value = "ruleType 常量字典关联数据")
|
||||
private Map<String, Object> ruleTypeDictMap;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -10,36 +12,43 @@ import java.util.Date;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线表单的数据表VO对象")
|
||||
@Data
|
||||
public class OnlineTableVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long tableId;
|
||||
|
||||
/**
|
||||
* 表名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "表名称")
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 实体名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "实体名称")
|
||||
private String modelName;
|
||||
|
||||
/**
|
||||
* 数据库链接Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "数据库链接Id")
|
||||
private Long dblinkId;
|
||||
|
||||
/**
|
||||
* 更新时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.orangeforms.common.online.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -8,66 +10,79 @@ import lombok.Data;
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@ApiModel("在线数据表虚拟字段VO对象")
|
||||
@Data
|
||||
public class OnlineVirtualColumnVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id")
|
||||
private Long virtualColumnId;
|
||||
|
||||
/**
|
||||
* 所在表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "所在表Id")
|
||||
private Long tableId;
|
||||
|
||||
/**
|
||||
* 字段名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段名称")
|
||||
private String objectFieldName;
|
||||
|
||||
/**
|
||||
* 属性类型。
|
||||
*/
|
||||
@ApiModelProperty(value = "属性类型")
|
||||
private String objectFieldType;
|
||||
|
||||
/**
|
||||
* 字段提示名。
|
||||
*/
|
||||
@ApiModelProperty(value = "字段提示名")
|
||||
private String columnPrompt;
|
||||
|
||||
/**
|
||||
* 虚拟字段类型(0: 聚合)。
|
||||
*/
|
||||
@ApiModelProperty(value = "虚拟字段类型(0: 聚合)")
|
||||
private Integer virtualType;
|
||||
|
||||
/**
|
||||
* 关联数据源Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联数据源Id")
|
||||
private Long datasourceId;
|
||||
|
||||
/**
|
||||
* 关联Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联Id")
|
||||
private Long relationId;
|
||||
|
||||
/**
|
||||
* 聚合字段所在关联表Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "聚合字段所在关联表Id")
|
||||
private Long aggregationTableId;
|
||||
|
||||
/**
|
||||
* 关联表聚合字段Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "关联表聚合字段Id")
|
||||
private Long aggregationColumnId;
|
||||
|
||||
/**
|
||||
* 聚合类型(0: count 1: sum 2: avg 3: max 4:min)。
|
||||
*/
|
||||
@ApiModelProperty(value = "聚合类型(0: count 1: sum 2: avg 3: max 4:min)")
|
||||
private Integer aggregationType;
|
||||
|
||||
/**
|
||||
* 存储过滤条件的json。
|
||||
*/
|
||||
@ApiModelProperty(value = "存储过滤条件的json")
|
||||
private String whereClauseJson;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.orangeforms.common.redis.cache;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.orangeforms.common.core.object.TokenData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.Cache;
|
||||
@@ -43,6 +44,28 @@ public class SessionCacheHelper {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存当前Session可以下载的文件集合。
|
||||
*
|
||||
* @param filenameSet 后台服务本地存储的文件名,而不是上传时的原始文件名。
|
||||
*/
|
||||
public void putSessionDownloadableFileNameSet(Set<String> filenameSet) {
|
||||
if (CollUtil.isEmpty(filenameSet)) {
|
||||
return;
|
||||
}
|
||||
Set<String> sessionUploadFileSet = null;
|
||||
Cache cache = cacheManager.getCache(RedissonCacheConfig.CacheEnum.UPLOAD_FILENAME_CACHE.name());
|
||||
Cache.ValueWrapper valueWrapper = cache.get(TokenData.takeFromRequest().getSessionId());
|
||||
if (valueWrapper != null) {
|
||||
sessionUploadFileSet = (Set<String>) valueWrapper.get();
|
||||
}
|
||||
if (sessionUploadFileSet == null) {
|
||||
sessionUploadFileSet = new HashSet<>();
|
||||
}
|
||||
sessionUploadFileSet.addAll(filenameSet);
|
||||
cache.put(TokenData.takeFromRequest().getSessionId(), sessionUploadFileSet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断参数中的文件名,是否有当前session上传。
|
||||
*
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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">
|
||||
<parent>
|
||||
<artifactId>common</artifactId>
|
||||
<groupId>com.orangeforms</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>common-swagger</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>${knife4j.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.plugin</groupId>
|
||||
<artifactId>spring-plugin-metadata</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.orangeforms</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.orangeforms.common.swagger.config;
|
||||
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||
|
||||
/**
|
||||
* 自动加载bean的配置对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@EnableSwagger2WebMvc
|
||||
@EnableKnife4j
|
||||
@EnableConfigurationProperties(SwaggerProperties.class)
|
||||
@ConditionalOnProperty(prefix = "swagger", name = "enabled")
|
||||
public class SwaggerAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
public Docket upmsDocket(SwaggerProperties properties) {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.groupName("1. 用户权限分组接口")
|
||||
.ignoredParameterTypes(MyRequestBody.class)
|
||||
.apiInfo(apiInfo(properties))
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage(properties.getServiceBasePackage() + ".upms.controller"))
|
||||
.paths(PathSelectors.any()).build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Docket bizDocket(SwaggerProperties properties) {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.groupName("2. 业务应用分组接口")
|
||||
.ignoredParameterTypes(MyRequestBody.class)
|
||||
.apiInfo(apiInfo(properties))
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage(properties.getServiceBasePackage() + ".app.controller"))
|
||||
.paths(PathSelectors.any()).build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Docket workflowDocket(SwaggerProperties properties) {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.groupName("3. 工作流通用操作接口")
|
||||
.ignoredParameterTypes(MyRequestBody.class)
|
||||
.apiInfo(apiInfo(properties))
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage(properties.getBasePackage() + ".common.flow.controller"))
|
||||
.paths(PathSelectors.any()).build();
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo(SwaggerProperties properties) {
|
||||
return new ApiInfoBuilder()
|
||||
.title(properties.getTitle())
|
||||
.description(properties.getDescription())
|
||||
.version(properties.getVersion()).build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.orangeforms.common.swagger.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* 配置参数对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Data
|
||||
@ConfigurationProperties("swagger")
|
||||
public class SwaggerProperties {
|
||||
|
||||
/**
|
||||
* 是否开启Swagger。
|
||||
*/
|
||||
private Boolean enabled;
|
||||
|
||||
/**
|
||||
* Swagger解析的基础包路径。
|
||||
**/
|
||||
private String basePackage = "";
|
||||
|
||||
/**
|
||||
* Swagger解析的服务包路径。
|
||||
**/
|
||||
private String serviceBasePackage = "";
|
||||
|
||||
/**
|
||||
* ApiInfo中的标题。
|
||||
**/
|
||||
private String title = "";
|
||||
|
||||
/**
|
||||
* ApiInfo中的描述信息。
|
||||
**/
|
||||
private String description = "";
|
||||
|
||||
/**
|
||||
* ApiInfo中的版本信息。
|
||||
**/
|
||||
private String version = "";
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.orangeforms.common.swagger.plugin;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.github.xiaoymin.knife4j.core.conf.Consts;
|
||||
import javassist.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import springfox.documentation.service.ResolvedMethodParameter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通过字节码方式动态创建接口参数封装对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Slf4j
|
||||
class ByteBuddyUtil {
|
||||
private static final ClassPool CLASS_POOL = ClassPool.getDefault();
|
||||
|
||||
static Class<?> createDynamicModelClass(String name, List<ResolvedMethodParameter> parameters) {
|
||||
String clazzName = Consts.BASE_PACKAGE_PREFIX + name;
|
||||
try {
|
||||
CtClass tmp = CLASS_POOL.getCtClass(clazzName);
|
||||
if (tmp != null) {
|
||||
tmp.detach();
|
||||
}
|
||||
} catch (NotFoundException e) {
|
||||
// 需要吃掉这个异常。
|
||||
}
|
||||
CtClass ctClass = CLASS_POOL.makeClass(clazzName);
|
||||
try {
|
||||
int fieldCount = 0;
|
||||
for (ResolvedMethodParameter dynamicParameter : parameters) {
|
||||
// 因为在调用这个方法之前,这些参数都包含MyRequestBody注解。
|
||||
MyRequestBody myRequestBody =
|
||||
dynamicParameter.findAnnotation(MyRequestBody.class).orElse(null);
|
||||
Assert.notNull(myRequestBody);
|
||||
String fieldName = dynamicParameter.defaultName().isPresent()
|
||||
? dynamicParameter.defaultName().get() : "parameter";
|
||||
if (StringUtils.isNotBlank(myRequestBody.value())) {
|
||||
fieldName = myRequestBody.value();
|
||||
}
|
||||
ctClass.addField(createField(dynamicParameter, fieldName, ctClass));
|
||||
fieldCount++;
|
||||
}
|
||||
if (fieldCount > 0) {
|
||||
return ctClass.toClass();
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static CtField createField(ResolvedMethodParameter parameter, String parameterName, CtClass ctClass)
|
||||
throws NotFoundException, CannotCompileException {
|
||||
CtField field = new CtField(getFieldType(parameter.getParameterType().getErasedType()), parameterName, ctClass);
|
||||
field.setModifiers(Modifier.PUBLIC);
|
||||
return field;
|
||||
}
|
||||
|
||||
private static CtClass getFieldType(Class<?> propetyType) {
|
||||
CtClass fieldType = null;
|
||||
try {
|
||||
if (!propetyType.isAssignableFrom(Void.class)) {
|
||||
fieldType = CLASS_POOL.get(propetyType.getName());
|
||||
} else {
|
||||
fieldType = CLASS_POOL.get(String.class.getName());
|
||||
}
|
||||
} catch (NotFoundException e) {
|
||||
// 抛异常
|
||||
ClassClassPath path = new ClassClassPath(propetyType);
|
||||
CLASS_POOL.insertClassPath(path);
|
||||
try {
|
||||
fieldType = CLASS_POOL.get(propetyType.getName());
|
||||
} catch (NotFoundException e1) {
|
||||
log.error(e1.getMessage(), e1);
|
||||
}
|
||||
}
|
||||
return fieldType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.orangeforms.common.swagger.plugin;
|
||||
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.fasterxml.classmate.TypeResolver;
|
||||
import com.google.common.base.CaseFormat;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
import springfox.documentation.service.ResolvedMethodParameter;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spi.service.OperationModelsProviderPlugin;
|
||||
import springfox.documentation.spi.service.contexts.RequestMappingContext;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 生成参数包装类的插件。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Component
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE + 200)
|
||||
@ConditionalOnProperty(prefix = "swagger", name = "enabled")
|
||||
public class DynamicBodyModelPlugin implements OperationModelsProviderPlugin {
|
||||
|
||||
private final TypeResolver typeResolver;
|
||||
|
||||
public DynamicBodyModelPlugin(TypeResolver typeResolver) {
|
||||
this.typeResolver = typeResolver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(RequestMappingContext context) {
|
||||
List<ResolvedMethodParameter> parameterTypes = context.getParameters();
|
||||
if (CollectionUtils.isEmpty(parameterTypes)) {
|
||||
return;
|
||||
}
|
||||
List<ResolvedMethodParameter> bodyParameter = parameterTypes.stream()
|
||||
.filter(p -> p.hasParameterAnnotation(MyRequestBody.class)).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(bodyParameter)) {
|
||||
return;
|
||||
}
|
||||
String groupName = CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, context.getGroupName());
|
||||
String clazzName = groupName + StringUtils.capitalize(context.getName());
|
||||
Class<?> clazz = ByteBuddyUtil.createDynamicModelClass(clazzName, bodyParameter);
|
||||
if (clazz != null) {
|
||||
context.operationModelsBuilder().addInputParam(typeResolver.resolve(clazz));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supports(DocumentationType delimiter) {
|
||||
// 支持2.0版本
|
||||
return delimiter == DocumentationType.SWAGGER_2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.orangeforms.common.swagger.plugin;
|
||||
|
||||
import com.orangeforms.common.core.annotation.MyRequestBody;
|
||||
import com.google.common.base.CaseFormat;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
import springfox.documentation.builders.ParameterBuilder;
|
||||
import springfox.documentation.schema.ModelRef;
|
||||
import springfox.documentation.service.Parameter;
|
||||
import springfox.documentation.service.ResolvedMethodParameter;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spi.service.OperationBuilderPlugin;
|
||||
import springfox.documentation.spi.service.contexts.OperationContext;
|
||||
import springfox.documentation.spi.service.contexts.ParameterContext;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 构建操作接口参数对象的插件。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2021-06-06
|
||||
*/
|
||||
@Component
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE + 102)
|
||||
@ConditionalOnProperty(prefix = "swagger", name = "enabled")
|
||||
public class DynamicBodyParameterBuilder implements OperationBuilderPlugin {
|
||||
|
||||
@Override
|
||||
public void apply(OperationContext context) {
|
||||
List<ResolvedMethodParameter> methodParameters = context.getParameters();
|
||||
List<Parameter> parameters = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(methodParameters)) {
|
||||
List<ResolvedMethodParameter> bodyParameter = methodParameters.stream()
|
||||
.filter(p -> p.hasParameterAnnotation(MyRequestBody.class)).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(bodyParameter)) {
|
||||
// 构造model
|
||||
String groupName = CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_CAMEL, context.getGroupName());
|
||||
String clazzName = groupName + StringUtils.capitalize(context.getName());
|
||||
ResolvedMethodParameter methodParameter = bodyParameter.get(0);
|
||||
ParameterContext parameterContext = new ParameterContext(methodParameter,
|
||||
new ParameterBuilder(),
|
||||
context.getDocumentationContext(),
|
||||
context.getGenericsNamingStrategy(),
|
||||
context);
|
||||
Parameter parameter = parameterContext.parameterBuilder()
|
||||
.parameterType("body").modelRef(new ModelRef(clazzName)).name(clazzName).build();
|
||||
parameters.add(parameter);
|
||||
}
|
||||
}
|
||||
context.operationBuilder().parameters(parameters);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supports(DocumentationType delimiter) {
|
||||
return delimiter == DocumentationType.SWAGGER_2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.orangeforms.common.swagger.config.SwaggerAutoConfiguration
|
||||
@@ -21,5 +21,6 @@
|
||||
<module>common-flow</module>
|
||||
<module>common-redis</module>
|
||||
<module>common-sequence</module>
|
||||
<module>common-swagger</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user