|
@@ -669,11 +669,11 @@ module.exports = app => {
|
|
|
*/
|
|
|
async getAuditMaterial(auditorId) {
|
|
|
const sql = 'SELECT ma.`aid`, ma.`times`, ma.`order`, ma.`begin_time`, ma.`end_time`, ma.`tid`, ma.`mid`,' +
|
|
|
- ' m.`order` As `morder`, m.`status` As `mstatus`,' +
|
|
|
- ' 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` ORDER BY ma.`begin_time` DESC';
|
|
|
+ ' m.`order` As `morder`, m.`status` As `mstatus`,' +
|
|
|
+ ' 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` 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);
|
|
|
}
|