diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index dd7c7dd0..2e1ca9d2 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -434,7 +434,7 @@ public class PageController { if (role == null) { role = 1; } - if (role == 4) { + if (role == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -455,7 +455,7 @@ public class PageController { if (isadmin == null) { isadmin = 1; } - if (isadmin == 4) { + if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -657,7 +657,7 @@ public class PageController { } List materialTypeAll = materialTypeService.findMaterialTypeByCondition(map); mv.addObject("materialTypes", materialTypeAll); - if (role == 4) { + if (role == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -893,7 +893,7 @@ public class PageController { if (isadmin == null) { isadmin = 1; } - if (isadmin == 4) { + if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { mv.addObject("display", "inline-block"); } else { mv.addObject("display", "none"); @@ -926,10 +926,20 @@ public class PageController { } @GetMapping("/group_edit") - public ModelAndView groupEdit(Integer id) { + public ModelAndView groupEdit(Integer id,HttpServletRequest request) { ModelAndView mv = new ModelAndView(); mv.setViewName("pages/group/group_edit"); Group group = groupService.findGroupOnlyById(id); + UserByPort userToken = (UserByPort) request.getAttribute("userToken"); + Integer isadmin = userToken.getIsadmin(); + if (isadmin == null) { + isadmin = 1; + } + if (isadmin == 4 || Integer.compare(userToken.getMaindeparment(),361) == 0) { + mv.addObject("display", "inline-block"); + } else { + mv.addObject("display", "none"); + } mv.addObject("id", id); mv.addObject("record", group); return mv; diff --git a/src/main/resources/templates/pages/group/group-out.html b/src/main/resources/templates/pages/group/group-out.html index 967bf23a..732df512 100644 --- a/src/main/resources/templates/pages/group/group-out.html +++ b/src/main/resources/templates/pages/group/group-out.html @@ -14,8 +14,8 @@
diff --git a/src/main/resources/templates/pages/group/group_edit.html b/src/main/resources/templates/pages/group/group_edit.html index b323cd7d..9a0fd678 100644 --- a/src/main/resources/templates/pages/group/group_edit.html +++ b/src/main/resources/templates/pages/group/group_edit.html @@ -58,16 +58,16 @@
diff --git a/src/main/resources/templates/pages/material/material-out.html b/src/main/resources/templates/pages/material/material-out.html index 1cccf0a9..0f0051a2 100644 --- a/src/main/resources/templates/pages/material/material-out.html +++ b/src/main/resources/templates/pages/material/material-out.html @@ -81,7 +81,7 @@ diff --git a/src/main/resources/templates/pages/materialtype/materialType_view.html b/src/main/resources/templates/pages/materialtype/materialType_view.html index abb0e9c4..e80c5d51 100644 --- a/src/main/resources/templates/pages/materialtype/materialType_view.html +++ b/src/main/resources/templates/pages/materialtype/materialType_view.html @@ -59,8 +59,8 @@ diff --git a/src/main/resources/templates/pages/split/split-out.html b/src/main/resources/templates/pages/split/split-out.html index e29a012b..d11c14b8 100644 --- a/src/main/resources/templates/pages/split/split-out.html +++ b/src/main/resources/templates/pages/split/split-out.html @@ -69,16 +69,16 @@
diff --git a/target/classes/templates/pages/group/group-out.html b/target/classes/templates/pages/group/group-out.html index 967bf23a..732df512 100644 --- a/target/classes/templates/pages/group/group-out.html +++ b/target/classes/templates/pages/group/group-out.html @@ -14,8 +14,8 @@
diff --git a/target/classes/templates/pages/group/group_edit.html b/target/classes/templates/pages/group/group_edit.html index b323cd7d..9a0fd678 100644 --- a/target/classes/templates/pages/group/group_edit.html +++ b/target/classes/templates/pages/group/group_edit.html @@ -58,16 +58,16 @@
diff --git a/target/classes/templates/pages/material/material-out.html b/target/classes/templates/pages/material/material-out.html index 1cccf0a9..0f0051a2 100644 --- a/target/classes/templates/pages/material/material-out.html +++ b/target/classes/templates/pages/material/material-out.html @@ -81,7 +81,7 @@ diff --git a/target/classes/templates/pages/materialtype/materialType_view.html b/target/classes/templates/pages/materialtype/materialType_view.html index abb0e9c4..e80c5d51 100644 --- a/target/classes/templates/pages/materialtype/materialType_view.html +++ b/target/classes/templates/pages/materialtype/materialType_view.html @@ -59,8 +59,8 @@ diff --git a/target/classes/templates/pages/split/split-out.html b/target/classes/templates/pages/split/split-out.html index e29a012b..d11c14b8 100644 --- a/target/classes/templates/pages/split/split-out.html +++ b/target/classes/templates/pages/split/split-out.html @@ -69,16 +69,16 @@