Browse Source

初始化合同支付数据问题

MaiXinRong 3 years ago
parent
commit
aa2dcaad35
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/service/stage_pay.js

+ 2 - 2
app/service/stage_pay.js

@@ -229,6 +229,7 @@ module.exports = app => {
             const PayCalculator = require('../lib/pay_calc');
             const payCalculator = new PayCalculator(this.ctx, stage, this.ctx.tender.info);
             await payCalculator.calculateAll(stagePays);
+            console.log(stagePays);
             const srUpdate = [], update = [];
             for (const sp of stagePays) {
                 update.push({
@@ -293,8 +294,7 @@ module.exports = app => {
                         '     SP.`pre_tp`, SP.`end_tp`, SP.`pre_used`, SP.`pre_finish`, SP.`start_stage_order` ' +
                         '  FROM ?? As SP' +
                         '  WHERE SP.`sid` = ? AND SP.`stimes` = ? AND SP.`sorder` = ?';
-            const sqlParam = [this.tableName, times, order, this.tableName, this.ctx.service.pay.tableName,
-                stage.id, stage.curTimes, stage.curOrder];
+            const sqlParam = [this.tableName, times, order, this.tableName, stage.id, stage.curTimes, stage.curOrder];
             return await transaction.query(sql, sqlParam);
         }