|
|
@@ -15,6 +15,7 @@ module.exports = {
|
|
|
deleteSubListByQuery:deleteSubListByQuery,
|
|
|
updateCoeAdjust:updateCoeAdjust,
|
|
|
getUnitPriceData:getUnitPriceData,
|
|
|
+ transGljType:transGljType
|
|
|
};
|
|
|
|
|
|
|
|
|
@@ -570,6 +571,15 @@ function getExtendData(property,compilation) {
|
|
|
}
|
|
|
|
|
|
|
|
|
+//查看是否需要将“设备”的处理成“普通材料”
|
|
|
+function transGljType(compilation,newGlJ){
|
|
|
+ if(compilation.overWriteUrl && compilation.overWriteUrl!=""){
|
|
|
+ let overWrite = require("../../.."+compilation.overWriteUrl);
|
|
|
+ if(overWrite.ifTransEqToMateria && overWrite.ifTransEqToMateria()){
|
|
|
+ if(newGlJ.type == 5) newGlJ.type = 201;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
|
|
|
async function addRationGLJ(std,newRation,compilation,isMaterial,connect_key) {
|
|
|
@@ -625,6 +635,8 @@ async function addRationGLJ(std,newRation,compilation,isMaterial,connect_key) {
|
|
|
let std_glj = getStdGlj(sub,stdGLJMap,cptGLJMap,{},ext);
|
|
|
if(std_glj){
|
|
|
ration_glj_facade.setPropertyFromStd(newGLJ,std_glj);
|
|
|
+ //有些编办要把设备类型转成普通材料 -- todo
|
|
|
+ transGljType(compilation,newGLJ);
|
|
|
let tindex = getIndex(newGLJ);
|
|
|
if(std_glj.component && std_glj.component.length > 0) mixRatioMap[tindex] = std_glj.component
|
|
|
let tdata = ration_glj_facade.getGLJSearchInfo(newGLJ);
|