Commit 2f80432f by liulianglang

加入权限判断可看数据

parent 0340a4a2
...@@ -3,6 +3,7 @@ package org.springblade.founder.tjfx.mapper; ...@@ -3,6 +3,7 @@ package org.springblade.founder.tjfx.mapper;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore; import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.founder.tjfx.entity.*; import org.springblade.founder.tjfx.entity.*;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -16,6 +17,12 @@ public interface DwTjfxMapper { ...@@ -16,6 +17,12 @@ public interface DwTjfxMapper {
DictitemXz getDwxxByDwdm(String unitcode); DictitemXz getDwxxByDwdm(String unitcode);
List<DictitemXz> getXqdwList(Map<String, Object> levMap); List<DictitemXz> getXqdwList(Map<String, Object> levMap);
//根据code获取该用户市级的单位
String getDUnitcode(@Param(value = "code") String code);
//根据code获取该用户县级的单位
String getXUnitcode(@Param(value = "code") String code);
@InterceptorIgnore(tenantLine = "1") @InterceptorIgnore(tenantLine = "1")
DwXnpgTj getDwTjFx(Map<String, Object> paramMap); DwXnpgTj getDwTjFx(Map<String, Object> paramMap);
......
...@@ -21,6 +21,26 @@ ...@@ -21,6 +21,26 @@
</if> </if>
</select> </select>
<!-- 获取市级别单位 -->
<select id="getDUnitcode" resultType="string" parameterType="string">
SELECT
CODE_LEV2
FROM
sys_dictitem_xz
WHERE
code = #{code}
</select>
<!-- 获取县级别单位 -->
<select id="getXUnitcode" resultType="string" parameterType="string">
SELECT
CODE_LEV3
FROM
sys_dictitem_xz
WHERE
code = #{code}
</select>
<select id="getSswpfltj" resultType="org.springblade.founder.tjfx.entity.Sswpfltj"> <select id="getSswpfltj" resultType="org.springblade.founder.tjfx.entity.Sswpfltj">
select select
(select count(1) zs from tb_st_asj ASJ left join tb_xw_ssdy sswp on sswp.asjbh = ASJ.asjbh where ASJ.xxsc_pdbz='0' and sswp.xxsc_pdbz = '0' (select count(1) zs from tb_st_asj ASJ left join tb_xw_ssdy sswp on sswp.asjbh = ASJ.asjbh where ASJ.xxsc_pdbz='0' and sswp.xxsc_pdbz = '0'
......
...@@ -102,6 +102,14 @@ public class DwAjlbTjfxServiceImpl implements DwAjlbTjfxService { ...@@ -102,6 +102,14 @@ public class DwAjlbTjfxServiceImpl implements DwAjlbTjfxService {
if (StringUtils.isEmpty(unitcode)) { if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt(); XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode=xzxtUser.getUnitcode() ;//获取对应用户的单位 unitcode=xzxtUser.getUnitcode() ;//获取对应用户的单位
String userGrade = xzxtUser.getGrade(); //用户等级
if("S".equals(userGrade)){
unitcode = "460000000000";
}else if("D".equals(userGrade)){
unitcode = dwTjfxMapper.getDUnitcode(unitcode);
}else if("X".equals(userGrade)){
unitcode = dwTjfxMapper.getXUnitcode(unitcode);
}
} }
//获取本单位信息 //获取本单位信息
......
...@@ -32,6 +32,14 @@ public class DwTjfxServiceImpl implements DwTjfxService { ...@@ -32,6 +32,14 @@ public class DwTjfxServiceImpl implements DwTjfxService {
if (StringUtils.isEmpty(unitcode)) { if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt(); XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode = xzxtUser.getUnitcode();//获取对应用户的单位 unitcode = xzxtUser.getUnitcode();//获取对应用户的单位
String userGrade = xzxtUser.getGrade(); //用户等级
if("S".equals(userGrade)){
unitcode = "460000000000";
}else if("D".equals(userGrade)){
unitcode = dwTjfxMapper.getDUnitcode(unitcode);
}else if("X".equals(userGrade)){
unitcode = dwTjfxMapper.getXUnitcode(unitcode);
}
} }
System.out.println(unitcode); System.out.println(unitcode);
//获取本单位信息 //获取本单位信息
......
...@@ -47,6 +47,14 @@ public class NewDwAjlbServiceImpl implements NewDwAjlbService { ...@@ -47,6 +47,14 @@ public class NewDwAjlbServiceImpl implements NewDwAjlbService {
if (StringUtils.isEmpty(unitcode)) { if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt(); XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode=xzxtUser.getUnitcode() ;//获取对应用户的单位 unitcode=xzxtUser.getUnitcode() ;//获取对应用户的单位
String userGrade = xzxtUser.getGrade(); //用户等级
if("S".equals(userGrade)){
unitcode = "460000000000";
}else if("D".equals(userGrade)){
unitcode = dwTjfxMapper.getDUnitcode(unitcode);
}else if("X".equals(userGrade)){
unitcode = dwTjfxMapper.getXUnitcode(unitcode);
}
} }
//获取本单位信息 //获取本单位信息
......
...@@ -48,6 +48,14 @@ public class WcnrfzShrTjServiceImpl implements WcnrfzShrTjService { ...@@ -48,6 +48,14 @@ public class WcnrfzShrTjServiceImpl implements WcnrfzShrTjService {
if (StringUtils.isEmpty(unitcode)) { if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt(); XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode=xzxtUser.getUnitcode() ;//获取对应用户的单位 unitcode=xzxtUser.getUnitcode() ;//获取对应用户的单位
String userGrade = xzxtUser.getGrade(); //用户等级
if("S".equals(userGrade)){
unitcode = "460000000000";
}else if("D".equals(userGrade)){
unitcode = dwTjfxMapper.getDUnitcode(unitcode);
}else if("X".equals(userGrade)){
unitcode = dwTjfxMapper.getXUnitcode(unitcode);
}
} }
//获取本单位信息 //获取本单位信息
......
...@@ -45,6 +45,14 @@ public class WcnrfzTjServiceImpl implements WcnrfzTjService { ...@@ -45,6 +45,14 @@ public class WcnrfzTjServiceImpl implements WcnrfzTjService {
if (StringUtils.isEmpty(unitcode)) { if (StringUtils.isEmpty(unitcode)) {
XzxtUser xzxtUser = SecureUtil.getUserXzxt(); XzxtUser xzxtUser = SecureUtil.getUserXzxt();
unitcode=xzxtUser.getUnitcode() ;//获取对应用户的单位 unitcode=xzxtUser.getUnitcode() ;//获取对应用户的单位
String userGrade = xzxtUser.getGrade(); //用户等级
if("S".equals(userGrade)){
unitcode = "460000000000";
}else if("D".equals(userGrade)){
unitcode = dwTjfxMapper.getDUnitcode(unitcode);
}else if("X".equals(userGrade)){
unitcode = dwTjfxMapper.getXUnitcode(unitcode);
}
} }
//获取本单位信息 //获取本单位信息
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment