批量将 required = true 替换成 requiredMode = Schema.RequiredMode.REQUIRED

This commit is contained in:
YunaiV
2023-07-26 20:52:15 +08:00
parent 6331054678
commit 9e01afc1da
197 changed files with 882 additions and 935 deletions

View File

@@ -1,8 +1,9 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* 动态表单 Base VO提供给添加、修改、详细的子 VO 使用
@@ -11,15 +12,15 @@ import javax.validation.constraints.*;
@Data
public class BpmFormBaseVO {
@Schema(description = "表单名称", required = true, example = "芋道")
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotNull(message = "表单名称不能为空")
private String name;
@Schema(description = "表单状态,参见 CommonStatusEnum 枚举", required = true, example = "1")
@Schema(description = "表单状态-参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "表单状态不能为空")
private Integer status;
@Schema(description = "备注", example = "我是备注")
private String remark;
}
}

View File

@@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.List;
@@ -12,12 +14,12 @@ import java.util.List;
@ToString(callSuper = true)
public class BpmFormCreateReqVO extends BpmFormBaseVO {
@Schema(description = "表单的配置,JSON 字符串", required = true)
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单的配置不能为空")
private String conf;
@Schema(description = "表单项的数组,JSON 字符串的数组", required = true)
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单项的数组不能为空")
private List<String> fields;
}
}

View File

@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -16,4 +15,4 @@ public class BpmFormPageReqVO extends PageParam {
@Schema(description = "表单名称", example = "芋道")
private String name;
}
}

View File

@@ -1,6 +1,4 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -16,18 +14,18 @@ import java.util.List;
@ToString(callSuper = true)
public class BpmFormRespVO extends BpmFormBaseVO {
@Schema(description = "表单编号", required = true, example = "1024")
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "表单的配置,JSON 字符串", required = true)
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单的配置不能为空")
private String conf;
@Schema(description = "表单项的数组,JSON 字符串的数组", required = true)
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单项的数组不能为空")
private List<String> fields;
@Schema(description = "创建时间", required = true)
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -8,10 +7,10 @@ import lombok.Data;
@Data
public class BpmFormSimpleRespVO {
@Schema(description = "表单编号", required = true, example = "1024")
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "表单名称", required = true, example = "芋道")
@Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name;
}
}

View File

@@ -1,8 +1,11 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.form;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.List;
@Schema(description = "管理后台 - 动态表单更新 Request VO")
@@ -11,16 +14,16 @@ import java.util.List;
@ToString(callSuper = true)
public class BpmFormUpdateReqVO extends BpmFormBaseVO {
@Schema(description = "表单编号", required = true, example = "1024")
@Schema(description = "表单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "表单编号不能为空")
private Long id;
@Schema(description = "表单的配置,JSON 字符串", required = true)
@Schema(description = "表单的配置-JSON 字符串", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单的配置不能为空")
private String conf;
@Schema(description = "表单项的数组,JSON 字符串的数组", required = true)
@Schema(description = "表单项的数组-JSON 字符串的数组", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "表单项的数组不能为空")
private List<String> fields;
}
}

View File

@@ -1,9 +1,10 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Set;
/**
* 用户组 Base VO提供给添加、修改、详细的子 VO 使用
@@ -12,20 +13,20 @@ import javax.validation.constraints.*;
@Data
public class BpmUserGroupBaseVO {
@Schema(description = "组名", required = true, example = "芋道")
@Schema(description = "组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotNull(message = "组名不能为空")
private String name;
@Schema(description = "描述", required = true, example = "芋道源码")
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
@NotNull(message = "描述不能为空")
private String description;
@Schema(description = "成员编号数组", required = true, example = "1,2,3")
@Schema(description = "成员编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
@NotNull(message = "成员编号数组不能为空")
private Set<Long> memberUserIds;
@Schema(description = "状态", required = true, example = "1")
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态不能为空")
private Integer status;
}
}

View File

@@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(description = "管理后台 - 用户组创建 Request VO")
@Data
@@ -9,4 +11,4 @@ import lombok.*;
@ToString(callSuper = true)
public class BpmUserGroupCreateReqVO extends BpmUserGroupBaseVO {
}
}

View File

@@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.date.DateUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -27,4 +26,4 @@ public class BpmUserGroupPageReqVO extends PageParam {
@Schema(description = "创建时间")
private LocalDateTime[] createTime;
}
}

View File

@@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.time.LocalDateTime;
@@ -11,10 +13,10 @@ import java.time.LocalDateTime;
@ToString(callSuper = true)
public class BpmUserGroupRespVO extends BpmUserGroupBaseVO {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "创建时间", required = true)
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -12,10 +11,10 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public class BpmUserGroupSimpleRespVO {
@Schema(description = "用户组编号", required = true, example = "1024")
@Schema(description = "用户组编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "用户组名字", required = true, example = "芋道")
@Schema(description = "用户组名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name;
}
}

View File

@@ -1,8 +1,11 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 用户组更新 Request VO")
@Data
@@ -10,8 +13,8 @@ import javax.validation.constraints.*;
@ToString(callSuper = true)
public class BpmUserGroupUpdateReqVO extends BpmUserGroupBaseVO {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "编号不能为空")
private Long id;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -9,14 +8,14 @@ import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 流程模型的导入 Request VO,相比流程模型的新建来说,只是多了一个 bpmnFile 文件")
@Schema(description = "管理后台 - 流程模型的导入 Request VO 相比流程模型的新建来说,只是多了一个 bpmnFile 文件")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmModeImportReqVO extends BpmModelCreateReqVO {
@Schema(description = "BPMN 文件", required = true)
@Schema(description = "BPMN 文件", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "BPMN 文件不能为空")
private MultipartFile bpmnFile;
}
}

View File

@@ -1,5 +1,4 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -12,28 +11,30 @@ import javax.validation.constraints.NotEmpty;
@Data
public class BpmModelBaseVO {
@Schema(description = "流程标识", required = true, example = "process_yudao")
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_yudao")
@NotEmpty(message = "流程标识不能为空")
private String key;
@Schema(description = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotEmpty(message = "流程名称不能为空")
private String name;
@Schema(description = "流程描述", example = "我是描述")
private String description;
@Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1")
@NotEmpty(message = "流程分类不能为空")
private String category;
@Schema(description = "表单类型,参见 bpm_model_form_type 数据字典", example = "1")
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType;
@Schema(description = "表单编号,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
private Long formId;
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/create")
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/create")
private String formCustomCreatePath;
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/view" )
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/view")
private String formCustomViewPath;
}
}

View File

@@ -1,10 +1,7 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotEmpty;
@@ -12,15 +9,15 @@ import javax.validation.constraints.NotEmpty;
@Data
public class BpmModelCreateReqVO {
@Schema(description = "流程标识", required = true, example = "process_yudao")
@Schema(description = "流程标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "process_yudao")
@NotEmpty(message = "流程标识不能为空")
private String key;
@Schema(description = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotEmpty(message = "流程名称不能为空")
private String name;
@Schema(description = "流程描述", example = "我是描述")
private String description;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -14,13 +13,13 @@ import java.time.LocalDateTime;
@ToString(callSuper = true)
public class BpmModelPageItemRespVO extends BpmModelBaseVO {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "表单名字", example = "请假表单")
private String formName;
@Schema(description = "创建时间", required = true)
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
/**
@@ -32,18 +31,18 @@ public class BpmModelPageItemRespVO extends BpmModelBaseVO {
@Data
public static class ProcessDefinition {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "版本", required = true, example = "1")
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer version;
@Schema(description = "部署时间", required = true)
@Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime deploymentTime;
@Schema(description = "中断状态,参见 SuspensionState 枚举", required = true, example = "1")
@Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer suspensionState;
}
}
}

View File

@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -14,13 +13,13 @@ import lombok.ToString;
@ToString(callSuper = true)
public class BpmModelPageReqVO extends PageParam {
@Schema(description = "标识,精准匹配", example = "process1641042089407")
@Schema(description = "标识-精准匹配", example = "process1641042089407")
private String key;
@Schema(description = "名字,精准匹配", example = "芋道")
@Schema(description = "名字-模糊匹配", example = "芋道")
private String name;
@Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1")
private String category;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -14,13 +13,13 @@ import java.time.LocalDateTime;
@ToString(callSuper = true)
public class BpmModelRespVO extends BpmModelBaseVO {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "BPMN XML", required = true)
@Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED)
private String bpmnXml;
@Schema(description = "创建时间", required = true)
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -10,7 +9,7 @@ import javax.validation.constraints.NotEmpty;
@Data
public class BpmModelUpdateReqVO {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "编号不能为空")
private String id;
@@ -20,19 +19,21 @@ public class BpmModelUpdateReqVO {
@Schema(description = "流程描述", example = "我是描述")
private String description;
@Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1")
private String category;
@Schema(description = "BPMN XML", required = true)
@Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED)
private String bpmnXml;
@Schema(description = "表单类型,参见 bpm_model_form_type 数据字典", example = "1")
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType;
@Schema(description = "表单编号,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
private Long formId;
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/create")
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/create")
private String formCustomCreatePath;
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/view" )
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/view")
private String formCustomViewPath;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.model;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -10,12 +9,12 @@ import javax.validation.constraints.NotNull;
@Data
public class BpmModelUpdateStateReqVO {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "编号不能为空")
private String id;
@Schema(description = "状态,见 SuspensionState 枚举", required = true, example = "1")
@Schema(description = "状态-见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态不能为空")
private Integer state;
}
}

View File

@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -13,7 +12,7 @@ import lombok.ToString;
@EqualsAndHashCode(callSuper = true)
public class BpmProcessDefinitionListReqVO extends PageParam {
@Schema(description = "中断状态,参见 SuspensionState 枚举", example = "1")
@Schema(description = "中断状态-参见 SuspensionState 枚举", example = "1")
private Integer suspensionState;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -17,7 +16,7 @@ public class BpmProcessDefinitionPageItemRespVO extends BpmProcessDefinitionResp
@Schema(description = "表单名字", example = "请假表单")
private String formName;
@Schema(description = "部署时间", required = true)
@Schema(description = "部署时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime deploymentTime;
}
}

View File

@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -13,7 +12,7 @@ import lombok.ToString;
@EqualsAndHashCode(callSuper = true)
public class BpmProcessDefinitionPageReqVO extends PageParam {
@Schema(description = "标识,精准匹配", example = "process1641042089407")
@Schema(description = "标识-精准匹配", example = "process1641042089407")
private String key;
}
}

View File

@@ -1,48 +1,48 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.process;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
@Schema(description = "管理后台 - 流程定义 Response VO")
@Data
public class BpmProcessDefinitionRespVO {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "版本", required = true, example = "1")
@Schema(description = "版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer version;
@Schema(description = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
@NotEmpty(message = "流程名称不能为空")
private String name;
@Schema(description = "流程描述", example = "我是描述")
private String description;
@Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1")
@NotEmpty(message = "流程分类不能为空")
private String category;
@Schema(description = "表单类型,参见 bpm_model_form_type 数据字典", example = "1")
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType;
@Schema(description = "表单编号,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
private Long formId;
@Schema(description = "表单的配置,JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true )
@Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
private String formConf;
@Schema(description = "表单项的数组,JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true )
@Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
private List<String> formFields;
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/create" )
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/create")
private String formCustomCreatePath;
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/view")
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/view")
private String formCustomViewPath;
@Schema(description = "中断状态,参见 SuspensionState 枚举", required = true, example = "1")
@Schema(description = "中断状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer suspensionState;
}
}

View File

@@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Set;
@@ -14,12 +13,12 @@ import java.util.Set;
@Data
public class BpmTaskAssignRuleBaseVO {
@Schema(description = "规则类型", required = true, example = "bpm_task_assign_rule_type")
@Schema(description = "规则类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "bpm_task_assign_rule_type")
@NotNull(message = "规则类型不能为空")
private Integer type;
@Schema(description = "规则值数组", required = true, example = "1,2,3")
@Schema(description = "规则值数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1,2,3")
@NotNull(message = "规则值数组不能为空")
private Set<Long> options;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -14,12 +13,12 @@ import javax.validation.constraints.NotEmpty;
@ToString(callSuper = true)
public class BpmTaskAssignRuleCreateReqVO extends BpmTaskAssignRuleBaseVO {
@Schema(description = "流程模型的编号", required = true, example = "1024")
@Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "流程模型的编号不能为空")
private String modelId;
@Schema(description = "流程任务定义的编号", required = true, example = "2048")
@Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
@NotEmpty(message = "流程任务定义的编号不能为空")
private String taskDefinitionKey;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -12,18 +11,18 @@ import lombok.ToString;
@ToString(callSuper = true)
public class BpmTaskAssignRuleRespVO extends BpmTaskAssignRuleBaseVO {
@Schema(description = "任务分配规则的编号", required = true, example = "1024")
@Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "流程模型的编号", required = true, example = "2048")
@Schema(description = "流程模型的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private String modelId;
@Schema(description = "流程定义的编号", required = true, example = "4096")
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096")
private String processDefinitionId;
@Schema(description = "流程任务定义的编号", required = true, example = "2048")
@Schema(description = "流程任务定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private String taskDefinitionKey;
@Schema(description = "流程任务定义的名字", required = true, example = "关注芋道")
@Schema(description = "流程任务定义的名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "关注芋道")
private String taskDefinitionName;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.rule;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -14,8 +13,8 @@ import javax.validation.constraints.NotNull;
@ToString(callSuper = true)
public class BpmTaskAssignRuleUpdateReqVO extends BpmTaskAssignRuleBaseVO {
@Schema(description = "任务分配规则的编号", required = true, example = "1024")
@Schema(description = "任务分配规则的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "任务分配规则的编号不能为空")
private Long id;
}
}

View File

@@ -16,19 +16,19 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data
public class BpmOALeaveBaseVO {
@Schema(description = "请假的开始时间", required = true)
@Schema(description = "请假的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开始时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime startTime;
@Schema(description = "请假的结束时间", required = true)
@Schema(description = "请假的结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "结束时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endTime;
@Schema(description = "请假类型,参见 bpm_oa_type 枚举", required = true, example = "1")
@Schema(description = "请假类型-参见 bpm_oa_type 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer type;
@Schema(description = "原因", required = true, example = "阅读芋道源码")
@Schema(description = "原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "阅读芋道源码")
private String reason;
}
}

View File

@@ -1,5 +1,4 @@
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -18,5 +17,4 @@ public class BpmOALeaveCreateReqVO extends BpmOALeaveBaseVO {
return !getEndTime().isBefore(getStartTime());
}
}

View File

@@ -1,11 +1,14 @@
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 请假申请分页 Request VO")
@@ -14,17 +17,17 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ToString(callSuper = true)
public class BpmOALeavePageReqVO extends PageParam {
@Schema(description = "状态,参见 bpm_process_instance_result 枚举", example = "1")
@Schema(description = "状态-参见 bpm_process_instance_result 枚举", example = "1")
private Integer result;
@Schema(description = "请假类型,参见 bpm_oa_type", example = "1")
@Schema(description = "请假类型-参见 bpm_oa_type", example = "1")
private Integer type;
@Schema(description = "原因,模糊匹配", example = "阅读芋道源码")
@Schema(description = "原因-模糊匹配", example = "阅读芋道源码")
private String reason;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@Schema(description = "申请时间")
private Date[] createTime;
private LocalDateTime[] createTime;
}
}

View File

@@ -1,7 +1,9 @@
package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
@@ -15,13 +17,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ToString(callSuper = true)
public class BpmOALeaveRespVO extends BpmOALeaveBaseVO {
@Schema(description = "请假表单主键", required = true, example = "1024")
@Schema(description = "请假表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "状态,参见 bpm_process_instance_result 枚举", required = true, example = "1")
@Schema(description = "状态-参见 bpm_process_instance_result 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer result;
@Schema(description = "申请时间", required = true)
@Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "申请时间不能为空")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime createTime;
@@ -29,4 +31,4 @@ public class BpmOALeaveRespVO extends BpmOALeaveBaseVO {
@Schema(description = "流程id")
private String processInstanceId;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.activity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -10,17 +9,17 @@ import java.time.LocalDateTime;
@Data
public class BpmActivityRespVO {
@Schema(description = "流程活动的标识", required = true, example = "1024")
@Schema(description = "流程活动的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String key;
@Schema(description = "流程活动的类型", required = true, example = "StartEvent")
@Schema(description = "流程活动的类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "StartEvent")
private String type;
@Schema(description = "流程活动的开始时间", required = true)
@Schema(description = "流程活动的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime startTime;
@Schema(description = "流程活动的结束时间", required = true)
@Schema(description = "流程活动的结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime;
@Schema(description = "关联的流程任务的编号,关联的流程任务,只有 UserTask 等类型才有", example = "2048")
@Schema(description = "关联的流程任务的编号-关联的流程任务,只有 UserTask 等类型才有", example = "2048")
private String taskId;
}
}

View File

@@ -1,23 +1,20 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;
@Schema(description = "管理后台 - 流程实例的取消 Request VO")
@Data
public class BpmProcessInstanceCancelReqVO {
@Schema(description = "流程实例的编号", required = true, example = "1024")
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "流程实例的编号不能为空")
private String id;
@Schema(description = "取消原因", required = true, example = "不请假了!")
@Schema(description = "取消原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!")
@NotEmpty(message = "取消原因不能为空")
private String reason;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -11,11 +10,11 @@ import java.util.Map;
@Data
public class BpmProcessInstanceCreateReqVO {
@Schema(description = "流程定义的编号", required = true, example = "1024")
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "流程定义编号不能为空")
private String processDefinitionId;
@Schema(description = "变量实例")
private Map<String, Object> variables;
}
}

View File

@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -24,17 +23,17 @@ public class BpmProcessInstanceMyPageReqVO extends PageParam {
@Schema(description = "流程定义的编号", example = "2048")
private String processDefinitionId;
@Schema(description = "流程实例的状态,参见 bpm_process_instance_status", example = "1")
@Schema(description = "流程实例的状态-参见 bpm_process_instance_status", example = "1")
private Integer status;
@Schema(description = "流程实例的结果,参见 bpm_process_instance_result", example = "2")
@Schema(description = "流程实例的结果-参见 bpm_process_instance_result", example = "2")
private Integer result;
@Schema(description = "流程分类,参见 bpm_model_category 数据字典", example = "1")
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", example = "1")
private String category;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -11,28 +10,28 @@ import java.util.List;
@Data
public class BpmProcessInstancePageItemRespVO {
@Schema(description = "流程实例的编号", required = true, example = "1024")
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name;
@Schema(description = "流程定义的编号", required = true, example = "2048")
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private String processDefinitionId;
@Schema(description = "流程分类,参见 bpm_model_category 数据字典", required = true, example = "1")
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private String category;
@Schema(description = "流程实例的状态,参见 bpm_process_instance_status", required = true, example = "1")
@Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status;
@Schema(description = "流程实例的结果,参见 bpm_process_instance_result", required = true, example = "2")
@Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Integer result;
@Schema(description = "提交时间", required = true)
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "结束时间", required = true)
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime;
/**
@@ -44,12 +43,12 @@ public class BpmProcessInstancePageItemRespVO {
@Data
public static class Task {
@Schema(description = "流程任务的编号", required = true, example = "1024")
@Schema(description = "流程任务的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "任务名称", required = true, example = "芋道")
@Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name;
}
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -12,31 +11,31 @@ import java.util.Map;
@Data
public class BpmProcessInstanceRespVO {
@Schema(description = "流程实例的编号", required = true, example = "1024")
@Schema(description = "流程实例的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "流程名称", required = true, example = "芋道")
@Schema(description = "流程名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name;
@Schema(description = "流程分类,参见 bpm_model_category 数据字典", required = true, example = "1")
@Schema(description = "流程分类-参见 bpm_model_category 数据字典", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private String category;
@Schema(description = "流程实例的状态,参见 bpm_process_instance_status", required = true, example = "1")
@Schema(description = "流程实例的状态-参见 bpm_process_instance_status", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status;
@Schema(description = "流程实例的结果,参见 bpm_process_instance_result", required = true, example = "2")
@Schema(description = "流程实例的结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Integer result;
@Schema(description = "提交时间", required = true)
@Schema(description = "提交时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "结束时间", required = true)
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime;
@Schema(description = "提交的表单值", required = true)
@Schema(description = "提交的表单值", requiredMode = Schema.RequiredMode.REQUIRED)
private Map<String, Object> formVariables;
@Schema(description = "业务的唯一标识,例如说,请假申请的编号", example = "1")
@Schema(description = "业务的唯一标识-例如说,请假申请的编号", example = "1")
private String businessKey;
/**
@@ -53,14 +52,14 @@ public class BpmProcessInstanceRespVO {
@Data
public static class User {
@Schema(description = "用户编号", required = true, example = "1")
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "用户昵称", required = true, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
private String nickname;
@Schema(description = "部门编号", required = true, example = "1")
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long deptId;
@Schema(description = "部门名称", required = true, example = "研发部")
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
private String deptName;
}
@@ -69,25 +68,27 @@ public class BpmProcessInstanceRespVO {
@Data
public static class ProcessDefinition {
@Schema(description = "编号", required = true, example = "1024")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "表单类型,参见 bpm_model_form_type 数据字典", example = "1")
@Schema(description = "表单类型-参见 bpm_model_form_type 数据字典", example = "1")
private Integer formType;
@Schema(description = "表单编号,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
@Schema(description = "表单编号-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "1024")
private Long formId;
@Schema(description = "表单的配置,JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true)
@Schema(description = "表单的配置-JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
private String formConf;
@Schema(description = "表单项的数组,JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", required = true)
@Schema(description = "表单项的数组-JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", requiredMode = Schema.RequiredMode.REQUIRED)
private List<String> formFields;
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/create")
@Schema(description = "自定义表单的提交路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/create")
private String formCustomCreatePath;
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址,在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空", example = "/bpm/oa/leave/view")
@Schema(description = "自定义表单的查看路径,使用 Vue 的路由地址-在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空",
example = "/bpm/oa/leave/view")
private String formCustomViewPath;
@Schema(description = "BPMN XML", required = true)
@Schema(description = "BPMN XML", requiredMode = Schema.RequiredMode.REQUIRED)
private String bpmnXml;
}
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -10,12 +9,12 @@ import javax.validation.constraints.NotEmpty;
@Data
public class BpmTaskApproveReqVO {
@Schema(description = "任务编号", required = true, example = "1024")
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "任务编号不能为空")
private String id;
@Schema(description = "审批意见", required = true, example = "不错不错!")
@Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "不错不错!")
@NotEmpty(message = "审批意见不能为空")
private String reason;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -14,14 +13,14 @@ import java.time.LocalDateTime;
@ToString(callSuper = true)
public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO {
@Schema(description = "结束时间", required = true)
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime;
@Schema(description = "持续时间", required = true, example = "1000")
@Schema(description = "持续时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
private Long durationInMillis;
@Schema(description = "任务结果,参见 bpm_process_instance_result", required = true, example = "2")
@Schema(description = "任务结果-参见 bpm_process_instance_result", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
private Integer result;
@Schema(description = "审批建议", required = true, example = "不请假了!")
@Schema(description = "审批建议", requiredMode = Schema.RequiredMode.REQUIRED, example = "不请假了!")
private String reason;
}
}

View File

@@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@@ -29,4 +28,4 @@ public class BpmTaskDonePageReqVO extends PageParam {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime endCreateTime;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -10,12 +9,12 @@ import javax.validation.constraints.NotEmpty;
@Data
public class BpmTaskRejectReqVO {
@Schema(description = "任务编号", required = true, example = "1024")
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "任务编号不能为空")
private String id;
@Schema(description = "审批意见", required = true, example = "不错不错!")
@Schema(description = "审批意见", requiredMode = Schema.RequiredMode.REQUIRED, example = "不错不错!")
@NotEmpty(message = "审批意见不能为空")
private String reason;
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -12,7 +11,7 @@ import lombok.ToString;
@ToString(callSuper = true)
public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO {
@Schema(description = "任务定义的标识", required = true, example = "user-001")
@Schema(description = "任务定义的标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "user-001")
private String definitionKey;
/**
@@ -24,15 +23,15 @@ public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO {
@Data
public static class User {
@Schema(description = "用户编号", required = true, example = "1")
@Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "用户昵称", required = true, example = "芋艿")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
private String nickname;
@Schema(description = "部门编号", required = true, example = "1")
@Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long deptId;
@Schema(description = "部门名称", required = true, example = "研发部")
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")
private String deptName;
}
}
}

View File

@@ -1,6 +1,5 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -10,19 +9,19 @@ import java.time.LocalDateTime;
@Data
public class BpmTaskTodoPageItemRespVO {
@Schema(description = "任务编号", required = true, example = "1024")
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "任务名字", required = true, example = "芋道")
@Schema(description = "任务名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name;
@Schema(description = "接收时间", required = true)
@Schema(description = "接收时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime claimTime;
@Schema(description = "创建时间", required = true)
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "激活状态,参见 SuspensionState 枚举", required = true, example = "1")
@Schema(description = "激活状态-参见 SuspensionState 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer suspensionState;
/**
@@ -34,21 +33,21 @@ public class BpmTaskTodoPageItemRespVO {
@Schema(description = "流程实例")
public static class ProcessInstance {
@Schema(description = "流程实例编号", required = true, example = "1024")
@Schema(description = "流程实例编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String id;
@Schema(description = "流程实例名称", required = true, example = "芋道")
@Schema(description = "流程实例名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
private String name;
@Schema(description = "发起人的用户编号", required = true, example = "1024")
@Schema(description = "发起人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long startUserId;
@Schema(description = "发起人的用户昵称", required = true, example = "芋艿")
@Schema(description = "发起人的用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
private String startUserNickname;
@Schema(description = "流程定义的编号", required = true, example = "2048")
@Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private String processDefinitionId;
}
}
}

View File

@@ -10,8 +10,6 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 流程任务的 TODO 待办的分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)

View File

@@ -1,11 +1,7 @@
package cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.bytebuddy.implementation.bind.annotation.Empty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@@ -14,12 +10,12 @@ import javax.validation.constraints.NotNull;
@Data
public class BpmTaskUpdateAssigneeReqVO {
@Schema(description = "任务编号", required = true, example = "1024")
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotEmpty(message = "任务编号不能为空")
private String id;
@Schema(description = "新审批人的用户编号", required = true, example = "2048")
@Schema(description = "新审批人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
@NotNull(message = "新审批人的用户编号不能为空")
private Long assigneeUserId;
}
}

View File

@@ -17,12 +17,9 @@ import org.flowable.task.api.Task;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;
import org.springframework.beans.BeanUtils;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Bpm 任务 Convert
@@ -34,37 +31,9 @@ public interface BpmTaskConvert {
BpmTaskConvert INSTANCE = Mappers.getMapper(BpmTaskConvert.class);
/**
* 复制对象
*
* @param source 源 要复制的对象
* @param target 目标 复制到此对象
* @param <T>
*
* @return
*/
public static <T> T copy(Object source, Class<T> target) {
if (source == null || target == null) {
return null;
}
try {
T newInstance = target.newInstance();
BeanUtils.copyProperties(source, newInstance);
return newInstance;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
default <T, K> List<K> copyList(List<T> source, Class<K> target) {
if (null == source || source.isEmpty()) {
return Collections.emptyList();
}
return source.stream().map(e -> copy(e, target)).collect(Collectors.toList());
}
default List<BpmTaskTodoPageItemRespVO> convertList1(List<Task> tasks,
Map<String, ProcessInstance> processInstanceMap, Map<Long, AdminUserRespDTO> userMap) {
Map<String, ProcessInstance> processInstanceMap,
Map<Long, AdminUserRespDTO> userMap) {
return CollectionUtils.convertList(tasks, task -> {
BpmTaskTodoPageItemRespVO respVO = convert1(task);
ProcessInstance processInstance = processInstanceMap.get(task.getProcessInstanceId());