|
|
@@ -1043,6 +1043,7 @@ async function exportMainData(userID,projectID) {
|
|
|
let project = await projectModel.findOne({ID:projectID});
|
|
|
if(!project) throw new Error("没有找到该建设项目:"+projectID);
|
|
|
result['compilationID'] = project.compilation;
|
|
|
+ result['from'] = "yanghu";
|
|
|
result.projects.push(project);
|
|
|
let subProjects = await projectModel.find({"$or": [{'ParentID':projectID}, {"property.rootProjectID": projectID}]});
|
|
|
for(let s of subProjects){
|
|
|
@@ -1116,6 +1117,10 @@ async function importProject(data,req,fields) {
|
|
|
}
|
|
|
let mainData = datas.length > 0 ?datas[0]:null;
|
|
|
if(mainData){
|
|
|
+ if(mainData.from && mainData.from != "yanghu"){
|
|
|
+ result.error = 1;
|
|
|
+ result.msg = "导入失败:您要导入的文件是由“大司空云计价”导出,当前软件是“纵横公路养护云版”,请选择正确的软件再进行操作!";
|
|
|
+ }
|
|
|
if(mainData.compilationID != req.session.sessionCompilation._id){
|
|
|
result.error = 1;
|
|
|
result.msg = "编办不同,无法导入,请重新选择!";
|