소스 검색

合同支付,变更基数问题

MaiXinRong 3 년 전
부모
커밋
72d356f4c1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/service/stage_change.js

+ 1 - 1
app/service/stage_change.js

@@ -396,7 +396,7 @@ module.exports = app => {
             const tender = await this._getTender(stage);
             const sql = 'SELECT sc.*, c.quality FROM ' + this.tableName + ' sc' +
                 '  LEFT JOIN ' + this.ctx.service.change.tableName + ' c ON sc.cid = c.cid' +
-                '  WHERE sid = ?';
+                '  WHERE sid = ? ' + (stage.readOnly ? `and (stimes < ${stage.curTimes} or (stimes = ${stage.curTimes} and sorder <= ${stage.curOrder}))` : '');
             let data = await this.db.query(sql, [stage.id]);
             data = helper.filterLastestData(data, ['lid', 'pid', 'cbid'], 'stimes', 'sorder');
             const bqData = [];