|
@@ -62,16 +62,17 @@ class PatentwarningService extends CrudService {
|
|
|
xmlPaths = xmlPaths.map(i => {
|
|
|
const arr = i.split(sep);
|
|
|
arr.pop();
|
|
|
- return arr.join(sep);
|
|
|
+ const obj = { dir: arr.join(sep), fullPath: i };
|
|
|
+ return obj;
|
|
|
});
|
|
|
// 按路径字符串长度排序
|
|
|
xmlPaths = xmlPaths.sort((a, b) => {
|
|
|
- const anum = a.length;
|
|
|
- const bnum = b.length;
|
|
|
+ const anum = a.dir.length;
|
|
|
+ const bnum = b.dir.length;
|
|
|
return anum - bnum;
|
|
|
});
|
|
|
}
|
|
|
- const xmlPath = _.head(xmlPaths);
|
|
|
+ const xmlPath = _.get(_.head(xmlPaths), 'fullPath');
|
|
|
if (!xmlPath) {
|
|
|
errorList.push({ key: patentNumber, word: '未找到xml文件' });
|
|
|
continue;
|