Sfoglia il codice sorgente

fix: 记录台账附件bug修复

LanJamRom 4 anni fa
parent
commit
cee64a06b1
1 ha cambiato i file con 1 aggiunte e 9 eliminazioni
  1. 1 9
      app/service/stage_att.js

+ 1 - 9
app/service/stage_att.js

@@ -68,15 +68,7 @@ module.exports = app => {
                 ' FROM ?? AS att,?? AS pa,?? AS leg' +
                 ' WHERE leg.id = att.lid AND pa.id = att.uid AND att.tid = ? AND att.sid = ? ORDER BY att.id DESC';
             const sqlParam = [this.tableName, this.ctx.service.projectAccount.tableName, this.ctx.service.ledger.tableName, tid, sid];
-            const result = await this.db.query(sql, sqlParam);
-            return result.map(item => {
-                if (!ctx.helper.canPreview(item.fileext)) {
-                    item.filepath = `/tender/${ctx.tender.id}/measure/stage/${ctx.params.order}/download/file/${item.id}`;
-                } else {
-                    item.filepath = item.filepath.replace(/^app|\/app/, '');
-                }
-                return item;
-            });
+            return await this.db.query(sql, sqlParam);
         }
 
         /**