|
@@ -597,6 +597,7 @@ async function getGLJSummayDatas(projectIDs) {
|
|
|
let projects = [];
|
|
let projects = [];
|
|
|
let names = [];
|
|
let names = [];
|
|
|
let prjTypeNames = [];
|
|
let prjTypeNames = [];
|
|
|
|
|
+ let compilationScopes = [];
|
|
|
try {
|
|
try {
|
|
|
for(let ID of projectIDs){
|
|
for(let ID of projectIDs){
|
|
|
projects.push(await getProjectData(ID)) ;
|
|
projects.push(await getProjectData(ID)) ;
|
|
@@ -609,11 +610,12 @@ async function getGLJSummayDatas(projectIDs) {
|
|
|
names.push(p.name);
|
|
names.push(p.name);
|
|
|
prjTypeNames.push(p.prjTypeName);
|
|
prjTypeNames.push(p.prjTypeName);
|
|
|
p.gljList = await getProjectGLJData(p.ID,p.unitPriceFileId,mp.property);
|
|
p.gljList = await getProjectGLJData(p.ID,p.unitPriceFileId,mp.property);
|
|
|
|
|
+ compilationScopes.push(p.compilationScope);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let mList = mergeGLJ(mp,projects,names,prjTypeNames);
|
|
let mList = mergeGLJ(mp,projects,names,prjTypeNames);
|
|
|
mList = gljUtil.sortProjectGLJ(mList,_);
|
|
mList = gljUtil.sortProjectGLJ(mList,_);
|
|
|
- let summaryGLJDatas = getSummaryGLJDatas(mList,mp.property.decimal,names,prjTypeNames);
|
|
|
|
|
|
|
+ let summaryGLJDatas = getSummaryGLJDatas(mList,mp.property.decimal,names,prjTypeNames,compilationScopes);
|
|
|
|
|
|
|
|
let parentProject = await projectsModel.findOne({ID:mp.ParentID});
|
|
let parentProject = await projectsModel.findOne({ID:mp.ParentID});
|
|
|
let result = {
|
|
let result = {
|
|
@@ -632,7 +634,7 @@ async function getGLJSummayDatas(projectIDs) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function getSummaryGLJDatas(gljList,decimal,nameList,prjTypeNames) {
|
|
|
|
|
|
|
+function getSummaryGLJDatas(gljList,decimal,nameList,prjTypeNames,compilationScopes) {
|
|
|
let datas = [],qdecimal = decimal.glj.quantity,process = decimal.process;
|
|
let datas = [],qdecimal = decimal.glj.quantity,process = decimal.process;
|
|
|
for(let tem of gljList){
|
|
for(let tem of gljList){
|
|
|
let d = {
|
|
let d = {
|
|
@@ -644,7 +646,8 @@ function getSummaryGLJDatas(gljList,decimal,nameList,prjTypeNames) {
|
|
|
marketPrice:tem.marketPrice,
|
|
marketPrice:tem.marketPrice,
|
|
|
prjNames:nameList,
|
|
prjNames:nameList,
|
|
|
prjTypeNames:prjTypeNames,
|
|
prjTypeNames:prjTypeNames,
|
|
|
- quantityList:[]
|
|
|
|
|
|
|
+ quantityList:[],
|
|
|
|
|
+ '编制范围明细':compilationScopes
|
|
|
};
|
|
};
|
|
|
let totalQuantity = 0;
|
|
let totalQuantity = 0;
|
|
|
for(let n of nameList){
|
|
for(let n of nameList){
|