修改角色对应的可见性权限
parent
875c239854
commit
8da7c908e0
|
@ -60,12 +60,12 @@ public class HumanCostController extends BaseController{
|
|||
Admin admin = getAdmin();
|
||||
int roleLevel = admin.getRoleLevel();
|
||||
List<Project> selfProjects = projectRepository.findByCreator(admin.getId(), new Date());
|
||||
if (roleLevel <= 2 || roleLevel == 4) {
|
||||
if (roleLevel <= 3 || roleLevel == 6) {
|
||||
model.put("deptVary", 1);
|
||||
model.put("deptList", deptRepository.findAll());
|
||||
model.put("projectList", projectRepository.findAll());
|
||||
model.put("showSalary", 1);
|
||||
} else if (roleLevel == 3) {
|
||||
} else if (roleLevel == 4 || roleLevel == 5) {
|
||||
model.put("deptVary", -1);
|
||||
model.put("deptList", new ArrayList<>());
|
||||
model.put("projectList", projectRepository.findByDeptId(admin.getDeptId()));
|
||||
|
|
|
@ -80,6 +80,7 @@ public class ProjectController extends BaseController {
|
|||
//当前登录人的角色类型
|
||||
model.put("keywords", keywords);
|
||||
model.put("adminId", InterfaceUtil.getAdminId());
|
||||
model.put("admin", InterfaceUtil.getAdmin());
|
||||
model.put("deptList", deptService.findAll());
|
||||
ConcurrentHashMap<String, String> searchInfo = getSearchInfo(keywords, model);
|
||||
model.put("pager", projectService.list(searchInfo, pageNumber, pageSize));
|
||||
|
|
|
@ -250,7 +250,7 @@ public class HumanCostService {
|
|||
}
|
||||
Admin admin = InterfaceUtil.getAdmin();
|
||||
List<Project> projectList = null;
|
||||
if (admin.getRoleLevel() <= 2 || admin.getRoleLevel() == 4) {
|
||||
if (admin.getRoleLevel() <= 3 || admin.getRoleLevel() == 6) {
|
||||
String sql = "select proj.id, proj.name from project proj where (proj.status = ? or (proj.status = ? and proj.approve_status_budget = ?) or (proj.status = ? and proj.approve_status_final <> ?)) order by proj.id asc";
|
||||
projectList = pagination.find(sql, Project.class, Project.STATUS_SETTLE, Project.STATUS_BUDGET, 2, Project.STATUS_FINAL, 2);
|
||||
} else {
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
<#-- </@shiro.hasPermission>-->
|
||||
|
||||
<#-- 项目等于预算状态、预算审核等于通过状态 -->
|
||||
<#if (list.status==5 && list.approveStatusBudget=2) || (list.status=10 && list.approveStatusSettle=2) >
|
||||
<#if admin.getRoleLevel() == 6 && ((list.status==5 && list.approveStatusBudget=2) || (list.status=10 && list.approveStatusSettle=2)) >
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/settle/add?id=${list.id}'"><span
|
||||
|
@ -247,7 +247,7 @@
|
|||
</#if>
|
||||
|
||||
<#-- 项目等于结算状态、结算审核不等于待审核状态-->
|
||||
<#if list.status==10 && list.approveStatusSettle!=1>
|
||||
<#if admin.getRoleLevel() = 6 && list.status==10 && list.approveStatusSettle!=1>
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/settle/edit?id=${list.id}'"><span
|
||||
|
@ -256,7 +256,7 @@
|
|||
</#if>
|
||||
|
||||
<#-- 项目等于结算状态、结算审核等于通过状态 -->
|
||||
<#if list.status== 10 && list.approveStatusSettle==2 >
|
||||
<#if (admin.getRoleLevel() = 2 || admin.getRoleLevel() = 6) && (list.status== 10 && list.approveStatusSettle==2) >
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/final/add?id=${list.id}'"><span
|
||||
|
@ -265,7 +265,7 @@
|
|||
</#if>
|
||||
|
||||
<#-- 项目等于决算状态、决算审核不等于待审核状态、 决算审核不等于通过状态-->
|
||||
<#if list.status== 15 && list.approveStatusFinal!=1 && list.approveStatusFinal!=2 >
|
||||
<#if (admin.getRoleLevel() = 2 || admin.getRoleLevel() = 6) && list.status== 15 && list.approveStatusFinal!=1 && list.approveStatusFinal!=2 >
|
||||
<button type="button"
|
||||
class="am-btn am-btn-default am-btn-xs am-text-secondary"
|
||||
onclick="location.href='${base}/project/final/edit?id=${list.id}'"><span
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目结算表</strong> / <small>${project.name}</small></div>
|
||||
</div>
|
||||
|
||||
<form method="post" class="am-form" id="pmsForm" action="${base}/project/settleAdd">
|
||||
<form method="post" class="am-form" id="pmsForm" action="${base}/project/settleAdd" data-am-validator>
|
||||
<!--选项卡(tabs)begin-->
|
||||
<div class="am-tabs am-margin" data-am-tabs>
|
||||
<ul class="am-tabs-nav am-nav am-nav-tabs">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目结算表</strong> / <small>${project.name}</small></div>
|
||||
</div>
|
||||
|
||||
<form method="post" class="am-form" id="pmsForm">
|
||||
<form method="post" class="am-form" id="pmsForm" data-am-validator>
|
||||
<!--选项卡(tabs)begin-->
|
||||
<div class="am-tabs am-margin" data-am-tabs>
|
||||
<ul class="am-tabs-nav am-nav am-nav-tabs">
|
||||
|
|
Loading…
Reference in New Issue