Procházet zdrojové kódy

审批流程排序问题

laiguoran před 6 roky
rodič
revize
27cd7dc06a
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      app/service/ledger_audit.js
  2. 1 1
      app/service/stage_audit.js

+ 1 - 1
app/service/ledger_audit.js

@@ -51,7 +51,7 @@ module.exports = app => {
             const sql = 'SELECT la.`audit_id`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, la.`times`, la.`audit_order`, la.`status`, la.`opinion`, la.`begin_time`, la.`end_time` ' +
                 'FROM ?? AS la, ?? AS pa ' +
                 'WHERE la.`tender_id` = ? and la.`times` = ?' +
-                '    and la.`audit_id` = pa.`id`';
+                '    and la.`audit_id` = pa.`id` order by la.`order`';
             const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, tenderId, times];
             return await this.db.query(sql, sqlParam);
         }

+ 1 - 1
app/service/stage_audit.js

@@ -50,7 +50,7 @@ module.exports = app => {
         async getAuditors(stageId, times = 1) {
             const sql = 'SELECT la.`aid`, pa.`name`, pa.`company`, pa.`role`, pa.`mobile`, pa.`telephone`, la.`times`, la.`order`, la.`status`, la.`opinion`, la.`begin_time`, la.`end_time` ' +
                 'FROM ?? AS la, ?? AS pa ' +
-                'WHERE la.`sid` = ? and la.`times` = ? and la.`aid` = pa.`id`';
+                'WHERE la.`sid` = ? and la.`times` = ? and la.`aid` = pa.`id` order by la.`order`';
             const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, stageId, times];
             return await this.db.query(sql, sqlParam);
         }