فهرست منبع

修复期列表查看审批流程bug

laiguoran 6 سال پیش
والد
کامیت
58086308da
1فایلهای تغییر یافته به همراه3 افزوده شده و 9 حذف شده
  1. 3 9
      app/service/stage_audit.js

+ 3 - 9
app/service/stage_audit.js

@@ -431,10 +431,11 @@ module.exports = app => {
             switch (status) {
                 case auditConst.status.checking :
                 case auditConst.status.checked :
+                case auditConst.status.checkNoPre :
                     sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, la.`times`, la.`sid`, la.`aid`, la.`order` ' +
                         'FROM ?? AS la, ?? AS pa ' +
-                        'WHERE la.`sid` = ? and (la.`status` = ? or la.`status` = ?) and la.`aid` = pa.`id` order by la.`times` desc';
-                    sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, stageId, auditConst.status.checking, auditConst.status.checked];
+                        'WHERE la.`sid` = ? and la.`status` = ? and la.`aid` = pa.`id` order by la.`times` desc';
+                    sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, stageId, status];
                     auditor = await this.db.queryOne(sql, sqlParam);
                     break;
                 case auditConst.status.checkNo :
@@ -444,13 +445,6 @@ module.exports = app => {
                     sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, stageId, auditConst.status.checkNo, parseInt(times) - 1];
                     auditor = await this.db.queryOne(sql, sqlParam);
                     break;
-                case auditConst.status.checkNoPre :
-                    sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, la.`times`, la.`sid`, la.`aid`, la.`order` ' +
-                        'FROM ?? AS la, ?? AS pa ' +
-                        'WHERE la.`sid` = ? and la.`status` = ? and la.`aid` = pa.`id` order by la.`times` desc';
-                    sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, stageId, auditConst.status.checkNoPre];
-                    auditor = await this.db.queryOne(sql, sqlParam);
-                    break;
                 case auditConst.status.uncheck :
                 default:break;
             }