fix: 福田AWC系统对接接口中VPPS编码只识别到第三级
This commit is contained in:
+24
@@ -36,6 +36,11 @@ public class StandDataServiceImpl extends ServiceImpl<StandDataDao, StandData> i
|
|||||||
public String searchStandData(SearchStandContext searchStandContext){
|
public String searchStandData(SearchStandContext searchStandContext){
|
||||||
List<FileResult> fileResultList = new ArrayList<>();
|
List<FileResult> fileResultList = new ArrayList<>();
|
||||||
try {
|
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);
|
List<StandData> standDataQuery = this.baseMapper.searchStandData(searchStandContext);
|
||||||
if(!standDataQuery.isEmpty()){
|
if(!standDataQuery.isEmpty()){
|
||||||
// 重组数据集合 只需documentName 及 documentUrl
|
// 重组数据集合 只需documentName 及 documentUrl
|
||||||
@@ -72,4 +77,23 @@ public class StandDataServiceImpl extends ServiceImpl<StandDataDao, StandData> i
|
|||||||
}
|
}
|
||||||
return str;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user