瀏覽代碼

台账修订终审bug

ellisran 9 月之前
父節點
當前提交
ce854062b9
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      app/middleware/revise_audit_check.js
  2. 1 1
      app/service/revise_audit.js

+ 1 - 1
app/middleware/revise_audit_check.js

@@ -20,7 +20,7 @@ const checkAuditFlow = async function(ctx) {
     if (info.shenpi.revise === shenpiConst.sp_status.sqspr) return;
     if (revise.status !== status.uncheck && revise.status !== status.checkNo) return;
 
-    const shenpi_status = info.shenpi.ledger;
+    const shenpi_status = info.shenpi.revise;
     // 进一步比较审批流是否与审批流程设置的相同,不同则替换为固定审批流或固定的终审
     const auditList = await ctx.service.reviseAudit.getAuditors(revise.id, revise.times);
     if (shenpi_status === shenpiConst.sp_status.gdspl) {

+ 1 - 1
app/service/revise_audit.js

@@ -1056,7 +1056,7 @@ module.exports = app => {
                 const existAudit = auditList.find(x => { return x.audit_id === lastId });
                 let order = auditList.length > 0 ? auditList.reduce((rst, a) => { return Math.max(rst, a.audit_order)}, 0) + 1 : 1; // 最大值 + 1
                 if (existAudit) {
-                    await transaction.delete(this.tableName, { sid: stage.id, times: stage.times, audit_id: lastId });
+                    await transaction.delete(this.tableName, { rid: revise.id, times: revise.times, audit_id: lastId });
                     const sameOrder = auditList.filter(x => { return x.audit_order === existAudit.audit_order });
                     if (sameOrder.length === 1) {
                         const updateData = [];