提交修改
This commit is contained in:
parent
4494f185dc
commit
7f89d1c4af
@ -1,53 +1,73 @@
|
|||||||
package com.lz.modules.flow.entity;
|
package com.lz.modules.flow.entity;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 菜单权限表
|
|
||||||
* </p>*流转记录表
|
* </p>*流转记录表
|
||||||
* @author quyixiao
|
* @author quyixiao
|
||||||
* @since 2020-09-03
|
* @since 2020-11-03
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName("lz_flow_record")
|
@TableName("lz_flow_record")
|
||||||
|
@ApiModel(value = "流转记录表")
|
||||||
public class FlowRecord implements java.io.Serializable {
|
public class FlowRecord implements java.io.Serializable {
|
||||||
//
|
//
|
||||||
@TableId(value = "id", type = IdType.AUTO)
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
private Long id;
|
private Long id;
|
||||||
//是否删除状态,1:删除,0:有效
|
//是否删除状态,1:删除,0:有效
|
||||||
|
@ApiModelProperty(value = "是否删除状态,1:删除,0:有效", name = "isDelete")
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
//创建时间
|
//创建时间
|
||||||
|
@ApiModelProperty(value = "创建时间", name = "gmtCreate")
|
||||||
private Date gmtCreate;
|
private Date gmtCreate;
|
||||||
//最后修改时间
|
//最后修改时间
|
||||||
|
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
|
||||||
private Date gmtModified;
|
private Date gmtModified;
|
||||||
//
|
//
|
||||||
|
@ApiModelProperty(value = "", name = "departmentLevel")
|
||||||
private String departmentLevel;
|
private String departmentLevel;
|
||||||
//记录 id
|
//记录 id
|
||||||
|
@ApiModelProperty(value = "记录 id", name = "recordId")
|
||||||
private Long recordId;
|
private Long recordId;
|
||||||
//审批员工 id
|
//审批员工 id
|
||||||
|
@ApiModelProperty(value = "审批员工 id", name = "approvalStaffId")
|
||||||
private Long approvalStaffId;
|
private Long approvalStaffId;
|
||||||
//审批员工名称
|
//审批员工名称
|
||||||
|
@ApiModelProperty(value = "审批员工名称", name = "approvalStaffName")
|
||||||
private String approvalStaffName;
|
private String approvalStaffName;
|
||||||
//流程名称
|
//流程名称
|
||||||
|
@ApiModelProperty(value = "流程名称", name = "flowName")
|
||||||
private String flowName;
|
private String flowName;
|
||||||
//record 表中的员工 id
|
//record 表中的员工 id
|
||||||
|
@ApiModelProperty(value = "record 表中的员工 id", name = "recordStaffId")
|
||||||
private Long recordStaffId;
|
private Long recordStaffId;
|
||||||
//流程 id
|
//流程 id
|
||||||
|
@ApiModelProperty(value = "流程 id", name = "flowId")
|
||||||
private Long flowId;
|
private Long flowId;
|
||||||
//流程中的第几个步骤
|
//流程中的第几个步骤
|
||||||
|
@ApiModelProperty(value = "流程中的第几个步骤", name = "flowIndex")
|
||||||
private Integer flowIndex;
|
private Integer flowIndex;
|
||||||
//0表示正常状态,1 表示被驳回无用的流程
|
//0表示流程未到,1 表示流程已走 2 :当前流程 3:其他人己经审批,4,跳过
|
||||||
|
@ApiModelProperty(value = "0表示流程未到,1 表示流程已走 2 :当前流程 3:其他人己经审批,4,跳过", name = "status")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
// 员工&权限id
|
// 员工&权限id
|
||||||
|
@ApiModelProperty(value = " 员工&权限id", name = "flowStaffIdRole")
|
||||||
private String flowStaffIdRole;
|
private String flowStaffIdRole;
|
||||||
//状态名称
|
//状态名称
|
||||||
|
@ApiModelProperty(value = "状态名称", name = "statusName")
|
||||||
private String statusName;
|
private String statusName;
|
||||||
//步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)
|
//步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)
|
||||||
|
@ApiModelProperty(value = "步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)", name = "type")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
//flow_manager表中id
|
||||||
|
@ApiModelProperty(value = "flow_manager表中id", name = "processId")
|
||||||
|
private Long processId;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
@ -229,14 +249,14 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0表示正常状态,1 表示被驳回无用的流程
|
* 0表示流程未到,1 表示流程已走 2 :当前流程 3:其他人己经审批,4,跳过
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getStatus() {
|
public Integer getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 0表示正常状态,1 表示被驳回无用的流程
|
* 0表示流程未到,1 表示流程已走 2 :当前流程 3:其他人己经审批,4,跳过
|
||||||
* @param status
|
* @param status
|
||||||
*/
|
*/
|
||||||
public void setStatus(Integer status) {
|
public void setStatus(Integer status) {
|
||||||
@ -273,14 +293,36 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
this.statusName = statusName;
|
this.statusName = statusName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Integer getType() {
|
public Integer getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 步骤类型0:依次,1:或签(同时通知,一人通过或拒绝即可),2会签(同时通知,所有人同意才可)
|
||||||
|
* @param type
|
||||||
|
*/
|
||||||
public void setType(Integer type) {
|
public void setType(Integer type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* flow_manager表中id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Long getProcessId() {
|
||||||
|
return processId;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* flow_manager表中id
|
||||||
|
* @param processId
|
||||||
|
*/
|
||||||
|
public void setProcessId(Long processId) {
|
||||||
|
this.processId = processId;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "FlowRecord{" +
|
return "FlowRecord{" +
|
||||||
@ -299,6 +341,8 @@ public class FlowRecord implements java.io.Serializable {
|
|||||||
",status=" + status +
|
",status=" + status +
|
||||||
",flowStaffIdRole=" + flowStaffIdRole +
|
",flowStaffIdRole=" + flowStaffIdRole +
|
||||||
",statusName=" + statusName +
|
",statusName=" + statusName +
|
||||||
|
",type=" + type +
|
||||||
|
",processId=" + processId +
|
||||||
"}";
|
"}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -796,14 +796,16 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
}
|
}
|
||||||
flowRecord.setApprovalStaffName(staffEntity.getName());
|
flowRecord.setApprovalStaffName(staffEntity.getName());
|
||||||
flowRecord.setApprovalStaffId(staffEntity.getId());
|
flowRecord.setApprovalStaffId(staffEntity.getId());
|
||||||
|
|
||||||
flowRecord.setFlowName(getFlow(flows, flowApprovalRole.getFlowId()).getOptDesc());
|
flowRecord.setFlowName(getFlow(flows, flowApprovalRole.getFlowId()).getOptDesc());
|
||||||
flowRecord.setRecordStaffId(resultRecord.getStaffId());
|
flowRecord.setRecordStaffId(resultRecord.getStaffId());
|
||||||
flowRecord.setFlowId(flowApprovalRole.getFlowId());
|
flowRecord.setFlowId(flowApprovalRole.getFlowId());
|
||||||
|
FlowChart flowChart = flowService.selectFlowChartByChartId(flowApprovalRole.getFlowId());
|
||||||
|
flowRecord.setProcessId(flowChart.getProcessId());
|
||||||
String staffRole = StaffRoles.getStaffRole(staffEntity.getId(), StringUtil.strToLongs(flowApprovalRole.getRoleId()));
|
String staffRole = StaffRoles.getStaffRole(staffEntity.getId(), StringUtil.strToLongs(flowApprovalRole.getRoleId()));
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
flowRecord.setStatus(FlowRecordStatusEnums.CURRENT_FLOW_STATUS.getStatus());
|
||||||
resultRecord.setFlowStaffIdRole(staffRole);
|
resultRecord.setFlowStaffIdRole(staffRole);
|
||||||
FlowChart flowChart = flowService.selectFlowChartByChartId(flowRecord.getFlowId());
|
|
||||||
resultRecord.setFlowProcess(flowChart.getFlowProcess());
|
resultRecord.setFlowProcess(flowChart.getFlowProcess());
|
||||||
} else {
|
} else {
|
||||||
flowRecord.setStatus(FlowRecordStatusEnums.UN_TO_STATUS.getStatus());
|
flowRecord.setStatus(FlowRecordStatusEnums.UN_TO_STATUS.getStatus());
|
||||||
|
|||||||
@ -20,12 +20,13 @@
|
|||||||
<result column="flow_staff_id_role" property="flowStaffIdRole"/>
|
<result column="flow_staff_id_role" property="flowStaffIdRole"/>
|
||||||
<result column="status_name" property="statusName"/>
|
<result column="status_name" property="statusName"/>
|
||||||
<result column="type" property="type"/>
|
<result column="type" property="type"/>
|
||||||
|
<result column="process_id" property="processId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<!-- 通用查询结果列 -->
|
<!-- 通用查询结果列 -->
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_level AS departmentLevel, record_id AS recordId, approval_staff_id AS approvalStaffId, approval_staff_name AS approvalStaffName, flow_name AS flowName, record_staff_id AS recordStaffId, flow_id AS flowId, flow_index AS flowIndex, status AS status, flow_staff_id_role AS flowStaffIdRole, status_name AS statusName, type AS type
|
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_level AS departmentLevel, record_id AS recordId, approval_staff_id AS approvalStaffId, approval_staff_name AS approvalStaffName, flow_name AS flowName, record_staff_id AS recordStaffId, flow_id AS flowId, flow_index AS flowIndex, status AS status, flow_staff_id_role AS flowStaffIdRole, status_name AS statusName, type AS type, process_id AS processId
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@ -50,6 +51,7 @@
|
|||||||
<if test="flowStaffIdRole != null">flow_staff_id_role, </if>
|
<if test="flowStaffIdRole != null">flow_staff_id_role, </if>
|
||||||
<if test="statusName != null">status_name, </if>
|
<if test="statusName != null">status_name, </if>
|
||||||
<if test="type != null">type, </if>
|
<if test="type != null">type, </if>
|
||||||
|
<if test="processId != null">process_id, </if>
|
||||||
is_delete,
|
is_delete,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
gmt_modified
|
gmt_modified
|
||||||
@ -66,48 +68,13 @@
|
|||||||
<if test="flowStaffIdRole != null">#{ flowStaffIdRole}, </if>
|
<if test="flowStaffIdRole != null">#{ flowStaffIdRole}, </if>
|
||||||
<if test="statusName != null">#{ statusName}, </if>
|
<if test="statusName != null">#{ statusName}, </if>
|
||||||
<if test="type != null">#{ type}, </if>
|
<if test="type != null">#{ type}, </if>
|
||||||
|
<if test="processId != null">#{ processId}, </if>
|
||||||
0,
|
0,
|
||||||
now(),
|
now(),
|
||||||
now()
|
now()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="copyFlowRecord" parameterType="FlowRecord" useGeneratedKeys="true" keyProperty="id" >
|
|
||||||
insert into lz_flow_record(
|
|
||||||
<if test="departmentLevel != null">department_level, </if>
|
|
||||||
<if test="recordId != null">record_id, </if>
|
|
||||||
<if test="approvalStaffId != null">approval_staff_id, </if>
|
|
||||||
<if test="approvalStaffName != null">approval_staff_name, </if>
|
|
||||||
<if test="flowName != null">flow_name, </if>
|
|
||||||
<if test="recordStaffId != null">record_staff_id, </if>
|
|
||||||
<if test="flowId != null">flow_id, </if>
|
|
||||||
<if test="flowIndex != null">flow_index, </if>
|
|
||||||
<if test="status != null">status, </if>
|
|
||||||
<if test="flowStaffIdRole != null">flow_staff_id_role, </if>
|
|
||||||
<if test="statusName != null">status_name, </if>
|
|
||||||
<if test="type != null">type, </if>
|
|
||||||
is_delete,
|
|
||||||
gmt_create,
|
|
||||||
gmt_modified
|
|
||||||
)values(
|
|
||||||
<if test="departmentLevel != null">#{ departmentLevel}, </if>
|
|
||||||
<if test="recordId != null">#{ recordId}, </if>
|
|
||||||
<if test="approvalStaffId != null">#{ approvalStaffId}, </if>
|
|
||||||
<if test="approvalStaffName != null">#{ approvalStaffName}, </if>
|
|
||||||
<if test="flowName != null">#{ flowName}, </if>
|
|
||||||
<if test="recordStaffId != null">#{ recordStaffId}, </if>
|
|
||||||
<if test="flowId != null">#{ flowId}, </if>
|
|
||||||
<if test="flowIndex != null">#{ flowIndex}, </if>
|
|
||||||
<if test="status != null">#{ status}, </if>
|
|
||||||
<if test="flowStaffIdRole != null">#{ flowStaffIdRole}, </if>
|
|
||||||
<if test="statusName != null">#{ statusName}, </if>
|
|
||||||
<if test="type != null">#{ type}, </if>
|
|
||||||
0,
|
|
||||||
#{ gmtCreate},
|
|
||||||
#{ gmtModified}
|
|
||||||
)
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
|
|
||||||
<update id="updateFlowRecordById" parameterType="FlowRecord" >
|
<update id="updateFlowRecordById" parameterType="FlowRecord" >
|
||||||
update
|
update
|
||||||
@ -126,7 +93,8 @@
|
|||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
<if test="flowStaffIdRole != null">flow_staff_id_role = #{flowStaffIdRole},</if>
|
<if test="flowStaffIdRole != null">flow_staff_id_role = #{flowStaffIdRole},</if>
|
||||||
<if test="statusName != null">status_name = #{statusName},</if>
|
<if test="statusName != null">status_name = #{statusName},</if>
|
||||||
<if test="type != null">type = #{type}</if>
|
<if test="type != null">type = #{type},</if>
|
||||||
|
<if test="processId != null">process_id = #{processId}</if>
|
||||||
</trim>
|
</trim>
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@ -150,7 +118,8 @@
|
|||||||
status = #{status},
|
status = #{status},
|
||||||
flow_staff_id_role = #{flowStaffIdRole},
|
flow_staff_id_role = #{flowStaffIdRole},
|
||||||
status_name = #{statusName},
|
status_name = #{statusName},
|
||||||
type = #{type}
|
type = #{type},
|
||||||
|
process_id = #{processId}
|
||||||
,gmt_modified = now()
|
,gmt_modified = now()
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@ -125,27 +125,8 @@ public class MysqlMain {
|
|||||||
}
|
}
|
||||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||||
|
|
||||||
/*list.add(new TablesBean("lz_evaluation_group"));
|
|
||||||
list.add(new TablesBean("lz_evaluation_start_staff"));
|
|
||||||
list.add(new TablesBean("lz_flow_approval_role"));
|
|
||||||
list.add(new TablesBean("lz_flow_change"));
|
|
||||||
list.add(new TablesBean("lz_flow_chart"));
|
|
||||||
list.add(new TablesBean("lz_flow_chart_role"));
|
|
||||||
list.add(new TablesBean("lz_flow_start"));
|
|
||||||
list.add(new TablesBean("lz_result_calculate"));
|
|
||||||
list.add(new TablesBean("lz_result_dimension"));'
|
|
||||||
list.add(new TablesBean("lz_result_grade"));*/
|
|
||||||
//list.add(new TablesBean("lz_result_model"));
|
|
||||||
//list.add(new TablesBean("lz_result_score"));
|
|
||||||
//list.add(new TablesBean("lz_result_taget_lib"));
|
|
||||||
|
|
||||||
//list.add(new TablesBean("lz_flow_chart_detail_record"));
|
list.add(new TablesBean("lz_flow_record"));
|
||||||
//list.add(new TablesBean("lz_flow_approval_role"));
|
|
||||||
|
|
||||||
list.add(new TablesBean("lz_staff_menu"));
|
|
||||||
list.add(new TablesBean("lz_staff_role"));
|
|
||||||
list.add(new TablesBean("lz_staff_role_evaluation_group"));
|
|
||||||
list.add(new TablesBean("lz_staff_role_menu"));
|
|
||||||
|
|
||||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user