|
|
@@ -31,7 +31,8 @@ module.exports={
|
|
|
importProject: importProject,
|
|
|
getProjectPlaceholder: getProjectPlaceholder,
|
|
|
exportProject:exportProject,
|
|
|
- importProjects:importProjects//建筑这里重名了,这比养护加多了个s
|
|
|
+ importProjects:importProjects,//建筑这里重名了,这比养护加多了个s
|
|
|
+ initOverHeightItems: initOverHeightItems
|
|
|
};
|
|
|
|
|
|
|
|
|
@@ -76,6 +77,7 @@ let evaluateListModel = mongoose.model("evaluate_list");
|
|
|
let bidListModel = mongoose.model("bid_evaluation_list");
|
|
|
let contractorListModel = mongoose.model("contractor_list");
|
|
|
let featureLibModel = mongoose.model("std_project_feature_lib");
|
|
|
+const overHeightLibModel = mongoose.model('std_over_height_lib');
|
|
|
let scMathUtil = require('../../../public/scMathUtil').getUtil();
|
|
|
let counter = require('../../../public/counter/counter');
|
|
|
import SectionTreeDao from '../../complementary_ration_lib/models/sectionTreeModel';
|
|
|
@@ -1994,4 +1996,19 @@ async function importFeeRateFiles(mainData,projectIDMap,feeRateFileIDMap,userID)
|
|
|
}
|
|
|
if(feeRateFiles.length > 0) await insertMany(feeRateFiles,feeRateFileModel);
|
|
|
if(feeRates.length > 0) await insertMany(feeRates,feeRateModel);
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+// 初始化
|
|
|
+async function initOverHeightItems(engineeringID) {
|
|
|
+ const defaultData = [];
|
|
|
+ const engineering = await engineeringModel.findById(engineeringID);
|
|
|
+ const overHeightLibs = engineering.over_height_lib;
|
|
|
+ if (!overHeightLibs || !overHeightLibs.length) {
|
|
|
+ return defaultData;
|
|
|
+ }
|
|
|
+ const overHeightLibID = overHeightLibs[0].id;
|
|
|
+ const overHeightLib = await overHeightLibModel.findOne({ID: overHeightLibID});
|
|
|
+ return overHeightLib ? overHeightLib.list : defaultData;
|
|
|
+
|
|
|
+
|
|
|
+}
|