|
|
@@ -734,7 +734,7 @@ const ImportXML = (() => {
|
|
|
});
|
|
|
}
|
|
|
//根据费用类别、配比类比获取人材机类别(后端匹配不到标准人材机的时候用)
|
|
|
- function getGljTypeData(feeType, ratioType) {
|
|
|
+ function getGljTypeData(feeType, ratioType, name) {
|
|
|
let map = {
|
|
|
'-': {type: 201, shortName: '材'},
|
|
|
'1-': {type: 1, shortName: '人'},
|
|
|
@@ -747,7 +747,22 @@ const ImportXML = (() => {
|
|
|
'3-': {type: 301, shortName: '机'},
|
|
|
'4-': {type: 4, shortName: '主'},
|
|
|
};
|
|
|
- return map[`${feeType}-${ratioType}`] || '';
|
|
|
+ let nameMap = {
|
|
|
+ '柴油': {type: 305, shortName: '动'},
|
|
|
+ '柴油(机械用)': {type: 305, shortName: '动'},
|
|
|
+ '柴油(机械用)': {type: 305, shortName: '动'},
|
|
|
+ '汽油': {type: 305, shortName: '动'},
|
|
|
+ '汽油(机械用)': {type: 305, shortName: '动'},
|
|
|
+ '汽油(机械用)': {type: 305, shortName: '动'},
|
|
|
+ '电': {type: 305, shortName: '动'},
|
|
|
+ '电(机械用)': {type: 305, shortName: '动'},
|
|
|
+ '电(机械用)': {type: 305, shortName: '动'},
|
|
|
+ '机上人工': {type: 303, shortName: '机人'},
|
|
|
+ };
|
|
|
+ if (feeType === '3' && nameMap[name]) {
|
|
|
+ return nameMap[name] || null;
|
|
|
+ }
|
|
|
+ return map[`${feeType}-${ratioType}`] || null;
|
|
|
}
|
|
|
//主要材料类别-三材类别映射
|
|
|
const MaterialMap = {
|
|
|
@@ -789,7 +804,7 @@ const ImportXML = (() => {
|
|
|
gljData.materialType = MaterialMap[getValue(gljSrc, ['_主要材料类别'])];
|
|
|
gljData.materialCoe = getValue(gljSrc, ['_主要材料单位系数']);
|
|
|
}
|
|
|
- let typeData = getGljTypeData(getValue(gljSrc, ['_费用类别']), getValue(gljSrc, ['_配比类别']));
|
|
|
+ let typeData = getGljTypeData(getValue(gljSrc, ['_费用类别']), getValue(gljSrc, ['_配比类别']), gljData.name);
|
|
|
if (typeData) {
|
|
|
gljData.type = typeData.type;
|
|
|
gljData.shortName = typeData.shortName;
|