feat: There is no way the, tree async
This commit is contained in:
+50
-21
@@ -404,6 +404,13 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
|
||||
public void attrInfoShowExport (List<SarBussionessStand> sarlist) throws Exception {
|
||||
|
||||
//查询字典表,形成Hash映射提升速度
|
||||
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_type_code", "dic_type_name");
|
||||
Map<String, String> dicMap = dicInfo.stream()
|
||||
.filter(item-> !item.getDicTypeCode().isEmpty())
|
||||
.collect(Collectors.toMap(DicTypeEO::getDicTypeCode,DicTypeEO::getDicTypeName,(value1, value2 )->value2));
|
||||
|
||||
for(SarBussionessStand row : sarlist){
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
@@ -424,16 +431,17 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
value = String.valueOf(getAttrMap.get("SVPPSName"));
|
||||
entry.setValue(value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
// value = entry.getValue().toString();
|
||||
// if (StringUtils.isNotBlank(value)) {
|
||||
// List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
// entry.setValue(fileObj);
|
||||
// }
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
|
||||
|
||||
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
@@ -442,7 +450,21 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
if(entry.getValue()!=null) {
|
||||
StringBuilder builder = new StringBuilder("");
|
||||
for (String s : valArr) {
|
||||
if (dicMap.containsKey(s) && !"ZRBM".equals(name)){
|
||||
builder.append(dicMap.get(s)+" ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (builder.toString().isEmpty()){
|
||||
value = entry.getValue().toString();
|
||||
}else {
|
||||
value = builder.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
@@ -889,11 +911,11 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarStandMenuEO.setBussStandId(standId);
|
||||
sarStandMenuEO.setId(null);
|
||||
sarStandMenuEO.setValidFlag(0);
|
||||
sarStandMenuEO.setTreeType("sarMs");
|
||||
// 根据当前目录查询所在父节点
|
||||
String secondLevelId = "";
|
||||
List<String> getMenuPIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
sarStandMenuEO.setTreeType("sarMs");
|
||||
getMenuPIds = iSarMenuStandardService.getChildMenuList(nowMenuId);
|
||||
}else {
|
||||
getMenuPIds = iTsResourceService.getParentMenuId(nowMenuId);
|
||||
@@ -906,16 +928,18 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
//查询标准是否已在 当前父节点中
|
||||
SarBussStandMenu standMenuEOQuery = new SarBussStandMenu();
|
||||
standMenuEOQuery.setMenuId(secondLevelId);
|
||||
standMenuEOQuery.setBussStandId(standardsInfoEO.getIdlist()[i]);
|
||||
|
||||
List<String> menuIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
|
||||
// sarMs 技术体系 标准只可选一个 根据标准查询唯一
|
||||
standMenuEOQuery.setTreeType("sarMs");
|
||||
menuIds = iSarMenuStandardService.getChildMenuList(secondLevelId);
|
||||
}else {
|
||||
standMenuEOQuery.setMenuId(secondLevelId);
|
||||
menuIds = iTsResourceService.getChildMenuList(secondLevelId);
|
||||
standMenuEOQuery.setMenuIds(menuIds);
|
||||
}
|
||||
standMenuEOQuery.setMenuIds(menuIds);
|
||||
List<SarBussStandMenu> getInfo = sarBussStandMenuEODao.selectMenuByMenuParentId(standMenuEOQuery);
|
||||
//删除节点与根节点的关联
|
||||
SarBussStandMenu sarStandMenuDel = new SarBussStandMenu();
|
||||
@@ -925,27 +949,32 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
int op = 0;
|
||||
if (getInfo == null || getInfo.isEmpty()) {
|
||||
sarStandMenuEO.setId(UUIDUtils.randomUUID20());
|
||||
op = sarBussStandMenuEODao.insert(sarStandMenuEO);
|
||||
op = sarBussStandMenuEODao.insertSelective(sarStandMenuEO);
|
||||
} else {
|
||||
sarStandMenuEO.setOldMenuId(secondLevelId);
|
||||
List<String> menuOldIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
|
||||
menuOldIds = iSarMenuStandardService.getChildMenuList(secondLevelId);
|
||||
sarStandMenuEO.setMenuIds(menuOldIds);
|
||||
sarStandMenuEO.setId(getInfo.get(0).getId());
|
||||
op = sarBussStandMenuEODao.updateById(sarStandMenuEO);
|
||||
}else {
|
||||
menuOldIds= iTsResourceService.getChildMenuList(secondLevelId);
|
||||
sarStandMenuEO.setMenuIds(menuOldIds);
|
||||
op = sarBussStandMenuEODao.updateByStandIdAndMenuId(sarStandMenuEO);
|
||||
}
|
||||
sarStandMenuEO.setMenuIds(menuOldIds);
|
||||
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);
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user