diff --git a/src/main/java/com/lz/modules/flow/dao/FlowChartRoleGroupMapper.java b/src/main/java/com/lz/modules/flow/dao/FlowChartRoleGroupMapper.java new file mode 100644 index 00000000..3d1cdd5e --- /dev/null +++ b/src/main/java/com/lz/modules/flow/dao/FlowChartRoleGroupMapper.java @@ -0,0 +1,33 @@ +package com.lz.modules.flow.dao; +/** +*

+* 流程权限分组表,分组显示 服务类 +*

+* +* @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 selectFlowChartRoleGroupById(@Param("id")Long id); + + + Long insertFlowChartRoleGroup(FlowChartRoleGroup flowChartRoleGroup); + + + int updateFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup); + + + int updateCoverFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup); + + + int deleteFlowChartRoleGroupById(@Param("id")Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/entity/FlowChartRoleGroup.java b/src/main/java/com/lz/modules/flow/entity/FlowChartRoleGroup.java new file mode 100644 index 00000000..6134ca12 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/entity/FlowChartRoleGroup.java @@ -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; +/** +*

+*

*流程权限分组表,分组显示 +* @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 + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/model/FlowChartRoleDto.java b/src/main/java/com/lz/modules/flow/model/FlowChartRoleDto.java index 7095efad..30587419 100644 --- a/src/main/java/com/lz/modules/flow/model/FlowChartRoleDto.java +++ b/src/main/java/com/lz/modules/flow/model/FlowChartRoleDto.java @@ -6,11 +6,11 @@ import lombok.Data; *

*

*流程节点权限对应关系表 * @author quyixiao -* @since 2020-10-15 +* @since 2021-01-12 */ @Data -@ApiModel(value = "流程节点权限对应关系Dto") +@ApiModel(value = "流程节点权限对应关系表Dto") public class FlowChartRoleDto { // @ApiModelProperty(value = "", name = "id") @@ -21,11 +21,12 @@ public class FlowChartRoleDto { //角色id @ApiModelProperty(value = "角色id", name = "roleId") 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", name = "roleGroupId") + private Long roleGroupId; /** * * @return @@ -41,8 +42,6 @@ public class FlowChartRoleDto { this.id = id; } - - /** * flow_chart表中id * @return @@ -74,28 +73,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 + "}"; } } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/model/FlowChartRoleGroupDto.java b/src/main/java/com/lz/modules/flow/model/FlowChartRoleGroupDto.java new file mode 100644 index 00000000..078e4787 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/model/FlowChartRoleGroupDto.java @@ -0,0 +1,77 @@ +package com.lz.modules.flow.model; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +/** +*

+*

*流程权限分组表,分组显示 +* @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 + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/req/FlowChartRoleGroupReq.java b/src/main/java/com/lz/modules/flow/req/FlowChartRoleGroupReq.java new file mode 100644 index 00000000..5bc59622 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/req/FlowChartRoleGroupReq.java @@ -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; +/** +*

+* 菜单权限表 +*

*流程权限分组表,分组显示 +* @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 + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/req/FlowChartRoleReq.java b/src/main/java/com/lz/modules/flow/req/FlowChartRoleReq.java index da07d80f..7dc9dce3 100644 --- a/src/main/java/com/lz/modules/flow/req/FlowChartRoleReq.java +++ b/src/main/java/com/lz/modules/flow/req/FlowChartRoleReq.java @@ -11,12 +11,12 @@ import java.util.Date; * 菜单权限表 *

*流程节点权限对应关系表 * @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 + "}"; } } \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/FlowChartRoleGroupService.java b/src/main/java/com/lz/modules/flow/service/FlowChartRoleGroupService.java new file mode 100644 index 00000000..41b58412 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/service/FlowChartRoleGroupService.java @@ -0,0 +1,33 @@ +package com.lz.modules.flow.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.lz.modules.flow.entity.FlowChartRoleGroup; + +/** +*

+* 流程权限分组表,分组显示 服务类 +*

+* +* @author quyixiao +* @since 2021-01-12 +*/ +public interface FlowChartRoleGroupService extends IService { + + + + FlowChartRoleGroup selectFlowChartRoleGroupById(Long id); + + + Long insertFlowChartRoleGroup(FlowChartRoleGroup flowChartRoleGroup); + + + int updateFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup); + + + int updateCoverFlowChartRoleGroupById(FlowChartRoleGroup flowChartRoleGroup); + + + int deleteFlowChartRoleGroupById(Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowChartRoleGroupServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowChartRoleGroupServiceImpl.java new file mode 100644 index 00000000..a4dfb4c5 --- /dev/null +++ b/src/main/java/com/lz/modules/flow/service/impl/FlowChartRoleGroupServiceImpl.java @@ -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; + +/** +*

+* 流程权限分组表,分组显示 服务类 +*

+* +* @author quyixiao +* @since 2021-01-12 +*/ + +@Service +public class FlowChartRoleGroupServiceImpl extends ServiceImpl 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); + } + + + +} diff --git a/src/main/java/com/lz/modules/performance/controller/FlowChartRoleGroupController.java b/src/main/java/com/lz/modules/performance/controller/FlowChartRoleGroupController.java new file mode 100644 index 00000000..3fc70ecd --- /dev/null +++ b/src/main/java/com/lz/modules/performance/controller/FlowChartRoleGroupController.java @@ -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(); + } +} diff --git a/src/main/resources/mapper/flow/FlowChartMapper.xml b/src/main/resources/mapper/flow/FlowChartMapper.xml index 9209f5c3..cb60d90b 100644 --- a/src/main/resources/mapper/flow/FlowChartMapper.xml +++ b/src/main/resources/mapper/flow/FlowChartMapper.xml @@ -96,7 +96,7 @@ - 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 + select * from lz_flow_chart_role_group where id=#{id} and is_delete = 0 limit 1 + + + + + insert into lz_flow_chart_role_group( + name, + remark, + is_delete, + gmt_create, + gmt_modified + )values( + #{ name}, + #{ remark}, + 0, + now(), + now() + ) + + + + + update + lz_flow_chart_role_group + + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + name = #{name}, + remark = #{remark} + + ,gmt_modified = now() + where id = #{id} + + + + + update + lz_flow_chart_role_group + set + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + name = #{name}, + remark = #{remark} + ,gmt_modified = now() + where id = #{id} + + + + + update lz_flow_chart_role_group set is_delete = 1 where id=#{id} limit 1 + + + + diff --git a/src/main/resources/mapper/flow/FlowChartRoleMapper.xml b/src/main/resources/mapper/flow/FlowChartRoleMapper.xml index c36cf30f..090344c1 100644 --- a/src/main/resources/mapper/flow/FlowChartRoleMapper.xml +++ b/src/main/resources/mapper/flow/FlowChartRoleMapper.xml @@ -11,50 +11,54 @@ + - 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 insert into lz_flow_chart_role( - chart_id, - role_id, - type, - is_delete, - gmt_create, - gmt_modified + chart_id, + role_id, + type, + role_group_id, + is_delete, + gmt_create, + gmt_modified )values( - #{ chartId}, - #{ roleId}, - #{ type}, - 0, - now(), - now() + #{ chartId}, + #{ roleId}, + #{ type}, + #{ roleGroupId}, + 0, + now(), + now() ) update - lz_flow_chart_role + lz_flow_chart_role is_delete = #{isDelete}, gmt_create = #{gmtCreate}, chart_id = #{chartId}, role_id = #{roleId}, - type = #{type} + type = #{type}, + role_group_id = #{roleGroupId} ,gmt_modified = now() where id = #{id} @@ -63,20 +67,21 @@ 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 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