查询机构人员

This commit is contained in:
root
2021-07-04 16:45:52 +08:00
parent afee88a408
commit 1f9f5ac2fa
6 changed files with 38 additions and 8 deletions
@@ -58,7 +58,9 @@ public class SarMenuController extends BaseController<SarMenu> {
for (SarMenu resultMenu : resultList) {
if ("gxhbq".equals(resultMenu.getId())) {
// 查出配置管理项
System.out.println(resultMenu);
List<SelectionResult> getDicList = dicTypeEOService.getDicTypeByDicId("ZHFKGAACTNUCN9AR5YBM");
System.out.println(getDicList);
if (getDicList != null && !getDicList.isEmpty()) {
for (SelectionResult selectionResult : getDicList) {
int i=0;
@@ -75,6 +77,8 @@ public class SarMenuController extends BaseController<SarMenu> {
}
}
resultList.addAll(listDic);
System.out.println("listDic");
System.out.println(listDic);
return Result.success(resultList);
}
@@ -140,6 +140,7 @@ public class SarStandardsInfoController extends BaseController<SarStandardsInfo>
}
}
page.setUserId(LoginUserUtil.getUserId());
System.out.println(page);
List<SarStandardsInfo> rows = sarStandardsInfoEOService.getSarStandardsInfoPage(page);
return Result.success(getPageInfo(page.getPager(), rows));
}
@@ -16,6 +16,7 @@ import com.adc.da.slrs.sarLawsInfo.page.SarLawsItemsEOPage;
import com.adc.da.slrs.sarLawsInfo.service.ISarLawsInfoService;
import com.adc.da.slrs.sarLawsItems.service.ISarLawsItemsService;
import com.adc.da.slrs.sarProductStand.dao.SarProductStandDao;
import com.adc.da.slrs.sarResource.entity.TsResource;
import com.adc.da.slrs.sarSarAccess.service.ISarSarAccessService;
import com.adc.da.slrs.sarSarAccessInfo.dao.SarSarAccessInfoDao;
import com.adc.da.slrs.sarStandAttrDetails.dao.SarStandAttrDetailsDao;
@@ -38,6 +39,7 @@ import com.adc.da.slrs.sarMenu.service.ISarMenuService;
import com.adc.da.slrs.sarStandardsInfo.dao.SarStandardsInfoDao;
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
import com.adc.da.slrs.sarUser.service.ITsUserService;
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
import com.adc.da.sys.common.SelectionResult;
import com.adc.da.sys.constant.ValueStateEnum;
@@ -151,6 +153,9 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
@Autowired
private SysInfoEOService sysInfoEOService;
@Autowired
private ITsUserService tsUserService;
/***
* @Description: 分页查询
@@ -161,7 +166,10 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
*/
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
//查询当前登录人角色拥有权限的菜单
List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
List<String> getMenuIdList=tsUserService.getResourceId(new TsResource());
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
System.out.println("菜单");
System.out.println(getMenuIdList);
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {
@@ -63,4 +63,5 @@ public interface ITsUserService extends IService<TsUser> {
*/
public List<SarMenu> getMenusByUserId(String userId);
List<String> getResourceId(TsResource tsResource);
}
@@ -168,4 +168,20 @@ public class TsUserServiceImpl extends ServiceImpl<TsUserDao, TsUser> implements
List<String> menuIds=tsRoleService.getMenuIdsByRoleIds(roleIds);
return sarMenuService.getMenuByIds(menuIds);
}
/**
* 查询当前登录的用户资源
* @return List<SarMenu>
* @param tsResource
*/
@Override
public List<String> getResourceId(TsResource tsResource) {
UserEO userEO=UserUtils.getUser();
String userId= userEO.getUsid();
System.out.println(userId);
List<String> positionIds=tsUserDao.selectPositionIds(userId);
List<String> roleIds=tsPositionService.getRoleIdsByPositionIds(positionIds);
return tsRoleService.getResourceIdsByRoleIds(roleIds);
}
}
@@ -381,7 +381,7 @@
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
left join SAR_MENU on SAR_STAND_MENU.menu_id = SAR_MENU.id
left join TS_RESOURCE on SAR_STAND_MENU.menu_id = TS_RESOURCE.id
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
left join TS_PERSON_COLLECT on (TS_PERSON_COLLECT.COLLECT_RES_ID = SAR_STANDARDS_INFO.id and TS_PERSON_COLLECT.VALID_FLAG=0)
where 1=1 and SAR_STANDARDS_INFO.valid_flag=0
@@ -439,7 +439,7 @@
</if>
<!-- 游离态标准查询 -->
<!-- <if test="menuId != null and menuId =='nomenu' and standType =='INLAND'">
and SAR_STAND_MENU.MENU_ID = (select SAR_MENU.id from SAR_MENU WHERE parent_id is null and sor_divide
and SAR_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide
='INLAND_STAND')
&lt;!&ndash;-查询游离态标准,编号和名称是分开的 &ndash;&gt;
<if test="standNumber != null">
@@ -450,7 +450,7 @@
</if>
</if>
<if test="menuId != null and menuId =='nomenu' and standType =='FOREIGN'">
and SAR_STAND_MENU.MENU_ID = (select SAR_MENU.id from SAR_MENU WHERE parent_id is null and sor_divide
and SAR_STAND_MENU.MENU_ID = (select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null and sor_divide
='FOREIGN_STAND')
<if test="standNumber != null">
and ((concat(SAR_STANDARDS_INFO.STAND_SORT,' ',SAR_STANDARDS_INFO.STAND_NUMBER,'-',
@@ -462,7 +462,7 @@
<!-- 当第一次进入页面未选择记录时-->
<!-- <if test="(menuId == null or menuId =='') and standType =='INLAND'">-->
<!-- and SAR_STAND_MENU.MENU_ID in (-->
<!-- select SAR_MENU.id from SAR_MENU start with id=(select SAR_MENU.id from SAR_MENU WHERE parent_id is null-->
<!-- select TS_RESOURCE.id from TS_RESOURCE start with id=(select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null-->
<!-- and sor_divide-->
<!-- ='INLAND_STAND') connect by prior id= parent_id-->
<!-- )-->
@@ -476,7 +476,7 @@
</if>
<!-- <if test="(menuId == null or menuId =='') and standType =='FOREIGN'">-->
<!-- and SAR_STAND_MENU.MENU_ID in (-->
<!-- select SAR_MENU.id from SAR_MENU start with id=(select SAR_MENU.id from SAR_MENU WHERE parent_id is null-->
<!-- select TS_RESOURCE.id from TS_RESOURCE start with id=(select TS_RESOURCE.id from TS_RESOURCE WHERE parent_id is null-->
<!-- and sor_divide-->
<!-- ='FOREIGN_STAND') connect by prior id= parent_id-->
<!-- )-->
@@ -710,7 +710,7 @@
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
left join SAR_MENU on SAR_STAND_MENU.menu_id = SAR_MENU.id
left join TS_RESOURCE on SAR_STAND_MENU.menu_id = TS_RESOURCE.id
where SAR_STANDARDS_INFO.id = #{id}
GROUP BY <include refid="Group_Column_List_Show"/>
</select>
@@ -828,7 +828,7 @@
left join TS_DICTYPE dicstandNature on (dicstandNature.dic_type_code = SAR_STANDARDS_INFO.stand_nature and
dicstandNature.dic_id is not null and dicstandNature.valid_flag = 0 )
left join SAR_STAND_MENU ON SAR_STANDARDS_INFO.id = SAR_STAND_MENU.stand_id
left join SAR_MENU on SAR_STAND_MENU.menu_id = SAR_MENU.id
left join TS_RESOURCE on SAR_STAND_MENU.menu_id = TS_RESOURCE.id
left join SAR_STAND_ATTR_INFO on (SAR_STAND_ATTR_INFO.stand_id = SAR_STANDARDS_INFO.id and SAR_STAND_ATTR_INFO.valid_flag=0)
left join TS_PERSON_COLLECT on (TS_PERSON_COLLECT.COLLECT_RES_ID = SAR_STANDARDS_INFO.id and TS_PERSON_COLLECT.VALID_FLAG=0)
where 1=1