Merge branch 'develop_migration' into 'develop_master'
feat: There is no way the, buss tree auth See merge request LiuChao/foton-slrs-system-rest!404
This commit is contained in:
+4
@@ -53,6 +53,10 @@ public class SarBussStandAttrInfo extends BaseEntity {
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date modifyTime;
|
||||
|
||||
@ApiModelProperty(value = "体系类别")
|
||||
@TableField("TXLBBUSS")
|
||||
private String txlbbuss;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String glwj;
|
||||
//
|
||||
|
||||
+4
@@ -43,6 +43,10 @@ public class SarBussStandMenu extends BaseEntity {
|
||||
@TableField("VALID_FLAG")
|
||||
private Integer validFlag;
|
||||
|
||||
@ApiModelProperty(value = "树结构数据 区分 类型: 标准数据 tsr 技术系列 sarMs ")
|
||||
@TableField("TREE_TYPE")
|
||||
private String treeType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String oldMenuId;
|
||||
|
||||
|
||||
+13
-1
@@ -4,10 +4,13 @@ import com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu;
|
||||
import com.adc.da.slrs.sarBussStandMenu.dao.SarBussStandMenuDao;
|
||||
import com.adc.da.slrs.sarBussStandMenu.service.ISarBussStandMenuService;
|
||||
import com.adc.da.slrs.sarResource.service.ITsResourceService;
|
||||
import com.adc.da.sys.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -24,8 +27,17 @@ public class SarBussStandMenuServiceImpl extends ServiceImpl<SarBussStandMenuDao
|
||||
@Autowired
|
||||
private ITsResourceService sarMenuEOService;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuStandardService iSarMenuStandardService;
|
||||
|
||||
public int deleteByMenuId (SarBussStandMenu sarStandMenuEO){
|
||||
List<String> menuIds = sarMenuEOService.getChildMenuList(sarStandMenuEO.getOldMenuId());
|
||||
String treeType = sarStandMenuEO.getTreeType();
|
||||
List<String> menuIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
menuIds = iSarMenuStandardService.getChildMenuList(sarStandMenuEO.getOldMenuId());
|
||||
}else {
|
||||
menuIds = sarMenuEOService.getChildMenuList(sarStandMenuEO.getOldMenuId());
|
||||
}
|
||||
sarStandMenuEO.setMenuIds(menuIds);
|
||||
return this.baseMapper.deleteByMenuId(sarStandMenuEO);
|
||||
}
|
||||
|
||||
+95
-9
@@ -19,6 +19,7 @@ import com.adc.da.search.service.StandLawsSearchService;
|
||||
import com.adc.da.slrs.otConvertMq.dao.OtConvertMqDao;
|
||||
import com.adc.da.slrs.otConvertMq.entity.OtConvertMq;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.dao.SarBussStandAttrInfoDao;
|
||||
import com.adc.da.slrs.sarBussStandAttrInfo.entity.SarBussStandAttrInfo;
|
||||
import com.adc.da.slrs.sarBussStandFile.dao.SarBussStandFileDao;
|
||||
import com.adc.da.slrs.sarBussStandFile.entity.SarBussStandFile;
|
||||
import com.adc.da.slrs.sarBussStandItems.dao.SarBussStandItemsDao;
|
||||
@@ -42,6 +43,7 @@ import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
|
||||
import com.adc.da.sys.constant.ValueStateEnum;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.sys.sarMenuStandard.service.ISarMenuStandardService;
|
||||
import com.adc.da.sys.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.adc.da.utils.util.FieldConvertUtil;
|
||||
@@ -145,6 +147,9 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
@Autowired
|
||||
private StandLawsSearchService standLawsSearchService;
|
||||
|
||||
@Autowired
|
||||
private ISarMenuStandardService iSarMenuStandardService;
|
||||
|
||||
@Override
|
||||
public SarBussionessStand getStandInfoByReviseStatus(String reviseStatus){
|
||||
return sarBussionessStandEODao.getStandInfoByReviseStatus(reviseStatus);
|
||||
@@ -250,11 +255,13 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
page.setPageSize(10000);
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
String treeType = page.getTreeType();
|
||||
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")){
|
||||
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "tsr".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
@@ -265,7 +272,31 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}else if(!page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
|
||||
// if(children.isEmpty() && !page.getMenuId().equals("nomenu")){
|
||||
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
// List<String> ids = iTsResourceService.getChildMenuList(page.getMenuId());
|
||||
// if (ids != null && !ids.isEmpty()) {
|
||||
// page.setMenuAllChildrenIdList(ids);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (StringUtils.isNotBlank(page.getAdvanceSearchVOStr())) {
|
||||
List<SarAdvanceSearchVO> searchList = com.alibaba.fastjson.JSONObject.parseArray(page.getAdvanceSearchVOStr(),SarAdvanceSearchVO.class);
|
||||
@@ -850,15 +881,24 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
public SarBussionessStandEOPage updateStandardsMenu(SarBussionessStandEOPage standardsInfoEO) {
|
||||
SarBussStandMenu sarStandMenuEO = new SarBussStandMenu();
|
||||
String nowMenuId = standardsInfoEO.getMenuId();
|
||||
String treeType = standardsInfoEO.getTreeType();
|
||||
String menuName = standardsInfoEO.getMenuName();
|
||||
sarStandMenuEO.setMenuId(nowMenuId);
|
||||
for (int i = 0; i < standardsInfoEO.getIdlist().length; i++) {
|
||||
sarStandMenuEO.setBussStandId(standardsInfoEO.getIdlist()[i]);
|
||||
String standId = standardsInfoEO.getIdlist()[i];
|
||||
sarStandMenuEO.setBussStandId(standId);
|
||||
sarStandMenuEO.setId(null);
|
||||
sarStandMenuEO.setValidFlag(0);
|
||||
sarStandMenuEO.setTreeType("sarMs");
|
||||
// 根据当前目录查询所在父节点
|
||||
String secondLevelId = "";
|
||||
List<String> getMenuPIds = iTsResourceService.getParentMenuId(nowMenuId);
|
||||
if (getMenuPIds != null && getMenuPIds.size() > 1) {
|
||||
List<String> getMenuPIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
getMenuPIds = iSarMenuStandardService.getChildMenuList(nowMenuId);
|
||||
}else {
|
||||
getMenuPIds = iTsResourceService.getParentMenuId(nowMenuId);
|
||||
}
|
||||
if (!getMenuPIds.isEmpty()) {
|
||||
int idSize = getMenuPIds.size();
|
||||
secondLevelId = getMenuPIds.get(idSize-1);
|
||||
} else {
|
||||
@@ -868,7 +908,13 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
SarBussStandMenu standMenuEOQuery = new SarBussStandMenu();
|
||||
standMenuEOQuery.setMenuId(secondLevelId);
|
||||
standMenuEOQuery.setBussStandId(standardsInfoEO.getIdlist()[i]);
|
||||
List<String> menuIds = iTsResourceService.getChildMenuList(secondLevelId);
|
||||
|
||||
List<String> menuIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
|
||||
menuIds = iSarMenuStandardService.getChildMenuList(secondLevelId);
|
||||
}else {
|
||||
menuIds = iTsResourceService.getChildMenuList(secondLevelId);
|
||||
}
|
||||
standMenuEOQuery.setMenuIds(menuIds);
|
||||
List<SarBussStandMenu> getInfo = sarBussStandMenuEODao.selectMenuByMenuParentId(standMenuEOQuery);
|
||||
//删除节点与根节点的关联
|
||||
@@ -876,14 +922,30 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarStandMenuDel.setBussStandId(standardsInfoEO.getIdlist()[i]);
|
||||
sarStandMenuDel.setMenuId(standardsInfoEO.getRootMenuId());
|
||||
sarBussStandMenuEODao.deleteByStandIdAndMenuId(sarStandMenuDel);
|
||||
int op = 0;
|
||||
if (getInfo == null || getInfo.isEmpty()) {
|
||||
sarStandMenuEO.setId(UUIDUtils.randomUUID20());
|
||||
sarBussStandMenuEODao.insert(sarStandMenuEO);
|
||||
op = sarBussStandMenuEODao.insert(sarStandMenuEO);
|
||||
} else {
|
||||
sarStandMenuEO.setOldMenuId(secondLevelId);
|
||||
List<String> menuOldIds = iTsResourceService.getChildMenuList(secondLevelId);
|
||||
List<String> menuOldIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
|
||||
menuOldIds = iSarMenuStandardService.getChildMenuList(secondLevelId);
|
||||
}else {
|
||||
menuOldIds= iTsResourceService.getChildMenuList(secondLevelId);
|
||||
}
|
||||
sarStandMenuEO.setMenuIds(menuOldIds);
|
||||
sarBussStandMenuEODao.updateByStandIdAndMenuId(sarStandMenuEO);
|
||||
op = sarBussStandMenuEODao.updateByStandIdAndMenuId(sarStandMenuEO);
|
||||
}
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.eq("STAND_ID",standId);
|
||||
List<SarBussStandAttrInfo> infoList = sarBussStandAttrInfoEODao.selectList(qw);
|
||||
if(!infoList.isEmpty()){
|
||||
SarBussStandAttrInfo attrInfo = new SarBussStandAttrInfo();
|
||||
attrInfo.setId(infoList.get(0).getId());
|
||||
attrInfo.setTxlbbuss(menuName);
|
||||
attrInfo.setValidFlag("0");
|
||||
sarBussStandAttrInfoEODao.updateById(attrInfo);
|
||||
}
|
||||
// sarBussStandMenuEODao.updateByStandIDSelective(sarStandMenuEO);
|
||||
}
|
||||
@@ -894,11 +956,12 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
public List<SarBussionessStand> getSarBussionStandPage(SarBussionessStandEOPage page) throws Exception {
|
||||
//查询当前登录人角色拥有权限的菜单
|
||||
if(page.getMenuId() != null && page.getUserId() != null && StringUtils.isNotBlank(page.getUserId())){
|
||||
String treeType = page.getTreeType();
|
||||
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")){
|
||||
if(children.isEmpty() && !page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "tsr".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
@@ -909,6 +972,29 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}else if(!page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
page.setMenuRoleList(getMenuIdList);
|
||||
} else {
|
||||
page.setMenuRoleList(null);
|
||||
}
|
||||
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getMenuId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}else if(page.getMenuId().equals("nomenu") && StringUtils.isNotBlank(page.getSarMsType()) && "filterSarMsMenu".equals(page.getSarMsType())){
|
||||
// List<String> getMenuIdList = tsUserService.getResourceUserId(page.getUserId());
|
||||
// if (getMenuIdList != null && !getMenuIdList.isEmpty()) {
|
||||
// page.setMenuRoleList(getMenuIdList);
|
||||
// } else {
|
||||
// page.setMenuRoleList(null);
|
||||
// }
|
||||
// menuTopId 1级目录下 所有目录 选择的标准不可重复 根据现逻辑 统一根据2级菜单查所有 没有选过的
|
||||
List<String> ids = iSarMenuStandardService.getChildMenuList(page.getMenuTopId());
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
page.setMenuAllChildrenIdList(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+63
@@ -154,6 +154,24 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
private String XGLC;
|
||||
private String GLWJBUSS;
|
||||
private String XCSJBUSS;
|
||||
private String BARQ;
|
||||
private String XGD;
|
||||
|
||||
public String getBARQ() {
|
||||
return BARQ;
|
||||
}
|
||||
|
||||
public void setBARQ(String BARQ) {
|
||||
this.BARQ = BARQ;
|
||||
}
|
||||
|
||||
public String getXGD() {
|
||||
return XGD;
|
||||
}
|
||||
|
||||
public void setXGD(String XGD) {
|
||||
this.XGD = XGD;
|
||||
}
|
||||
|
||||
public Integer getNowOrder() {
|
||||
return nowOrder;
|
||||
@@ -860,9 +878,54 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
}
|
||||
|
||||
private String menuId;
|
||||
private String menuTopId;
|
||||
private String menuName;
|
||||
private String treeType; // 树结构数据 区分 类型: 标准数据 tsr 技术系列 sarMs
|
||||
private String sarMsType; // 树结构数据 技术系列 sarMs 过滤此目录之外数据
|
||||
private String sarMsMenuId;
|
||||
private String[] idlist; //用于导出数据过程中传递选择的标准id
|
||||
private String[] replaceStandNumList;
|
||||
|
||||
public String getMenuName() {
|
||||
return menuName;
|
||||
}
|
||||
|
||||
public void setMenuName(String menuName) {
|
||||
this.menuName = menuName;
|
||||
}
|
||||
|
||||
public String getMenuTopId() {
|
||||
return menuTopId;
|
||||
}
|
||||
|
||||
public void setMenuTopId(String menuTopId) {
|
||||
this.menuTopId = menuTopId;
|
||||
}
|
||||
|
||||
public String getTreeType() {
|
||||
return treeType;
|
||||
}
|
||||
|
||||
public void setTreeType(String treeType) {
|
||||
this.treeType = treeType;
|
||||
}
|
||||
|
||||
public String getSarMsType() {
|
||||
return sarMsType;
|
||||
}
|
||||
|
||||
public void setSarMsType(String sarMsType) {
|
||||
this.sarMsType = sarMsType;
|
||||
}
|
||||
|
||||
public String getSarMsMenuId() {
|
||||
return sarMsMenuId;
|
||||
}
|
||||
|
||||
public void setSarMsMenuId(String sarMsMenuId) {
|
||||
this.sarMsMenuId = sarMsMenuId;
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
return menuId;
|
||||
}
|
||||
|
||||
+10
-1
@@ -444,6 +444,13 @@
|
||||
</sql>
|
||||
<sql id="SarBussionInfo_Where_Clause">
|
||||
left join SAR_BUSS_STAND_MENU ON SAR_BUSSIONESS_STAND.id = SAR_BUSS_STAND_MENU.buss_stand_id
|
||||
<if test="menuId != null and menuId =='nomenu' and menuAllChildrenIdList != null and sarMsType != null and sarMsType == 'filterSarMsMenu'" >
|
||||
and SAR_BUSS_STAND_MENU.TREE_TYPE = 'sarMs'
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID in
|
||||
<foreach collection="menuAllChildrenIdList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
left join TS_RESOURCE on SAR_BUSS_STAND_MENU.menu_id = TS_RESOURCE.id
|
||||
left join SAR_BUSS_STAND_ATTR_INFO on (SAR_BUSS_STAND_ATTR_INFO.STAND_ID = SAR_BUSSIONESS_STAND.id and SAR_BUSS_STAND_ATTR_INFO.valid_flag=0)
|
||||
LEFT JOIN TS_DICTYPE dicstandTextStatus ON (
|
||||
@@ -518,7 +525,9 @@
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
<if test="menuId != null and menuId =='nomenu' and menuAllChildrenIdList != null and sarMsType != null and sarMsType == 'filterSarMsMenu'" >
|
||||
and SAR_BUSS_STAND_MENU.MENU_ID IS NULL
|
||||
</if>
|
||||
|
||||
<!-- 目录判断 -->
|
||||
<if test="menuId != null and menuId !='nomenu' and menuAllChildrenIdList != null" >
|
||||
|
||||
Reference in New Issue
Block a user