Skip to content

Commit

Permalink
1,解决发起流程时,参数传错的问题
Browse files Browse the repository at this point in the history
2,为所有实体类添加@TableId注解,增加sqlsever的兼容性
  • Loading branch information
hlhutu committed Jun 14, 2023
1 parent c439f3d commit f2467eb
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</el-tabs>

<el-dialog :title="formTitle" width="800px" top="20px" :visible.sync="openItemDl" :close-on-click-modal="false">
<initiate-process ref="processForm" :code="selectForm.id" v-if="openItemDl"></initiate-process>
<initiate-process ref="processForm" :code="selectForm.formId" v-if="openItemDl"></initiate-process>
<span slot="footer" class="dialog-footer">
<el-button @click="openItemDl = false">取 消</el-button>
<el-button type="primary" @click="submitForm">提 交</el-button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package xyz.erupt.flow.bean.entity;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -54,6 +56,7 @@ public class OaProcessActivity {
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField
@TableId(type = IdType.AUTO)
private Long id;

@EruptField(views = @View(title = "节点key"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package xyz.erupt.flow.bean.entity;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand All @@ -16,7 +18,6 @@
import xyz.erupt.annotation.sub_field.ViewType;
import xyz.erupt.annotation.sub_field.sub_edit.Search;
import xyz.erupt.flow.bean.entity.node.OaProcessNode;
import xyz.erupt.jpa.model.BaseModel;

import javax.persistence.*;
import java.util.Date;
Expand All @@ -39,6 +40,7 @@ public class OaProcessActivityHistory {
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField
@TableId(type = IdType.AUTO)
private Long id;

@EruptField(views = @View(title = "节点key"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package xyz.erupt.flow.bean.entity;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -42,6 +44,7 @@ public class OaProcessDefinition {
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField(views = @View(title = "流程定义ID", sortable = true))
@TableId(type = IdType.AUTO)
private String id;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package xyz.erupt.flow.bean.entity;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand All @@ -15,7 +17,6 @@
import xyz.erupt.annotation.sub_field.ViewType;
import xyz.erupt.annotation.sub_field.sub_edit.Search;
import xyz.erupt.flow.bean.entity.node.OaProcessNode;
import xyz.erupt.jpa.model.BaseModel;

import javax.persistence.*;
import java.util.Date;
Expand Down Expand Up @@ -46,6 +47,7 @@ public class OaProcessExecution {
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField
@TableId(type = IdType.AUTO)
private Long id;

@EruptField(views = @View(title = "父线程id"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -52,6 +54,7 @@ public class OaProcessInstance {
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField
@TableId(type = IdType.AUTO)
private Long id;

@EruptField(views = @View(title = "流程定义id", show = true))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package xyz.erupt.flow.bean.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -44,6 +46,7 @@ public class OaProcessInstanceHistory {
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField(views = @View(title = "实例ID"))
@TableId(type = IdType.AUTO)
private Long id;

@EruptField(views = @View(title = "流程定义id"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package xyz.erupt.flow.bean.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -40,6 +42,7 @@ public class OaTask {
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField
@TableId(type = IdType.AUTO)
private Long id;

@EruptField(views = @View(title = "节点id"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package xyz.erupt.flow.bean.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -42,6 +44,7 @@ public class OaTaskHistory {
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField(views = @View(title = "任务ID"))
@TableId(type = IdType.AUTO)
private Long id;

@Transient//标识虚拟列
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
package xyz.erupt.flow.bean.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_erupt.Power;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.annotation.sub_field.ViewType;
import xyz.erupt.annotation.sub_field.sub_edit.Search;
import xyz.erupt.jpa.model.BaseModel;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;
import java.util.Date;

@Erupt(name = "任务操作日志"
Expand All @@ -29,14 +30,22 @@
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OaTaskOperation extends BaseModel {
public class OaTaskOperation {

public static final String COMPLETE = "COMPLETE";//完成
public static final String REFUSE = "REFUSE";//拒绝,走拒绝策略
public static final String JUMP = "JUMP";//跳转,指定节点进行跳转
public static final String SHUTDOWN = "SHUTDOWN";//终止
public static final String ASSIGN = "ASSIGN";//转办

@Id
@GeneratedValue(generator = "generator")
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField
@TableId(type = IdType.AUTO)
private Long id;

@EruptField(views = @View(title = "流程实例id"))
private Long processInstId;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
package xyz.erupt.flow.bean.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_erupt.Power;
import xyz.erupt.jpa.model.BaseModel;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;

/**
* 用户和候选人的中间表
Expand All @@ -27,6 +30,14 @@
@NoArgsConstructor
public class OaTaskUserLink extends BaseModel {

@Id
@GeneratedValue(generator = "generator")
@GenericGenerator(name = "generator", strategy = "native")
@Column(name = "id")
@EruptField
@TableId(type = IdType.AUTO)
private Long id;

private Long taskId;

/**
Expand Down

0 comments on commit f2467eb

Please sign in to comment.