diff --git a/application/config/config.php b/application/config/config.php index b397778d..bfd01861 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -382,7 +382,7 @@ $config['proxy_ips'] = ''; //各站信息组和人员权限分配 $config['site'] = array( - 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,SYH'), + 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,si'), 'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'https://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'https://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'https://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), diff --git a/application/controllers/Order.php b/application/controllers/Order.php new file mode 100644 index 00000000..84ae288a --- /dev/null +++ b/application/controllers/Order.php @@ -0,0 +1,21 @@ +load->model('order_model'); + } + + public function index() { + $this->load->view('order/index'); + } + + public function search() { + $order_id = $this->input->get_post('orderId'); + $order_array = $this->order_model->get_order_by_id($order_id); + $order_in_ht_array = $this->order_model->get_order_by_id_in_ht($order_id); + $data['online'] = $order_array; + $data['ht'] = $order_in_ht_array; + $data['order_id'] = $order_id; + $this->load->view('order/detail', $data); + } +} diff --git a/application/controllers/sendmail.php b/application/controllers/sendmail.php index a6907fa9..7235133f 100644 --- a/application/controllers/sendmail.php +++ b/application/controllers/sendmail.php @@ -46,7 +46,7 @@ class Sendmail extends CI_Controller public function send_mail(){ @set_time_limit(0); - $result=$this->InfoSMS_model->un_send_mail(2,0); + $result=$this->InfoSMS_model->un_send_mail(1,0); if (empty($result)) { echo 'null'; diff --git a/application/models/Order_model.php b/application/models/Order_model.php new file mode 100644 index 00000000..74780e95 --- /dev/null +++ b/application/models/Order_model.php @@ -0,0 +1,36 @@ +hunter = $this->load->database('HT', TRUE); + } + + public function get_order_by_id($order_id) { + // [syn123].tourmanager.dbo. + $order_query = $this->hunter->query("select COLI_Name, COLI_OrderDetailText, COLI_OrderStartDate + from ConfirmLineInfoTmp + where + COLI_ID = ?", $order_id); + $order_array = $order_query->row_array(); + return $order_array; + } + + public function get_order_by_id_in_ht($order_id) { + $order_query = $this->hunter->query("select COLI_Name, COLI_OrderDetailText, COLI_OrderStartDate from ConfirmLineInfo where COLI_AddCode IN + (select cast(coli_sn as varchar(20)) + from ConfirmLineInfoTmp + where + COLI_ID = ?)", $order_id); + $order_array = $order_query->row_array(); + + if (empty($order_array)) { + $order_array = [ + 'COLI_Name' => 'NULL', + 'COLI_OrderDetailText' => 'NULL', + 'COLI_OrderStartDate' => 'NULL' + ]; + } + return $order_array; + } +} diff --git a/application/third_party/order/controllers/confirm.php b/application/third_party/order/controllers/confirm.php index 4c05b515..cd6937a9 100644 --- a/application/third_party/order/controllers/confirm.php +++ b/application/third_party/order/controllers/confirm.php @@ -111,7 +111,7 @@ class Confirm extends CI_Controller { if ($MEI_SN && $this->input->post('emergency_person_name') != '') { $add_emergency_res = $this->Order_model->add_customer_info( - '', '', $this->input->post('emergency_person_name'), '', '', '', '', $this->input->post('emergency_relationship'), '', $this->input->post('emergency_email'), $this->input->post('emergency_telephone'), 1, $COLI_SN, $visitor_link + '', '', '', $this->input->post('emergency_person_name'), '', '', '', '', $this->input->post('emergency_relationship'), '', $this->input->post('emergency_email'), $this->input->post('emergency_telephone'), 1, $COLI_SN, $visitor_link ,$MEI_ArrivalFlightNo,$MEI_ArrivalTime,$MEI_DepartureFlightNo,$MEI_DepartureTime ); } diff --git a/application/third_party/order/views/confirm_order.php b/application/third_party/order/views/confirm_order.php index fcd84ed2..7f403540 100644 --- a/application/third_party/order/views/confirm_order.php +++ b/application/third_party/order/views/confirm_order.php @@ -400,24 +400,24 @@ diff --git a/application/third_party/trainsystem/controllers/api.php b/application/third_party/trainsystem/controllers/api.php index 6527a8d4..a157f133 100644 --- a/application/third_party/trainsystem/controllers/api.php +++ b/application/third_party/trainsystem/controllers/api.php @@ -87,14 +87,14 @@ class api extends CI_Controller{ $flag = $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); $this->BIZ_train_model->update_biz_jol(array("ts_ordernumber"=>$jh_order),array("ts_sendmail"=>1,"ts_m_sn"=>$flag)); }else if($status == '1'){ - /*$subject = "The train ticket(s) will be issued manually, Order No $coli_id"; + $subject = "The train ticket(s) will be issued manually, Order No $coli_id"; $body = $this->load->view('email_fault',$data,true); $this->send_mail_to_wl("订单:{$coli_id} 出票失败","翰特订单号:{$coli_id};聚合订单号:{$jh_order}",$coli_id); //测试阶段,将失败邮件发送一份给操作外联。 $flag = $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$fromName,$fromEmail,$subject,$body); //测试阶段,将失败邮件发送一份给操作外联。 $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body); - $this->BIZ_train_model->update_biz_jol(array("ts_ordernumber"=>$jh_order),array("ts_sendmail"=>1,"ts_m_sn"=>$flag));*/ + $this->BIZ_train_model->update_biz_jol(array("ts_ordernumber"=>$jh_order),array("ts_sendmail"=>1,"ts_m_sn"=>$flag)); } } diff --git a/application/third_party/trainsystem/controllers/callback.php b/application/third_party/trainsystem/controllers/callback.php index 2716e8fb..d4308fce 100644 --- a/application/third_party/trainsystem/controllers/callback.php +++ b/application/third_party/trainsystem/controllers/callback.php @@ -162,7 +162,7 @@ class callback extends CI_Controller{ public function ctripcallback(){ $back_json = file_get_contents('php://input'); log_message('error','携程回调信息:'.$back_json); - //$back_json = '{"@attributes":{"xsi":"http:\/\/www.w3.org\/2001\/XMLSchema-instance"},"Authentication":{"TimeStamp":"2019-07-17 12:04:27","ServiceName":"web.order.notifyTicket","MessageIdentity":"277AA64C7D2B97DB9ECEAA3ABCFE1395","PartnerName":"tieyou"},"TrainOrderService":{"OrderInfo":{"OrderNumber":"guilintravel1563336241061","ElectronicOrderNumber":"EE43125942","OrderType":"\u7535\u5b50","OrderTotleFee":"673.50","TicketInfo":{"OrderTicketFromStation":"\u4e0a\u6d77\u8679\u6865","OrderTicketToStation":"\u6d4e\u5357\u897f","OrderTicketYMD":"20190721","OrderTicketTime":"13:00","OrderTicketCheci":"G134","OrderTicketPrice":"673.50","OrderAcceptSeat":{"0":"\n "},"OrderTicketSeat":"\u4e00\u7b49\u5ea7","SeatNumber":"02\u8f66\u53a211F\u53f7","railwayTip":{"0":"\n "},"AuditTicketCount":"1","ChildTicketCount":"0","Passengers":{"Passenger":{"RealName":"CARDOSORODRIGUEZMARIOALBERTO","IdentityType":"\u62a4\u7167","NumberID":"G14201195","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"}}},"TicketInfoFinal":{"OrderTicketFromStation":"\u4e0a\u6d77\u8679\u6865","OrderTicketToStation":"\u6d4e\u5357\u897f","ChildBillid":{"0":"\n "},"ElectronicOrderNumber":"EE43125942","Result":"2","NoTicketReasons":{"0":"\n "},"OrderTicketYMD":"20190721","OrderTicketTime":"13:00","OrderTicketCheci":"G134","OrderTicketPrice":"673.50","SeatNumber":"02\u8f66\u53a211F\u53f7","railwayTip":{"0":"\n "},"TicketCheck":"\u68c0\u7968\u53e33B","IsUserAcount":"0","ReturnFlag":"0","RescheduleFlag":"0","Tickets":{"Ticket":{"OrderTicketSeat":"\u4e00\u7b49\u5ea7","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"673.50","TicketCount":"1","DetailInfos":{"DetailInfo":{"PassengerName":"CARDOSORODRIGUEZMARIOALBERTO","IdentityType":"\u62a4\u7167","NumberID":"G14201195","SeatNo":"02\u8f66\u53a211F\u53f7"}}}}}}}}'; + //$back_json = '{"@attributes":{"xsi":"http:\/\/www.w3.org\/2001\/XMLSchema-instance"},"Authentication":{"TimeStamp":"2019-07-29 22:51:05","ServiceName":"web.order.notifyTicket","MessageIdentity":"3B077107D1B6D07729A708B5B3ADEF9C","PartnerName":"tieyou"},"TrainOrderService":{"OrderInfo":{"OrderNumber":"guilintravel1564411808120","ElectronicOrderNumber":"EC11737908","OrderType":"\u7535\u5b50","OrderTotleFee":"1870.00","TicketInfo":{"OrderTicketFromStation":"\u4e0a\u6d77","OrderTicketToStation":"\u5317\u4eac\u5357","OrderTicketYMD":"20190827","OrderTicketTime":"21:24","OrderTicketCheci":"D710","OrderTicketPrice":"623.33","OrderAcceptSeat":{"0":"\n "},"OrderTicketSeat":"\u4e00\u7b49\u5367","SeatNumber":"10\u8f66\u53a225\u53f7\u4e0b\u94fa,10\u8f66\u53a226\u53f7\u4e0a\u94fa,10\u8f66\u53a228\u53f7\u4e0a\u94fa","railwayTip":{"0":"\n "},"AuditTicketCount":"3","ChildTicketCount":"0","Passengers":{"Passenger":[{"RealName":"BRAGANTINI ALICE","IdentityType":"\u62a4\u7167","NumberID":"YB1358397","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"},{"RealName":"VACCARI ALBERTO","IdentityType":"\u62a4\u7167","NumberID":"YA2689241","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"},{"RealName":"TUNESI SIMONE","IdentityType":"\u62a4\u7167","NumberID":"YB1847839","TicketType":"\u6210\u4eba\u7968","Birth":{"0":"\n "},"InsuranceCount":"0"}]}},"TicketInfoFinal":{"OrderTicketFromStation":"\u4e0a\u6d77","OrderTicketToStation":"\u5317\u4eac\u5357","ChildBillid":{"0":"\n "},"ElectronicOrderNumber":"EC11737908","Result":"2","NoTicketReasons":{"0":"\n "},"OrderTicketYMD":"20190827","OrderTicketTime":"21:24","OrderTicketCheci":"D710","OrderTicketPrice":"623.33","SeatNumber":"10\u8f66\u53a225\u53f7\u4e0b\u94fa","railwayTip":{"0":"\n "},"TicketCheck":"\u5019\u8f66\u5730\u70b9\uff1a\u5019\u8f66\u5ba45","IsUserAcount":"0","ReturnFlag":"0","RescheduleFlag":"0","Tickets":{"Ticket":[{"OrderTicketSeat":"\u4e00\u7b49\u5367","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"676.00","TicketCount":"1","DetailInfos":{"DetailInfo":{"PassengerName":"BRAGANTINI ALICE","IdentityType":"\u62a4\u7167","NumberID":"YB1358397","SeatNo":"10\u8f66\u53a225\u53f7\u4e0b\u94fa"}}},{"OrderTicketSeat":"\u4e00\u7b49\u5367","TicketType":"\u6210\u4eba\u7968","OrderTicketPrice":"597.00","TicketCount":"2","DetailInfos":{"DetailInfo":[{"PassengerName":"VACCARI ALBERTO","IdentityType":"\u62a4\u7167","NumberID":"YA2689241","SeatNo":"10\u8f66\u53a226\u53f7\u4e0a\u94fa"},{"PassengerName":"TUNESI SIMONE","IdentityType":"\u62a4\u7167","NumberID":"YB1847839","SeatNo":"10\u8f66\u53a228\u53f7\u4e0a\u94fa"}]}}]}}}}}'; $ctrip_backdata = json_decode($back_json); //print_r($ctrip_backdata); @@ -244,14 +244,27 @@ class callback extends CI_Controller{ $data_passager->ordernumber = $ctrip_backdata->TrainOrderService->OrderInfo->OrderNumber; if(is_array($ctrip_backdata->TrainOrderService->OrderInfo->TicketInfoFinal->Tickets->Ticket)){ foreach($ctrip_backdata->TrainOrderService->OrderInfo->TicketInfoFinal->Tickets->Ticket as $tickets_item){ - $data_passager->realname = $tickets_item->DetailInfos->DetailInfo->PassengerName; - $data_passager->identitytype = $tickets_item->DetailInfos->DetailInfo->IdentityType; - $data_passager->numberid = $tickets_item->DetailInfos->DetailInfo->NumberID; - $data_passager->ticketype = $tickets_item->TicketType; - $data_passager->ticketprice = $tickets_item->OrderTicketPrice; - $data_passager->seatype = $tickets_item->OrderTicketSeat; - $data_passager->seatdetail = $tickets_item->DetailInfos->DetailInfo->SeatNo; - $this->train_system_model->add_passagers($data_passager); + if(is_array($tickets_item->DetailInfos->DetailInfo)){ + foreach($tickets_item->DetailInfos->DetailInfo as $ticket_item2){ + $data_passager->realname = $ticket_item2->PassengerName; + $data_passager->identitytype = $ticket_item2->IdentityType; + $data_passager->numberid = $ticket_item2->NumberID; + $data_passager->ticketype = $tickets_item->TicketType; + $data_passager->ticketprice = $tickets_item->OrderTicketPrice; + $data_passager->seatype = $tickets_item->OrderTicketSeat; + $data_passager->seatdetail = $ticket_item2->SeatNo; + $this->train_system_model->add_passagers($data_passager); + } + }else{ + $data_passager->realname = $tickets_item->DetailInfos->DetailInfo->PassengerName; + $data_passager->identitytype = $tickets_item->DetailInfos->DetailInfo->IdentityType; + $data_passager->numberid = $tickets_item->DetailInfos->DetailInfo->NumberID; + $data_passager->ticketype = $tickets_item->TicketType; + $data_passager->ticketprice = $tickets_item->OrderTicketPrice; + $data_passager->seatype = $tickets_item->OrderTicketSeat; + $data_passager->seatdetail = $tickets_item->DetailInfos->DetailInfo->SeatNo; + $this->train_system_model->add_passagers($data_passager); + } } }else{ foreach($ctrip_backdata->TrainOrderService->OrderInfo->TicketInfoFinal->Tickets->Ticket->DetailInfos->DetailInfo as $items){ diff --git a/application/third_party/trainsystem/helpers/train_helper.php b/application/third_party/trainsystem/helpers/train_helper.php index de0d7b52..5b02363b 100644 --- a/application/third_party/trainsystem/helpers/train_helper.php +++ b/application/third_party/trainsystem/helpers/train_helper.php @@ -35,8 +35,8 @@ function strexchangeid($name){ //特殊字符转换 function chk_sp_name($name){ $name = str_replace( - array('á','ë','é','è','í','ó','ú','ű','ñ','á','é','í','ó','ú','ű','ñ','/',' '), - array('a','e','e','e','i','o','u','u','n','A','E','I','O','U','U','N','',''), + array('á','ë','é','è','í','ó','ú','ű','ñ','á','é','í','ó','ö','ú','ű','ñ','/',' '), + array('a','e','e','e','i','o','u','u','n','A','E','I','o','o','U','U','N','',''), $name ); return substr(strtoupper($name),0,30); diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php index ebd389d0..f525d375 100644 --- a/application/third_party/trainsystem/models/BIZ_train_model.php +++ b/application/third_party/trainsystem/models/BIZ_train_model.php @@ -286,6 +286,7 @@ class BIZ_train_model extends CI_Model { //筛选符合发送邮件的订单 public function auto_sendmail(){ + $time = date('Y-m-d',time()); $sql = "SELECT ts_cold_sn, ts_ordernumber, @@ -311,6 +312,8 @@ class BIZ_train_model extends CI_Model { ts_status != 'e' AND ts_status != '2' + AND + ts_subtime > '{$time}' AND bcli.COLI_WebCode in ('cht','WebMob-biz','WeChat-biz') "; diff --git a/application/third_party/trainsystem/models/train_system_model.php b/application/third_party/trainsystem/models/train_system_model.php index e671111e..c6ce76f7 100644 --- a/application/third_party/trainsystem/models/train_system_model.php +++ b/application/third_party/trainsystem/models/train_system_model.php @@ -160,6 +160,8 @@ class train_system_model extends CI_Model { tst_ordernumber = '{$data->ordernumber}' and tst_numberid = '{$data->numberid}' + and + tst_realname = '{$data->realname}' else INSERT INTO trainsystem_tickets ( tst_ordernumber, diff --git a/application/views/order/detail.php b/application/views/order/detail.php new file mode 100644 index 00000000..9148ad46 --- /dev/null +++ b/application/views/order/detail.php @@ -0,0 +1,71 @@ + + + + + + +
+
+
+
+
+ + +
+ +
+
+
+
网前
+
+ + + + + + + + + + + + +
已经入库成功
COLI_Name COLI_OrderDetailText
+
+
+ +
+
HT
+
+ + + + + + + + + + + + +
可以在HT查询
COLI_Name COLI_OrderDetailText
+
+
+ +
+ +
+ + +
+ + + +
+
+
+
+ + + diff --git a/application/views/order/index.php b/application/views/order/index.php new file mode 100644 index 00000000..e4a06e19 --- /dev/null +++ b/application/views/order/index.php @@ -0,0 +1,33 @@ + + + + + + +
+
+
+
+
+ + +
+ +
+ +
+ +
+ + +
+ + + +
+
+
+
+ + + diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php index b598b148..dce81d6d 100644 --- a/webht/third_party/dingmail/controllers/index.php +++ b/webht/third_party/dingmail/controllers/index.php @@ -207,34 +207,36 @@ class Index extends CI_Controller { header('Access-Control-Allow-Headers:x-requested-with, Content-Type'); header('Access-Control-Allow-Credentials:true'); - $data = array(); + $data = array(); $data['position'] = $this->input->get_post('position'); $data['phone'] = $this->input->get_post('phone'); - $data['email'] = $this->input->get_post('email'); - $data['name'] = $this->input->get_post('name'); + + $data['name'] = $this->input->get_post('name'); $data['sex'] = $this->input->get_post('sex'); - $data['school'] = $this->input->get_post('school'); - $data['education'] = $this->input->get_post('education'); - $data['currentcompany'] = $this->input->get_post('currentcompany'); - $data['from_time'] = $this->input->get_post('from_time'); - $data['to_time'] = $this->input->get_post('to_time'); + // $data['email'] = $this->input->get_post('email'); + // $data['school'] = $this->input->get_post('school'); + // $data['education'] = $this->input->get_post('education'); + // $data['currentcompany'] = $this->input->get_post('currentcompany'); + // $data['from_time'] = $this->input->get_post('from_time'); + // $data['to_time'] = $this->input->get_post('to_time'); $mailnody = ''; $mailnody .= '应聘职位:'.$data['position'].'
'; $mailnody .= '手机号码:'.$data['phone'].'
'; - $mailnody .= '电子邮箱:'.$data['email'].'
'; + $mailnody .= '姓名:'.$data['name'].'
'; if($data['sex'] == 0){ $data['sex'] = '女'; }else{ $data['sex'] = '男'; } - $mailnody .= '性别:'.$data['sex'].'
'; - $mailnody .= '毕业院校:'.$data['school'].'
'; - $mailnody .= '最高学历:'.$data['education'].'
'; - $mailnody .= '当前公司:'.$data['currentcompany'].'
'; - $mailnody .= '任职时间开始:'.$data['from_time'].'
'; - $mailnody .= '任职时间结束:'.$data['to_time'].'
'; + // $mailnody .= '电子邮箱:'.$data['email'].'
'; + // $mailnody .= '性别:'.$data['sex'].'
'; + // $mailnody .= '毕业院校:'.$data['school'].'
'; + // $mailnody .= '最高学历:'.$data['education'].'
'; + // $mailnody .= '当前公司:'.$data['currentcompany'].'
'; + // $mailnody .= '任职时间开始:'.$data['from_time'].'
'; + // $mailnody .= '任职时间结束:'.$data['to_time'].'
'; $tolist_array = array(); $tolist_array['0'] = new stdClass(); diff --git a/webht/third_party/dingmail/views/user.php b/webht/third_party/dingmail/views/user.php index 69792f03..4233fd93 100644 --- a/webht/third_party/dingmail/views/user.php +++ b/webht/third_party/dingmail/views/user.php @@ -130,7 +130,7 @@

钉邮签名没有更新成功的同学请看这里:

-

拖动鼠标选中上方的三个按钮(在按钮下方鼠标左键三击试试),然后按下Ctrl+C键进行复制到自己的outlook签名里即可。

温馨提示:不能直接用鼠标右键功能进行复制

+

拖动鼠标选中上方的三个按钮(在按钮下方鼠标左键三击试试),然后按下Ctrl+C键进行复制到自己的钉邮签名里即可。

温馨提示:不能直接用鼠标右键功能进行复制

diff --git a/webht/third_party/pay/models/Online_payment_account_model.php b/webht/third_party/pay/models/Online_payment_account_model.php index d1c33493..c2118335 100644 --- a/webht/third_party/pay/models/Online_payment_account_model.php +++ b/webht/third_party/pay/models/Online_payment_account_model.php @@ -375,55 +375,102 @@ class Online_payment_account_model extends CI_Model { public function get_refund_imported() { $ret = array(); - $paypal_sql = "SELECT 'paypal' as 'payment_type', pn_sn note_sn, pn_txn_id transaction_id, - (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN - where OPI_SN=ISNULL(coli.COLI_OPI_ID, bcoli.COLI_OPI_ID)) as department, - (select GRI_Name from GRoupInfo where gri_sn=ISNULL(coli.COLI_GRI_SN,bcoli.COLI_GRI_SN)) as gri_name, + $send_flag = "send-to-finance"; + $paypal_sql = "SELECT 'paypal' as payment_type, + pn_sn note_sn,pn_txn_id transaction_id, + (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN + where OPI_SN=ISNULL(table_t.COLI_OPI_ID, isnull(table_b.COLI_OPI_ID,table_app.COLI_OPI_ID)) + ) as department, + case when ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) is null + then isnull(table_app.COLI_GroupCode,table_app.COLI_ID) + else (select GRI_Name from GRoupInfo + where gri_sn=ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) + ) end as gri_name, pn.pn_payment_date payment_date, pn.pn_mc_gross amount,pn_mc_currency currency, - isnull(gai.GAI_SSJE,bgai.GAI_SSJE) amount_CNY, + isnull(table_t.GAI_SSJE,isnull(table_b.GAI_SSJE,table_app.GAI_SSJE)) amount_CNY, pn_payer payer,pn_payer_email payer_email from paypal_note pn - left join GroupAccountInfo gai on gai.GAI_AccreditNo=pn.pn_txn_id - left join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN - left join BIZ_GroupAccountInfo bgai on bgai.GAI_AccreditNo=pn.pn_txn_id - left join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN - where pn_send='send-to-finance' "; + left join ( + select gai.GAI_SSJE,gai.GAI_AccreditNo ,coli.COLI_GRI_SN,coli.COLI_OPI_ID,coli.COLI_SN + from GroupAccountInfo gai inner join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN + ) as table_t on table_t.GAI_AccreditNo=pn.pn_txn_id + left join ( + select bgai.GAI_AccreditNo,bgai.GAI_SSJE ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN + from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN + ) as table_b on table_b.GAI_AccreditNo=pn.pn_txn_id + left join ( + select bgai.GAI_AccreditNo,bgai.GAI_SSJE,bgai.GAI_SQJE,bgai.GAI_SQJECurrency ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN ,bcoli.COLI_id ,bcoli.COLI_GroupCode + from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN + ) as table_app on table_app.COLI_ID=REPLACE ( pn_invoice , '_B' , '' ) + and pn.pn_mc_gross=table_app.GAI_SQJE and pn.pn_mc_currency=table_app.GAI_SQJECurrency + where pn_send='$send_flag' + order by department "; $ret = $paypal_list = $this->HT->query($paypal_sql)->result_array(); $ipaylinks_sql = "SELECT 'ipaylinks' as 'payment_type', IPL_sn note_sn,IPL_dealId transaction_id, - (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN - where OPI_SN=ISNULL(coli.COLI_OPI_ID, bcoli.COLI_OPI_ID)) as department, - (select GRI_Name from GRoupInfo where gri_sn=ISNULL(coli.COLI_GRI_SN,bcoli.COLI_GRI_SN)) as gri_name, + (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN + where OPI_SN=ISNULL(table_t.COLI_OPI_ID, isnull(table_b.COLI_OPI_ID,table_app.COLI_OPI_ID)) + ) as department, + case when ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) is null + then isnull(table_app.COLI_GroupCode,table_app.COLI_ID) + else (select GRI_Name from GRoupInfo + where gri_sn=ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) + ) end as gri_name, pn.IPL_completeTime payment_date, pn.IPL_orderAmount amount, - isnull(IPL_currencyCode,isnull(gai.GAI_SQJECurrency,bgai.GAI_SQJECurrency)) currency, - isnull(gai.GAI_SSJE,bgai.GAI_SSJE) amount_CNY, - isnull(IPL_payerName,isnull(gai.GAI_CusName,bgai.GAI_CusName)) payer, - isnull(IPL_payerEmail,ISNULL(gai.gai_cusEmail,bgai.gai_cusemail)) payer_email + isnull(IPL_currencyCode,isnull(table_t.GAI_SQJECurrency,isnull(table_b.GAI_SQJECurrency,table_app.GAI_SQJECurrency))) currency, + isnull(table_t.GAI_SSJE,isnull(table_b.GAI_SSJE,table_app.GAI_SSJE)) amount_CNY, + isnull(IPL_payerName,isnull(table_t.GAI_CusName,isnull(table_b.GAI_CusName,table_app.GAI_CusName))) payer, + isnull(IPL_payerEmail,ISNULL(table_t.gai_cusEmail,isnull(table_b.gai_cusemail,table_app.gai_cusemail))) payer_email from InfoManager.dbo.IPayLinksLog pn - left join GroupAccountInfo gai on gai.GAI_AccreditNo=pn.IPL_dealId - left join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN - left join BIZ_GroupAccountInfo bgai on bgai.GAI_AccreditNo=pn.IPL_dealId - left join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN - where IPL_sent='send-to-finance' "; + left join ( + select gai.GAI_SQJECurrency,gai.GAI_CusName,gai.gai_cusEmail, gai.GAI_SSJE,gai.GAI_AccreditNo ,coli.COLI_GRI_SN,coli.COLI_OPI_ID,coli.COLI_SN + from GroupAccountInfo gai inner join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN + ) as table_t on table_t.GAI_AccreditNo=pn.IPL_dealId + left join ( + select bgai.GAI_AccreditNo,bgai.GAI_CusName,bgai.gai_cusEmail,bgai.GAI_SQJECurrency,bgai.GAI_SSJE ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN + from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN + ) as table_b on table_b.GAI_AccreditNo=pn.IPL_dealId + left join ( + select bgai.GAI_AccreditNo,bgai.GAI_CusName,bgai.gai_cusEmail,bgai.GAI_SSJE,bgai.GAI_SQJE,bgai.GAI_SQJECurrency ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN ,bcoli.COLI_id ,bcoli.COLI_GroupCode + from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN + ) as table_app on table_app.COLI_ID=REPLACE ( IPL_orderId , '_B' , '' ) + and pn.IPL_orderAmount=table_app.GAI_SQJE and pn.IPL_currencyCode=table_app.GAI_SQJECurrency + where IPL_sent='$send_flag' + order by department "; $ipaylinks_list = $this->HT->query($ipaylinks_sql)->result_array(); empty($ipaylinks_list) ? $ipaylinks_list=array() : false; $alipay_sql = "SELECT 'alipay' as 'payment_type', ALI_sn note_sn,ALI_dealId transaction_id, (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN - where OPI_SN=ISNULL(coli.COLI_OPI_ID, bcoli.COLI_OPI_ID)) as department, - (select GRI_Name from GRoupInfo where gri_sn=ISNULL(coli.COLI_GRI_SN,bcoli.COLI_GRI_SN)) as gri_name, - pn.ALI_completeTime payment_date, - pn.ALI_orderAmount amount, - isnull(ALI_currencyCode,isnull(gai.GAI_SQJECurrency,bgai.GAI_SQJECurrency)) currency, - isnull(gai.GAI_SSJE,bgai.GAI_SSJE) amount_CNY, - isnull(ALI_payerName,isnull(gai.GAI_CusName,bgai.GAI_CusName)) payer, - isnull(ALI_payerEmail,ISNULL(gai.gai_cusEmail,bgai.gai_cusemail)) payer_email - from InfoManager.dbo.AlipayLog pn - left join GroupAccountInfo gai on gai.GAI_AccreditNo=SUBSTRING(pn.ALI_dealId,0,31) - left join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN - left join BIZ_GroupAccountInfo bgai on bgai.GAI_AccreditNo=SUBSTRING(pn.ALI_dealId,0,31) - left join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN - where ALI_sent='send-to-finance' "; + where OPI_SN=ISNULL(table_t.COLI_OPI_ID, isnull(table_b.COLI_OPI_ID,table_app.COLI_OPI_ID)) + ) as department, + case when ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) is null + then isnull(table_app.COLI_GroupCode,table_app.COLI_ID) + else (select GRI_Name from GRoupInfo + where gri_sn=ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) + ) end as gri_name, + pn.ALI_completeTime payment_date, + pn.ALI_orderAmount amount, + isnull(ALI_currencyCode,isnull(table_t.GAI_SQJECurrency,isnull(table_b.GAI_SQJECurrency,table_app.GAI_SQJECurrency))) currency, + isnull(table_t.GAI_SSJE,isnull(table_b.GAI_SSJE,table_app.GAI_SSJE)) amount_CNY, + isnull(ALI_payerName,isnull(table_t.GAI_CusName,isnull(table_b.GAI_CusName,table_app.GAI_CusName))) payer, + isnull(ALI_payerEmail,ISNULL(table_t.gai_cusEmail,isnull(table_b.gai_cusemail,table_app.gai_cusemail))) payer_email + from InfoManager.dbo.AlipayLog pn + left join ( + select gai.GAI_SQJECurrency,gai.GAI_CusName,gai.gai_cusEmail, gai.GAI_SSJE,gai.GAI_AccreditNo ,coli.COLI_GRI_SN,coli.COLI_OPI_ID,coli.COLI_SN + from GroupAccountInfo gai inner join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN + ) as table_t on table_t.GAI_AccreditNo=SUBSTRING( pn.ALI_dealId,0,31) + left join ( + select bgai.GAI_AccreditNo,bgai.GAI_CusName,bgai.gai_cusEmail,bgai.GAI_SQJECurrency,bgai.GAI_SSJE ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN + from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN + ) as table_b on table_b.GAI_AccreditNo=SUBSTRING( pn.ALI_dealId,0,31) + left join ( + select bgai.GAI_AccreditNo,bgai.GAI_CusName,bgai.gai_cusEmail,bgai.GAI_SSJE,bgai.GAI_SQJE,bgai.GAI_SQJECurrency ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN ,bcoli.COLI_id ,bcoli.COLI_GroupCode + from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN + ) as table_app on table_app.COLI_ID=REPLACE ( REPLACE ( ALI_orderId , '_A' , '' ) , '_B' , '' ) + and pn.ALI_orderAmount=table_app.GAI_SQJE --and pn.ALI_currencyCode=table_app.GAI_SQJECurrency + where ALI_sent ='$send_flag' + order by department "; $alipay_list = $this->HT->query($alipay_sql)->result_array(); empty($alipay_list) ? $alipay_list=array() : false; $ret = array_merge($paypal_list, $ipaylinks_list, $alipay_list); diff --git a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php index e2652c2f..d26cb5af 100644 --- a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php +++ b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php @@ -443,8 +443,8 @@ class TulanduoApi extends CI_Controller $travel_fee_currency = $partner_fee_currency; } $coli_update_column = array( - "COLI_Memo" => substr($new_memo, 0, 400) - ,"COLI_OrderDetailText" => $new_detail + "COLI_Memo" => mb_convert_encoding(substr($new_memo, 0, 400), 'UTF-8') + ,"COLI_OrderDetailText" => mb_convert_encoding($new_detail, 'UTF-8') ); if (intval($coli_opi_id)===435) { $coli_update_column["COLI_IsSuccess"] = 1; // 表示成行订单 @@ -996,6 +996,7 @@ class TulanduoApi extends CI_Controller $this->Orders_model->BIZ_COLI_OrderDetailText = "来自图兰朵系统同步" . $list_ele["orderId"] . ";线路:" . $list_ele['routeName'] . "; 团名: " . $list_ele['agcOrderNo']; $this->Orders_model->BIZ_COLI_GUT_SN = $this->Orders_model->BIZ_GUT_SN ? $this->Orders_model->BIZ_GUT_SN : null; $this->Orders_model->BIZ_COLI_OPI_ID = 435; + $this->Orders_model->BIZ_COLI_IsSuccess = 1; $this->Orders_model->BIZ_COLI_PayManner = PAY_TO_AGENCY; return $this->Orders_model->biz_confirm_save(); } diff --git a/webht/third_party/trippestOrderSync/models/orders_model.php b/webht/third_party/trippestOrderSync/models/orders_model.php index cbf63595..0453ce8c 100644 --- a/webht/third_party/trippestOrderSync/models/orders_model.php +++ b/webht/third_party/trippestOrderSync/models/orders_model.php @@ -148,7 +148,11 @@ class Orders_model extends CI_Model { $sql .= " and GCI_VendorOrderId='$get_vendorID' "; } if ($startDate !== NULL) { - $sql .= " and gci.GCI_travelDate between '$startDate' and '$endDate' + $sql .= " and ( + gci.GCI_travelDate between '$startDate' and '$endDate' + OR + CONVERT(DATE, COLI_ApplyDate) = CONVERT(DATE, GETDATE()) + ) and gci.GCI_createTime < '" . date($createTime_format) . "' "; } // 近期的订单同步完成之后, 同步历史数据 @@ -176,8 +180,8 @@ class Orders_model extends CI_Model { public function get_groupCombineInfo_finance() { // return array(); // 历史数据已获取完毕 - $to_update_month_begin = date('Y-m-01', strtotime("-3 months", strtotime(date("Y-m-d")))); - $to_update_month_end = date('Y-m-01', strtotime("-2 months", strtotime(date("Y-m-d")))); + $to_update_month_begin = date('Y-m-01', strtotime("-2 months", strtotime(date("Y-m-d")))); + $to_update_month_end = date('Y-m-01', strtotime("-1 months", strtotime(date("Y-m-d")))); $end_d = strtotime($to_update_month_end)-1; $to_update_month_end = date("Y-m-d 23:59:59", $end_d); $set_time = date("Y-m-d 00:00:00", strtotime("+50 days",$end_d)); @@ -652,6 +656,7 @@ class Orders_model extends CI_Model { var $BIZ_COLI_PayManner; var $BIZ_COLI_State; var $BIZ_COLI_OPI_ID; + var $BIZ_COLI_IsSuccess; /** * 商务订单主表入库 @@ -689,6 +694,7 @@ class Orders_model extends CI_Model { . " COLI_OPI_ID, \n" . " COLI_GroupCode, \n" . " COLI_PayManner, \n" + . " COLI_IsSuccess, \n" . " COLI_OriginalText \n" . ") \n" . "VALUES \n" @@ -717,6 +723,7 @@ class Orders_model extends CI_Model { . " ?, \n" . " N?, \n" . " ?, \n" + . " ?, \n" . " N? \n" . ")"; $query = $this->HT->query($sql, array( @@ -746,6 +753,7 @@ class Orders_model extends CI_Model { $this->BIZ_COLI_OPI_ID, $this->BIZ_COLI_GroupCode, $this->BIZ_COLI_PayManner, + $this->BIZ_COLI_IsSuccess, $this->BIZ_COLI_OriginalText )); $this->BIZ_COLI_SN = $this->HT->query('select MAX(COLI_SN) as insert_id FROM BIZ_ConfirmLineInfo WHERE COLI_AddCode=' . $AddCode)->row('insert_id'); diff --git a/webht/third_party/vendorPlanSync/controllers/index.php b/webht/third_party/vendorPlanSync/controllers/index.php index 0feb4228..a9f8da3e 100644 --- a/webht/third_party/vendorPlanSync/controllers/index.php +++ b/webht/third_party/vendorPlanSync/controllers/index.php @@ -24,13 +24,13 @@ class Index extends CI_Controller { * * 使用供应商平台登陆账号获取接口的key */ - public function index($GRI_SN=0, $vendor=null) + public function index($GRI_SN=0, $vendor=null, $set_pvt=0) { $auto_vendor_str = $vendor===null ? implode(",", $this->vendor->auto_vendor) : $vendor; - return $this->push($GRI_SN, $auto_vendor_str); + return $this->push($GRI_SN, $auto_vendor_str, $set_pvt); } - public function push($GRI_SN=0, $vendor_str=null) + public function push($GRI_SN=0, $vendor_str=null, $set_pvt=0) { $start_date = date('Y-m-d'); $end_date = date('Y-m-d 23:59:59', strtotime("+2 months")); @@ -43,7 +43,7 @@ class Index extends CI_Controller { $vendor_class = $this->vendor->vendor_fun[strval($order->VAS_VEI_SN)]; $this->load->library($vendor_class); $vendor_class_name = mb_strtolower($vendor_class); - $call_fun = $this->$vendor_class_name->order_push($order); + $call_fun = $this->$vendor_class_name->order_push($order, $set_pvt); log_message('error',"Call [$vendor_class>order_push] " . $order->GRI_SN . ". " . $call_fun); return $this->output->set_output($call_fun . ". " . $order->GRI_SN); } diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index 494a9460..4ecf5e32 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -74,7 +74,7 @@ class Tulanduo $this->vendor_ids = array(1343,30548,29188); } - public function order_push($order=null) + public function order_push($order=null, $set_pvt=0) { // 初始化所有Trippest合作项目的包价产品 $this->tulanduo_trippest_pag = $this->ci->BIZ_order->get_packageDetails('', implode(',', $this->vendor_ids)); @@ -87,11 +87,11 @@ class Tulanduo } // 商务 if (strval($order->GRI_OrderType) === "227002") { - return $this->push_biz($order); + return $this->push_biz($order, $set_pvt); } // 传统订单 if (strval($order->GRI_OrderType) === "227001") { - return $this->push_tour($order); + return $this->push_tour($order, $set_pvt); } return "[Tulanduo>order_push] No function match. "; @@ -100,7 +100,7 @@ class Tulanduo /*! * 发送线路订单计划 */ - public function push_tour($vas=null) + public function push_tour($vas=null, $set_pvt=0) { $gri_sn = $vas->GRI_SN; $vas_sn = $vas->VAS_SN; @@ -127,7 +127,7 @@ class Tulanduo } $reduce_package_code = array_filter($reduce_package_code); */ - $grd_apart_info = $this->tour_apart($grd_info); + $grd_apart_info = $this->tour_apart($grd_info, $set_pvt); $big_order_index = 0; $expect_order_cnt = count($grd_apart_info['com'])+intval(!empty($grd_apart_info['big_pvt']))+intval(!empty($grd_apart_info['pvt'])); foreach ($grd_apart_info as $group_key => $grd_a) { @@ -246,7 +246,7 @@ class Tulanduo $this_otherinfo .= "; " . $vg->Gender; } if (strval($vg->BirthDay) !== '') { - $this_otherinfo .= "; 生日:". $vg->BirthDay . "; " . calc_age($vg->BirthDay) . "岁"; + $this_otherinfo .= "; 生日:". substr($vg->BirthDay,0,10) . "; " . calc_age($vg->BirthDay) . "岁"; } if (strval($vg->PassportValidDate) !== '') { $this_otherinfo .= "; 护照有效期:" . $vg->PassportValidDate; @@ -317,6 +317,7 @@ class Tulanduo $sync_orderstate = 10; $set_update = false; $this->ci->tldOrderBuilder->clearModifyLogInfo(); + // echo $this->ci->tldOrderBuilder->getBizContent();exit; $resp = $this->excute_curl($this->neworder_url, $this->ci->tldOrderBuilder); $response = json_decode($resp); if ($response->status == 1) { @@ -353,7 +354,7 @@ class Tulanduo * ) * ) */ - public function tour_apart($all_pag_info) + public function tour_apart($all_pag_info, $set_pvt=0) { $apart = array(); $ret = array(); foreach ($all_pag_info as $key => $pag) { @@ -379,7 +380,7 @@ class Tulanduo } // 合作的产品 // 商务订单全部按PVT || isset($pag->is_biz) - if ($this->ci->trippest->if_tour_pvt(array($pag))===1) { + if ($this->ci->trippest->if_tour_pvt(array($pag))===1 || $set_pvt!==0) { $apart["pvt"]['details'][] = $pag; } else { $apart["com"]['details'][$pag->PAG_Code][] = $pag; @@ -429,7 +430,7 @@ class Tulanduo * @Date: 2019-06-04 11:47:38 * @Desc: 发送商务订单计划 */ - public function push_biz($vas=null) + public function push_biz($vas=null, $set_pvt=0) { $userId = $this->send_host["1"]["userId"]; $userKey = $this->send_host["1"]["key"]; @@ -556,12 +557,12 @@ class Tulanduo } } if ( ! empty($pag_coldsn_arr)) { - $this->biz_pag_order_exec($vas,$grd_info); + $this->biz_pag_order_exec($vas,$grd_info, $set_pvt); } return false; } - private function biz_pag_order_exec($vas, $grd) + private function biz_pag_order_exec($vas, $grd, $set_pvt=0) { if (empty($grd)) { return false; @@ -629,7 +630,7 @@ class Tulanduo } $complete_grd = array_merge($special_grd, $normal_grd); $complete_grd = json_decode(json_encode($complete_grd)); - $grd_apart_info = $this->tour_apart($complete_grd); + $grd_apart_info = $this->tour_apart($complete_grd, $set_pvt); // echo json_encode($grd_apart_info);exit; $request_info = $this->ci->Group_model->get_plan_request($vas->GRI_SN); $big_order_index = 0; diff --git a/webht/third_party/vendorPlanSync/libraries/trippest.php b/webht/third_party/vendorPlanSync/libraries/trippest.php index e566e32e..11007cea 100644 --- a/webht/third_party/vendorPlanSync/libraries/trippest.php +++ b/webht/third_party/vendorPlanSync/libraries/trippest.php @@ -92,7 +92,10 @@ class Trippest public function if_tour_pvt($all_pag_info) { $tour_pvt_arr = array_filter(array_map(function($pag) { - if(intval($pag->PAG_ExtendType)===39009 && !in_array(intval($pag->PAG_Type), array(35003,35007))) + // 扩展类型:接送 + // 交通:非-[大车] + if(intval($pag->PAG_ExtendType)===39009 + && ! in_array(intval($pag->PAG_Vehicle), array(60002))) { return 1; } else if (stripos($pag->PAG_Title,"PVT") !== false) { diff --git a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php index 9b0068c3..94159878 100644 --- a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php +++ b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php @@ -82,7 +82,7 @@ class BIZ_Orders_model extends CI_Model { public function get_packageDetails($pag_code_str='', $vei_sn_str='', $is_trippest=true) { $code_sql = $pag_code_str=='' ? " " : " and pag.PAG_Code IN ($pag_code_str) "; - $vei_sql = $vei_sn_str=='' ? " " : " and pag.PAG_DefaultVEI_SN IN ($vei_sn_str) "; + $vei_sql = $vei_sn_str=='' ? " " : " and isnull(pag.PAG_DefaultVEI_SN,0) IN (0,$vei_sn_str) "; $trippest_sql = $is_trippest===true ? " and pag.PAG_DEI_SN=30 " : " "; $sql = "SELECT *, (select CII2_name from CItyInfo2 where CII2_CII_SN=PAG_CII_SN and CII2_LGC=2) as city_chinese, diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index e4dd44bf..41303b4e 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -78,6 +78,7 @@ class Group_model extends CI_Model { $vgrd->PAG_Code = mb_strtoupper($vaci->PAG_Code); $vgrd->PAG_ExtendType = mb_strtoupper($vaci->PAG_ExtendType); $vgrd->PAG_Type = trim($vaci->PAG_Type); + $vgrd->PAG_Vehicle = $vaci->PAG_Vehicle; $vgrd->pag_code_arr[] = mb_strtoupper($vaci->PAG_Code); break; } @@ -112,6 +113,7 @@ class Group_model extends CI_Model { $vgrd->PAG_Code = mb_strtoupper($vcold->PAG_Code); $vgrd->PAG_ExtendType = mb_strtoupper($vcold->PAG_ExtendType); $vgrd->PAG_Type = trim($vcold->PAG_Type); + $vgrd->PAG_Vehicle = $vcold->PAG_Vehicle; $vgrd->pag_code_arr[] = mb_strtoupper($vcold->PAG_Code); break; } @@ -151,11 +153,12 @@ class Group_model extends CI_Model { isnull(pag_for_channel.PAG_ExtendType,pag_tp.PAG_ExtendType) as PAG_ExtendType, isnull(pag_for_channel.PAG_Type,pag_tp.PAG_Type) as PAG_Type, isnull(pag_for_channel.PAG_DEI_SN,pag_tp.PAG_DEI_SN) as PAG_DEI_SN, + isnull(pag_for_channel.PAG_Vehicle,pag_tp.PAG_Vehicle) as PAG_Vehicle, -- (select PAG_DEI_SN from BIZ_PackageInfo where PAG_SN=ACI_ServiceSN) as raw_PAG_DEI_SN, aci.* from ArrangeConfirmInfo aci left join [Tourmanager].[dbo].[BIZ_PackageInfoRelate] pl on pl.PAGR_PAG_SN_channel=ACI_ServiceSN - and isnull(pl.PAGR_DeleteFlag,0) = 0 + and isnull(pl.PAGR_DeleteFlag,0) = 0 and ACI_ServiceType='D' left join BIZ_PackageInfo pag_for_channel on pag_for_channel.PAG_SN=pl.PAGR_PAG_SN_host and pag_for_channel.PAG_DEI_SN=30 left join BIZ_PackageInfo pag_tp on pag_tp.PAG_SN=ACI_ServiceSN @@ -179,6 +182,7 @@ class Group_model extends CI_Model { isnull(pag_for_channel.PAG_ExtendType,pag_tp.PAG_ExtendType) as PAG_ExtendType, isnull(pag_for_channel.PAG_Type,pag_tp.PAG_Type) as PAG_Type, isnull(pag_for_channel.PAG_DEI_SN,pag_tp.PAG_DEI_SN) as PAG_DEI_SN, + isnull(pag_for_channel.PAG_Vehicle,pag_tp.PAG_Vehicle) as PAG_Vehicle, -- (select PAG_DEI_SN from BIZ_PackageInfo where PAG_SN=COLD_ServiceSN) as raw_PAG_DEI_SN, cold.* from BIZ_ConfirmLineDetail cold left join [Tourmanager].[dbo].[BIZ_PackageInfoRelate] pl on pl.PAGR_PAG_SN_channel=COLD_ServiceSN