|
@@ -210,13 +210,15 @@ class PatentinfoService extends CrudService {
|
|
|
const midList = inventor.split(/[,;/]/);
|
|
|
nameList = [ ...nameList, ...midList ];
|
|
|
}
|
|
|
+ nameList = nameList.map(i => _.trim(i));
|
|
|
const l1 = await this.personalModel.find({ name: nameList });
|
|
|
const l2 = await this.organizationModel.find({ name: nameList });
|
|
|
// 查出来的所有人,添加到user_id中
|
|
|
const nList = [ ...l1, ...l2 ];
|
|
|
for (const i of arr) {
|
|
|
const { inventor } = i;
|
|
|
- const midNameList = inventor.split(/[,;/]/);
|
|
|
+ let midNameList = inventor.split(/[,;/]/);
|
|
|
+ midNameList = midNameList.map(i => _.trim(i));
|
|
|
if (!_.isArray(i.user_id)) i.user_id = [];
|
|
|
for (const name of midNameList) {
|
|
|
const rList = nList.filter(f => f.name === name);
|