|
@@ -134,25 +134,25 @@ module.exports={
|
|
|
// 获取单位工程ID 工程费用(费用汇总里的totalFee) 映射表
|
|
|
getUnitsBudgetMap: async function (unitIDs) {
|
|
|
const rst = {};
|
|
|
- unitIDs.forEach(unitID => {
|
|
|
+ /* unitIDs.forEach(unitID => {
|
|
|
rst[unitID] = 1000000;
|
|
|
- });
|
|
|
- /* const gatherData = await gatherModel.find({ projectID: { $in: unitIDs } }, '-_id projectID totalFee').lean();
|
|
|
+ }); */
|
|
|
+ const gatherData = await gatherModel.find({ projectID: { $in: unitIDs } }, '-_id projectID totalFee').lean();
|
|
|
const gatherMap = {};
|
|
|
gatherData.forEach(item => gatherMap[item.projectID] = item.totalFee || 0);
|
|
|
unitIDs.forEach(unitID => {
|
|
|
rst[unitID] = gatherMap[unitID] || 0;
|
|
|
- }); */
|
|
|
+ });
|
|
|
return rst;
|
|
|
},
|
|
|
// 获取设备购置费
|
|
|
getUnitsEquipmentMap: async function (unitIDs) {
|
|
|
- //return await equipmentFacade.getEquipmentTotalCost(unitIDs);
|
|
|
- const rst = {};
|
|
|
+ /* const rst = {};
|
|
|
unitIDs.forEach(unitID => {
|
|
|
rst[unitID] = 5000;
|
|
|
});
|
|
|
- return rst;
|
|
|
+ return rst; */
|
|
|
+ return await equipmentFacade.getEquipmentTotalCost(unitIDs);
|
|
|
},
|
|
|
// 获取概算汇总初始化数据
|
|
|
initialBudgetSummary: async function (constructionID) {
|