|
@@ -262,6 +262,7 @@ module.exports = app => {
|
|
|
await transaction.update(this.ctx.service.advance.tableName, {
|
|
|
id: advanceId,
|
|
|
status: checkData.checkType,
|
|
|
+ end_time: time,
|
|
|
});
|
|
|
}
|
|
|
await transaction.commit();
|
|
@@ -478,6 +479,21 @@ module.exports = app => {
|
|
|
const sqlParam = [tenderId];
|
|
|
return this.db.query(sql, sqlParam);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取待处理审核列表
|
|
|
+ * @param {Number} auditorId 审核人id
|
|
|
+ */
|
|
|
+ async getAuditAdvance(auditorId) {
|
|
|
+ const sql = 'SELECT ma.`audit_id`, ma.`times`, ma.`order`, ma.`create_time`, ma.`end_time`, ma.`tid`, ma.`vid`,' +
|
|
|
+ ' 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.`audit_id` = ? and ma.`status` = ?) OR (m.`uid` = ? and ma.`status` = ? and m.`status` = ? and ma.`times` = (m.`times`-1)))' +
|
|
|
+ ' and ma.`vid` = m.`id` and ma.`tid` = t.`id`';
|
|
|
+ const sqlParam = [this.tableName, this.ctx.service.advance.tableName, this.ctx.service.tender.tableName, auditorId, auditConst.status.checking, auditorId, auditConst.status.checkNo, auditConst.status.checkNo];
|
|
|
+ return await this.db.query(sql, sqlParam);
|
|
|
+ }
|
|
|
}
|
|
|
return AdvanceAudit;
|
|
|
};
|