|
@@ -74,7 +74,7 @@ class PatentwarningService extends CrudService {
|
|
}
|
|
}
|
|
const tifPaths = filePaths.filter(f => f.includes('.tif'));
|
|
const tifPaths = filePaths.filter(f => f.includes('.tif'));
|
|
if (tifPaths && tifPaths.length > 0) this.toUploadTif(warningData, tifPaths);
|
|
if (tifPaths && tifPaths.length > 0) this.toUploadTif(warningData, tifPaths);
|
|
- await this.dirDelete(`${uncompressFilePath}${fileName}`);
|
|
|
|
|
|
+ // await this.dirDelete(`${uncompressFilePath}${fileName}`);
|
|
return 'ok';
|
|
return 'ok';
|
|
}
|
|
}
|
|
|
|
|
|
@@ -92,8 +92,6 @@ class PatentwarningService extends CrudService {
|
|
arr = fullFileName.split('.');
|
|
arr = fullFileName.split('.');
|
|
// 文件后缀
|
|
// 文件后缀
|
|
const ext = _.last(arr);
|
|
const ext = _.last(arr);
|
|
- console.log('file');
|
|
|
|
- console.log(file);
|
|
|
|
// 图片文件
|
|
// 图片文件
|
|
const buffer = await fs.readFileSync(file);
|
|
const buffer = await fs.readFileSync(file);
|
|
// 新文件名
|
|
// 新文件名
|
|
@@ -104,10 +102,6 @@ class PatentwarningService extends CrudService {
|
|
const shortPath = `platform${sep}patent${sep}${savePath}${sep}`;
|
|
const shortPath = `platform${sep}patent${sep}${savePath}${sep}`;
|
|
// 上传全路径
|
|
// 上传全路径
|
|
const path = `${this.import_root_path}${sep}${shortPath}`;
|
|
const path = `${this.import_root_path}${sep}${shortPath}`;
|
|
- console.log('path');
|
|
|
|
- console.log(`${path}`);
|
|
|
|
- console.log('all');
|
|
|
|
- console.log(`${path}${newFileName}`);
|
|
|
|
// 检查上传全路径是否存在,不存在就创建文件夹
|
|
// 检查上传全路径是否存在,不存在就创建文件夹
|
|
await this.checkPathAndCreate(path);
|
|
await this.checkPathAndCreate(path);
|
|
// 另存文件
|
|
// 另存文件
|
|
@@ -156,7 +150,6 @@ class PatentwarningService extends CrudService {
|
|
* @param {Object} patent 专利
|
|
* @param {Object} patent 专利
|
|
*/
|
|
*/
|
|
async getWarningData(patent) {
|
|
async getWarningData(patent) {
|
|
- console.log(patent);
|
|
|
|
const object = {};
|
|
const object = {};
|
|
if (_.get(patent, 'create_number'))object.create_number = _.get(patent, 'create_number');
|
|
if (_.get(patent, 'create_number'))object.create_number = _.get(patent, 'create_number');
|
|
if (_.get(patent, 'id'))object.patent_id = _.get(patent, 'id');
|
|
if (_.get(patent, 'id'))object.patent_id = _.get(patent, 'id');
|
|
@@ -226,8 +219,6 @@ class PatentwarningService extends CrudService {
|
|
const files = fs.readdirSync(filePath);
|
|
const files = fs.readdirSync(filePath);
|
|
let result = [];
|
|
let result = [];
|
|
for (const file of files) {
|
|
for (const file of files) {
|
|
- console.log(_.trimEnd(filePath));
|
|
|
|
- console.log(file);
|
|
|
|
const curPath = `${_.trimEnd(filePath)}${sep}${file}`;
|
|
const curPath = `${_.trimEnd(filePath)}${sep}${file}`;
|
|
if (fs.statSync(curPath).isDirectory()) {
|
|
if (fs.statSync(curPath).isDirectory()) {
|
|
const res = await this.findFileNameLoop(curPath, file);
|
|
const res = await this.findFileNameLoop(curPath, file);
|