MaiXinRong 1 gadu atpakaļ
vecāks
revīzija
17f470dc4f
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      app/service/stage_audit.js

+ 3 - 2
app/service/stage_audit.js

@@ -1133,8 +1133,9 @@ module.exports = app => {
                 });
                 await transaction.insert(this.tableName, [...checkCancelAuditors, ...checkingAuditors]);
                 // 当前审批人变成待审批
-                await transaction.update(this.tableName, { begin_time: null, status: auditConst.status.uncheck, order: stage.curAuditors[0].order + 2 },
-                    { where: { sid: stage.id, times: stage.curAuditors[0].times, order: stage.curAuditors[0].order } });
+                await transaction.updateRows(this.tableName, stage.curAuditors.map(x => { return {
+                    id: x.id, begin_time: null, status: auditConst.status.uncheck, order: x.order + 2
+                }}));
                 // 计算并合同支付最终数据
                 const [yfPay, sfPay] = await this.ctx.service.stagePay.calcAllStagePays(this.ctx.stage, transaction);
                 const stageTp = {