feat: There is no way the,

This commit is contained in:
super_liu
2022-03-17 19:59:40 +08:00
parent 0ccf54aaf1
commit 98fc9bbb56
3 changed files with 30 additions and 8 deletions
@@ -254,7 +254,8 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
row.setCollectId(collectId);
// 查询属性表数据
if (StringUtils.isNotBlank(fieldInfo)) {
Map<String, Object> getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
Map<String, Object> getAttrMap = new TreeMap<>();
getAttrMap = sarLawsAttrInfoDao.selectLawsFieldAndData(fieldInfo,row.getId());
if (InitStandAttrUtil.clobFieldListLaws != null && !InitStandAttrUtil.clobFieldListLaws.isEmpty()) {
// 遍历修改所有clob类型的值
for (String clobField : InitStandAttrUtil.clobFieldListLaws) {
@@ -285,16 +286,36 @@ public class SarLawsStandInfoServiceImpl extends ServiceImpl<SarLawsStandInfoDao
value = sysInfoEOService.getRoleNamesByIds(value);
newMap.put(name + "Name",value);
}
}else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListLaws != null && !InitStandAttrUtil.fileFieldListLaws.isEmpty() && InitStandAttrUtil.fileFieldListLaws.contains(entry.getKey())) {
String value = entry.getValue().toString();
if (StringUtils.isNotBlank(value)) {
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
if(!fileObj.isEmpty()){
String oldFileName = fileObj.stream().map(AttFileEO::getOldFileName).collect(Collectors.joining(","));
newMap.put(name + "Name", oldFileName);
}
}
}
}
getAttrMap.putAll(newMap);
if (!getAttrMap.isEmpty()) {
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
}
row.setAttrInfoMap(getAttrMap);
}else{
List<String> list= Arrays.stream(fieldInfo.split(",")).map(String::trim).collect(Collectors.toList());
list.forEach(s -> {
newMap.put(s,"");
});
if (!newMap.isEmpty()) {
row.setAttrInfoCaseMap(transformUpperCase(newMap));
}
row.setAttrInfoMap(newMap);
}
if (getAttrMap != null && !getAttrMap.isEmpty()) {
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
}
row.setAttrInfoMap(getAttrMap);
}
}
@@ -387,7 +387,7 @@ public class TsResourceServiceImpl extends ServiceImpl<TsResourceDao, TsResource
*/
private List<TsResource> recursionGetListChildrenStand(TsResource resource,List<TsResource> children){
List<TsResource> tsResources = children.stream()
.filter(resource1 -> resource1.getParentId().equals(resource.getId()))
.filter(resource1 -> !children.isEmpty() && StringUtils.isNotBlank(resource1.getParentId()) && resource1.getParentId().equals(resource.getId()))
.collect(Collectors.toList());
if(!tsResources.isEmpty()){
tsResources = tsResources.stream().sorted(Comparator.comparing(resource1 -> resource1.getDisplaySeq())).collect(Collectors.toList());
@@ -42,6 +42,7 @@ public class InitStandAttrUtil implements ApplicationRunner {
standTypeList.add(SarTypeEnum.INLAND_STAND.getValue());
standTypeList.add(SarTypeEnum.FOREIGN_STAND.getValue());
lawsTypeList.add(SarTypeEnum.LAWS_STAND.getValue());
lawsTypeList.add(SarTypeEnum.FOREIGN_LAWS.getValue());
standStateList.add("DRAFT");
standStateList.add("ADVICE");
standStateList.add("RADYSUBMIT");
@@ -142,6 +143,7 @@ public class InitStandAttrUtil implements ApplicationRunner {
} else if (lawsTypeList.contains(sarType)) {
if (SarTypeEnum.FOREIGN_LAWS.getValue().equals(sarType)) {
lawsForeignAttrFieldList.add(detailsEO);
fieldInfoBuilderLaws.append(detailsEO.getAttrField() + ",");
}
if (SarTypeEnum.LAWS_STAND.getValue().equals(sarType)) {
lawsStandAttrFieldList.add(detailsEO);
@@ -150,7 +152,6 @@ public class InitStandAttrUtil implements ApplicationRunner {
if (SarTypeEnum.INLAND_LAWS.getValue().equals(sarType)) {
lawsInlandAttrFieldList.add(detailsEO);
}
fieldInfoBuilderLaws.append(detailsEO.getAttrField() + ",");
fieldInfoNameBuilderLaws.append(detailsEO.getAttrName() + ",");
queryFieldListLaws.add(detailsEO.getAttrField());
if (StandAttrTypeEnum.SELECT_OPTION.getValue().equals(attrType) || StandAttrTypeEnum.SEL_OPTS.getValue().equals(attrType)) {