feat: There is no way the

This commit is contained in:
super_liu
2021-08-19 10:38:21 +08:00
parent c343a20ae2
commit bc1a9e8241
2 changed files with 9 additions and 10 deletions
@@ -189,10 +189,6 @@ public class SarStandItems extends BaseEntity {
@TableField("compliance_state")
private String complianceState;
@ApiModelProperty(value = "符合性要求-符合性状态")
@TableId("COMPLIANCE_REQUIR")
private String complianceRequire;
@ApiModelProperty(value = "解读内容")
@TableField("read_content")
private String readContent;
@@ -267,13 +267,13 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
*/
public List<SarStandardsInfo> getSarStandardsInfoPage(SarStandardsInfoEOPage page) throws Exception {
//查询当前登录人角色拥有权限的菜单
if(page.getMenuId() != null ){
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
QueryWrapper<TsResource> qw = new QueryWrapper<>();
qw.eq("ID",page.getMenuId());
qw.isNull("PARENT_ID");
List<TsResource> children = iTsResourceService.list(qw);
if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
List<String> getMenuIdList = tsUserService.getResourceId(new TsResource());
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {
@@ -609,7 +609,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
List<SarStandItems> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
if(!sarItemVOS.isEmpty()){
Map<String,String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getItemsName));
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getTermsConditions));
sarStandardsInfoEO.setMapItems(collectMap);
}
createStandMQService.sendStandMQ(sarStandardsInfoEO,"add");
@@ -1195,7 +1195,7 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
List<SarStandItems> sarItemVOS = standItemsDao.querySarItemAndInterpretation(pageInfo);
if(!sarItemVOS.isEmpty()){
Map<String,String> collectMap = sarItemVOS.stream().filter((e) -> e.getItemsNum() != null && e.getItemsName() != null)
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getItemsName));
.collect(Collectors.toMap(SarStandItems::getItemsNum, SarStandItems::getTermsConditions));
sarStandardsInfoEO.setMapItems(collectMap);
}
createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");
@@ -1362,8 +1362,11 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
page = (SarStandardsInfoEOPage) JSONObject.toBean(jsonObject, SarStandardsInfoEOPage.class);
page.setStandType(standardsInfoExcelVO.getStandType());
//查询当前登录人角色拥有权限的菜单
List<String> getMenuIdList=tsUserService.getResourceId(new TsResource());
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
List<String> getMenuIdList = new ArrayList<>();
if(standardsInfoExcelVO.getUserId() != null){
getMenuIdList= tsUserService.getResourceUserId(standardsInfoExcelVO.getUserId());
}
// List<String> getMenuIdList = sarMenuEOService.queryRoleMenuIdList(page.getStandType() + "_STAND", null);
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
page.setMenuRoleList(getMenuIdList);
} else {