|
|
@@ -762,6 +762,7 @@ async function getProjectGLJinfo(projectID,t_newRationGLJList,gljKeyMap,gljCodes
|
|
|
unitPrice.base_price = ration_glj.basePrice;
|
|
|
unitPrice.market_price = ration_glj.marketPrice;
|
|
|
}
|
|
|
+ await setIDfromCounter("unit_price",[unitPrice])
|
|
|
await unitPriceModel.insertMany([unitPrice]);
|
|
|
p.unit_price =unitPrice
|
|
|
}
|
|
|
@@ -842,7 +843,6 @@ async function getUnitPriceData(newProjectGLJList,gljCodes,unitPriceFileId){
|
|
|
unitPriceMap[pkey] = insertData;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if(newUnitPriceList.length > 0){
|
|
|
await setIDfromCounter("unit_price",newUnitPriceList);
|
|
|
await unitPriceModel.insertMany(newUnitPriceList);
|
|
|
@@ -863,7 +863,7 @@ async function getMixRatioInfo(projectID,projectGLJMap,newProjectGLJList,mixRati
|
|
|
|
|
|
// 1. 先检查现在的组成物表中,是否有相关信息 - 生成映射记录
|
|
|
if(connectKeyList.length > 0){//有组成物的话从数据库中取出组成物信息
|
|
|
- let mixRatioList = await mixRatioModel.find({'unit_price_file_id': unitPriceFileId,'connect_key': {'$in':connectKeyList}}).lean();
|
|
|
+ let mixRatioList = await mixRatioModel.find({'unit_price_file_id': unitPriceFileId}).lean();
|
|
|
for(let m of mixRatioList){
|
|
|
//组成物信息分组,查看哪些是已经存在的
|
|
|
existMixRatioMap[m.connect_key]?existMixRatioMap[m.connect_key].push(m):existMixRatioMap[m.connect_key]=[m];
|