Browse Source

fix: 安全计量报表审核问题

Tony Kang 1 week atrás
parent
commit
7bdd9bd9e9
1 changed files with 7 additions and 1 deletions
  1. 7 1
      app/controller/report_controller.js

+ 7 - 1
app/controller/report_controller.js

@@ -1338,6 +1338,12 @@ module.exports = app => {
         async _commonGetAudit(ctx, params, stgAudit, stageFlow) {
             const COMMON_INVALID_STATUS_FOR_ORG = [1, 6]; // 对原报来说,待上报、重新上报状态就不能默认为审核通过
             switch (params.stage_id) {
+                case -150:
+                    const safeAudit = await ctx.service.safeStageAudit.getAuditors(params.business_id, params.stage_times, 'asc', true);
+                    safeAudit.forEach(audit => {
+                        stgAudit.push({ aid: audit.audit_id, status: audit.audit_status, opinion: audit.opinion, end_time: audit.audit_time, order: audit.audit_order });
+                    });
+                    break;
                 case -300: // 变更令
                     const changeAudit = await ctx.service.changeAudit.getAuditors(params.change_id, params.change_times, 'asc', true);
                     const change = await ctx.service.change.getChangeByCid(params.change_id);
@@ -1539,7 +1545,7 @@ module.exports = app => {
                     const payment = paymentDetailList[0];
                     stageList.push({ id: params.stage_id, user_id: payment.uid, status: payment.status });
                 }
-            } else if ([-300, -301, -302, -303, -400, -500].includes(params.stage_id)) {
+            } else if ([-150, -300, -301, -302, -303, -400, -500].includes(params.stage_id)) {
                 // 变更令、预付款、材差相关的
                 stgAudit = [];
                 stgAuditForOrg = [];