|
@@ -267,10 +267,10 @@ module.exports = app => {
|
|
|
switch (status) {
|
|
|
case 0: // 包含你的所有变更令
|
|
|
sql =
|
|
|
- 'SELECT a.* FROM ?? AS a WHERE a.tid = ? AND ' +
|
|
|
- '(a.uid = ? OR (a.status != ? AND a.cid IN (SELECT b.cid FROM ?? AS b WHERE b.uid = ? AND a.times = b.times GROUP BY b.cid))' +
|
|
|
+ 'SELECT a.* FROM ?? AS a WHERE a.tid = ? AND' +
|
|
|
+ ' (a.uid = ? OR (a.status != ? AND a.cid IN (SELECT b.cid FROM ?? AS b WHERE b.uid = ? AND a.times = b.times GROUP BY b.cid))' +
|
|
|
' OR (a.status = ? AND a.cid IN (SELECT b.cid FROM ?? AS b WHERE b.uid = ? AND a.times - 1 = b.times GROUP BY b.cid))' +
|
|
|
- 'OR a.status = ? )' + stateSql;
|
|
|
+ ' OR a.status = ?)' + stateSql;
|
|
|
sqlParam = [
|
|
|
this.tableName,
|
|
|
tenderId,
|
|
@@ -1903,7 +1903,7 @@ module.exports = app => {
|
|
|
} else {
|
|
|
const lastAuditors = await this.service.changeAudit.getAuditors(change.cid, change.times - 1);
|
|
|
const onAuditor = this._.findLast(lastAuditors, { status: auditStatus.back });
|
|
|
- if (onAuditor.uid === accountId) {
|
|
|
+ if (onAuditor && onAuditor.uid === accountId) {
|
|
|
change.cancancel = 4;// 审批人撤回退回原报
|
|
|
}
|
|
|
}
|