|
@@ -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);
|
|
|
}
|
|
|
|
|
|
/**
|