diff --git a/webht/third_party/vendorPlanSync/controllers/Tulanduo.php b/webht/third_party/vendorPlanSync/controllers/Tulanduo.php index 0d66b918..1ca50dbe 100644 --- a/webht/third_party/vendorPlanSync/controllers/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/controllers/Tulanduo.php @@ -37,7 +37,7 @@ class Tulanduo extends CI_Controller ,"routeType" => "上海目的地线路" ) ); - public $vendor_ids = array(1343,30548,29188); + // public $vendor_ids = array(1343,30548,29188); // userId key // 1343 2e47c3721e3ff6e816fe6b928d7acc7d @@ -75,24 +75,22 @@ class Tulanduo extends CI_Controller // 桂林海纳国旅 // $this->userId = "18"; // $this->key = "d05c25e6e6c5d4898161e0aaf700d9c7"; + $this->vendor_ids = $this->trippest->tulanduo_vei_sn; } - public function order_push($GRI_SN=null) + public function order_push($GRI_SN=0) { - if ($GRI_SN !== null) { - return $this->push_trippest($GRI_SN); - } $start_date = date('Y-m-d'); $end_date = date('Y-m-d 23:59:59', strtotime("+2 months")); $vei_sn_str = implode(",", $this->vendor_ids); - $ready_to_send = $this->Group_model->get_plan_not_received(1, $vei_sn_str, $start_date, $end_date); + $ready_to_send = $this->Group_model->get_plan_not_received(1, $vei_sn_str, $GRI_SN, $start_date, $end_date); if (empty($ready_to_send)) { return; } $order = $ready_to_send[0]; // 目的地计划 if (strval($order->GRI_OrderType) === "227002" && strval($order->department) === "30") { - return $this->push_trippest($order->GRI_SN); + return $this->push_trippest($order); } // 商务 if (strval($order->GRI_OrderType) === "227002") { @@ -101,35 +99,55 @@ class Tulanduo extends CI_Controller if (strval($order->GRI_OrderType) === "227001") { } - return $this->output->set_content_type('application/json')->set_output(json_encode($order)); + return $this->output->set_output("not trippest"); + // return $this->output->set_content_type('application/json')->set_output(json_encode($order)); } /*! * 发送目的地项目组预订计划到图兰朵地接系统 - * 地接社未接受的或有变更的 + * 地接社未接收的或有变更的 * @date 2018-05-02 */ - public function push_trippest($gri_sn=0) + public function push_trippest($vas=null) { // exit(); /** 目的地 test */ $this->userId = "902"; $this->key = "f56541ff40e1afba444d831c5a666195"; + + $gri_sn = $vas->GRI_SN; + $vas_sn = $vas->VAS_SN; + $vei_sn = $vas->VAS_VEI_SN; + $is_send_vary = $vas->VAS_SendVary; + $change_info = $vas->VAS_ChangeText; + if (trim($change_info) !== "") { + preg_match_all('/(.*)={6}(.*)(\d{4}\-\d{2}\-\d{2})/ismU', characet($change_info,'UTF-8'), $change_arr); + $change_info = $change_arr[0][0]; + } + $change_info = str_replace("\n", "
", $change_info); + $vei_sn_str = implode(",", $this->vendor_ids); $this->load->model('TuLanDuo_addOrUpdateRouteOrderContentBuilder', 'tldOrderBuilder'); - $orderinfo = $this->BIZ_order->get_orderinfo_detail($gri_sn); + $orderinfo = $this->BIZ_order->get_orderinfo_detail($gri_sn, $vei_sn_str); if(empty($orderinfo)) {return;} $COLI_ID = $orderinfo[0]->COLI_ID; + $set_pvt = strval($orderinfo[0]->COLI_PVT); $travelFees = $this->BIZ_order->get_paymentDetails($COLI_ID); + // 按产品拆分 todo:按订单类型拆分? 单团/拼团 $fill_order = array(); $processed_date = array(); $processed_cold = array(); foreach ($orderinfo as $ko => $cold) { - if ( ! in_array($cold->COLD_SN, $processed_cold)) { + if ( ! in_array($cold->COLD_SN, $processed_cold) && $cold->pag_code != '') { $processed_cold[] = $cold->COLD_SN; $all_package = $this->trippest->tour_code($cold->pag_code); $pag_info = $this->BIZ_order->get_packageDetails(my_implode("'",",",$all_package)); - $fill_order[$cold->pag_code]["cold"][] = $cold; - $fill_order[$cold->pag_code]["package_info"] = $pag_info; + if ($set_pvt==='1') { + $fill_order[0]["cold"][] = $cold; + $fill_order[0]["package_info"] = $pag_info; + } else { + $fill_order[$cold->pag_code]["cold"][] = $cold; + $fill_order[$cold->pag_code]["package_info"] = $pag_info; + } } } // $fill_order = array_values($fill_order); @@ -141,8 +159,10 @@ class Tulanduo extends CI_Controller $order_type = intval($vf["package_info"][0]->PAG_ExtendType)===39009 ? 1 : 2; $last_code = count($vf["package_info"])-1; $last_date = count($vf["cold"])-1; - $routeName = $vf["package_info"][0]->PAG2_Name . mb_strtoupper($vf["cold"][0]->pag_code); - $end_date = strstr($vf["cold"][$last_date]->COLD_StartDate, " ", true); + $tour_code = mb_strtoupper($vf["cold"][0]->pag_code); + $routeName = $vf["package_info"][0]->PAG2_Name . "(" . mb_strtoupper($vf["cold"][0]->pag_code) . ")"; + $first_date = strstr($vf["cold"][0]->COLD_StartDate, " ", true); + $end_date = strstr($vf["cold"][$last_date]->COLD_EndDate, " ", true); if (isset($this->trippest->special_route[$vf["cold"][0]->pag_code])) { $routeName = $this->trippest->special_route[$vf["cold"][0]->pag_code]["name"]; $extra_day = $this->trippest->special_route[$vf["cold"][0]->pag_code]["day"]-1; @@ -181,7 +201,7 @@ class Tulanduo extends CI_Controller ->setCustomersPeopleType($key, ($vg->BPE_GuestType==1 ? "成人" : "儿童")) ->setCustomersDocumentType($key, "护照") // Passport No. ->setCustomersDocumentNo($key, $vg->BPE_Passport) - ->setCustomersOtherInfo($key, $this->BIZ_order->GetNationalityName($orderinfo[0]->GUT_NationalityID)); + ->setCustomersOtherInfo($key, $this->BIZ_order->GetNationalityName($vg->BPE_Nationality)); } $scheduleDetails = $this->BIZ_order->get_scheduleDetails($COLD_SN_str); $schedule_obj = array(); @@ -254,9 +274,20 @@ class Tulanduo extends CI_Controller if ( ! in_array(substr($vs->COLD_StartDate, 0, 10), $fill_date)) { $schedule_obj[substr($vs->COLD_StartDate, 0, 10)]['content'] .= $this_title . $this_content; } + // 当前产品连续日期的补充 + $date_s = new DateTime(strstr($vs->COLD_StartDate, " ", TRUE)); + $date_e = new DateTime(strstr($vs->COLD_EndDate, " ", TRUE)); + $date_d = $date_e->diff($date_s); + $d_t = ($date_d->format("%d")); + if ($d_t > 0) { + for ($d_i=0; $d_i < ($d_t+1); $d_i++) { + $f_d = date('Y-m-d', strtotime("+$d_i day", strtotime(substr($vs->COLD_StartDate, 0, 10)))); + $schedule_obj[$f_d] = $schedule_obj[substr($vs->COLD_StartDate, 0, 10)]; + $schedule_obj[$f_d]['date'] = $f_d; + } + } } // 补全空的日期 - $first_date = strstr($vf["cold"][0]->COLD_StartDate, " ", true); $date1 = new DateTime($first_date); $date_end = new DateTime($end_date); $date_diff = $date_end->diff($date1); @@ -302,22 +333,55 @@ class Tulanduo extends CI_Controller ->setTravelFeesRemark($kf, $vf->GAI_Memo); } } - echo(($this->tldOrderBuilder->getBizContent())); + // 查询是否变更 + $sync_orderstate = 1; + $vps_sn = 0; + $vendor_orderid = 0; + if (intval($is_send_vary)===1) { + $vps = $this->Group_model->get_sync_info($vas_sn, $tour_code); + if ( ! empty($vps)) { + $vps_sn = $vps->VPS_SN; + $vendor_orderid = $vps->VPS_sync_id; + $sync_orderstate = 11; + $modifyLogInfo = "
$change_info
"; + // $modifyLogInfo = "
https://www.trippest.com
"; + $this->tldOrderBuilder->setOrderId($vendor_orderid) + ->setModifyLogInfo($modifyLogInfo) + ; + } + } else { + $this->tldOrderBuilder->clearModifyLogInfo(); + // $this->tldOrderBuilder->setModifyLogInfo($modifyLogInfo) + ; + } + // echo(($this->tldOrderBuilder->getBizContent())); // $this->output->set_content_type('application/json')->set_output($this->tldOrderBuilder->getBizContent()); - // $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder); + $resp = $this->excute_curl($this->neworder_url, $this->tldOrderBuilder); // var_dump($resp); - - /** BIZ_GroupCombineInfo */ - // if (json_decode($resp)->status == 1) { - // log_message('error','in GCI ' . json_decode($resp)->responseData->orderId); - // $this->BIZ_order->GCI_COLI_SN = $orderinfo[0]->COLI_SN; - // $this->BIZ_order->GCI_GRI_SN = $orderinfo[0]->COLI_GRI_SN; - // $this->BIZ_order->GCI_VendorOrderId = json_decode($resp)->responseData->orderId; - // $this->BIZ_order->GCI_FromAgc = "D目的地桂林组"; - // $this->BIZ_order->biz_groupcombineinfo_save(); - // } + $response = json_decode($resp); + if ($response->status == 1) { + /** VendorPlanSync */ + $sync_ret = array( + "VPS_VAS_SN" => $vas_sn + ,"VPS_GRI_SN" => $gri_sn + ,"VPS_VEI_SN" => $vei_sn + ,"VPS_startDate" => $first_date + ,"VPS_endDate" => $end_date + ,"VPS_tourCode" => $tour_code + ,"VPS_sync_id" => $response->responseData->orderId + ,"VPS_sync_orderType" => $order_type + ,"VPS_sync_orderState" => $sync_orderstate + ,"VPS_syncTime" => date('Y-m-d H:i:s') + ); + if ($vps_sn === 0) { + $sync_id = $this->Group_model->insert_VendorPlanSync($sync_ret); + } else { + $update = $this->Group_model->update_VendorPlanSync($vps_sn, $sync_ret); + } + /** VendorArrangeState VAS_IsReceive */ + $this->Group_model->set_plan_received($vas_sn); + } } - // email 供应商 todo echo "Order Push done."; return; } @@ -332,7 +396,7 @@ class Tulanduo extends CI_Controller $ret['status'] = -1; $ret['errMsg'] = "未知错误"; $input = $this->input->post(); - $vendorID = $input['userId']; + $vendorID = $input['openId']; $validate = $this->calc_key($vendorID, $input['key']); if ($validate !== TRUE) { $ret['errMsg'] = "身份验证失败."; @@ -484,4 +548,5 @@ class Tulanduo extends CI_Controller return $ret===$key; } + } diff --git a/webht/third_party/vendorPlanSync/controllers/index.php b/webht/third_party/vendorPlanSync/controllers/index.php index b8a30420..9ef50337 100644 --- a/webht/third_party/vendorPlanSync/controllers/index.php +++ b/webht/third_party/vendorPlanSync/controllers/index.php @@ -8,6 +8,7 @@ class Index extends CI_Controller { mb_regex_encoding("UTF-8"); bcscale(4); $this->load->helper('array'); + $this->load->library('trippest'); $this->load->model('BIZ_Orders_model'); $this->load->model('Group_model'); } @@ -25,6 +26,102 @@ class Index extends CI_Controller { return $this->output->set_content_type('application/json')->set_output(json_encode($orderinfo)); } + /** + * 接收地接社的信息上报 + * * 信息类型代码: + * * * 1000 已接收变更,未确认 + * * * 2000 已确认计划/变更 + * * * 3001 导游信息变更 + * * * 4001 已确认取消 + * * * 4002 订单已删除 + * @date 2018-11-14 + */ + public function uploadOperation() + { + $ret['status'] = -1; + $ret['errMsg'] = "未知错误"; + $input = $this->input->post(); + $vendorID = $input['openId']; + $validate = $this->calc_key($vendorID, $input['key']); + if ($validate !== TRUE) { + $ret['errMsg'] = "身份验证失败."; + return $this->output->set_content_type('application/json')->set_output(json_encode($ret)); + } + $vendor_order_id = $input['orderId']; + $action_code = $input['operationTypeCode']; + switch ($action_code) { + case '1000': + # code... + break; + case '2000': + $ret = $this->plan_confirm($input); + break; + case '3001': + # code... + break; + case '4001': + # code... + break; + case '4002': + # code... + break; + + default: + # code... + break; + } + return $this->output->set_content_type('application/json')->set_output(json_encode($ret)); + } + + public function plan_confirm($input) + { + $ret['status'] = -1; + $ret['errMsg'] = "未知用户"; + $vps = $this->Group_model->get_sync_info_by_vendororder($input['orderId']); + if (empty($vps)) { + $ret['errMsg'] = "未找到相应的订单."; + return $ret; + } + $vendor_manager = $this->Group_model->get_vendorContact($input['openId']); + /** VendorArrangeState */ + $VAS_ConfirmInfo = $input['operationRemark'] . "\r\n======确认人: " . $input['operator'] . ", 确认时间: " . $input['operateTime']; + $VAS_ConfirmInfo .= "\r\n" . $vps->VAS_ConfirmInfo; + $update_vas = $this->Group_model->set_plan_confirm($vps->VAS_SN, $vendor_manager->LMI_SN, $VAS_ConfirmInfo); + if ($update_vas === TRUE) { + $ret['status'] = 1; + $ret['errMsg'] = ""; + $sync_arr = array( + "VPS_sync_orderState" => 2 + ,"VPS_syncTime" => date('Y-m-d H:i:s') + ); + /** VendorPlanSync */ + $this->Group_model->update_VendorPlanSync($vps->VPS_SN, $sync_arr); + // 邮件外联 + $sender_name = "中华游供应商合作平台"; + $sender_mail = "info@chinahighlights.net"; + $from_name = $vendor_manager->LMI2_Name; + $from_mail = $vendor_manager->LMI_ListMail; + $to_name = $vps->OPI_Name; + $to_mail = $vps->OPI_Email; + $subject = $vps->GRI_Name . "团已确认: " . $vendor_manager->VEI2_CompanyBN; + $mail_body = $vendor_manager->VEI2_CompanyBN . "对团" . $vps->GRI_Name . "的计划在" . $input['operateTime'] . "已确认。
"; + $mail_body .= "确认说明:" . $input['operationRemark'] . "
"; + $mail_body .= "确认人:$vendor_manager->LMI2_Name $vendor_manager->LMI_ListMail 固定电话: $vendor_manager->LMI_Telephone 移动电话:$vendor_manager->LMI_Mobile
"; + $mail_body .= "变更内容: " . $vps->VAS_ChangeText . "
"; + $this->Group_model->save_automail($sender_name, $sender_mail, $from_name, $from_mail, $to_name, $to_mail, $subject, $mail_body, $sender_name); + } else { + log_message('error','图兰朵确认上报更新状态失败. POST RAW: ' . raw_json_encode($input) ); + } + return $ret; + } + + public function calc_key($userId, $key) + { + $default = "b825e39422a54875a95752fc7ed6f5d2"; + $ret = md5(hash("sha256", $userId.$default)); + return $ret===$key; + } + } /* End of file index.php */ diff --git a/webht/third_party/vendorPlanSync/helpers/array_helper.php b/webht/third_party/vendorPlanSync/helpers/array_helper.php index f66c6d2b..3d265013 100644 --- a/webht/third_party/vendorPlanSync/helpers/array_helper.php +++ b/webht/third_party/vendorPlanSync/helpers/array_helper.php @@ -165,3 +165,4 @@ function real_phone_number($phone, $nation_code) $cut_nation = str_replace($nation_str, "", $phone); return mb_ereg_replace('[\D]', '', $cut_nation); } + diff --git a/webht/third_party/vendorPlanSync/libraries/trippest.php b/webht/third_party/vendorPlanSync/libraries/trippest.php index ebba5748..dfc48fe6 100644 --- a/webht/third_party/vendorPlanSync/libraries/trippest.php +++ b/webht/third_party/vendorPlanSync/libraries/trippest.php @@ -10,6 +10,8 @@ class Trippest $this->ci =& get_instance(); } + public $tulanduo_vei_sn = array(1343,30548,29188); + public function tour_name($pag_code) { $name = ""; diff --git a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php index e9426647..bef796ca 100644 --- a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php +++ b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php @@ -32,7 +32,7 @@ class BIZ_Orders_model extends CI_Model { } } - public function get_orderinfo_detail($gri_sn) + public function get_orderinfo_detail($gri_sn, $vei_sn_str) { $sql = "SELECT coli.COLI_ID, coli.COLI_Department, @@ -47,6 +47,7 @@ class BIZ_Orders_model extends CI_Model { INNER JOIN BIZ_ConfirmLineDetail cold ON cold.COLD_COLI_SN=coli.COLI_SN and cold.DeleteFlag=0 LEFT JOIN BIZ_GUEST gut ON gut.GUT_SN=coli.COLI_GUT_SN WHERE coli.COLI_GRI_SN=$gri_sn + AND COLD_PlanVEI_SN in ($vei_sn_str) ORDER BY COLD_StartDate ASC"; $query = $this->HT->query($sql); return $query->result(); diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index 3a602790..60a06d2b 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -8,24 +8,27 @@ class Group_model extends CI_Model { $this->HT = $this->load->database('HT', TRUE); } - public function get_plan_not_received($top=1, $vei_sn_str, $start_date=null, $end_date=null) + public function get_plan_not_received($top=1, $vei_sn_str, $gri_sn=0, $start_date=null, $end_date=null) { $top_sql = $top>0 ? " TOP $top " : ""; - $sql = "SELECT $top_sql VAS_IsConfirm, VAS_SendVary, GRI_OrderType, GRI_SN, GRI_No, GRI_operator, + $gri_sql = $gri_sn===0 ? "" : " and GRI_SN=$gri_sn "; + $sql = "SELECT $top_sql VAS_IsConfirm, VAS_SendVary, + GRI_OrderType, GRI_SN, GRI_No, GRI_operator, (select OPI_DEI_SN from OperatorInfo where OPI_SN=GRI_operator) as department, vas.* from VendorArrangeState vas inner join Eva_ObjectInfo eoi on EOI_GRI_SN=VAS_GRI_SN and EOI_Type=1 and EOI_ObjSN=VAS_VEI_SN inner join GRoupInfo gri on GRI_SN=VAS_GRI_SN - where 1=1 + where 1=1 "; + $sql .= $gri_sn!==0 ? $gri_sql : " and VAS_IsCancel=0 and VAS_Delete=0 and vas.DeleteFlag=0 and VAS_IsSendSucceed=1 and VAS_IsConfirm=0 and EOI_GetDate between '$start_date' and '$end_date' and VAS_VEI_SN in ($vei_sn_str) and GRI_OrderType=227002 -- test - and (VAS_IsReceive=0 or (VAS_SendTime > ISNULL(VAS_ReceiveTime,0))) - order by EOI_GetDate asc, vas.VAS_IsConfirm asc "; + and (VAS_IsReceive=0 or (VAS_SendTime > ISNULL(VAS_ReceiveTime,0))) "; + $sql .= " order by EOI_GetDate asc, vas.VAS_IsConfirm asc"; return $this->HT->query($sql)->result(); } @@ -35,9 +38,121 @@ class Group_model extends CI_Model { return $this->HT->query($sql)->result(); } + public function get_sync_info($vas, $tour_code="") + { + $sql = "SELECT * + from VendorPlanSync + where VPS_VAS_SN=? "; + $param_arr = array($vas); + if ($tour_code !== "") { + $sql .= " AND VPS_tourCode=? "; + $param_arr[] = $tour_code; + } + return $this->HT->query($sql, $param_arr)->row(); + } + public function get_sync_info_by_vendororder($vendor_order_id) + { + $sql = "SELECT + opi.OPI_DEI_SN as department, + * + from VendorPlanSync vps + inner join VendorArrangeState vas on vas.VAS_SN=vps.VPS_VAS_SN + inner join GRoupInfo gri on GRI_SN=vas.VAS_GRI_SN + left join OperatorInfo opi on opi.OPI_SN=GRI_operator + where VPS_sync_id=? "; + $param_arr = array($vendor_order_id); + return $this->HT->query($sql, $param_arr)->row(); + } + /*! + * 获取地接社接受计划的人员信息 + * @param $vendorID 地接社ID + */ + public function get_vendorContact($vendorID) + { + $sql = "SELECT top 1 lmi2.LMI2_Name, + lmi.LMI_SN, + lmi.LMI_AutoFax, + lmi.LMI_Telephone, + lmi.LMI_Mobile, + lmi.LMI_ListMail + ,vei2.VEI2_CompanyBN + FROM LinkmanInfo lmi + INNER JOIN LinkManInfo2 lmi2 ON lmi2.LMI2_LMI_SN=lmi.LMI_SN AND lmi2.LMI2_LGC=2 + INNER JOIN VEndorInfo2 vei2 ON vei2.VEI2_VEI_SN=LMI_VEI_SN AND VEI2_LGC=2 + WHERE LMI_Receiver='Yes' AND LMI_VEI_SN=$vendorID"; + $query = $this->HT->query($sql); + return $query->row(); + } + public function set_plan_received($vas_sn=0) + { + $sql = "UPDATE VendorArrangeState set VAS_IsReceive=1,VAS_ReceiveTime=GETDATE() where VAS_SN=? "; + return $this->HT->query($sql, array($vas_sn)); + } + + /*! + * 地接计划状态变更 + * @param [type] $vas_sn [description] + * @param string $confirminfo [description] + */ + public function set_plan_confirm($vas_sn, $lmi_sn, $confirminfo="") + { + $sql = "UPDATE VendorArrangeState + SET VAS_IsConfirm=1 + ,VAS_ConfirmInfo=? + ,VAS_ConfirmTime=getdate() + ,VAS_ConfirmSN=? + WHERE VAS_SN=?"; + $query = $this->HT->query($sql, array($confirminfo, $lmi_sn, $vas_sn)); + // affected_rows() doesn't work with the 'sqlsrv' driver in CI2 + // The solution: Upgrade to the latest CodeIgniter 3.0.x version + $ssql = "SELECT 1 as 'exist' from VendorArrangeState where VAS_IsConfirm=1 and VAS_SN=? "; + $squery = $this->HT->query($ssql, array($vas_sn)); + $ret = $squery->result(); + return !empty($ret); + } + + public function insert_VendorPlanSync($sync_arr=array()) + { + $this->HT->insert('VendorPlanSync', $sync_arr); + return $this->HT->query("SELECT MAX(VPS_SN) VPS_SN from VendorPlanSync") + ->row()->VPS_SN; + } + + public function update_VendorPlanSync($vps, $sync_arr=array()) + { + $where = " VPS_SN=" . $vps; + $update_sql = $this->HT->update_string('VendorPlanSync', $sync_arr, $where); + return $this->HT->query($update_sql); + } + + + + /* + * 发送邮件 + */ + public function save_automail($M_SenderName, $M_SenderEmail, $fromName, $fromEmail, $toName, $toEmail, $subject, $body, $frominfo = 'vendorConfirm msg', $M_RelatedInfo = '', $M_State = 0, $M_AddTime = '', $M_Web = 'vendorConfirm msg') { + $sql = "INSERT INTO + Email_AutomaticSend ( + M_SenderName, + M_SenderEmail, + M_ReplyToName, + M_ReplyToEmail, + M_ToName, + M_ToEmail, + M_Title, + M_Body, + M_Web, + M_FromName, + M_ServiceSN, + M_State, + M_AddTime + ) VALUES (N?, N?, N?, N?, N?, N?, N?, N?, ?, N?, ?,?,getdate()) "; + $query = $this->HT->query($sql, array($M_SenderName, $M_SenderEmail, $fromName, $fromEmail, $toName, $toEmail, $subject, $body, $M_Web, $frominfo, $M_RelatedInfo, $M_State)); + return $query; + } } diff --git a/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php b/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php index 277ed0b6..93b9b595 100644 --- a/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php +++ b/webht/third_party/vendorPlanSync/models/TuLanDuo_addOrUpdateRouteOrderContentBuilder.php @@ -10,74 +10,16 @@ class TuLanDuo_addOrUpdateRouteOrderContentBuilder extends CI_Model private $bizContentarr = array(); private $bizContent = NULL; - private $orderData=array(); - private $orderId; //”Integer”//订单ID,不为空代表修改 - private $modifyLogInfo; //”String”//修改的日志记录信息.如果是修改订单的状态,这里传输修改简报 - private $orderType; //”Integer” //订单类型 1=独立成团,2=散客团 - private $routeName; //”String”//行程名称 - private $routeType; //”String”//线路类型 - private $agcOrderNo; //”String”//组团社团号,团号格式 yyyy-mm-dd-cc(**)后面中括号号的对应团号的其他表达信息 - private $adultNum; //”Integer”//大人数量 - private $childNum; //”Integer”//小孩数量 - private $guiderNum; //”Integer”//领队数量 - private $guiderInfo; //”String”//领队信息 - private $toTraffic; //”String”//抵达交通 - private $backTraffic; //”String”//返回交通 - private $roomStandard; //”String”//用房标准 - private $orderRemark; //”String”//订单备注 - private $routeStandard; //”String”//行程接待标准 - private $destination; //”目的地名称”//目的地城市名称 - private $travelDate; //”String”//出游时间yyyy-mm-dd - private $leavedDate; //”String”//离团时间 yyyy-mm-dd - - // private $orderData['travelFees']=array(); //团款明细 - // [{ - // type:”String”//团款类型 - // money:”Double”//单价 - // num:”Double”//数量 - // unit:”Double”//单位 - // sumMoney:”Double//总金额” - // remark:”String”//备注 - // }] - // private $orderData['replaceCollections']=array(); //代收明细 - // [{ - // type:“String”//代收类型 - // money:”Double”//金额 - // remark:”String”//备注 - // }] - // private $orderData['replacePays']=array(); //代付明细 - // [{ - // type:“String”//代付类型 - // money:”Double”//金额 - // remark:”String”//备注 - // }] - // private $orderData['scheduleDetails']=array(); //行程详细,数组类型,按照第一天往后有序排列 - // [{ - // title:”String”//行程标题 - // content:”String”//行程内容 - // traffic:”String”//交通号 - // accommodation:”String”//住宿 - // breakFirst:”Integer”//是否包含早餐 【1=包含 0=不含】 - // dinner:”Integer”//是否包含中餐 【1=包含 0=不含】 - // lunch:”Integer”//是否包含晚餐 【1=包含 0=不含】 - // }] - // private $orderData['customers']=array(); //游客信息 - // [{ - // name:”String”//名字 - // peopleType:”String”//类型 【成人,小孩,婴儿,老人,学生…】 - // document Type:”String”//证件类型【护照,身份证,户口,驾驶证….】 - // documentNo:”String”//证件号 - // phoneNo:”String”//手机号 - // otherInfo:”String”//其他信息 - // }] + private $orderData=array( + 'travelFees' => array() //团款明细 + ,'replaceCollections' => array() //代收明细 + ,'replacePays' => array() //代付明细 + ,'scheduleDetails' => array() //行程详细,数组类型,按照第一天往后有序排列 + ,'customers' => array() //游客信息 + ); function __construct() { parent::__construct(); - $this->orderData['travelFees'] = array(); //团款明细 - $this->orderData['replaceCollections'] = array(); //代收明细 - $this->orderData['replacePays'] = array(); //代付明细 - $this->orderData['scheduleDetails'] = array(); //行程详细,数组类型,按照第一天往后有序排列 - $this->orderData['customers'] = array(); //游客信息 } public function getBizContent() @@ -119,6 +61,11 @@ class TuLanDuo_addOrUpdateRouteOrderContentBuilder extends CI_Model $this->orderData['modifyLogInfo'] = $modifyLogInfo; return $this; } + public function clearModifyLogInfo() + { + $this->orderData['modifyLogInfo'] = ''; + return $this; + } public function setOrderType($orderType) { $this->orderData['orderType'] = $orderType;