|
@@ -156,6 +156,7 @@ class PatentwarningService extends CrudService {
|
|
|
* @param {Object} patent 专利
|
|
|
*/
|
|
|
async getWarningData(patent) {
|
|
|
+ console.log(patent);
|
|
|
const object = {};
|
|
|
if (_.get(patent, 'create_number'))object.create_number = _.get(patent, 'create_number');
|
|
|
if (_.get(patent, 'id'))object.patent_id = _.get(patent, 'id');
|
|
@@ -218,16 +219,16 @@ class PatentwarningService extends CrudService {
|
|
|
* @param {String} fileName 文件名
|
|
|
*/
|
|
|
async findFileNameLoop(uri, fileName) {
|
|
|
- const filePath = `${_.trimEnuri}${sep}${fileName}`;
|
|
|
+ const filePath = `${_.trimEnd(uri, sep)}${sep}${fileName}`;
|
|
|
if (!fs.existsSync(filePath)) {
|
|
|
return [];
|
|
|
}
|
|
|
const files = fs.readdirSync(filePath);
|
|
|
let result = [];
|
|
|
for (const file of files) {
|
|
|
- console.log(filePath);
|
|
|
+ console.log(_.trimEnd(filePath));
|
|
|
console.log(file);
|
|
|
- const curPath = `${_.trimEnd(filePath, sep)}${sep}${file}`;
|
|
|
+ const curPath = `${_.trimEnd(filePath)}${sep}${file}`;
|
|
|
if (fs.statSync(curPath).isDirectory()) {
|
|
|
const res = await this.findFileNameLoop(curPath, file);
|
|
|
result.push(...res);
|