优化获取节点的权限
This commit is contained in:
parent
f113774616
commit
865858c80c
@ -43,4 +43,5 @@ public interface FlowChartMapper extends BaseMapper<FlowChart> {
|
||||
|
||||
List<FlowChart> selectFlowChartsByGroupId(Long groupId);
|
||||
|
||||
List<FlowChartRoleDto> selectCanSetChartRoleByChartId(Long id);
|
||||
}
|
||||
@ -41,4 +41,6 @@ public interface FlowChartService extends IService<FlowChart> {
|
||||
List<FlowChartDto> selectFlowChartDtoByFlowManagerId(Long id);
|
||||
|
||||
List<FlowChart> selectFlowChartsByGroupId(Long groupId);
|
||||
|
||||
List<FlowChartRoleDto> selectCanSetChartRoleByChartId(Long id);
|
||||
}
|
||||
@ -82,6 +82,12 @@ public class FlowChartServiceImpl extends ServiceImpl<FlowChartMapper, FlowChart
|
||||
return flowChartMapper.selectFlowChartsByGroupId(groupId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FlowChartRoleDto> selectCanSetChartRoleByChartId(Long id)
|
||||
{
|
||||
return flowChartMapper.selectCanSetChartRoleByChartId(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -57,8 +57,8 @@ public class FlowChartController {
|
||||
List<FlowChartDto> flowChartDtos = flowChartService.selectFlowChartDtoByFlowManagerId(flowManager.getId());
|
||||
for (FlowChartDto dto:flowChartDtos
|
||||
) {
|
||||
List<FlowChartRoleDto> flowCharts = flowChartService.selectChartRoleByChartId(dto.getId());
|
||||
dto.setRoleDtos(flowCharts);
|
||||
List<FlowChartRoleDto> flowChartRoles = flowChartService.selectCanSetChartRoleByChartId(dto.getId());
|
||||
dto.setRoleDtos(flowChartRoles);
|
||||
if(groupId > 0){
|
||||
//获取节点已保存的数据
|
||||
FlowChartDetailRecordListDto flowChartDetailRecordListDto = new FlowChartDetailRecordListDto();
|
||||
|
||||
@ -119,5 +119,11 @@
|
||||
) and is_delete=0 order by step_index asc
|
||||
</select>
|
||||
|
||||
<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
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user