|
|
@@ -1835,7 +1835,7 @@ async function doDownLoadAndImport(privateDownloadUrl,info) {
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.log(error.message);
|
|
|
- doc.errorMsg = "导入失败,请检查文件!";
|
|
|
+ doc.errorMsg = error.message || "导入失败,请检查文件!";
|
|
|
doc.status = "error";
|
|
|
} finally {
|
|
|
await importLogsModel.update({ key: info.key }, doc);
|
|
|
@@ -2331,7 +2331,8 @@ async function handleMainProjectDatas(mainData,updateData,userID) {
|
|
|
}
|
|
|
//查看是否重名;
|
|
|
let temp = await projectModel.findOne({userID:userID,ParentID:p.ParentID,name:p.name});
|
|
|
- if(temp) p.name = p.name + '(' + moment(Date.now()).tz("Asia/Shanghai").format('MM-DD HH:mm:ss') + '导入)';
|
|
|
+ if(temp) throw new Error(`已存在建设项目“${p.name}”`);
|
|
|
+ // p.name = p.name + '(' + moment(Date.now()).tz("Asia/Shanghai").format('MM-DD HH:mm:ss') + '导入)';
|
|
|
}else {
|
|
|
p.ParentID = projectIDMap[p.ParentID];
|
|
|
p.NextSiblingID = projectIDMap[p.NextSiblingID];
|