$result_wechat = send_wechat_msg_pe($notifications['notice_id'], $user_openid, 'adm', $template_id, $notifications['t_ticketid'], $first_data, $remark_data, $keyword1_data, $keyword2_data); } } else { _log('No openid binded for ADM ' . $notifications['ADM_email'] . '...'); } } if ($prefer_email) { $to_addr = $notifications['ADM_email']; $to_name = $notifications['ADM_name']; $subject = '服务请求处理完结通知【' . $notifications['t_maskid'] . '】'; $url_ticket_id = $notifications['t_ticketid']; $first_data = '您的客户【' . $notifications['t_custorgname'] . '】的服务请求已被处理完结!请悉知。'; $remark_data = ' '; $keyword1_data = '服务单号:' . $notifications['t_maskid']; $keyword2_data = '完成时间:' . $notifications['n_create_ts']; $result_mail = send_mail_pe($notifications['notice_id'], $to_addr, 'adm', $to_name, $subject, $url_ticket_id, $first_data, $remark_data, $keyword1_data, $keyword2_data); } if ($prefer_mobile) { $to_mobile = $notifications['ADM_phone']; $url_ticket_id = $notifications['t_ticketid']; $first_data = '您的客户【' . $notifications['t_custorgname'] . '】的请求已被处理完结'; $remark_data = ''; $keyword1_data = '服务单号:' . $notifications['t_maskid']; $keyword2_data = '完成时间:' . $notifications['n_create_ts']; $result_sms = send_sms_pe($notifications['notice_id'], $to_mobile, 'adm', $url_ticket_id, $first_data, $remark_data, $keyword1_data); } break; default: # code... _log('Unknows stage, doing nothing...'); break;
$to_name = $p_user_name; $subject = '服务请求消息'; $url_ticket_id = $p_ky_ticketid; $first_data = $p_first; $remark_data = $p_remark; if ($p_stage != 'manual_1') { $keyword1_data = '请求单号:' . $p_ky_maskid; $keyword2_data = '请求标题:' . $p_title; $keyword3_data = '工单编号:' . $p_wo_id; $keyword4_data = '客户公司:' . $p_cust_org; $keyword5_data = '客户联系人:' . $p_cust_name; $keyword6_data = 'CSC客服:' . $p_csc_name; $keyword7_data = 'ADM经理:' . $p_adm_name; $keyword8_data = 'DCS专员:' . $p_dcs_name; } $result_mail = send_mail_pe($notice_id, $to_addr, 'csc', $to_name, $subject, $url_ticket_id, $first_data, $remark_data, $keyword1_data, $keyword2_data, $keyword3_data, $keyword4_data, $keyword5_data, $keyword6_data, $keyword7_data, $keyword8_data); if ($result_mail != 1) { array_push($error, '向CSC发送邮件失败'); } else { array_push($sent, '发送邮件成功'); } } else { _log('CSC设置了不通过【邮件】接收【' . $p_stage_text . '】有关的消息'); array_push($error, 'CSC设置了不通过【邮件】接收【' . $p_stage_text . '】有关的消息'); } } if ($p_method_sms == '1') { if ($prefer_mobile == true || $p_stage == 'wo_delay' || $p_stage == 'manual' || $p_stage == 'manual_1') { $to_mobile = $p_user_phone; $url_ticket_id = $p_ky_ticketid; $first_data = $p_first;