|
@@ -65,7 +65,7 @@ module.exports = app => {
|
|
|
const sql = 'SELECT att.id, att.lid, att.uid, att.filename, att.fileext, att.filesize, att.remark, att.in_time,' +
|
|
|
' pa.name as `username`, leg.name as `lname`, leg.code as `code`, leg.b_code as `b_code`' +
|
|
|
' 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.in_time DESC';
|
|
|
+ ' 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];
|
|
|
return await this.db.query(sql, sqlParam);
|
|
|
}
|