From b9c5c9062b4607e0318dcbc4e5b1a38e5393f297 Mon Sep 17 00:00:00 2001 From: wans <747101512@qq.com> Date: Tue, 6 Jul 2021 14:46:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9app=E9=80=9A=E8=AE=AF?= =?UTF-8?q?=E5=BD=95=E5=92=8C=E8=AF=B7=E5=81=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CommunityBossServiceImpl.java | 8 ++++++++ .../service/leave/impl/LeaveServiceImpl.java | 15 ++++++++++----- .../mapper/communityboss/communityboss-mapper.xml | 7 +++++-- .../static/route/userpoints/map_user.html | 2 +- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/cm/systemcity/service/communityboss/impl/CommunityBossServiceImpl.java b/src/main/java/com/cm/systemcity/service/communityboss/impl/CommunityBossServiceImpl.java index 5ce3427..2f88cca 100755 --- a/src/main/java/com/cm/systemcity/service/communityboss/impl/CommunityBossServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/communityboss/impl/CommunityBossServiceImpl.java @@ -360,6 +360,14 @@ public class CommunityBossServiceImpl extends AbstractService implements ICommun @Override public List listCommunityBossDetail(Map params) throws SearchException { + if(params.get("communityBossParentId") != null + && !"".equals(params.get("communityBossParentId").toString()) + && !"0".equals(params.get("communityBossParentId").toString())){ + Map query = new HashMap<>(4); + query.put("communityBossId",params.get("communityBossParentId").toString()); + CommunityBossDTO communityBoss = communityBossService.getCommunityBoss(query); + params.put("communityBossParentUserId",communityBoss.getCommunityBossUserId()); + } return communityBossDao.listCommunityBossDetail(params); } diff --git a/src/main/java/com/cm/systemcity/service/leave/impl/LeaveServiceImpl.java b/src/main/java/com/cm/systemcity/service/leave/impl/LeaveServiceImpl.java index 2409ebc..50099df 100644 --- a/src/main/java/com/cm/systemcity/service/leave/impl/LeaveServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/leave/impl/LeaveServiceImpl.java @@ -83,15 +83,20 @@ public class LeaveServiceImpl extends BaseService implements ILeaveService { approverName = nLeaders.getJSONObject(0).getString("userName"); } else { LOG.debug("不是N员,查询是不是网格长"); - userParams.put("communityBossId", appTokenUser.getId()); + /** + * 小王帅 2021年7月6日09:20:01 + * 修改 userParams.put("communityBossId", appTokenUser.getId()); + */ + userParams.put("communityBossUserId", appTokenUser.getId()); CommunityBossDTO communityBossDTO = communityBossService.getCommunityBoss(userParams); - if (communityBossDTO.getCommunityBossLevel() != 3) { - throw new SearchException("非三级网格长和N员"); + if (communityBossDTO.getCommunityBossLevel() < 2) { + throw new SearchException("三、四、五网格长和专管员才可以请假"); } - LOG.debug("查询二级网格长"); + LOG.debug("查询上级网格长"); + userParams.clear(); userParams.put("communityBossId", communityBossDTO.getCommunityBossParentId()); communityBossDTO = communityBossService.getCommunityBoss(userParams); - approverId = communityBossDTO.getCommunityBossId(); + approverId = communityBossDTO.getCommunityBossUserId(); approverName = communityBossDTO.getCommunityBossName(); } params.put("approverId", approverId); diff --git a/src/main/resources/mybatis/mapper/communityboss/communityboss-mapper.xml b/src/main/resources/mybatis/mapper/communityboss/communityboss-mapper.xml index b14a3dd..6c187fd 100755 --- a/src/main/resources/mybatis/mapper/communityboss/communityboss-mapper.xml +++ b/src/main/resources/mybatis/mapper/communityboss/communityboss-mapper.xml @@ -356,12 +356,15 @@ t1.area_id, t1.area_name, t1.grid_summary, + t4.user_name community_boss_name, + t4.user_phone community_boss_phone, GROUP_CONCAT(t3.community_id) community_ids, GROUP_CONCAT(t3.community_name) community_names FROM city_community_boss t1 - LEFT JOIN city_community_boss_community t2 ON t1.community_boss_id = t2.community_boss_id - LEFT JOIN city_community t3 ON t2.community_id = t3.community_id AND t3.is_delete = 0 + LEFT JOIN city_community_boss_community t2 ON t1.community_boss_id = t2.community_boss_id + LEFT JOIN city_community t3 ON t2.community_id = t3.community_id AND t3.is_delete = 0 + LEFT JOIN sys_user t4 ON t1.community_boss_user_id = t4.user_id WHERE t1.is_delete = 0 GROUP BY diff --git a/src/main/resources/static/route/userpoints/map_user.html b/src/main/resources/static/route/userpoints/map_user.html index 40df949..82f43a3 100755 --- a/src/main/resources/static/route/userpoints/map_user.html +++ b/src/main/resources/static/route/userpoints/map_user.html @@ -28,7 +28,7 @@