|
@@ -194,7 +194,6 @@ class srCache {
|
|
|
this.details = await this.ctx.service.stageDetail.getLastestStageData(this.stage.tid, this.stage.id);
|
|
|
stageIm.buildRelaStageIm(this.stage, this.billsTree, this.pos, this.details, this.changes);
|
|
|
for (const i of stageIm.ImData) {
|
|
|
- if (i.pre_jl) console.log(i);
|
|
|
this.stageIm.push({
|
|
|
tid: this.ctx.tender.id, sid: this.ctx.stage.id, sorder: this.ctx.stage.order,
|
|
|
rela_tid: this.stage.tid, rela_sid: this.stage.id, rela_sorder: this.stage.order,
|
|
@@ -217,7 +216,6 @@ class srCache {
|
|
|
})
|
|
|
}
|
|
|
for (const i of stageIm.ImBillsData) {
|
|
|
- if (i.pre_jl) console.log(i);
|
|
|
this.stageImBills.push({
|
|
|
tid: this.ctx.tender.id, sid: this.ctx.stage.id, sorder: this.ctx.stage.order,
|
|
|
rela_tid: this.stage.tid, rela_sid: this.stage.id, rela_sorder: this.stage.order,
|
|
@@ -232,7 +230,6 @@ class srCache {
|
|
|
quantity: i.quantity, total_price: i.total_price
|
|
|
})
|
|
|
}
|
|
|
- console.log('calc', this.stageIm.length);
|
|
|
}
|
|
|
|
|
|
async calculate(stage) {
|
|
@@ -460,7 +457,6 @@ module.exports = app => {
|
|
|
if (calcModel.stageBillsFinal && calcModel.stageBillsFinal.length > 0) await conn.insert(this.ctx.service.stageRelaBillsFinal.tableName, calcModel.stageBillsFinal);
|
|
|
if (calcModel.stagePos && calcModel.stagePos.length > 0) await conn.insert(this.ctx.service.stageRelaPos.tableName, calcModel.stagePos);
|
|
|
if (calcModel.stagePosFinal && calcModel.stagePosFinal.length > 0) await conn.insert(this.ctx.service.stageRelaPosFinal.tableName, calcModel.stagePosFinal);
|
|
|
- console.log('insert', calcModel.stageIm.length);
|
|
|
if (calcModel.stageIm && calcModel.stageIm.length > 0) await conn.insert(this.ctx.service.stageRelaIm.tableName, calcModel.stageIm);
|
|
|
if (calcModel.stageImBills && calcModel.stageImBills.length > 0) await conn.insert(this.ctx.service.stageRelaImBills.tableName, calcModel.stageImBills);
|
|
|
await conn.update(this.ctx.service.stage.tableName, { id: this.ctx.stage.id, check_calc: 1 });
|