|
@@ -133,7 +133,9 @@ module.exports = app => {
|
|
|
const changeInfo = await this.ctx.service.change.getHaveAuditLastInfo(tenderId);
|
|
|
if (changeInfo) {
|
|
|
// 再获取非原报审批人
|
|
|
+ console.log(changeInfo);
|
|
|
const auditList = await this.ctx.service.changeAudit.getListGroupByTimes(changeInfo.cid, changeInfo.times);
|
|
|
+ console.log(auditList);
|
|
|
let sort = 1;
|
|
|
for (const audit of auditList) {
|
|
|
if (audit.usite !== 0) {
|
|
@@ -153,6 +155,7 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ console.log(changeaudit);
|
|
|
await this.transaction.insert(this.ctx.service.changeAudit.tableName, changeaudit);
|
|
|
|
|
|
result = change;
|
|
@@ -167,7 +170,7 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
async getHaveAuditLastInfo(tenderId) {
|
|
|
- const sql = 'SELECT * FROM ?? as a LEFT JOIN ?? as b ON a.`cid` = b.`cid` WHERE a.`tid` = ? AND b.`usite` > 0 ORDER BY a.`in_time` DESC';
|
|
|
+ const sql = 'SELECT a.* FROM ?? as a LEFT JOIN ?? as b ON a.`cid` = b.`cid` WHERE a.`tid` = ? AND b.`usite` > 0 ORDER BY a.`in_time` DESC';
|
|
|
const sqlParam = [this.tableName, this.ctx.service.changeAudit.tableName, tenderId];
|
|
|
return await this.db.queryOne(sql, sqlParam);
|
|
|
}
|