Browse Source

重新审批相关

MaiXinRong 9 months ago
parent
commit
ce722b0746
2 changed files with 2 additions and 1 deletions
  1. 0 1
      app/middleware/ledger_audit_check.js
  2. 2 0
      app/service/ledger_audit.js

+ 0 - 1
app/middleware/ledger_audit_check.js

@@ -25,7 +25,6 @@ const checkAuditFlow = async function(ctx) {
         const shenpiList = await ctx.service.shenpiAudit.getAllDataByCondition({ where: { tid: tender.id, sp_type: shenpiConst.sp_type.ledger, sp_status: shenpi_status } });
         // 判断2个id数组是否相同,不同则删除原审批流,切换成固定的审批流
         let sameAudit = auditList.length === shenpiList.length;
-        console.log(sameAudit);
         if (sameAudit) {
             for (const audit of auditList) {
                 const shenpi = shenpiList.find(x => { return x.audit_id === audit.audit_id; });

+ 2 - 0
app/service/ledger_audit.js

@@ -732,6 +732,7 @@ module.exports = app => {
             const checkAgainAuditor = flowAuditors.map(x => {
                 return {
                     tender_id: tenderId, times, audit_order: x.audit_order + 1, audit_id: x.audit_id,
+                    audit_type: x.audit_type, audit_ledger_id: x.audit_ledger_id,
                     begin_time: time, end_time: time, opinion: '',
                     status: x.audit_id === accountId ? auditConst.status.checkAgain : auditConst.status.checkSkip,
                 }
@@ -739,6 +740,7 @@ module.exports = app => {
             const checkingAuditor = flowAuditors.map(x => {
                 return {
                     tender_id: tenderId, times, audit_order: x.audit_order + 2, audit_id: x.audit_id,
+                    audit_type: x.audit_type, audit_ledger_id: x.audit_ledger_id,
                     begin_time: time, end_time: null, opinion: '', status: auditConst.status.checking,
                 };
             });