|
|
@@ -877,27 +877,16 @@ const ImportXML = (() => {
|
|
|
}
|
|
|
//根据费用类别、配比类比获取人材机类别(后端匹配不到标准人材机的时候用)
|
|
|
function getGljTypeData(feeType, ratioType, name) {
|
|
|
+ // 因为这份文件不太标准,各家也不统一,没有一个靠谱的方法能准备获取人材机类型,所以有些地方需要特殊处理
|
|
|
// 有的人材机类型根据人材机名称特殊获取
|
|
|
- // 因为这份文件不太标准,各家也不统一,没有一个靠谱的方法能准备获取人材机类型
|
|
|
const specialMap = {
|
|
|
'定额管理费': {type: 6, shortName: '管'}
|
|
|
};
|
|
|
if (specialMap[name]) {
|
|
|
return specialMap[name];
|
|
|
}
|
|
|
- const map = {
|
|
|
- '-': {type: 201, shortName: '材'},
|
|
|
- '1-': {type: 1, shortName: '人'},
|
|
|
- '2-': {type: 201, shortName: '材'},
|
|
|
- '2-1': {type: 202, shortName: '砼'},
|
|
|
- '2-2': {type: 205, shortName: '商砼'},
|
|
|
- '2-3': {type: 203, shortName: '浆'},
|
|
|
- '2-4': {type: 206, shortName: '商浆'},
|
|
|
- '2-5': {type: 204, shortName: '配比'},
|
|
|
- '3-': {type: 301, shortName: '机'},
|
|
|
- '4-': {type: 4, shortName: '主'},
|
|
|
- };
|
|
|
- const nameMap = {
|
|
|
+ // 一些需要特殊处理的动力材料
|
|
|
+ const powerNameMap = {
|
|
|
'柴油': {type: 305, shortName: '动'},
|
|
|
'柴油(机械用)': {type: 305, shortName: '动'},
|
|
|
'柴油(机械用)': {type: 305, shortName: '动'},
|
|
|
@@ -909,9 +898,23 @@ const ImportXML = (() => {
|
|
|
'电(机械用)': {type: 305, shortName: '动'},
|
|
|
'机上人工': {type: 303, shortName: '机人'},
|
|
|
};
|
|
|
- if (feeType === '3' && nameMap[name]) {
|
|
|
- return nameMap[name] || null;
|
|
|
+ // 人、机不需要匹配配比类别
|
|
|
+ if (feeType === '1') {
|
|
|
+ return {type: 1, shortName: '人'};
|
|
|
+ } else if (feeType === '3') {
|
|
|
+ // 特殊处理动力材料
|
|
|
+ return powerNameMap[name] || {type: 301, shortName: '机'};
|
|
|
}
|
|
|
+ const map = {
|
|
|
+ '-': {type: 201, shortName: '材'},
|
|
|
+ '2-': {type: 201, shortName: '材'},
|
|
|
+ '2-1': {type: 202, shortName: '砼'},
|
|
|
+ '2-2': {type: 205, shortName: '商砼'},
|
|
|
+ '2-3': {type: 203, shortName: '浆'},
|
|
|
+ '2-4': {type: 206, shortName: '商浆'},
|
|
|
+ '2-5': {type: 204, shortName: '配比'},
|
|
|
+ '4-': {type: 4, shortName: '主'},
|
|
|
+ };
|
|
|
return map[`${feeType}-${ratioType}`] || null;
|
|
|
}
|
|
|
//主要材料类别-三材类别映射
|