|
|
@@ -23,6 +23,7 @@ INTERFACE_EXPORT = (() => {
|
|
|
getValueByKey,
|
|
|
getHan,
|
|
|
getFee,
|
|
|
+ generateHardwareId,
|
|
|
},
|
|
|
Element,
|
|
|
} = INTERFACE_EXPORT_BASE;
|
|
|
@@ -30,7 +31,6 @@ INTERFACE_EXPORT = (() => {
|
|
|
const {
|
|
|
EXPORT_KIND: { BID_INVITATION, BID_SUBMISSION, CONTROL },
|
|
|
fixedFlag,
|
|
|
- SourceType,
|
|
|
RationType,
|
|
|
} = window.commonConstants
|
|
|
|
|
|
@@ -287,6 +287,7 @@ INTERFACE_EXPORT = (() => {
|
|
|
{ name: 'Code', value: `F${row}` }, // 行引用
|
|
|
{ name: 'Jsgs', value: node.data.calcBase }, // 计算基数
|
|
|
{ name: 'Lb', value: BillsTitleType[node.getFlag()], type: TYPE.INT }, // 类别
|
|
|
+ { name: 'Bz', value: node.data.remark }, // 备注
|
|
|
];
|
|
|
Element.call(this, 'QdBt', attrs);
|
|
|
}
|
|
|
@@ -296,7 +297,7 @@ INTERFACE_EXPORT = (() => {
|
|
|
const row = node.row();
|
|
|
const attrs = [
|
|
|
{ name: 'Xh', value: row, type: TYPE.INT }, // 序号
|
|
|
- { name: 'Qdbm', value: node.data.code }, // 编码
|
|
|
+ { name: 'Qdbm', value: node.data.code, minLen: 1 }, // 编码
|
|
|
{ name: 'Name', value: node.data.name }, // 名称
|
|
|
{ name: 'Dw', value: node.data.unit }, // 单位
|
|
|
{ name: 'Sl', value: node.data.quantity, type: TYPE.DECIMAL }, // 工程量
|
|
|
@@ -443,18 +444,23 @@ INTERFACE_EXPORT = (() => {
|
|
|
{ name: 'Sl', value: BID_INVITATION ? '0' : glj.quantity, type: TYPE.DECIMAL }, // 工程量
|
|
|
{ name: 'Dj', value: glj.marketPrice, type: TYPE.DECIMAL }, // 暂定价、单价
|
|
|
{ name: 'Hj', value: BID_INVITATION ? '0' : glj.totalPrice, type: TYPE.DECIMAL }, // 合价
|
|
|
- { name: 'Bz', value: glj.remark, type: TYPE.DECIMAL }, // 备注
|
|
|
+ { name: 'Bz', value: glj.remark }, // 备注
|
|
|
];
|
|
|
Element.call(this, eleName, attrs);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 人材机汇总
|
|
|
function Rcjhz() {
|
|
|
Element.call(this, 'Rcjhz');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 人材机汇总明细
|
|
|
function RcjhzMx(glj) {
|
|
|
+ const rootTypeReg = /\d/;
|
|
|
+ let rootType = rootTypeReg.exec(glj.type)[0];
|
|
|
+ if (!['1', '2', '3'].includes(rootType)) {
|
|
|
+ rootType = '2';
|
|
|
+ }
|
|
|
const attrs = [
|
|
|
{ name: 'RcjId', value: projectGLJIDToRcjID[glj.id] }, // 资源ID
|
|
|
{ name: 'Bm', value: glj.code }, // 编码
|
|
|
@@ -466,14 +472,43 @@ INTERFACE_EXPORT = (() => {
|
|
|
{ name: 'Hj', value: glj.totalPrice, type: TYPE.DECIMAL }, // 合价,人材料总消耗量*预算价
|
|
|
{ name: 'Cd', value: '' }, // 产地
|
|
|
{ name: 'Gycs', value: '' }, // 厂商
|
|
|
- { name: 'Rcjlb', value: '', type: TYPE.INT }, // 人材机类型 1=人工;2=材料;3=机械
|
|
|
+ { name: 'Rcjlb', value: rootType, type: TYPE.INT }, // 人材机类型 1=人工;2=材料;3=机械
|
|
|
{ name: 'Jgbz', value: 'false', type: TYPE.BOOL }, // 供材方
|
|
|
{ name: 'Zyclbj', value: !!glj.is_main_material, type: TYPE.BOOL }, // 主要材料
|
|
|
{ name: 'Zgjbz', value: !!glj.is_evaluate, type: TYPE.BOOL }, // 是否暂估
|
|
|
{ name: 'Zcbz', value: 'false', type: TYPE.BOOL }, // 主材标记
|
|
|
- ]
|
|
|
+ ];
|
|
|
Element.call(this, 'RcjhzMx', attrs);
|
|
|
}
|
|
|
+
|
|
|
+ // 配比组成
|
|
|
+ function PbZc() {
|
|
|
+ Element.call(this, 'PbZc');
|
|
|
+ }
|
|
|
+
|
|
|
+ // 配比明细
|
|
|
+ function PbZcMx(ratio) {
|
|
|
+ const attrs = [
|
|
|
+ { name: 'RcjId', value: projectGLJIDToRcjID[ratio.projectGLJID] }, // 组成物对应人材机汇总的资源ID
|
|
|
+ { name: 'Sl', value: ratio.consumption, type: TYPE.DECIMAL }, // 组成物消耗量
|
|
|
+ ];
|
|
|
+ Element.call(this, 'PbZcMx', attrs);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 校验信息
|
|
|
+ function Jyxx(cpuID, diskID, macID, toMD5Value) {
|
|
|
+ const attrs = [
|
|
|
+ { name: 'SoftName', value: '纵横创新软件有限公司' }, // 公司名
|
|
|
+ { name: 'SoftNum', value: md5(toMD5Value) }, // 校验数据
|
|
|
+ { name: 'MacAdress', value: macID }, // mac地址
|
|
|
+ { name: 'DogNum', value: userID }, // 加密锁号,取用户ID
|
|
|
+ { name: 'ComputerName', value: USER_NAME }, // 计算机名,取用户名称
|
|
|
+ { name: 'HDDSerial', value: diskID }, // 硬盘序列号
|
|
|
+ { name: 'CPUSerial', value: cpuID }, // CPU序列号
|
|
|
+ ];
|
|
|
+ Element.call(this, 'Jyxx', attrs);
|
|
|
+ }
|
|
|
+
|
|
|
// 组装数据 --------------------------------------
|
|
|
|
|
|
// 组装建设项目数据
|
|
|
@@ -500,7 +535,13 @@ INTERFACE_EXPORT = (() => {
|
|
|
}
|
|
|
midLayerMap[midLayerKey].children.push(setupTender(tenderData, feature));
|
|
|
}
|
|
|
+ // 校验信息
|
|
|
+ const [cpuID, diskID, macID] = generateHardwareId().split(';');
|
|
|
const suffix = INTERFACE_CONFIG[areaKey]['fileSuffix'][exportKind];
|
|
|
+ // 需要md5的值:MD5(“WHGLZTB”+项目名称+机器码+加密锁锁号)机器码取mac地址,加密锁锁号取用户账号id
|
|
|
+ const toMD5Suffix = suffix.split('.')[1];
|
|
|
+ const toMD5Value = `${toMD5Suffix}${constructionData.name}${macID}${userID}`;
|
|
|
+ jingJiBiao.children.push(new Jyxx(cpuID, diskID, macID, suffix, toMD5Value));
|
|
|
return [{
|
|
|
data: jingJiBiao,
|
|
|
exportKind,
|
|
|
@@ -525,7 +566,8 @@ INTERFACE_EXPORT = (() => {
|
|
|
const dwgcxx = new Dwgcxx(tenderData.name, feature);
|
|
|
dwgcxx.children.push(
|
|
|
setupFeeRate(curDetail.FeeRate),
|
|
|
- setupBills(curDetail.mainTree)
|
|
|
+ setupBills(curDetail.mainTree),
|
|
|
+ ...setupGLJList(curDetail)
|
|
|
);
|
|
|
return dwgcxx;
|
|
|
}
|
|
|
@@ -667,21 +709,32 @@ INTERFACE_EXPORT = (() => {
|
|
|
}
|
|
|
|
|
|
// 组装人材机汇总相关表数据
|
|
|
- function setupGLJList() {
|
|
|
+ function setupGLJList(tenderDetail) {
|
|
|
// 暂估材料
|
|
|
const zgcl = new gljRefRoot('ZgCl');
|
|
|
- const zgclData = curDetail.evaluateMaterialData.map(glj => new gljRefElement('ZgClMx', glj));
|
|
|
- zgcl.children.push(...zgclData);
|
|
|
-
|
|
|
+ zgcl.children = tenderDetail.evaluateMaterialData.map(glj => new gljRefElement('ZgClMx', glj));
|
|
|
+
|
|
|
// 评标材料
|
|
|
const jpcl = new gljRefRoot('JpCl');
|
|
|
- const jpclData = curDetail.bidMaterialData.map(glj => new gljRefElement('JpClMx', glj));
|
|
|
- jpcl.children.push(...jpclData);
|
|
|
- if (BID_INVITATION) {
|
|
|
+ jpcl.children = tenderDetail.bidMaterialData.map(glj => new gljRefElement('JpClMx', glj));
|
|
|
+ if (isBidInvitation) {
|
|
|
return [zgcl, jpcl];
|
|
|
}
|
|
|
// 人材机汇总 (招标不导出)
|
|
|
const rcjhz = new Rcjhz();
|
|
|
+ rcjhz.children = tenderDetail.projectGLJ.datas.gljList.map(pGLJ => {
|
|
|
+ const gljElement = new RcjhzMx(pGLJ);
|
|
|
+ // 组成物
|
|
|
+ const connectKey = gljUtil.getIndex(pGLJ, gljKeyArray);
|
|
|
+ const ratioData = tenderDetail.projectGLJ.datas.mixRatioMap[connectKey];
|
|
|
+ if (ratioData && ratioData.length) {
|
|
|
+ const pbzc = new PbZc();
|
|
|
+ pbzc.children = ratioData.map(ratio => new PbZcMx(ratio));
|
|
|
+ gljElement.children.push(pbzc);
|
|
|
+ }
|
|
|
+ return gljElement;
|
|
|
+ });
|
|
|
+ return [zgcl, jpcl, rcjhz];
|
|
|
}
|
|
|
|
|
|
return setupConstruction(projectData);
|