diff --git a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php index 4f600884..cb5be68c 100644 --- a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php +++ b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php @@ -165,11 +165,13 @@ class TulanduoApi extends CI_Controller $serviceSN = $this->Orders_model->get_packageSN($PAG_Code); $COLD_MemoText = raw_json_encode(array("Pick up"=>$vo['toTraffic'], "Drop off"=>$vo['backTraffic'])); - $this->Orders_model->BIZ_COLI_SN = $this->Orders_model->GRI_SN = $this->Orders_model->GCI_SN = null; + $this->Orders_model->BIZ_COLI_SN = null; + $this->Orders_model->GRI_SN = null; + $this->Orders_model->GCI_SN = null; $tmpv = $this->city_info[$vo['operationDep']]['PlanVEI_SN'] ? $this->city_info[$vo['operationDep']]['PlanVEI_SN'] : 1343; // set GCI_SN $this->Orders_model->get_SN_by_vendorOrderId($vo['orderId'], $tmpv); // 查询订单是否已经录入过 - if ($this->Orders_model->BIZ_COLI_SN === null && in_array($vo['agcName'], array("D目的地桂林组", "Trippest"))) { + if ($this->Orders_model->BIZ_COLI_SN === null && in_array($vo['agcName'], array("D目的地桂林组", "Trippest", "桂林海纳国旅"))) { $real_groupCode = $this->analysis_groupCode($vo['agcOrderNo']); // set BIZ_COLI_SN, GRI_SN at Orders_model $this->Orders_model->get_SN_by_groupCode($real_groupCode, $real_groupCode); @@ -203,7 +205,7 @@ class TulanduoApi extends CI_Controller $this->Orders_model->BIZ_COLI_ID = $this->Orders_model->biz_make_order_number(); $this->Orders_model->BIZ_COLI_ApplyDate = $vo['orderDate']; $this->Orders_model->BIZ_COLI_sourcetype = empty($this->city_info[$vo['operationDep']]) ? 32090 : $this->city_info[$vo['operationDep']]['COLI_sourcetype']; - $this->Orders_model->BIZ_COLI_State = 7; + $this->Orders_model->BIZ_COLI_State = 9; $this->Orders_model->BIZ_COLI_servicetype = 'D'; $this->Orders_model->BIZ_COLI_ConfirmType = 52001; $this->Orders_model->BIZ_COLI_Memo = ""; @@ -222,7 +224,7 @@ class TulanduoApi extends CI_Controller $this->Orders_model->COLD_EndDate = $vo['leaveDate']; $this->Orders_model->COLD_PersonNum = $vo['adultNum']; $this->Orders_model->COLD_ChildNum = $vo['childNum']; - $this->Orders_model->cold_state = $vo['orderStatus']==1 ? 7 : 4; // 7已确认 // 4 下计划未确认 + $this->Orders_model->cold_state = $vo['orderStatus']==1 ? 9 : 104; // 9订妥 // 104联络地接中 $this->Orders_model->DeleteFlag = 0; $this->Orders_model->COLD_PlanVEI_SN = $this->city_info[$vo['operationDep']]['PlanVEI_SN'] ? $this->city_info[$vo['operationDep']]['PlanVEI_SN'] : 1343; $this->Orders_model->COLD_MemoText = $COLD_MemoText; @@ -344,8 +346,8 @@ class TulanduoApi extends CI_Controller $coli_memo = $getInfo_byGroupCode!==null ? $getInfo_byGroupCode->COLI_Memo : $order->COLI_Memo; $coli_orderdetailtext = $getInfo_byGroupCode!==null ? $getInfo_byGroupCode->COLI_OrderDetailText : $order->COLI_OrderDetailText; $coli_state = $getInfo_byGroupCode!==null ? - (intval($getInfo_byGroupCode->COLI_OPI_ID)===435 ? 7 : $getInfo_byGroupCode->COLI_State) - : 7; + (intval($getInfo_byGroupCode->COLI_OPI_ID)===435 ? 9 : $getInfo_byGroupCode->COLI_State) + : 9; $cold_sn = $getInfo_byGroupCode!==null ? $getInfo_byGroupCode->COLD_SN : $order->COLD_SN; // HT 订单有重复时, 以图兰朵的团号为正确的订单, 原本已录入的设为无效 if ($getInfo_byGroupCode === null) { diff --git a/webht/third_party/trippestOrderSync/models/orders_model.php b/webht/third_party/trippestOrderSync/models/orders_model.php index 6a9fbeb5..0e23532c 100644 --- a/webht/third_party/trippestOrderSync/models/orders_model.php +++ b/webht/third_party/trippestOrderSync/models/orders_model.php @@ -152,9 +152,10 @@ class Orders_model extends CI_Model { left JOIN BIZ_ConfirmLineInfo coli ON coli.COLI_GRI_SN=gci.GCI_GRI_SN and coli.COLI_State NOT IN ('30','40','50') left JOIN BIZ_ConfirmLineDetail cold ON cold.COLD_COLI_SN=coli.COLI_SN WHERE 1=1 - and (GCI_combineNo='' or GCI_combineNo is null) - and GCI_travelDate < GETDATE() + and COLI_OPI_ID=435 and COLI_Price is null order by GCI_travelDate"; + // -- and (GCI_combineNo='' or GCI_combineNo is null) + // -- and GCI_travelDate < GETDATE() $query = $this->HT->query($sql); return $query->result(); }