Merge branch 'develop_master' into develop_migration
This commit is contained in:
+24
@@ -36,6 +36,11 @@ public class StandDataServiceImpl extends ServiceImpl<StandDataDao, StandData> i
|
||||
public String searchStandData(SearchStandContext searchStandContext){
|
||||
List<FileResult> fileResultList = new ArrayList<>();
|
||||
try {
|
||||
//TODO 此处接口优化 传入的VPPSCode 参数全部截取到第三位位置
|
||||
logger.info("接口传递的VPPS编码为"+searchStandContext.getVppsCode());
|
||||
String newVppsCode= convertVppsCode(searchStandContext.getVppsCode());
|
||||
logger.info("经过处理后只获取前三级的VPPS编码为"+newVppsCode);
|
||||
searchStandContext.setVsgCode(newVppsCode);
|
||||
List<StandData> standDataQuery = this.baseMapper.searchStandData(searchStandContext);
|
||||
if(!standDataQuery.isEmpty()){
|
||||
// 重组数据集合 只需documentName 及 documentUrl
|
||||
@@ -72,4 +77,23 @@ public class StandDataServiceImpl extends ServiceImpl<StandDataDao, StandData> i
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
private String convertVppsCode(String vppsCode){
|
||||
if(StringUtils.isNotBlank(vppsCode)){
|
||||
String[] splitData = vppsCode.split(".");
|
||||
if(splitData.length<=3){
|
||||
return vppsCode;
|
||||
}else{
|
||||
StringBuilder result = new StringBuilder();
|
||||
result.append(splitData[0]).append(".").append(splitData[1]).append(".").append(splitData[2]);
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+6
-4
@@ -288,16 +288,18 @@ public class TsInstitutionServiceImpl extends ServiceImpl<TsInstitutionDao, TsIn
|
||||
List<TsInstitution> tsInstitutions = new ArrayList<>();
|
||||
List<TsInstitution> institutions = getTopChild(map,userVO.getInstitutionId(),topNum,tsInstitutions);
|
||||
if(!institutions.isEmpty()){
|
||||
if(institutions.size() >= topNum){
|
||||
if(institutions.size() > topNum){
|
||||
userVO.setTopUnitId(institutions.get(topNum).getId());
|
||||
userVO.setTopUnit(institutions.get(topNum).getName());
|
||||
}else if(institutions.size() == topNum){
|
||||
userVO.setTopUnitId(institutions.get(topNum-1).getId());
|
||||
userVO.setTopUnit(institutions.get(topNum-1).getName());
|
||||
}else {
|
||||
userVO.setTopUnitId(institutions.get(institutions.size()-1).getId());
|
||||
userVO.setTopUnit(institutions.get(institutions.size()-1).getName());
|
||||
userVO.setTopUnitId(institutions.get(institutions.size()-1).getId());
|
||||
userVO.setTopUnit(institutions.get(institutions.size()-1).getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user