|
@@ -40,38 +40,44 @@ INTERFACE_EXPORT = (() => {
|
|
|
const isControl = exportKind === CONTROL; // 是否是控制价
|
|
const isControl = exportKind === CONTROL; // 是否是控制价
|
|
|
|
|
|
|
|
// 节点定义--------------------------------
|
|
// 节点定义--------------------------------
|
|
|
|
|
+ const subArea = areaKey.split('@')[1];
|
|
|
|
|
|
|
|
- // 建设项目基本信息
|
|
|
|
|
- function JingJiBiao(projectName, information) {
|
|
|
|
|
- const taxModeMap = {
|
|
|
|
|
- '一般计税': '1',
|
|
|
|
|
- '简易计税': '2',
|
|
|
|
|
- };
|
|
|
|
|
- const czzt = {
|
|
|
|
|
- [BID_INVITATION]: '招标',
|
|
|
|
|
- [BID_SUBMISSION]: '投标',
|
|
|
|
|
- [CONTROL]: '招标控制',
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ function ChiZGLGC() {
|
|
|
|
|
+ Element.call(this, '池州公路工程');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function GongCXX(information) {
|
|
|
const attrs = [
|
|
const attrs = [
|
|
|
- { name: 'Xmbh', value: getValueByKey(information, 'projNum') , minLen: 1, whiteSpace: WHITE_SPACE.COLLAPSE }, // 项目编号,招标xsd中有规定minLen whiteSpace,这里投标招标统一处理
|
|
|
|
|
- { name: 'Xmmc', value: projectName }, // 项目名称
|
|
|
|
|
- { name: 'Bzlx', value: '清单' }, // 项目编制类型
|
|
|
|
|
- { name: 'Jjyj', value: '【18清单】2018部颁清单计价依据' }, // 计价依据
|
|
|
|
|
- { name: 'Xmqzzh', value: getValueByKey(information, 'startAndChainages') }, // 项目起止桩号
|
|
|
|
|
- { name: 'Jsdw', value: getValueByKey(information, 'constructingUnits') }, // 建设单位
|
|
|
|
|
- { name: 'Czzt', value: czzt[exportKind] }, // 操作状态:招标、投标、招标控制,即导出接口时,所选的文件类型
|
|
|
|
|
- { name: 'Jsfs', value: taxModeMap[getValueByKey(information, 'taxMode')] || '1', type: TYPE.INT }, // 计税方式,默认1。1=一般计税 2=简易计税
|
|
|
|
|
- { name: 'Version', value: '1.0' },
|
|
|
|
|
|
|
+ { name: '项目编号', value: getValueByKey(information, 'tendereeName') }, // 招标人
|
|
|
|
|
+ { name: '项目名称', value: getValueByKey(information, 'costConsultant') }, // 造价咨询人
|
|
|
|
|
+ { name: '建设单位', value: getValueByKey(information, 'tenderAuthorizer') }, // 招标人法定代表人或其授权人
|
|
|
|
|
+ { name: '起始桩号', value: getValueByKey(information, 'consultantAuthorizer') }, // 造价咨询人法定代表人或其授权人
|
|
|
|
|
+ { name: '终点桩号', value: getValueByKey(information, 'tenderCompiler') }, // 编制人
|
|
|
|
|
+ { name: '建设地址', value: getValueByKey(information, 'tenderExaminer') }, // 复核人
|
|
|
|
|
+ { name: '项目概况', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE }, // 编制时间
|
|
|
|
|
+ { name: '建设性质', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
|
|
|
|
|
+ { name: '专业划分', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
|
|
|
|
|
+ { name: '道路里程', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
|
|
|
|
|
+ { name: '设计单位', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
|
|
|
|
|
+ { name: '计税方式', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
|
|
|
|
|
+ { name: '文件类型', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
|
|
|
|
|
+ { name: '标准版本号', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
|
|
|
|
|
+ { name: 'GUID', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
|
|
|
];
|
|
];
|
|
|
- Element.call(this, 'JingJiBiao', attrs);
|
|
|
|
|
|
|
+ Element.call(this, '工程信息', attrs);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const subArea = areaKey.split('@')[1];
|
|
|
|
|
|
|
+ function ZhaoTBXX(){
|
|
|
|
|
+ Element.call(this, '招投标信息');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function GongLGCSJ(){
|
|
|
|
|
+ Element.call(this, '公路工程数据');
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- // 招标信息
|
|
|
|
|
function ZhaoBiaoXx(information) {
|
|
function ZhaoBiaoXx(information) {
|
|
|
const attrs = [
|
|
const attrs = [
|
|
|
- { name: 'Zbr', value: getValueByKey(information, 'tendereeName') }, // 招标人
|
|
|
|
|
|
|
+ { name: '招标人', value: getValueByKey(information, 'tendereeName') }, // 招标人
|
|
|
{ name: 'Zxr', value: getValueByKey(information, 'costConsultant') }, // 造价咨询人
|
|
{ name: 'Zxr', value: getValueByKey(information, 'costConsultant') }, // 造价咨询人
|
|
|
{ name: 'ZbrDb', value: getValueByKey(information, 'tenderAuthorizer') }, // 招标人法定代表人或其授权人
|
|
{ name: 'ZbrDb', value: getValueByKey(information, 'tenderAuthorizer') }, // 招标人法定代表人或其授权人
|
|
|
{ name: 'ZxrDb', value: getValueByKey(information, 'consultantAuthorizer') }, // 造价咨询人法定代表人或其授权人
|
|
{ name: 'ZxrDb', value: getValueByKey(information, 'consultantAuthorizer') }, // 造价咨询人法定代表人或其授权人
|
|
@@ -92,10 +98,9 @@ INTERFACE_EXPORT = (() => {
|
|
|
if (extraMap[subArea]) {
|
|
if (extraMap[subArea]) {
|
|
|
attrs.push(...extraMap[subArea]);
|
|
attrs.push(...extraMap[subArea]);
|
|
|
}
|
|
}
|
|
|
- Element.call(this, 'ZhaoBiaoXx', attrs);
|
|
|
|
|
|
|
+ Element.call(this, '招标信息', attrs);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 招标控制价信息
|
|
|
|
|
function ZhaoBiaoKzXx(information, totalCost) {
|
|
function ZhaoBiaoKzXx(information, totalCost) {
|
|
|
const attrs = [
|
|
const attrs = [
|
|
|
{ name: 'Zbr', value: getValueByKey(information, 'tendereeName') }, // 招标人
|
|
{ name: 'Zbr', value: getValueByKey(information, 'tendereeName') }, // 招标人
|
|
@@ -120,10 +125,9 @@ INTERFACE_EXPORT = (() => {
|
|
|
if (extraMap[subArea]) {
|
|
if (extraMap[subArea]) {
|
|
|
attrs.push(...extraMap[subArea]);
|
|
attrs.push(...extraMap[subArea]);
|
|
|
}
|
|
}
|
|
|
- Element.call(this, 'ZhaoBiaoKzXx', attrs);
|
|
|
|
|
|
|
+ Element.call(this, '招标控制价', attrs);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 招标控制价信息
|
|
|
|
|
function TouBiaoXx(information, totalCost) {
|
|
function TouBiaoXx(information, totalCost) {
|
|
|
const attrs = [
|
|
const attrs = [
|
|
|
{ name: 'Zbr', value: getValueByKey(information, 'tendereeName') }, // 招标人
|
|
{ name: 'Zbr', value: getValueByKey(information, 'tendereeName') }, // 招标人
|
|
@@ -144,7 +148,7 @@ INTERFACE_EXPORT = (() => {
|
|
|
if (extraMap[subArea]) {
|
|
if (extraMap[subArea]) {
|
|
|
attrs.push(...extraMap[subArea]);
|
|
attrs.push(...extraMap[subArea]);
|
|
|
}
|
|
}
|
|
|
- Element.call(this, 'TouBiaoXx', attrs);
|
|
|
|
|
|
|
+ Element.call(this, '投标信息', attrs);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 单项工程信息,因项目管理中无“单项工程”这一层,从单位工程的工程特征信息中拼凑出来
|
|
// 单项工程信息,因项目管理中无“单项工程”这一层,从单位工程的工程特征信息中拼凑出来
|
|
@@ -515,25 +519,34 @@ INTERFACE_EXPORT = (() => {
|
|
|
function setupConstruction(constructionData) {
|
|
function setupConstruction(constructionData) {
|
|
|
const information = constructionData.property && constructionData.property.basicInformation || [];
|
|
const information = constructionData.property && constructionData.property.basicInformation || [];
|
|
|
const summaryInfo = constructionData.summaryInfo[constructionData.ID];
|
|
const summaryInfo = constructionData.summaryInfo[constructionData.ID];
|
|
|
- const jingJiBiao = new JingJiBiao(constructionData.name, information);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const chiZGLGC = new ChiZGLGC(constructionData.name, information);
|
|
|
|
|
+ chiZGLGC.children.push(new GongCXX(information));
|
|
|
|
|
+
|
|
|
|
|
+ const zhaoTBXX = new ZhaoTBXX();
|
|
|
|
|
+ chiZGLGC.children.push(zhaoTBXX);
|
|
|
if (isBidInvitation) {
|
|
if (isBidInvitation) {
|
|
|
- jingJiBiao.children.push(new ZhaoBiaoXx(information));
|
|
|
|
|
|
|
+ zhaoTBXX.children.push(new ZhaoBiaoXx(information));
|
|
|
} else if (isControl) {
|
|
} else if (isControl) {
|
|
|
- jingJiBiao.children.push(new ZhaoBiaoKzXx(information, summaryInfo.totalCost));
|
|
|
|
|
|
|
+ zhaoTBXX.children.push(new ZhaoBiaoKzXx(information, summaryInfo.totalCost));
|
|
|
} else {
|
|
} else {
|
|
|
- jingJiBiao.children.push(new TouBiaoXx(information, summaryInfo.totalCost));
|
|
|
|
|
|
|
+ zhaoTBXX.children.push(new TouBiaoXx(information, summaryInfo.totalCost));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ const gongLGCSJ = new GongLGCSJ(constructionData.name, information);
|
|
|
|
|
+ chiZGLGC.children.push(gongLGCSJ);
|
|
|
|
|
+
|
|
|
// 将单位工程工程特征中,单项工程编号、名称相同的,插入到建设项目和分段(单位工程)的中间层。
|
|
// 将单位工程工程特征中,单项工程编号、名称相同的,插入到建设项目和分段(单位工程)的中间层。
|
|
|
const midLayerMap = {}; // 单项工程key(code@name)与单项工程节点映射
|
|
const midLayerMap = {}; // 单项工程key(code@name)与单项工程节点映射
|
|
|
for (const tenderData of constructionData.children) {
|
|
for (const tenderData of constructionData.children) {
|
|
|
const feature = tenderData.property && tenderData.property.projectFeature || [];
|
|
const feature = tenderData.property && tenderData.property.projectFeature || [];
|
|
|
const midLayerCode = getValueByKey(feature, 'singleProjNo');
|
|
const midLayerCode = getValueByKey(feature, 'singleProjNo');
|
|
|
const midLayerName = getValueByKey(feature, 'singleProjName');
|
|
const midLayerName = getValueByKey(feature, 'singleProjName');
|
|
|
- const midLayerKey = `${midLayerCode}@${midLayerName}`;
|
|
|
|
|
- if (!midLayerMap[midLayerKey]) {
|
|
|
|
|
- jingJiBiao.children.push(midLayerMap[midLayerKey] = new Dxgcxx(midLayerCode, midLayerName));
|
|
|
|
|
- }
|
|
|
|
|
- midLayerMap[midLayerKey].children.push(setupTender(tenderData, feature));
|
|
|
|
|
|
|
+ // const midLayerKey = `${midLayerCode}@${midLayerName}`;
|
|
|
|
|
+ // if (!midLayerMap[midLayerKey]) {
|
|
|
|
|
+ // chiZGLGC.children.push(midLayerMap[midLayerKey] = new Dxgcxx(midLayerCode, midLayerName));
|
|
|
|
|
+ // }
|
|
|
|
|
+ // midLayerMap[midLayerKey].children.push(setupTender(tenderData, feature));
|
|
|
}
|
|
}
|
|
|
// 校验信息
|
|
// 校验信息
|
|
|
const [cpuID, diskID, macID] = generateHardwareId().split(';');
|
|
const [cpuID, diskID, macID] = generateHardwareId().split(';');
|
|
@@ -541,9 +554,9 @@ INTERFACE_EXPORT = (() => {
|
|
|
// 需要md5的值:MD5(“WHGLZTB”+项目名称+机器码+加密锁锁号)机器码取mac地址,加密锁锁号取用户账号id
|
|
// 需要md5的值:MD5(“WHGLZTB”+项目名称+机器码+加密锁锁号)机器码取mac地址,加密锁锁号取用户账号id
|
|
|
const toMD5Suffix = suffix.split('.')[1];
|
|
const toMD5Suffix = suffix.split('.')[1];
|
|
|
const toMD5Value = `${toMD5Suffix}${constructionData.name}${macID}${userID}`;
|
|
const toMD5Value = `${toMD5Suffix}${constructionData.name}${macID}${userID}`;
|
|
|
- jingJiBiao.children.push(new Jyxx(cpuID, diskID, macID, suffix, toMD5Value));
|
|
|
|
|
|
|
+ // chiZGLGC.children.push(new Jyxx(cpuID, diskID, macID, suffix, toMD5Value));
|
|
|
return [{
|
|
return [{
|
|
|
- data: jingJiBiao,
|
|
|
|
|
|
|
+ data: chiZGLGC,
|
|
|
exportKind,
|
|
exportKind,
|
|
|
fileName: `${constructionData.name}${suffix}`
|
|
fileName: `${constructionData.name}${suffix}`
|
|
|
}];
|
|
}];
|