mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-17 12:35:07 +08:00
多模块重构 8:bom 模块,尝试公用部分逻辑
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.definition.vo.form;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.oa.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.annotations.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* 请假申请 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class BpmOALeaveBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "请假的开始时间", required = true)
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date startTime;
|
||||
@ApiModelProperty(value = "请假的结束时间", required = true)
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "请假类型", required = true, example = "1", notes = "参见 bpm_oa_type 枚举")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "原因", required = true, example = "阅读芋道源码")
|
||||
private String reason;
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.oa.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.AssertTrue;
|
||||
|
||||
@ApiModel("请假申请创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmOALeaveCreateReqVO extends BpmOALeaveBaseVO {
|
||||
|
||||
@AssertTrue(message = "结束时间,需要在开始时间之后")
|
||||
public boolean isEndTimeValid() {
|
||||
return !getEndTime().before(getStartTime());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.oa.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.annotations.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("请假申请分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmOALeavePageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "状态", example = "1", notes = "参见 bpm_process_instance_result 枚举")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "请假类型", example = "1", notes = "参见 bpm_oa_type")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "原因", example = "阅读芋道源码", notes = "模糊匹配")
|
||||
private String reason;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "开始申请时间")
|
||||
private Date beginCreateTime;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@ApiModelProperty(value = "结束申请时间")
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.oa.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("请假申请 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmOALeaveRespVO extends BpmOALeaveBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "请假表单主键", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 bpm_process_instance_result 枚举")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "申请时间", required = true)
|
||||
@NotNull(message = "申请时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "流程id")
|
||||
private String processInstanceId;
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.activity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("流程活动的 Response VO")
|
||||
@Data
|
||||
public class BpmActivityRespVO {
|
||||
|
||||
@ApiModelProperty(value = "流程活动的标识", required = true, example = "1024")
|
||||
private String key;
|
||||
@ApiModelProperty(value = "流程活动的类型", required = true, example = "StartEvent")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "流程活动的开始时间", required = true)
|
||||
private Date startTime;
|
||||
@ApiModelProperty(value = "流程活动的结束时间", required = true)
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "关联的流程任务的编号", example = "2048", notes = "关联的流程任务,只有 UserTask 等类型才有")
|
||||
private String taskId;
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.instance;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("流程实例的取消 Request VO")
|
||||
@Data
|
||||
public class BpmProcessInstanceCancelReqVO {
|
||||
|
||||
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "流程实例的编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "取消原因", required = true, example = "不请假了!")
|
||||
@NotEmpty(message = "取消原因不能为空")
|
||||
private String reason;
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.instance;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("流程实例的创建 Request VO")
|
||||
@Data
|
||||
public class BpmProcessInstanceCreateReqVO {
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "流程定义编号不能为空")
|
||||
private String processDefinitionId;
|
||||
|
||||
@ApiModelProperty(value = "变量实例")
|
||||
private Map<String, Object> variables;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.instance;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("流程实例的分页 Item Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmProcessInstanceMyPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "流程名称", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", example = "2048")
|
||||
private String processDefinitionId;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的状态", notes = "参见 bpm_process_instance_status", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的结果", notes = "参见 bpm_process_instance_result", example = "2")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "开始的创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "结束的创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.instance;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel("流程实例的分页 Item Response VO")
|
||||
@Data
|
||||
public class BpmProcessInstancePageItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", required = true, example = "2048")
|
||||
private String processDefinitionId;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "提交时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", required = true)
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 当前任务
|
||||
*/
|
||||
private List<Task> tasks;
|
||||
|
||||
@ApiModel("流程任务")
|
||||
@Data
|
||||
public static class Task {
|
||||
|
||||
@ApiModelProperty(value = "流程任务的编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "任务名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.instance;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("流程实例的 Response VO")
|
||||
@Data
|
||||
public class BpmProcessInstanceRespVO {
|
||||
|
||||
@ApiModelProperty(value = "流程实例的编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "流程名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "流程分类", required = true, notes = "参见 bpm_model_category 数据字典", example = "1")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的状态", required = true, notes = "参见 bpm_process_instance_status", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "流程实例的结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
|
||||
private Integer result;
|
||||
|
||||
@ApiModelProperty(value = "提交时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", required = true)
|
||||
private Date endTime;
|
||||
|
||||
@ApiModelProperty(value = "提交的表单值", required = true)
|
||||
private Map<String, Object> formVariables;
|
||||
|
||||
@ApiModelProperty(value = "业务的唯一标识", example = "1", notes = "例如说,请假申请的编号")
|
||||
private String businessKey;
|
||||
|
||||
/**
|
||||
* 发起流程的用户
|
||||
*/
|
||||
private User startUser;
|
||||
|
||||
/**
|
||||
* 流程定义
|
||||
*/
|
||||
private ProcessDefinition processDefinition;
|
||||
|
||||
@ApiModel("用户信息")
|
||||
@Data
|
||||
public static class User {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "1")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "用户昵称", required = true, example = "芋艿")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "部门编号", required = true, example = "1")
|
||||
private Long deptId;
|
||||
@ApiModelProperty(value = "部门名称", required = true, example = "研发部")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
|
||||
@ApiModel("流程定义信息")
|
||||
@Data
|
||||
public static class ProcessDefinition {
|
||||
|
||||
@ApiModelProperty(value = "编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "表单类型", notes = "参见 bpm_model_form_type 数据字典", example = "1")
|
||||
private Integer formType;
|
||||
@ApiModelProperty(value = "表单编号", example = "1024", notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private Long formId;
|
||||
@ApiModelProperty(value = "表单的配置", required = true,
|
||||
notes = "JSON 字符串。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formConf;
|
||||
@ApiModelProperty(value = "表单项的数组", required = true,
|
||||
notes = "JSON 字符串的数组。在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private List<String> formFields;
|
||||
@ApiModelProperty(value = "自定义表单的提交路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/create",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomCreatePath;
|
||||
@ApiModelProperty(value = "自定义表单的查看路径,使用 Vue 的路由地址", example = "/bpm/oa/leave/view",
|
||||
notes = "在表单类型为 {@link BpmModelFormTypeEnum#CUSTOM} 时,必须非空")
|
||||
private String formCustomViewPath;
|
||||
|
||||
@ApiModelProperty(value = "BPMN XML", required = true)
|
||||
private String bpmnXml;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel("通过流程任务的 Request VO")
|
||||
@Data
|
||||
public class BpmTaskApproveReqVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "任务编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "审批意见", required = true, example = "不错不错!")
|
||||
@NotEmpty(message = "审批意见不能为空")
|
||||
private String comment;
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("流程任务的 Done 已完成的分页项 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskDonePageItemRespVO extends BpmTaskTodoPageItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "结束时间", required = true)
|
||||
private Date endTime;
|
||||
@ApiModelProperty(value = "持续时间", required = true, example = "1000")
|
||||
private Long durationInMillis;
|
||||
|
||||
@ApiModelProperty(value = "任务结果", required = true, notes = "参见 bpm_process_instance_result", example = "2")
|
||||
private Integer result;
|
||||
@ApiModelProperty(value = "审批建议", required = true, example = "不请假了!")
|
||||
private String comment;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("流程任务的 Done 已办的分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskDonePageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "流程任务名", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "开始的创建收间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "结束的创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@ApiModel("不通过流程任务的 Request VO")
|
||||
@Data
|
||||
public class BpmTaskRejectReqVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "任务编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "审批意见", required = true, example = "不错不错!")
|
||||
@NotEmpty(message = "审批意见不能为空")
|
||||
private String comment;
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ApiModel("流程任务的 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskRespVO extends BpmTaskDonePageItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "任务定义的标识", required = true, example = "user-001")
|
||||
private String definitionKey;
|
||||
|
||||
/**
|
||||
* 审核的用户信息
|
||||
*/
|
||||
private User assigneeUser;
|
||||
|
||||
@ApiModel("用户信息")
|
||||
@Data
|
||||
public static class User {
|
||||
|
||||
@ApiModelProperty(value = "用户编号", required = true, example = "1")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "用户昵称", required = true, example = "芋艿")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "部门编号", required = true, example = "1")
|
||||
private Long deptId;
|
||||
@ApiModelProperty(value = "部门名称", required = true, example = "研发部")
|
||||
private String deptName;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("流程任务的 Running 进行中的分页项 Response VO")
|
||||
@Data
|
||||
public class BpmTaskTodoPageItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "任务名字", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "接收时间", required = true)
|
||||
private Date claimTime;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "激活状态", required = true, example = "1", notes = "参见 SuspensionState 枚举")
|
||||
private Integer suspensionState;
|
||||
|
||||
/**
|
||||
* 所属流程实例
|
||||
*/
|
||||
private ProcessInstance processInstance;
|
||||
|
||||
@Data
|
||||
@ApiModel("流程实例")
|
||||
public static class ProcessInstance {
|
||||
|
||||
@ApiModelProperty(value = "流程实例编号", required = true, example = "1024")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "流程实例名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "发起人的用户编号", required = true, example = "1024")
|
||||
private Long startUserId;
|
||||
|
||||
@ApiModelProperty(value = "发起人的用户昵称", required = true, example = "芋艿")
|
||||
private String startUserNickname;
|
||||
|
||||
@ApiModelProperty(value = "流程定义的编号", required = true, example = "2048")
|
||||
private String processDefinitionId;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.task;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("流程任务的 TODO 待办的分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BpmTaskTodoPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "流程任务名", example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "开始的创建收间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "结束的创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endCreateTime;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.bpm.controller.task.vo.task;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
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;
|
||||
|
||||
@ApiModel("流程任务的更新负责人的 Request VO")
|
||||
@Data
|
||||
public class BpmTaskUpdateAssigneeReqVO {
|
||||
|
||||
@ApiModelProperty(value = "任务编号", required = true, example = "1024")
|
||||
@NotEmpty(message = "任务编号不能为空")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "新审批人的用户编号", required = true, example = "2048")
|
||||
@NotNull(message = "新审批人的用户编号不能为空")
|
||||
private Long assigneeUserId;
|
||||
|
||||
}
|
@ -5,7 +5,6 @@ import cn.iocoder.yudao.module.bpm.controller.definition.vo.form.BpmFormRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.definition.vo.form.BpmFormSimpleRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.definition.vo.form.BpmFormUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
|
||||
import cn.iocoder.yudao.module.bpm.api.form.dto.BpmFormDTO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
@ -28,10 +27,6 @@ public interface BpmFormConvert {
|
||||
|
||||
BpmFormRespVO convert(BpmFormDO bean);
|
||||
|
||||
BpmFormDTO convert1(BpmFormDO bean);
|
||||
|
||||
List<BpmFormDTO> convertList(List<BpmFormDO> list);
|
||||
|
||||
List<BpmFormSimpleRespVO> convertList2(List<BpmFormDO> list);
|
||||
|
||||
PageResult<BpmFormRespVO> convertPage(PageResult<BpmFormDO> page);
|
||||
|
@ -6,7 +6,6 @@ import cn.iocoder.yudao.module.bpm.controller.definition.vo.group.BpmUserGroupCr
|
||||
import cn.iocoder.yudao.module.bpm.controller.definition.vo.group.BpmUserGroupRespVO;
|
||||
import cn.iocoder.yudao.module.bpm.controller.definition.vo.group.BpmUserGroupUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmUserGroupDO;
|
||||
import cn.iocoder.yudao.module.bpm.api.group.dto.BpmUserGroupDTO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
@ -36,5 +35,4 @@ public interface BpmUserGroupConvert {
|
||||
@Named("convertList2")
|
||||
List<BpmUserGroupRespVO> convertList2(List<BpmUserGroupDO> list);
|
||||
|
||||
List<BpmUserGroupDTO> convertList3(List<BpmUserGroupDO> list);
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.bpm.convert.message;
|
||||
|
||||
import cn.iocoder.yudao.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface BpmMessageConvert {
|
||||
|
||||
BpmMessageConvert INSTANCE = Mappers.getMapper(BpmMessageConvert.class);
|
||||
|
||||
SmsSendSingleToUserReqDTO convert(Long userId, String templateCode, Map<String, Object> templateParams);
|
||||
|
||||
}
|
@ -0,0 +1 @@
|
||||
package cn.iocoder.yudao.module.bpm.convert.oa;
|
@ -0,0 +1 @@
|
||||
package cn.iocoder.yudao.module.bpm.convert.task;
|
@ -1,15 +1,12 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.bpm.enums.definition.BpmModelFormTypeEnum;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmModelFormTypeEnum;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.*;
|
||||
import org.activiti.engine.repository.Model;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -36,13 +33,13 @@ public class BpmProcessDefinitionExtDO extends BaseDO {
|
||||
/**
|
||||
* 流程定义的编号
|
||||
*
|
||||
* 关联 {@link ProcessDefinition#getId()}
|
||||
* 关联 ProcessDefinition 的 id 属性
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程模型的编号
|
||||
*
|
||||
* 关联 {@link Model#getId()}
|
||||
* 关联 Model 的 id 属性
|
||||
*/
|
||||
private String modelId;
|
||||
/**
|
||||
|
@ -1,16 +1,13 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.definition;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.bpm.enums.definition.BpmTaskRuleScriptEnum;
|
||||
import cn.iocoder.yudao.adminserver.modules.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.type.JsonLongSetTypeHandler;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskAssignRuleTypeEnum;
|
||||
import cn.iocoder.yudao.module.bpm.enums.definition.BpmTaskRuleScriptEnum;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
import org.activiti.engine.repository.Model;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
import org.activiti.engine.task.Task;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@ -46,19 +43,19 @@ public class BpmTaskAssignRuleDO extends BaseDO {
|
||||
/**
|
||||
* 流程模型编号
|
||||
*
|
||||
* 关联 {@link Model#getId()}
|
||||
* 关联 Model 的 id 属性
|
||||
*/
|
||||
private String modelId;
|
||||
/**
|
||||
* 流程定义编号
|
||||
*
|
||||
* 关联 {@link ProcessDefinition#getId()}
|
||||
* 关联 ProcessDefinition 的 id 属性
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程任务的定义 Key
|
||||
*
|
||||
* 关联 {@link Task#getTaskDefinitionKey()}
|
||||
* 关联 Task 的 taskDefinitionKey 属性
|
||||
*/
|
||||
private String taskDefinitionKey;
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.oa;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.SysUserDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import org.activiti.engine.runtime.ProcessInstance;
|
||||
|
||||
/**
|
||||
* OA 请假申请 DO
|
||||
@ -32,7 +31,7 @@ public class BpmOALeaveDO extends BaseDO {
|
||||
/**
|
||||
* 申请人的用户编号
|
||||
*
|
||||
* 关联 {@link SysUserDO#getId()}
|
||||
* 关联 AdminUserDO 的 id 属性
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
@ -59,7 +58,7 @@ public class BpmOALeaveDO extends BaseDO {
|
||||
/**
|
||||
* 请假的结果
|
||||
*
|
||||
* 枚举 {@link cn.iocoder.yudao.adminserver.modules.bpm.enums.task.BpmProcessInstanceResultEnum}
|
||||
* 枚举 {@link BpmProcessInstanceResultEnum}
|
||||
* 考虑到简单,所以直接复用了 BpmProcessInstanceResultEnum 枚举,也可以自己定义一个枚举哈
|
||||
*/
|
||||
private Integer result;
|
||||
@ -67,7 +66,7 @@ public class BpmOALeaveDO extends BaseDO {
|
||||
/**
|
||||
* 对应的流程编号
|
||||
*
|
||||
* 关联 {@link ProcessInstance#getId()}
|
||||
* 关联 ProcessInstance 的 id 属性
|
||||
*/
|
||||
private String processInstanceId;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.task;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.bpm.enums.task.BpmProcessInstanceResultEnum;
|
||||
import cn.iocoder.yudao.adminserver.modules.bpm.enums.task.BpmProcessInstanceStatusEnum;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceStatusEnum;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
@ -10,16 +10,13 @@ import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.activiti.engine.history.HistoricProcessInstance;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
import org.activiti.engine.runtime.ProcessInstance;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Bpm 流程实例的拓展表
|
||||
* 主要解决 Activiti {@link ProcessInstance} 和 {@link HistoricProcessInstance} 不支持拓展字段,所以新建拓展表
|
||||
* 主要解决 Activiti ProcessInstance 和 HistoricProcessInstance 不支持拓展字段,所以新建拓展表
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@ -27,9 +24,6 @@ import java.util.Map;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
//@Builder
|
||||
//@NoArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
public class BpmProcessInstanceExtDO extends BaseDO {
|
||||
|
||||
/**
|
||||
@ -40,31 +34,31 @@ public class BpmProcessInstanceExtDO extends BaseDO {
|
||||
/**
|
||||
* 发起流程的用户编号
|
||||
*
|
||||
* 冗余 {@link HistoricProcessInstance#getStartUserId()}
|
||||
* 冗余 HistoricProcessInstance 的 startUserId 属性
|
||||
*/
|
||||
private Long startUserId;
|
||||
/**
|
||||
* 流程实例的名字
|
||||
*
|
||||
* 冗余 {@link ProcessInstance#getName()} 为了筛选
|
||||
* 冗余 ProcessInstance 的 name 属性,用于筛选
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 流程实例的编号
|
||||
*
|
||||
* 关联 {@link ProcessInstance#getId()}
|
||||
* 关联 ProcessInstance 的 id 属性
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 流程定义的编号
|
||||
*
|
||||
* 关联 {@link ProcessDefinition#getId()}
|
||||
* 关联 ProcessDefinition 的 id 属性
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
/**
|
||||
* 流程分类
|
||||
*
|
||||
* 冗余 {@link ProcessDefinition#getCategory()}
|
||||
* 冗余 ProcessDefinition 的 category 属性
|
||||
* 数据字典 bpm_model_category
|
||||
*/
|
||||
private String category;
|
||||
@ -83,7 +77,7 @@ public class BpmProcessInstanceExtDO extends BaseDO {
|
||||
/**
|
||||
* 结束时间
|
||||
*
|
||||
* 冗余 {@link HistoricProcessInstance#getEndTime()}
|
||||
* 冗余 HistoricProcessInstance 的 endTime 属性
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
|
@ -1,21 +1,17 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.dataobject.task;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.bpm.enums.task.BpmProcessInstanceResultEnum;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.activiti.engine.history.HistoricTaskInstance;
|
||||
import org.activiti.engine.repository.ProcessDefinition;
|
||||
import org.activiti.engine.runtime.ProcessInstance;
|
||||
import org.activiti.engine.task.Task;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Bpm 流程任务的拓展表
|
||||
* 主要解决 Activiti {@link Task} 和 {@link HistoricTaskInstance} 不支持拓展字段,所以新建拓展表
|
||||
* 主要解决 Activiti Task 和 HistoricTaskInstance 不支持拓展字段,所以新建拓展表
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@ -23,27 +19,24 @@ import java.util.Date;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
//@Builder
|
||||
//@NoArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
public class BpmTaskExtDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 任务的审批人
|
||||
*
|
||||
* 冗余 {@link Task#getAssignee()}
|
||||
* 冗余 Task 的 assignee 属性
|
||||
*/
|
||||
private Long assigneeUserId;
|
||||
/**
|
||||
* 任务的名字
|
||||
*
|
||||
* 冗余 {@link Task#getName()} 为了筛选
|
||||
* 冗余 Task 的 name 属性,为了筛选
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 任务的编号
|
||||
*
|
||||
* 关联 {@link Task#getId()}
|
||||
* 关联 Task 的 id 属性
|
||||
*/
|
||||
private String taskId;
|
||||
// /**
|
||||
@ -65,20 +58,20 @@ public class BpmTaskExtDO extends BaseDO {
|
||||
/**
|
||||
* 任务的结束时间
|
||||
*
|
||||
* 冗余 {@link HistoricTaskInstance#getEndTime()}
|
||||
* 冗余 HistoricTaskInstance 的 endTime 属性
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 流程实例的编号
|
||||
*
|
||||
* 关联 {@link ProcessInstance#getId()}
|
||||
* 关联 ProcessInstance 的 id 属性
|
||||
*/
|
||||
private String processInstanceId;
|
||||
/**
|
||||
* 流程定义的编号
|
||||
*
|
||||
* 关联 {@link ProcessDefinition#getId()}
|
||||
* 关联 ProcessDefinition 的 id 属性
|
||||
*/
|
||||
private String processDefinitionId;
|
||||
|
||||
|
@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.definition;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BpmProcessDefinitionExtMapper extends BaseMapperX<BpmProcessDefinitionExtDO> {
|
||||
|
||||
default List<BpmProcessDefinitionExtDO> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) {
|
||||
return selectList("process_definition_id", processDefinitionIds);
|
||||
}
|
||||
|
||||
default BpmProcessDefinitionExtDO selectByProcessDefinitionId(String processDefinitionId) {
|
||||
return selectOne("process_definition_id", processDefinitionId);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.definition;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmTaskAssignRuleDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BpmTaskAssignRuleMapper extends BaseMapperX<BpmTaskAssignRuleDO> {
|
||||
|
||||
default List<BpmTaskAssignRuleDO> selectListByProcessDefinitionId(String processDefinitionId,
|
||||
@Nullable String taskDefinitionKey) {
|
||||
return selectList(new QueryWrapperX<BpmTaskAssignRuleDO>()
|
||||
.eq("process_definition_id", processDefinitionId)
|
||||
.eqIfPresent("task_definition_key", taskDefinitionKey));
|
||||
}
|
||||
|
||||
default List<BpmTaskAssignRuleDO> selectListByModelId(String modelId) {
|
||||
return selectList(new QueryWrapperX<BpmTaskAssignRuleDO>()
|
||||
.eq("model_id", modelId)
|
||||
.eq("process_definition_id", BpmTaskAssignRuleDO.PROCESS_DEFINITION_ID_NULL));
|
||||
}
|
||||
|
||||
default BpmTaskAssignRuleDO selectListByModelIdAndTaskDefinitionKey(String modelId,
|
||||
String taskDefinitionKey) {
|
||||
return selectOne(new QueryWrapperX<BpmTaskAssignRuleDO>()
|
||||
.eq("model_id", modelId)
|
||||
.eq("process_definition_id", BpmTaskAssignRuleDO.PROCESS_DEFINITION_ID_NULL)
|
||||
.eq("task_definition_key", taskDefinitionKey));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.oa;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.oa.vo.BpmOALeavePageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 请假申请 Mapper
|
||||
*
|
||||
* @author jason
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Mapper
|
||||
public interface BpmOALeaveMapper extends BaseMapperX<BpmOALeaveDO> {
|
||||
|
||||
default PageResult<BpmOALeaveDO> selectPage(Long userId, BpmOALeavePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<BpmOALeaveDO>()
|
||||
.eqIfPresent(BpmOALeaveDO::getUserId, userId)
|
||||
.eqIfPresent(BpmOALeaveDO::getResult, reqVO.getResult())
|
||||
.eqIfPresent(BpmOALeaveDO::getType, reqVO.getType())
|
||||
.likeIfPresent(BpmOALeaveDO::getReason, reqVO.getReason())
|
||||
.betweenIfPresent(BpmOALeaveDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
|
||||
.orderByDesc(BpmOALeaveDO::getId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.task;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.controller.task.vo.instance.BpmProcessInstanceMyPageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmProcessInstanceExtDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface BpmProcessInstanceExtMapper extends BaseMapperX<BpmProcessInstanceExtDO> {
|
||||
|
||||
default PageResult<BpmProcessInstanceExtDO> selectPage(Long userId, BpmProcessInstanceMyPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new QueryWrapperX<BpmProcessInstanceExtDO>()
|
||||
.eqIfPresent("start_user_id", userId)
|
||||
.likeIfPresent("name", reqVO.getName())
|
||||
.eqIfPresent("process_definition_id", reqVO.getProcessDefinitionId())
|
||||
.eqIfPresent("category", reqVO.getCategory())
|
||||
.eqIfPresent("status", reqVO.getStatus())
|
||||
.eqIfPresent("result", reqVO.getResult())
|
||||
.betweenIfPresent("create_time", reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
|
||||
.orderByDesc("id"));
|
||||
}
|
||||
|
||||
default BpmProcessInstanceExtDO selectByProcessInstanceId(String processDefinitionId) {
|
||||
return selectOne("process_instance_id", processDefinitionId);
|
||||
}
|
||||
|
||||
default void updateByProcessInstanceId(BpmProcessInstanceExtDO updateObj) {
|
||||
update(updateObj, new QueryWrapper<BpmProcessInstanceExtDO>()
|
||||
.eq("process_instance_id", updateObj.getProcessInstanceId()));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cn.iocoder.yudao.module.bpm.dal.mysql.task;
|
||||
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BpmTaskExtMapper extends BaseMapperX<BpmTaskExtDO> {
|
||||
|
||||
default void updateByTaskId(BpmTaskExtDO entity) {
|
||||
update(entity, new LambdaQueryWrapper<BpmTaskExtDO>().eq(BpmTaskExtDO::getTaskId, entity.getTaskId()));
|
||||
}
|
||||
|
||||
default List<BpmTaskExtDO> selectListByTaskIds(Collection<String> taskIds) {
|
||||
return selectList(BpmTaskExtDO::getTaskId, taskIds);
|
||||
}
|
||||
|
||||
default List<BpmTaskExtDO> selectListByProcessInstanceId(String processInstanceId) {
|
||||
return selectList("process_instance_id", processInstanceId);
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.bpm.enums.message;
|
||||
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SysSmsTemplateDO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@ -20,9 +19,8 @@ public enum BpmMessageEnum {
|
||||
/**
|
||||
* 短信模板的标识
|
||||
*
|
||||
* 关联 {@link SysSmsTemplateDO#getCode()}
|
||||
* 关联 SmsTemplateDO 的 code 属性
|
||||
*/
|
||||
private final String smsCode;
|
||||
|
||||
private final String smsTemplateCode;
|
||||
|
||||
}
|
||||
|
@ -46,6 +46,14 @@ public interface BpmUserGroupService {
|
||||
*/
|
||||
BpmUserGroupDO getUserGroup(Long id);
|
||||
|
||||
/**
|
||||
* 获得用户组列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 用户组列表
|
||||
*/
|
||||
List<BpmUserGroupDO> getUserGroupList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得指定状态的用户组列表
|
||||
*
|
||||
@ -70,4 +78,5 @@ public interface BpmUserGroupService {
|
||||
* @param ids 用户组编号数组
|
||||
*/
|
||||
void validUserGroups(Set<Long> ids);
|
||||
|
||||
}
|
||||
|
@ -15,12 +15,13 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.USER_GROUP_NOT_EXISTS;
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 用户组 Service 实现类
|
||||
@ -71,6 +72,11 @@ public class BpmUserGroupServiceImpl implements BpmUserGroupService {
|
||||
return userGroupMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BpmUserGroupDO> getUserGroupList(Collection<Long> ids) {
|
||||
return userGroupMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<BpmUserGroupDO> getUserGroupListByStatus(Integer status) {
|
||||
|
@ -1,13 +1,13 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.message;
|
||||
|
||||
import cn.iocoder.yudao.adminserver.modules.bpm.enums.message.BpmMessageEnum;
|
||||
import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService;
|
||||
import cn.iocoder.yudao.framework.web.config.WebProperties;
|
||||
import cn.iocoder.yudao.module.bpm.convert.message.BpmMessageConvert;
|
||||
import cn.iocoder.yudao.module.bpm.enums.message.BpmMessageEnum;
|
||||
import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceApproveReqDTO;
|
||||
import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenProcessInstanceRejectReqDTO;
|
||||
import cn.iocoder.yudao.module.bpm.service.message.dto.BpmMessageSendWhenTaskCreatedReqDTO;
|
||||
import cn.iocoder.yudao.module.system.service.sms.SysSmsCoreService;
|
||||
import cn.iocoder.yudao.module.system.api.sms.SmsSendApi;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@ -26,18 +26,18 @@ import java.util.Map;
|
||||
public class BpmMessageServiceImpl implements BpmMessageService {
|
||||
|
||||
@Resource
|
||||
private SysSmsCoreService smsCoreService;
|
||||
private SmsSendApi smsSendApi;
|
||||
|
||||
@Value("${yudao.url.admin-ui}")
|
||||
private String adminUiUrl;
|
||||
@Resource
|
||||
private WebProperties webProperties;
|
||||
|
||||
@Override
|
||||
public void sendMessageWhenProcessInstanceApprove(BpmMessageSendWhenProcessInstanceApproveReqDTO reqDTO) {
|
||||
Map<String, Object> templateParams = new HashMap<>();
|
||||
templateParams.put("processInstanceName", reqDTO.getProcessInstanceName());
|
||||
templateParams.put("detailUrl", getProcessInstanceDetailUrl(reqDTO.getProcessInstanceId()));
|
||||
smsCoreService.sendSingleSmsToAdmin(null, reqDTO.getStartUserId(),
|
||||
BpmMessageEnum.PROCESS_INSTANCE_APPROVE.getSmsCode(), templateParams);
|
||||
smsSendApi.sendSingleSmsToAdmin(BpmMessageConvert.INSTANCE.convert(reqDTO.getStartUserId(),
|
||||
BpmMessageEnum.PROCESS_INSTANCE_APPROVE.getSmsTemplateCode(), templateParams));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -46,8 +46,8 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
||||
templateParams.put("processInstanceName", reqDTO.getProcessInstanceName());
|
||||
templateParams.put("comment", reqDTO.getComment());
|
||||
templateParams.put("detailUrl", getProcessInstanceDetailUrl(reqDTO.getProcessInstanceId()));
|
||||
smsCoreService.sendSingleSmsToAdmin(null, reqDTO.getStartUserId(),
|
||||
BpmMessageEnum.PROCESS_INSTANCE_REJECT.getSmsCode(), templateParams);
|
||||
smsSendApi.sendSingleSmsToAdmin(BpmMessageConvert.INSTANCE.convert(reqDTO.getStartUserId(),
|
||||
BpmMessageEnum.PROCESS_INSTANCE_REJECT.getSmsTemplateCode(), templateParams));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -57,12 +57,12 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
||||
templateParams.put("taskName", reqDTO.getTaskName());
|
||||
templateParams.put("startUserNickname", reqDTO.getStartUserNickname());
|
||||
templateParams.put("detailUrl", getProcessInstanceDetailUrl(reqDTO.getProcessInstanceId()));
|
||||
smsCoreService.sendSingleSmsToAdmin(null, reqDTO.getAssigneeUserId(),
|
||||
BpmMessageEnum.TASK_ASSIGNED.getSmsCode(), templateParams);
|
||||
smsSendApi.sendSingleSmsToAdmin(BpmMessageConvert.INSTANCE.convert(reqDTO.getStartUserId(),
|
||||
BpmMessageEnum.TASK_ASSIGNED.getSmsTemplateCode(), templateParams));
|
||||
}
|
||||
|
||||
private String getProcessInstanceDetailUrl(String taskId) {
|
||||
return adminUiUrl + "bpm/process-instance/detail?id=" + taskId;
|
||||
return webProperties.getAdminUi().getUrl() + "/bpm/process-instance/detail?id=" + taskId;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class BpmMessageSendWhenTaskCreatedReqDTO {
|
||||
@NotEmpty(message = "流程实例的名字不能为空")
|
||||
private String processInstanceName;
|
||||
@NotEmpty(message = "发起人的用户编号")
|
||||
private String startUserId;
|
||||
private Long startUserId;
|
||||
@NotEmpty(message = "发起人的昵称")
|
||||
private String startUserNickname;
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.task;
|
Reference in New Issue
Block a user