| 
					
				 | 
			
			
				@@ -214,17 +214,20 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 // 添加短信通知-需要审批提醒功能 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const smsUser = await this.ctx.service.projectAccount.getDataById(audit.audit_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (smsUser.auth_mobile !== '' && smsUser.auth_mobile !== undefined && smsUser.sms_type !== '' && smsUser.sms_type !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    const smsType = JSON.parse(smsUser.sms_type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (smsType[smsTypeConst.const.TZ] !== undefined && smsType[smsTypeConst.const.TZ].indexOf(smsTypeConst.judge.approval.toString()) !== -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const tenderInfo = await this.ctx.service.tender.getDataById(tenderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const sms = new SMS(this.ctx); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const tenderName = await sms.contentChange(tenderInfo.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const content = '【纵横计量支付】' + this.ctx.session.sessionProject.name + '-' + tenderName + '台帐需要您审批。'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        sms.send(smsUser.auth_mobile, content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                await this.ctx.helper.sendUserSms(audit.audit_id, smsTypeConst.const.TZ, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    smsTypeConst.judge.approval.toString(), '台帐需要您审批。'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // const smsUser = await this.ctx.service.projectAccount.getDataById(audit.audit_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // if (smsUser.auth_mobile !== '' && smsUser.auth_mobile !== undefined && smsUser.sms_type !== '' && smsUser.sms_type !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //     const smsType = JSON.parse(smsUser.sms_type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //     if (smsType[smsTypeConst.const.TZ] !== undefined && smsType[smsTypeConst.const.TZ].indexOf(smsTypeConst.judge.approval.toString()) !== -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //         const tenderInfo = await this.ctx.service.tender.getDataById(tenderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //         const projectName = await this.ctx.service.tenderInfo.getDealInfoBuildName(tenderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //         const sms = new SMS(this.ctx); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //         const tenderName = await sms.contentChange(tenderInfo.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //         const content = '【纵横计量支付】' + (projectName !== '' ? projectName + '-' : '') + tenderName + '台帐需要您审批。'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //         sms.send(smsUser.auth_mobile, content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 await transaction.commit(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } catch (err) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -263,17 +266,19 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         await transaction.update(this.tableName, {id: nextAudit.id, status: auditConst.status.checking, begin_time: time}); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         // 添加短信通知-需要审批提醒功能 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const smsUser = await this.ctx.service.projectAccount.getDataById(nextAudit.audit_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (smsUser.auth_mobile !== '' && smsUser.auth_mobile !== undefined && smsUser.sms_type !== '' && smsUser.sms_type !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            const smsType = JSON.parse(smsUser.sms_type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            if (smsType[smsTypeConst.const.TZ] !== undefined && smsType[smsTypeConst.const.TZ].indexOf(smsTypeConst.judge.approval.toString()) !== -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                const tenderInfo = await this.ctx.service.tender.getDataById(tenderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                const sms = new SMS(this.ctx); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                const tenderName = await sms.contentChange(tenderInfo.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                const content = '【纵横计量支付】' + this.ctx.session.sessionProject.name + '-' + tenderName + '台帐需要您审批。'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                sms.send(smsUser.auth_mobile, content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // const smsUser = await this.ctx.service.projectAccount.getDataById(nextAudit.audit_id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // if (smsUser.auth_mobile !== '' && smsUser.auth_mobile !== undefined && smsUser.sms_type !== '' && smsUser.sms_type !== null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //     const smsType = JSON.parse(smsUser.sms_type); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //     if (smsType[smsTypeConst.const.TZ] !== undefined && smsType[smsTypeConst.const.TZ].indexOf(smsTypeConst.judge.approval.toString()) !== -1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //         const tenderInfo = await this.ctx.service.tender.getDataById(tenderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //         const sms = new SMS(this.ctx); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //         const tenderName = await sms.contentChange(tenderInfo.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //         const content = '【纵横计量支付】' + this.ctx.session.sessionProject.name + '-' + tenderName + '台帐需要您审批。'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //         sms.send(smsUser.auth_mobile, content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        await this.ctx.helper.sendUserSms(nextAudit.audit_id, smsTypeConst.const.TZ, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            smsTypeConst.judge.approval.toString(), '台帐需要您审批。'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         // 同步标段信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         await transaction.update(this.ctx.service.tender.tableName, {id: tenderId, ledger_status: checkType}); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -301,9 +306,15 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (mobile_array.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             const sms = new SMS(this.ctx); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             const tenderName = await sms.contentChange(tenderInfo.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            const content = '【纵横计量支付】' + this.ctx.session.sessionProject.name + '-' + tenderName + '台账审批通过,请登录系统处理。'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            let projectName = await sms.contentChange(JSON.parse(this.ctx.tender.info.deal_info).buildName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            projectName = projectName !== '' ? projectName + '-' : ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            const content = '【纵横计量支付】' + projectName + tenderName + '台账审批通过,请登录系统处理。'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             sms.send(mobile_array, content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // const auditList = await this.getAuditors(tenderId, times); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // const users = this._.pull(this._.map(auditList, 'user_id'), audit.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // await this.ctx.helper.sendUserSms(users, smsTypeConst.const.TZ, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //     smsTypeConst.judge.result.toString(), '台账审批通过,请登录系统处理。'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // 同步标段信息 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -341,7 +352,9 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (mobile_array.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         const sms = new SMS(this.ctx); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         const tenderName = await sms.contentChange(tenderInfo.name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        const content = '【纵横计量支付】' + this.ctx.session.sessionProject.name + '-' + tenderName + '台账审批退回,请登录系统处理。'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        let projectName = await sms.contentChange(JSON.parse(this.ctx.tender.info.deal_info).buildName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        projectName = projectName !== '' ? projectName + '-' : ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        const content = '【纵横计量支付】' + projectName + tenderName + '台账审批退回,请登录系统处理。'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         sms.send(mobile_array, content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 |