From b329b6c455b67311b9ddafaf79114f6427ce6c58 Mon Sep 17 00:00:00 2001 From: erdanergou Date: Tue, 28 Mar 2023 13:24:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=87=BA=E5=BA=93=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E6=8C=89=E7=89=A9=E6=96=99=E7=B1=BB=E5=88=AB=E5=88=86?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PageController.java | 11 +++ .../depository_manage/mapper/RoleMapper.java | 8 ++ .../depository_manage/mapper/RoleMapper.xml | 4 + .../service/RoleService.java | 9 +- .../impl/DepositoryRecordServiceImpl.java | 91 +++++++++--------- .../service/impl/ExcelServiceImpl.java | 25 ++--- .../service/impl/RoleServiceImpl.java | 15 +++ src/main/resources/static/css/public.css | 6 +- .../static/upload/PrintTemplate.xlsx | Bin 21351 -> 21406 bytes .../application/form-step-look_back.html | 2 +- .../pages/scanQrCode/ScanBarOrQrCodeOut.html | 9 +- .../depository_manage/mapper/RoleMapper.xml | 4 + target/classes/static/css/public.css | 6 +- .../classes/static/upload/PrintTemplate.xlsx | Bin 21351 -> 21406 bytes .../application/form-step-look_back.html | 2 +- .../pages/scanQrCode/ScanBarOrQrCodeOut.html | 9 +- 16 files changed, 132 insertions(+), 69 deletions(-) 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 a99999fe..a3f3622a 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -2056,6 +2056,17 @@ public class PageController { mv.addObject("cdisplay", "none"); } + Integer role = userToken.getIsadmin(); + if (role == null) { + role = 1; + } + + if (Integer.compare(userToken.getMaindeparment(), 361) == 0 || Integer.compare(role, 4) == 0) { + mv.addObject("display", "inline-block"); + }else{ + mv.addObject("display", "none"); + + } applicationOutRecordPById.setApplicantName(userByPort.getName()); diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/RoleMapper.java b/src/main/java/com/dreamchaser/depository_manage/mapper/RoleMapper.java index 3f06d3a8..4c91d4c4 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/RoleMapper.java +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/RoleMapper.java @@ -92,6 +92,14 @@ public interface RoleMapper { */ List findUserIdByDid(Integer did); + + /** + * 根据类型id获取userId + * @param mtId + * @return + */ + List findUserIdByMtId(Long mtId); + /** * 根据条件获取权限 * diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/RoleMapper.xml b/src/main/java/com/dreamchaser/depository_manage/mapper/RoleMapper.xml index 726a260b..ee8dce17 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/RoleMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/RoleMapper.xml @@ -165,6 +165,10 @@ select userid from postoruserrole where 1 = 1 and did = #{did} and classes in (1,2) group by userid + + + +