Procházet zdrojové kódy

修复变更令重新审批bug

ellisran před 1 rokem
rodič
revize
9b9e216a2d
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      app/controller/change_controller.js

+ 1 - 1
app/controller/change_controller.js

@@ -1533,7 +1533,7 @@ module.exports = app => {
                     throw '变更令数据错误';
                 }
                 // 获取终审
-                const auditInfo = (await this.ctx.service.changeAudit.getAllDataByCondition({ where: { cid: changeData.cid }, orders: [['usort', 'desc']], limit: 1, offset: 0 }))[0];
+                const auditInfo = await ctx.service.changeAudit.getAuditorByStatus(changeData.cid, changeData.times, audit.flow.status.checked);
                 if (changeData.status !== audit.flow.status.checked || ctx.session.sessionUser.accountId !== auditInfo.uid) {
                     throw '您无权进行该操作';
                 }