|
|
@@ -67,7 +67,7 @@ ProjectsDAO.prototype.getUserProjects = async function (userId, compilation, cal
|
|
|
'compilation': compilation,
|
|
|
'deleteInfo': null
|
|
|
}, {'userID': userId, 'compilation': compilation, 'deleteInfo.deleted': {'$in': [null, false]}}]
|
|
|
- }, '-_id');
|
|
|
+ }, '-_id', {lean: true});
|
|
|
let projIDs= [];
|
|
|
for(let project of projects){
|
|
|
if(project.projType === projectType.project){
|
|
|
@@ -79,16 +79,16 @@ ProjectsDAO.prototype.getUserProjects = async function (userId, compilation, cal
|
|
|
for(let proj of projects){
|
|
|
let summaryProj = summaryInfo[proj.ID];
|
|
|
if(summaryProj){
|
|
|
- proj._doc.engineeringCost = summaryProj.engineeringCost;
|
|
|
- proj._doc.subEngineering = summaryProj.subEngineering;
|
|
|
- proj._doc.measure = summaryProj.measure;
|
|
|
- proj._doc.safetyConstruction = summaryProj.safetyConstruction;
|
|
|
- proj._doc.other = summaryProj.other;
|
|
|
- proj._doc.charge = summaryProj.charge;
|
|
|
- proj._doc.tax = summaryProj.tax;
|
|
|
- proj._doc.rate = summaryProj.rate;
|
|
|
- proj._doc.buildingArea = summaryProj.buildingArea;
|
|
|
- proj._doc.perCost = summaryProj.perCost;
|
|
|
+ proj.engineeringCost = summaryProj.engineeringCost;
|
|
|
+ proj.subEngineering = summaryProj.subEngineering;
|
|
|
+ proj.measure = summaryProj.measure;
|
|
|
+ proj.safetyConstruction = summaryProj.safetyConstruction;
|
|
|
+ proj.other = summaryProj.other;
|
|
|
+ proj.charge = summaryProj.charge;
|
|
|
+ proj.tax = summaryProj.tax;
|
|
|
+ proj.rate = summaryProj.rate;
|
|
|
+ proj.buildingArea = summaryProj.buildingArea;
|
|
|
+ proj.perCost = summaryProj.perCost;
|
|
|
}
|
|
|
}
|
|
|
callback(0, '', projects);
|