diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php index 33e91b1b..b0742e2e 100644 --- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php +++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php @@ -315,6 +315,7 @@ class Tulanduo } // 查询是否变更 deprecated at 2019-05 $sync_orderstate = 10; + $set_update = false; $this->ci->tldOrderBuilder->clearModifyLogInfo(); $resp = $this->excute_curl($this->neworder_url, $this->ci->tldOrderBuilder); $response = json_decode($resp); @@ -374,7 +375,7 @@ class Tulanduo $pag->PAG_Title = $this->tulanduo_trippest_pag[$pag->PAG_Code]->PAG_Title; } // 合作的产品 - if ($this->ci->trippest->if_tour_pvt(array($pag))===1) { + if ($this->ci->trippest->if_tour_pvt(array($pag))===1 || isset($pag->is_biz)) { $apart["pvt"]['details'][] = $pag; } else { $apart["com"]['details'][$pag->PAG_Code][] = $pag; diff --git a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php index c7f56fc3..e6982ad7 100644 --- a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php +++ b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php @@ -104,7 +104,6 @@ class BIZ_Orders_model extends CI_Model { $sql = "SELECT * from BIZ_PackageOrderInfo poi where poi.POI_COLD_SN IN ($COLD_SN_str)"; -log_message('error',$sql); return $this->HT->query($sql)->result(); } diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php index 40ed0810..62ab259f 100644 --- a/webht/third_party/vendorPlanSync/models/Group_model.php +++ b/webht/third_party/vendorPlanSync/models/Group_model.php @@ -20,10 +20,11 @@ class Group_model extends CI_Model { 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 AND VAS_VEI_SN in ($vendor_str) "; - $sql .= $gri_sn!==0 ? $gri_sql : " + where 1=1 AND VAS_VEI_SN in ($vendor_str) AND isnull(VAS_IsCancel,0)=0 AND isnull(VAS_Delete,0)=0 AND isnull(vas.DeleteFlag,0)=0 - AND VAS_IsSendSucceed=1 AND isnull(VAS_IsReceive,0)=0 + AND VAS_IsSendSucceed=1 "; + $sql .= $gri_sn!==0 ? $gri_sql : " + AND isnull(VAS_IsReceive,0)=0 -- AND EOI_GetDate between '$start_date' AND '$end_date' AND EOI_GetDate > CONVERT(date, GETDATE()) AND isnull(VAS_IsConfirm,0)=0 AND VAS_ConfirmSN IS NULL @@ -102,9 +103,10 @@ class Group_model extends CI_Model { $vgrd->ACI_PersonNum = intval($vcold->COLD_PersonNum); $vgrd->ACI_ChildNum = intval($vcold->COLD_ChildNum); $vgrd->ACI_BabyNum = intval($vcold->COLD_BabyNum); - $vgrd->PAG_DEI_SN = $vcold->PAG_DEI_SN; + $vgrd->PAG_DEI_SN = $vcold->PAG_DEI_SN ? $vcold->PAG_DEI_SN : 0; $vgrd->PAG_sub_sn = intval($vcold->COLD_ServiceSN2); $vgrd->vendor_memo = trim($vcold->COLD_vendorMemo); + $vgrd->is_biz = 1; if ( strval($vcold->COLD_ServiceType)==='D') { $vgrd->PAG_Code = mb_strtoupper($vcold->PAG_Code); $vgrd->PAG_ExtendType = mb_strtoupper($vcold->PAG_ExtendType); @@ -199,12 +201,16 @@ class Group_model extends CI_Model { return $this->HT->query($sql, array($gri_sn))->result(); } - public function get_sync_info($vas, $tour_code="") + public function get_sync_info($vas, $external_id=null, $tour_code="") { $sql = "SELECT * from VendorPlanSendout where VPS_VAS_SN=? "; $param_arr = array($vas); + if ($external_id !== null) { + $sql .= " AND VPS_externalId=? "; + $param_arr[] = $external_id; + } if ($tour_code !== "") { $sql .= " AND VPS_tourCode=? "; $param_arr[] = $tour_code;