|  | @@ -856,10 +856,13 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                      });
 | 
	
		
			
				|  |  |                  });
 | 
	
		
			
				|  |  |                  await this.transaction.insert('zh_notice', records);
 | 
	
		
			
				|  |  | +                // 判断是否终审方法需要更改了,因为存在修改审批流程的操作,会使判断是否终审有问题
 | 
	
		
			
				|  |  | +                const curAudit = await this.ctx.service.changeAudit.getCurAuditor(changeData.cid, changeData.times);
 | 
	
		
			
				|  |  | +                const nextAudit = await this.ctx.service.changeAudit.getDataByCondition({ cid: changeData.cid, times: changeData.times, usite: curAudit.usite + 1 });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  // 设置审批人通过
 | 
	
		
			
				|  |  |                  const audit_update = {
 | 
	
		
			
				|  |  | -                    id: postData.audit_id,
 | 
	
		
			
				|  |  | +                    id: curAudit.id,
 | 
	
		
			
				|  |  |                      sdesc: postData.sdesc,
 | 
	
		
			
				|  |  |                      status: audit.flow.auditStatus.checked,
 | 
	
		
			
				|  |  |                      sin_time: new Date(),
 | 
	
	
		
			
				|  | @@ -896,7 +899,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                          await this.transaction.update(this.ctx.service.changeAuditList.tableName, list_update);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if (postData.audit_next_id === undefined) {
 | 
	
		
			
				|  |  | +                if (nextAudit === undefined) {
 | 
	
		
			
				|  |  |                      // 变更令审批完成
 | 
	
		
			
				|  |  |                      change_update.status = audit.flow.status.checked;
 | 
	
		
			
				|  |  |                      change_update.p_code = postData.p_code;
 | 
	
	
		
			
				|  | @@ -935,20 +938,19 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                  } else {
 | 
	
		
			
				|  |  |                      // 设置下一个审批人为审批状态
 | 
	
		
			
				|  |  |                      const nextAudit_update = {
 | 
	
		
			
				|  |  | -                        id: postData.audit_next_id,
 | 
	
		
			
				|  |  | +                        id: nextAudit.id,
 | 
	
		
			
				|  |  |                          status: audit.flow.auditStatus.checking,
 | 
	
		
			
				|  |  |                          sin_time: new Date(),
 | 
	
		
			
				|  |  |                      };
 | 
	
		
			
				|  |  |                      await this.transaction.update(this.ctx.service.changeAudit.tableName, nextAudit_update);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                      // 添加短信通知-需要审批提醒功能
 | 
	
		
			
				|  |  | -                    const nextAuditData = await this.ctx.service.changeAudit.getDataById(postData.audit_next_id);
 | 
	
		
			
				|  |  |                      const sms = new SMS(this.ctx);
 | 
	
		
			
				|  |  |                      const code = await sms.contentChange(changeData.code);
 | 
	
		
			
				|  |  |                      const shenpiUrl = await this.ctx.helper.urlToShort(
 | 
	
		
			
				|  |  |                          this.ctx.protocol + '://' + this.ctx.host + '/wap/tender/' + changeData.tid + '/change/' + changeData.cid + '/information#shenpi'
 | 
	
		
			
				|  |  |                      );
 | 
	
		
			
				|  |  | -                    await this.ctx.helper.sendAliSms(nextAuditData.uid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), SmsAliConst.template.change_check, {
 | 
	
		
			
				|  |  | +                    await this.ctx.helper.sendAliSms(nextAudit.uid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), SmsAliConst.template.change_check, {
 | 
	
		
			
				|  |  |                          biangeng: code,
 | 
	
		
			
				|  |  |                          code: shenpiUrl,
 | 
	
		
			
				|  |  |                      });
 | 
	
	
		
			
				|  | @@ -960,7 +962,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                          code: this.ctx.session.sessionProject.code,
 | 
	
		
			
				|  |  |                          c_name: changeData.name,
 | 
	
		
			
				|  |  |                      };
 | 
	
		
			
				|  |  | -                    await this.ctx.helper.sendWechat(nextAuditData.uid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), wxConst.template.change, wechatData);
 | 
	
		
			
				|  |  | +                    await this.ctx.helper.sendWechat(nextAudit.uid, smsTypeConst.const.BG, smsTypeConst.judge.approval.toString(), wxConst.template.change, wechatData);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  change_update.total_price = total_price;
 | 
	
		
			
				|  |  |                  const options = {
 |