|  | @@ -275,18 +275,32 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                      });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                      // 添加短信通知-审批通过提醒功能
 | 
	
		
			
				|  |  | +                    const mobile_array = [];
 | 
	
		
			
				|  |  |                      const stageInfo = await this.ctx.service.stage.getDataById(stageId);
 | 
	
		
			
				|  |  | -                    const smsUser = await this.ctx.service.projectAccount.getDataById(stageInfo.user_id);
 | 
	
		
			
				|  |  | -                    if (smsUser.auth_mobile !== undefined && smsUser.sms_type !== '') {
 | 
	
		
			
				|  |  | -                        const smsType = JSON.parse(smsUser.sms_type);
 | 
	
		
			
				|  |  | +                    const auditList = await this.getAuditors(stageId, stageInfo.times);
 | 
	
		
			
				|  |  | +                    const smsUser1 = await this.ctx.service.projectAccount.getDataById(stageInfo.user_id);
 | 
	
		
			
				|  |  | +                    if (smsUser1.auth_mobile !== undefined && smsUser1.sms_type !== '') {
 | 
	
		
			
				|  |  | +                        const smsType = JSON.parse(smsUser1.sms_type);
 | 
	
		
			
				|  |  |                          if (smsType[smsTypeConst.const.JL] !== undefined && smsType[smsTypeConst.const.JL].indexOf(smsTypeConst.judge.result.toString()) !== -1) {
 | 
	
		
			
				|  |  | -                            const tenderInfo = await this.ctx.service.tender.getDataById(stageInfo.tid);
 | 
	
		
			
				|  |  | -                            const sms = new SMS(this.ctx);
 | 
	
		
			
				|  |  | -                            const tenderName = await sms.contentChange(tenderInfo.name);
 | 
	
		
			
				|  |  | -                            const content = '【纵横计量支付】' + tenderName + '第' + stageInfo.order + '期,审批通过。';
 | 
	
		
			
				|  |  | -                            sms.send(smsUser.auth_mobile, content);
 | 
	
		
			
				|  |  | +                            mobile_array.push(smsUser1.auth_mobile);
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    for (const user of auditList) {
 | 
	
		
			
				|  |  | +                        const smsUser = await this.ctx.service.projectAccount.getDataById(user.aid);
 | 
	
		
			
				|  |  | +                        if (smsUser.auth_mobile !== undefined && smsUser.sms_type !== '') {
 | 
	
		
			
				|  |  | +                            const smsType = JSON.parse(smsUser.sms_type);
 | 
	
		
			
				|  |  | +                            if (mobile_array.indexOf(smsUser.auth_mobile) === -1 && smsType[smsTypeConst.const.JL] !== undefined && smsType[smsTypeConst.const.JL].indexOf(smsTypeConst.judge.result.toString()) !== -1) {
 | 
	
		
			
				|  |  | +                                mobile_array.push(smsUser.auth_mobile);
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  |                          }
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | +                    if (mobile_array.length > 0) {
 | 
	
		
			
				|  |  | +                        const tenderInfo = await this.ctx.service.tender.getDataById(stageInfo.tid);
 | 
	
		
			
				|  |  | +                        const sms = new SMS(this.ctx);
 | 
	
		
			
				|  |  | +                        const tenderName = await sms.contentChange(tenderInfo.name);
 | 
	
		
			
				|  |  | +                        const content = '【纵横计量支付】' + tenderName + '第' + stageInfo.order + '期,审批通过。';
 | 
	
		
			
				|  |  | +                        sms.send(mobile_array, content);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                  await transaction.commit();
 | 
	
		
			
				|  |  |              } catch (err) {
 | 
	
	
		
			
				|  | @@ -298,7 +312,7 @@ module.exports = app => {
 | 
	
		
			
				|  |  |          async _checkNo(stageId, checkData, times) {
 | 
	
		
			
				|  |  |              const time = new Date();
 | 
	
		
			
				|  |  |              // 整理当前流程审核人状态更新
 | 
	
		
			
				|  |  | -            const audit = await this.getDataByCondition({sid: stageId, times: times, status: auditConst.status.checking, check_detail: false});
 | 
	
		
			
				|  |  | +            const audit = await this.getDataByCondition({sid: stageId, times: times, status: auditConst.status.checking});
 | 
	
		
			
				|  |  |              if (!audit) {
 | 
	
		
			
				|  |  |                  throw '审核数据错误';
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -332,18 +346,32 @@ module.exports = app => {
 | 
	
		
			
				|  |  |                  await this.ctx.service.stagePay.copyAuditStagePays(this.ctx.stage, this.ctx.stage.times + 1, 0, transaction);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  // 添加短信通知-审批退回提醒功能
 | 
	
		
			
				|  |  | +                const mobile_array = [];
 | 
	
		
			
				|  |  |                  const stageInfo = await this.ctx.service.stage.getDataById(stageId);
 | 
	
		
			
				|  |  | -                const smsUser = await this.ctx.service.projectAccount.getDataById(stageInfo.user_id);
 | 
	
		
			
				|  |  | -                if (smsUser.auth_mobile !== undefined && smsUser.sms_type !== '') {
 | 
	
		
			
				|  |  | -                    const smsType = JSON.parse(smsUser.sms_type);
 | 
	
		
			
				|  |  | +                const auditList = await this.getAuditors(stageId, stageInfo.times);
 | 
	
		
			
				|  |  | +                const smsUser1 = await this.ctx.service.projectAccount.getDataById(stageInfo.user_id);
 | 
	
		
			
				|  |  | +                if (smsUser1.auth_mobile !== undefined && smsUser1.sms_type !== '') {
 | 
	
		
			
				|  |  | +                    const smsType = JSON.parse(smsUser1.sms_type);
 | 
	
		
			
				|  |  |                      if (smsType[smsTypeConst.const.JL] !== undefined && smsType[smsTypeConst.const.JL].indexOf(smsTypeConst.judge.result.toString()) !== -1) {
 | 
	
		
			
				|  |  | -                        const tenderInfo = await this.ctx.service.tender.getDataById(stageInfo.tid);
 | 
	
		
			
				|  |  | -                        const sms = new SMS(this.ctx);
 | 
	
		
			
				|  |  | -                        const tenderName = await sms.contentChange(tenderInfo.name);
 | 
	
		
			
				|  |  | -                        const content = '【纵横计量支付】' + tenderName + '第' + stageInfo.order + '期,审批退回。';
 | 
	
		
			
				|  |  | -                        sms.send(smsUser.auth_mobile, content);
 | 
	
		
			
				|  |  | +                        mobile_array.push(smsUser1.auth_mobile);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | +                for (const user of auditList) {
 | 
	
		
			
				|  |  | +                    const smsUser = await this.ctx.service.projectAccount.getDataById(user.aid);
 | 
	
		
			
				|  |  | +                    if (smsUser.auth_mobile !== undefined && smsUser.sms_type !== '') {
 | 
	
		
			
				|  |  | +                        const smsType = JSON.parse(smsUser.sms_type);
 | 
	
		
			
				|  |  | +                        if (mobile_array.indexOf(smsUser.auth_mobile) === -1 && smsType[smsTypeConst.const.JL] !== undefined && smsType[smsTypeConst.const.JL].indexOf(smsTypeConst.judge.result.toString()) !== -1) {
 | 
	
		
			
				|  |  | +                            mobile_array.push(smsUser.auth_mobile);
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                if (mobile_array.length > 0) {
 | 
	
		
			
				|  |  | +                    const tenderInfo = await this.ctx.service.tender.getDataById(stageInfo.tid);
 | 
	
		
			
				|  |  | +                    const sms = new SMS(this.ctx);
 | 
	
		
			
				|  |  | +                    const tenderName = await sms.contentChange(tenderInfo.name);
 | 
	
		
			
				|  |  | +                    const content = '【纵横计量支付】' + tenderName + '第' + stageInfo.order + '期,审批退回。';
 | 
	
		
			
				|  |  | +                    sms.send(mobile_array, content);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  await transaction.commit();
 | 
	
		
			
				|  |  |              } catch (err) {
 |