ソースを参照

审核比较问题

MaiXinRong 5 年 前
コミット
fa382ac794
2 ファイル変更3 行追加3 行削除
  1. 2 2
      app/controller/stage_controller.js
  2. 1 1
      app/service/stage_bills.js

+ 2 - 2
app/controller/stage_controller.js

@@ -1142,8 +1142,8 @@ module.exports = app => {
                 }
                 for (const order of data.roles) {
                     const data = { order: order, bills: [], pos: [] };
-                    data.bills = await ctx.service.stageBills.getAuditorStageData(ctx.tender.id, ctx.stage.id, ctx.stage.times, order);
-                    data.pos = await ctx.service.stagePos.getAuditorStageData(ctx.tender.id, ctx.stage.id, ctx.stage.times, order);
+                    data.bills = await ctx.service.stageBills.getAuditorStageData(ctx.tender.id, ctx.stage.id, ctx.stage.curTimes, order);
+                    data.pos = await ctx.service.stagePos.getAuditorStageData(ctx.tender.id, ctx.stage.id, ctx.stage.curTimes, order);
                     result.roles.push(data);
                 }
                 ctx.body = {err: 0, msg: '', data: result};

+ 1 - 1
app/service/stage_bills.js

@@ -71,7 +71,7 @@ module.exports = app => {
             const sql = 'SELECT Bills.* FROM ' + this.tableName + ' As Bills ' +
                 '  INNER JOIN ( ' +
                 '    SELECT MAX(`times` * ' + timesLen + ' + `order`) As `progress`, `lid`, `tid`, `sid` From ' + this.tableName +
-                '      WHERE `times` < ? OR (`times` = ? AND `order` <= ?) And tid = ? And sid = ?' + lidSql +
+                '      WHERE (`times` < ? OR (`times` = ? AND `order` <= ?)) And tid = ? And sid = ?' + lidSql +
                 '      GROUP BY `lid`' +
                 '  ) As MaxFilter ' +
                 '  ON (Bills.times * ' + timesLen + ' + `order`) = MaxFilter.progress And Bills.lid = MaxFilter.lid' +