|
@@ -208,7 +208,8 @@ async function getMixRatioMap(glj,gljList,coeList,assList,mixRatioMap) {//生成
|
|
|
for(let m of mixList){
|
|
for(let m of mixList){
|
|
|
if(glj.createType == 'replace'&& glj.mIndexObj){//如果是替换过的工料机,要造一条加的数据去补回下面的减数据
|
|
if(glj.createType == 'replace'&& glj.mIndexObj){//如果是替换过的工料机,要造一条加的数据去补回下面的减数据
|
|
|
//与下面的减相对应,如果有没被引用子组成物工料机,会少一条加的数据,这样,那条没被引用的消耗量会被减为0
|
|
//与下面的减相对应,如果有没被引用子组成物工料机,会少一条加的数据,这样,那条没被引用的消耗量会被减为0
|
|
|
- addToMixMap(m,mixRatioMap,glj.rationItemQuantity,0);
|
|
|
|
|
|
|
+ addToMixMap(m,mixRatioMap,assCoeQuantity,0); //addToMixMap(m,mixRatioMap,glj.rationItemQuantity,0); -- 2019-04-15 和下面的减相对做修改
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
if(!noCustomQuantiyt(glj)) {//有自定义消耗量才做正常的计算处理
|
|
if(!noCustomQuantiyt(glj)) {//有自定义消耗量才做正常的计算处理
|
|
|
addToMixMap(m,mixRatioMap,glj.customQuantity,assCoeQuantity);
|
|
addToMixMap(m,mixRatioMap,glj.customQuantity,assCoeQuantity);
|
|
@@ -218,7 +219,9 @@ async function getMixRatioMap(glj,gljList,coeList,assList,mixRatioMap) {//生成
|
|
|
let t_con_key = gljUtil.getIndex(glj.mIndexObj);
|
|
let t_con_key = gljUtil.getIndex(glj.mIndexObj);
|
|
|
let tmixList = await mixRatioModel.find({"unit_price_file_id":unitPriceFileId,'connect_key':t_con_key});
|
|
let tmixList = await mixRatioModel.find({"unit_price_file_id":unitPriceFileId,'connect_key':t_con_key});
|
|
|
for(let tm of tmixList ){
|
|
for(let tm of tmixList ){
|
|
|
- addToMixMap(tm,mixRatioMap,0,glj.rationItemQuantity);
|
|
|
|
|
|
|
+ addToMixMap(tm,mixRatioMap,0,assCoeQuantity); //addToMixMap(tm,mixRatioMap,0,glj.rationItemQuantity);
|
|
|
|
|
+ // -- 2019-04-15 修改bugs 这里把glj.rationItemQuantity 改成assCoeQuantity。 定额下组成物的消耗量要减去父工料机经过辅助定额或者子目换算后的对应的增加量
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
function addToMixMap(m,map,cust,ass,isReplace = false) {
|
|
function addToMixMap(m,map,cust,ass,isReplace = false) {
|