|
@@ -375,7 +375,7 @@ module.exports = app => {
|
|
|
' Left Join ' + this.ctx.service.ledgerRevise.tableName + ' As r On ra.rid = r.id' +
|
|
|
' Left Join '+ this.ctx.service.tender.tableName +' AS t On r.tid = t.id' +
|
|
|
' Left Join ' + this.ctx.service.projectAccount.tableName + ' As p On ra.audit_id = p.id' +
|
|
|
- ' WHERE ((ra.`audit_id` = ? and ra.`status` = ?) OR' +
|
|
|
+ ' WHERE r.`valid` != 0 and t.`id` != null and ((ra.`audit_id` = ? and ra.`status` = ?) OR' +
|
|
|
' (r.`uid` = ? and r.`status` = ? and ra.`status` = ? and ra.`times` = (r.`times`-1)))';
|
|
|
const sqlParam = [auditorId, auditConst.status.checking, auditorId, auditConst.status.checkNo, auditConst.status.checkNo];
|
|
|
return await this.db.query(sql, sqlParam);
|