提交修改

This commit is contained in:
quyixiao 2021-01-13 10:26:06 +08:00
commit ea96d6f75b
14 changed files with 759 additions and 50 deletions

View File

@ -0,0 +1,33 @@
package com.lz.modules.flow.dao;
/**
* <p>
* 流程权限分组表分组显示 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.flow.entity.FlowChartRoleGroup;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface FlowChartRoleGroupMapper extends BaseMapper<FlowChartRoleGroup> {
FlowChartRoleGroup selectFlowChartRoleGroupById(@Param("id")Long id);
Long insertFlowChartRoleGroup(FlowChartRoleGroup flowChartRoleGroup);
int updateFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup);
int updateCoverFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup);
int deleteFlowChartRoleGroupById(@Param("id")Long id);
}

View File

@ -0,0 +1,139 @@
package com.lz.modules.flow.entity;
import com.baomidou.mybatisplus.annotation.TableId;
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 java.util.Date;
/**
* <p>
* </p>*流程权限分组表分组显示
* @author quyixiao
* @since 2021-01-12
*/
@Data
@TableName("lz_flow_chart_role_group")
@ApiModel(value = "流程权限分组表,分组显示")
public class FlowChartRoleGroup implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
//
@ApiModelProperty(value = "", name = "isDelete")
private Integer isDelete;
//
@ApiModelProperty(value = "", name = "gmtCreate")
private Date gmtCreate;
//
@ApiModelProperty(value = "", name = "gmtModified")
private Date gmtModified;
//组名称显示的名称
@ApiModelProperty(value = "组名称,显示的名称", name = "name")
private String name;
//备注说明
@ApiModelProperty(value = "备注说明", name = "remark")
private String remark;
/**
*
* @return
*/
public Long getId() {
return id;
}
/**
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
*
* @return
*/
public Integer getIsDelete() {
return isDelete;
}
/**
*
* @param isDelete
*/
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
/**
*
* @return
*/
public Date getGmtCreate() {
return gmtCreate;
}
/**
*
* @param gmtCreate
*/
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
/**
*
* @return
*/
public Date getGmtModified() {
return gmtModified;
}
/**
*
* @param gmtModified
*/
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
/**
* 组名称显示的名称
* @return
*/
public String getName() {
return name;
}
/**
* 组名称显示的名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 备注说明
* @return
*/
public String getRemark() {
return remark;
}
/**
* 备注说明
* @param remark
*/
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return "FlowChartRoleGroup{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",name=" + name +
",remark=" + remark +
"}";
}
}

View File

@ -2,15 +2,18 @@ package com.lz.modules.flow.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* <p>
* </p>*流程节点权限对应关系表
* @author quyixiao
* @since 2020-10-15
* @since 2021-01-12
*/
@Data
@ApiModel(value = "流程节点权限对应关系Dto")
@ApiModel(value = "流程节点权限对应关系Dto")
public class FlowChartRoleDto {
//
@ApiModelProperty(value = "", name = "id")
@ -23,9 +26,14 @@ public class FlowChartRoleDto {
private Long roleId;
@ApiModelProperty(value = "角色名称", name = "roleName")
private String roleName;
//1默认权限必带权限不可修改权限0可选权限
@ApiModelProperty(value = "1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限", name = "type")
//1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限初始化时获取
@ApiModelProperty(value = "1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限,初始化时获取", name = "type")
private Integer type;
//lz_flow_chart_role_group中的id分组id
@ApiModelProperty(value = "lz_flow_chart_role_group中的id分组id如果不为0那么roleDtos需要一起显示", name = "roleGroupId")
private Long roleGroupId;
@ApiModelProperty(value = "节点权限列表", name = "roleDtos")
private List<FlowChartRoleDto> roleDtos;
/**
*
* @return
@ -41,8 +49,6 @@ public class FlowChartRoleDto {
this.id = id;
}
/**
* flow_chart表中id
* @return
@ -74,28 +80,43 @@ public class FlowChartRoleDto {
}
/**
* 1默认权限必带权限不可修改权限0可选权限
* 1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限初始化时获取
* @return
*/
public Integer getType() {
return type;
}
/**
* 1默认权限必带权限不可修改权限0可选权限
* 1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限初始化时获取
* @param type
*/
public void setType(Integer type) {
this.type = type;
}
/**
* lz_flow_chart_role_group中的id分组id
* @return
*/
public Long getRoleGroupId() {
return roleGroupId;
}
/**
* lz_flow_chart_role_group中的id分组id
* @param roleGroupId
*/
public void setRoleGroupId(Long roleGroupId) {
this.roleGroupId = roleGroupId;
}
@Override
public String toString() {
return "FlowChartRole{" +
return "FlowChartRoleDto{" +
",id=" + id +
",chartId=" + chartId +
",roleId=" + roleId +
",roleName=" + roleName +
",type=" + type +
",roleGroupId=" + roleGroupId +
"}";
}
}

View File

@ -0,0 +1,77 @@
package com.lz.modules.flow.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* <p>
* </p>*流程权限分组表分组显示
* @author quyixiao
* @since 2021-01-12
*/
@Data
@ApiModel(value = "流程权限分组表分组显示Dto")
public class FlowChartRoleGroupDto {
//
@ApiModelProperty(value = "", name = "id")
private Long id;
//组名称显示的名称
@ApiModelProperty(value = "组名称,显示的名称", name = "name")
private String name;
//备注说明
@ApiModelProperty(value = "备注说明", name = "remark")
private String remark;
/**
*
* @return
*/
public Long getId() {
return id;
}
/**
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* 组名称显示的名称
* @return
*/
public String getName() {
return name;
}
/**
* 组名称显示的名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 备注说明
* @return
*/
public String getRemark() {
return remark;
}
/**
* 备注说明
* @param remark
*/
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return "FlowChartRoleGroupDto{" +
",id=" + id +
",name=" + name +
",remark=" + remark +
"}";
}
}

View File

@ -0,0 +1,148 @@
package com.lz.modules.flow.req;
import com.baomidou.mybatisplus.annotation.TableId;
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 java.util.Date;
/**
* <p>
* 菜单权限表
* </p>*流程权限分组表分组显示
* @author quyixiao
* @since 2021-01-12
*/
@Data
@ApiModel(value = "流程权限分组表分组显示Req")
public class FlowChartRoleGroupReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
private int currPage = 1;
@ApiModelProperty(value = "pageSize", name = "每页返回条数")
private int pageSize = 10;
@ApiModelProperty(value = "sort", name = "类型")
private String sort;
@ApiModelProperty(value = "order", name = "排序")
private String order;
//
private Long id;
//
@ApiModelProperty(value = "", name = "isDelete")
private Integer isDelete;
//
@ApiModelProperty(value = "", name = "gmtCreate")
private Date gmtCreate;
//
@ApiModelProperty(value = "", name = "gmtModified")
private Date gmtModified;
//组名称显示的名称
@ApiModelProperty(value = "组名称,显示的名称", name = "name")
private String name;
//备注说明
@ApiModelProperty(value = "备注说明", name = "remark")
private String remark;
/**
*
* @return
*/
public Long getId() {
return id;
}
/**
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
*
* @return
*/
public Integer getIsDelete() {
return isDelete;
}
/**
*
* @param isDelete
*/
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
/**
*
* @return
*/
public Date getGmtCreate() {
return gmtCreate;
}
/**
*
* @param gmtCreate
*/
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
/**
*
* @return
*/
public Date getGmtModified() {
return gmtModified;
}
/**
*
* @param gmtModified
*/
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
/**
* 组名称显示的名称
* @return
*/
public String getName() {
return name;
}
/**
* 组名称显示的名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
* 备注说明
* @return
*/
public String getRemark() {
return remark;
}
/**
* 备注说明
* @param remark
*/
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return "FlowChartRoleGroupReq{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",name=" + name +
",remark=" + remark +
"}";
}
}

View File

@ -11,12 +11,12 @@ import java.util.Date;
* 菜单权限表
* </p>*流程节点权限对应关系表
* @author quyixiao
* @since 2020-10-16
* @since 2021-01-12
*/
@Data
@ApiModel(value = "流程节点权限对应关系Req")
@ApiModel(value = "流程节点权限对应关系Req")
public class FlowChartRoleReq implements java.io.Serializable {
@ApiModelProperty(value = "currPage", name = "当前页码")
@ -44,9 +44,12 @@ public class FlowChartRoleReq implements java.io.Serializable {
//角色id
@ApiModelProperty(value = "角色id", name = "roleId")
private Long roleId;
//1默认权限必带权限不可修改权限0可选权限
@ApiModelProperty(value = "1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限", name = "type")
//1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限初始化时获取
@ApiModelProperty(value = "1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限,初始化时获取", name = "type")
private Integer type;
//lz_flow_chart_role_group中的id分组id
@ApiModelProperty(value = "lz_flow_chart_role_group中的id分组id", name = "roleGroupId")
private Long roleGroupId;
/**
*
* @return
@ -138,23 +141,38 @@ public class FlowChartRoleReq implements java.io.Serializable {
}
/**
* 1默认权限必带权限不可修改权限0可选权限
* 1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限初始化时获取
* @return
*/
public Integer getType() {
return type;
}
/**
* 1默认权限必带权限不可修改权限0可选权限
* 1默认权限必带权限不可修改权限0可选权限2被考核人默认权限必带权限初始化时获取
* @param type
*/
public void setType(Integer type) {
this.type = type;
}
/**
* lz_flow_chart_role_group中的id分组id
* @return
*/
public Long getRoleGroupId() {
return roleGroupId;
}
/**
* lz_flow_chart_role_group中的id分组id
* @param roleGroupId
*/
public void setRoleGroupId(Long roleGroupId) {
this.roleGroupId = roleGroupId;
}
@Override
public String toString() {
return "FlowChartRole{" +
return "FlowChartRoleReq{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
@ -162,6 +180,7 @@ public class FlowChartRoleReq implements java.io.Serializable {
",chartId=" + chartId +
",roleId=" + roleId +
",type=" + type +
",roleGroupId=" + roleGroupId +
"}";
}
}

View File

@ -0,0 +1,33 @@
package com.lz.modules.flow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lz.modules.flow.entity.FlowChartRoleGroup;
/**
* <p>
* 流程权限分组表分组显示 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
public interface FlowChartRoleGroupService extends IService<FlowChartRoleGroup> {
FlowChartRoleGroup selectFlowChartRoleGroupById(Long id);
Long insertFlowChartRoleGroup(FlowChartRoleGroup flowChartRoleGroup);
int updateFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup);
int updateCoverFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup);
int deleteFlowChartRoleGroupById(Long id);
}

View File

@ -0,0 +1,63 @@
package com.lz.modules.flow.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.flow.dao.FlowChartRoleGroupMapper;
import com.lz.modules.flow.entity.FlowChartRoleGroup;
import com.lz.modules.flow.service.FlowChartRoleGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* <p>
* 流程权限分组表分组显示 服务类
* </p>
*
* @author quyixiao
* @since 2021-01-12
*/
@Service
public class FlowChartRoleGroupServiceImpl extends ServiceImpl<FlowChartRoleGroupMapper, FlowChartRoleGroup> implements FlowChartRoleGroupService {
@Autowired
private FlowChartRoleGroupMapper flowChartRoleGroupMapper;
@Override
public FlowChartRoleGroup selectFlowChartRoleGroupById(Long id){
return flowChartRoleGroupMapper.selectFlowChartRoleGroupById(id);
}
@Override
public Long insertFlowChartRoleGroup(FlowChartRoleGroup flowChartRoleGroup){
return flowChartRoleGroupMapper.insertFlowChartRoleGroup(flowChartRoleGroup);
}
@Override
public int updateFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup){
return flowChartRoleGroupMapper.updateFlowChartRoleGroupById(flowChartRoleGroup);
}
@Override
public int updateCoverFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup){
return flowChartRoleGroupMapper.updateCoverFlowChartRoleGroupById(flowChartRoleGroup);
}
@Override
public int deleteFlowChartRoleGroupById(Long id){
return flowChartRoleGroupMapper.deleteFlowChartRoleGroupById(id);
}
}

View File

@ -5,17 +5,11 @@ import com.lz.common.emun.ChartOptType;
import com.lz.common.utils.R;
import com.lz.modules.app.dto.StaffSimpleDto;
import com.lz.modules.app.service.StaffService;
import com.lz.modules.flow.entity.FlowChart;
import com.lz.modules.flow.entity.FlowChartDetailRecord;
import com.lz.modules.flow.entity.FlowChartRole;
import com.lz.modules.flow.entity.FlowManager;
import com.lz.modules.flow.entity.*;
import com.lz.modules.flow.model.*;
import com.lz.modules.flow.req.FlowChartDetailRecordListReq;
import com.lz.modules.flow.req.FlowChartDetailRecordSimpleReq;
import com.lz.modules.flow.service.FlowChartDetailRecordService;
import com.lz.modules.flow.service.FlowChartRoleService;
import com.lz.modules.flow.service.FlowChartService;
import com.lz.modules.flow.service.FlowManagerService;
import com.lz.modules.flow.service.*;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
@ -50,6 +44,9 @@ public class FlowChartController {
@Autowired
private FlowChartRoleService flowChartRoleService;
@Autowired
private FlowChartRoleGroupService flowChartRoleGroupService;
@GetMapping("/getByFlowManagerId")
@ApiOperation("获取大流程节点")
@ApiResponses({@ApiResponse(code = 200,message = "成功",response = FlowChartDto.class)})
@ -57,9 +54,48 @@ public class FlowChartController {
FlowManager flowManager = flowManagerService.selectFlowManagerById(id);
if(flowManager != null){
List<FlowChartDto> flowChartDtos = flowChartService.selectFlowChartDtoByFlowManagerId(flowManager.getId());
Map<Long, FlowChartRoleGroup> flowChartRoleGroupMap = new HashMap<>();
for (FlowChartDto dto:flowChartDtos
) {
List<FlowChartRoleDto> flowChartRoles = flowChartService.selectCanSetChartRoleByChartId(dto.getId());
//代码层面对分组的数据做树形结构返回
Long rGroupId = 0l;
FlowChartRoleDto flowChartRoleDto = null;
for (int i = 0; i < flowChartRoles.size(); i++
) {
FlowChartRoleDto roleDto = flowChartRoles.get(i);
if(roleDto.getRoleGroupId().longValue() != 0L){
//查询考评组
FlowChartRoleGroup flowChartRoleGroup = flowChartRoleGroupMap.get(roleDto.getRoleGroupId());
if(flowChartRoleGroup == null){
flowChartRoleGroup = flowChartRoleGroupService.selectFlowChartRoleGroupById(roleDto.getRoleGroupId());
}
if(flowChartRoleGroup != null){
flowChartRoles.remove(i);
flowChartRoleGroupMap.put(flowChartRoleGroup.getId(), flowChartRoleGroup);
if(rGroupId != flowChartRoleGroup.getId()){
flowChartRoleDto = new FlowChartRoleDto();
flowChartRoleDto.setChartId(roleDto.getChartId());
flowChartRoleDto.setRoleName(flowChartRoleGroup.getName());
flowChartRoleDto.setType(0);
flowChartRoleDto.setRoleId(0l);
flowChartRoleDto.setId(flowChartRoleGroup.getId());
flowChartRoleDto.setRoleGroupId(flowChartRoleGroup.getId());
flowChartRoleDto.setRoleDtos(new ArrayList<>());
flowChartRoles.add(i, flowChartRoleDto);
rGroupId = flowChartRoleGroup.getId();
}else{
i--;
}
flowChartRoleDto.getRoleDtos().add(roleDto);
}
}
}
dto.setRoleDtos(flowChartRoles);
if(groupId > 0){
//获取节点已保存的数据

View File

@ -0,0 +1,56 @@
package com.lz.modules.performance.controller;
import com.alibaba.fastjson.JSONObject;
import com.lz.common.utils.PageUtils;
import com.lz.common.utils.R;
import com.lz.common.utils.StringUtil;
import com.lz.modules.flow.entity.FlowChartRoleGroup;
import com.lz.modules.flow.service.FlowChartRoleGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/flowChartRoleGroup")
public class FlowChartRoleGroupController {
@Autowired
private FlowChartRoleGroupService flowChartRoleGroupService;
@RequestMapping("/getById")
public R getById(@RequestBody FlowChartRoleGroup flowChartRoleGroup) {
flowChartRoleGroup = flowChartRoleGroupService.selectFlowChartRoleGroupById(flowChartRoleGroup.getId());
return R.ok().put("flowChartRoleGroup",flowChartRoleGroup);
}
@RequestMapping("/update")
public R update(@RequestBody FlowChartRoleGroup flowChartRoleGroup) {
flowChartRoleGroupService.updateFlowChartRoleGroupById(flowChartRoleGroup);
return R.ok();
}
@RequestMapping("/save")
public R save(@RequestBody FlowChartRoleGroup flowChartRoleGroup) {
flowChartRoleGroupService.insertFlowChartRoleGroup(flowChartRoleGroup);
return R.ok();
}
@RequestMapping("/delete")
public R delete(@RequestBody Long id) {
flowChartRoleGroupService.deleteFlowChartRoleGroupById(id);
return R.ok();
}
}

View File

@ -96,7 +96,7 @@
<update id="deleteFlowChartById" parameterType="java.lang.Long">
update lz_flow_chart set is_delete = 1 where id=#{id} limit 1
update lz_flow_chart set is_delete = 1 where id=#{id} limit 1
</update>
<select id="selectFlowChartByFlowManagerId" resultType="FlowChart" >
@ -121,8 +121,8 @@
<select id="selectCanSetChartRoleByChartId" resultType="com.lz.modules.flow.model.FlowChartRoleDto" >
SELECT crole.id as id, crole.chart_id as chart_id, crole.role_id as role_id, role.name as role_name,
crole.type as type FROM lz_flow_chart_role crole left join lz_record_role role on role.id=crole.role_id
where crole.chart_id=#{id} and crole.type = 0 and crole.is_delete=0
crole.type as type, crole.role_group_id as role_group_id FROM lz_flow_chart_role crole left join lz_record_role role on role.id=crole.role_id
where crole.chart_id=#{id} and crole.type = 0 and crole.is_delete=0 order by crole.role_group_id
</select>
</mapper>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lz.modules.flow.dao.FlowChartRoleGroupMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.lz.modules.flow.entity.FlowChartRoleGroup">
<id column="id" property="id"/>
<result column="is_delete" property="isDelete"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="name" property="name"/>
<result column="remark" property="remark"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, remark AS remark
</sql>
<select id="selectFlowChartRoleGroupById" resultType="FlowChartRoleGroup" >
select * from lz_flow_chart_role_group where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertFlowChartRoleGroup" parameterType="FlowChartRoleGroup" useGeneratedKeys="true" keyProperty="id" >
insert into lz_flow_chart_role_group(
<if test="name != null">name, </if>
<if test="remark != null">remark, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="name != null">#{ name}, </if>
<if test="remark != null">#{ remark}, </if>
0,
now(),
now()
)
</insert>
<update id="updateFlowChartRoleGroupById" parameterType="FlowChartRoleGroup" >
update
lz_flow_chart_role_group
<trim prefix="set" suffixOverrides=",">
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="name != null">name = #{name},</if>
<if test="remark != null">remark = #{remark}</if>
</trim>
,gmt_modified = now()
where id = #{id}
</update>
<update id="updateCoverFlowChartRoleGroupById" parameterType="FlowChartRoleGroup" >
update
lz_flow_chart_role_group
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
name = #{name},
remark = #{remark}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deleteFlowChartRoleGroupById" parameterType="java.lang.Long">
update lz_flow_chart_role_group set is_delete = 1 where id=#{id} limit 1
</update>
</mapper>

View File

@ -11,50 +11,54 @@
<result column="chart_id" property="chartId"/>
<result column="role_id" property="roleId"/>
<result column="type" property="type"/>
<result column="role_group_id" property="roleGroupId"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, chart_id AS chartId, role_id AS roleId, type AS type
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, chart_id AS chartId, role_id AS roleId, type AS type, role_group_id AS roleGroupId
</sql>
<select id="selectFlowChartRoleById" resultType="FlowChartRole" >
select * from lz_flow_chart_role where id=#{id} and is_delete = 0 limit 1
select * from lz_flow_chart_role where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertFlowChartRole" parameterType="FlowChartRole" useGeneratedKeys="true" keyProperty="id" >
insert into lz_flow_chart_role(
<if test="chartId != null">chart_id, </if>
<if test="roleId != null">role_id, </if>
<if test="type != null">type, </if>
is_delete,
gmt_create,
gmt_modified
<if test="chartId != null">chart_id, </if>
<if test="roleId != null">role_id, </if>
<if test="type != null">type, </if>
<if test="roleGroupId != null">role_group_id, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="chartId != null">#{ chartId}, </if>
<if test="roleId != null">#{ roleId}, </if>
<if test="type != null">#{ type}, </if>
0,
now(),
now()
<if test="chartId != null">#{ chartId}, </if>
<if test="roleId != null">#{ roleId}, </if>
<if test="type != null">#{ type}, </if>
<if test="roleGroupId != null">#{ roleGroupId}, </if>
0,
now(),
now()
)
</insert>
<update id="updateFlowChartRoleById" parameterType="FlowChartRole" >
update
lz_flow_chart_role
lz_flow_chart_role
<trim prefix="set" suffixOverrides=",">
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="chartId != null">chart_id = #{chartId},</if>
<if test="roleId != null">role_id = #{roleId},</if>
<if test="type != null">type = #{type}</if>
<if test="type != null">type = #{type},</if>
<if test="roleGroupId != null">role_group_id = #{roleGroupId}</if>
</trim>
,gmt_modified = now()
where id = #{id}
@ -63,20 +67,21 @@
<update id="updateCoverFlowChartRoleById" parameterType="FlowChartRole" >
update
lz_flow_chart_role
set
lz_flow_chart_role
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
chart_id = #{chartId},
role_id = #{roleId},
type = #{type}
,gmt_modified = now()
type = #{type},
role_group_id = #{roleGroupId}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deleteFlowChartRoleById" parameterType="java.lang.Long">
update lz_flow_chart_role set is_delete = 1 where id=#{id} limit 1
update lz_flow_chart_role set is_delete = 1 where id=#{id} limit 1
</update>
<select id="selectFlowChartRolesByChartIdAndType" resultType="FlowChartRole" >

View File

@ -85,7 +85,8 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("equipment_info"));
list.add(new TablesBean("lz_flow_chart_role"));
list.add(new TablesBean("lz_flow_chart_role_group"));
List<TablesBean> list2 = new ArrayList<TablesBean>();