소스 검색

待办页排序调整

laiguoran 4 년 전
부모
커밋
ba8a419ab9
5개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      app/service/advance_audit.js
  2. 1 1
      app/service/ledger_audit.js
  3. 1 1
      app/service/material_audit.js
  4. 1 1
      app/service/revise_audit.js
  5. 1 1
      app/service/stage_audit.js

+ 1 - 1
app/service/advance_audit.js

@@ -490,7 +490,7 @@ module.exports = app => {
                         '    t.`name`, t.`project_id`, t.`type`, t.`user_id` ' +
                         '  FROM ?? AS ma, ?? AS m, ?? As t ' +
                         '  WHERE ((ma.`audit_id` = ? and ma.`status` = ?) OR (m.`uid` = ? and ma.`status` = ? and m.`status` = ? and ma.`times` = (m.`times`-1)))' +
-                        '    and ma.`vid` = m.`id` and ma.`tid` = t.`id`';
+                        '    and ma.`vid` = m.`id` and ma.`tid` = t.`id` ORDER BY ma.`create_time` DESC';
             const sqlParam = [this.tableName, this.ctx.service.advance.tableName, this.ctx.service.tender.tableName, auditorId, auditConst.status.checking, auditorId, auditConst.status.checkNo, auditConst.status.checkNo];
             return await this.db.query(sql, sqlParam);
         }

+ 1 - 1
app/service/ledger_audit.js

@@ -387,7 +387,7 @@ module.exports = app => {
                 'SELECT la.`audit_id`, la.`times`, la.`audit_order`, la.`begin_time`, la.`end_time`, t.`id`, t.`name`, t.`project_id`, t.`type`, t.`user_id`, t.`ledger_status` ' +
                 'FROM ?? AS la, ?? AS t ' +
                 'WHERE ((la.`audit_id` = ? and la.`status` = ?) OR (t.`user_id` = ? and t.`ledger_status` = ? and la.`status` = ? and la.`times` = (t.`ledger_times`-1)))' +
-                '    and la.`tender_id` = t.`id`';
+                '    and la.`tender_id` = t.`id` ORDER BY la.`begin_time` DESC';
             const sqlParam = [
                 this.tableName,
                 this.ctx.service.tender.tableName,

+ 1 - 1
app/service/material_audit.js

@@ -596,7 +596,7 @@ module.exports = app => {
                         '    t.`name`, t.`project_id`, t.`type`, t.`user_id` ' +
                         '  FROM ?? AS ma, ?? AS m, ?? As t ' +
                         '  WHERE ((ma.`aid` = ? and ma.`status` = ?) OR (m.`user_id` = ? and ma.`status` = ? and m.`status` = ? and ma.`times` = (m.`times`-1)))' +
-                        '    and ma.`mid` = m.`id` and ma.`tid` = t.`id`';
+                        '    and ma.`mid` = m.`id` and ma.`tid` = t.`id` ORDER BY ma.`begin_time` DESC';
             const sqlParam = [this.tableName, this.ctx.service.material.tableName, this.ctx.service.tender.tableName, auditorId, auditConst.status.checking, auditorId, auditConst.status.checkNo, auditConst.status.checkNo];
             return await this.db.query(sql, sqlParam);
         }

+ 1 - 1
app/service/revise_audit.js

@@ -541,7 +541,7 @@ module.exports = app => {
                 this.ctx.service.projectAccount.tableName +
                 ' As p On ra.audit_id = p.id' +
                 '  WHERE r.`valid` != 0 and ((ra.`audit_id` = ? and ra.`status` = ?) OR' +
-                '    (r.`uid` = ? and r.`status` = ? and ra.`status` = ? and ra.`times` = (r.`times`-1)))';
+                '    (r.`uid` = ? and r.`status` = ? and ra.`status` = ? and ra.`times` = (r.`times`-1))) ORDER BY ra.`begin_time` DESC';
             const sqlParam = [auditorId, auditConst.status.checking, auditorId, auditConst.status.checkNo, auditConst.status.checkNo];
             return await this.db.query(sql, sqlParam);
         }

+ 1 - 1
app/service/stage_audit.js

@@ -907,7 +907,7 @@ module.exports = app => {
                 '    t.`name`, t.`project_id`, t.`type`, t.`user_id` ' +
                 '  FROM ?? AS sa, ?? AS s, ?? As t ' +
                 '  WHERE ((sa.`aid` = ? and sa.`status` = ?) OR (s.`user_id` = ? and sa.`status` = ? and s.`status` = ? and sa.`times` = (s.`times`-1)))' +
-                '    and sa.`sid` = s.`id` and sa.`tid` = t.`id`';
+                '    and sa.`sid` = s.`id` and sa.`tid` = t.`id` ORDER BY sa.`begin_time` DESC';
             const sqlParam = [
                 this.tableName,
                 this.ctx.service.stage.tableName,