diff --git a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php index 66811b34..b9df1c80 100644 --- a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php +++ b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php @@ -327,6 +327,18 @@ class TulanduoApi extends CI_Controller $getInfo_byGroupCode = $getInfo_byGroupCodeArr[0]; // 渠道和目的地有重复操作的团 $duplicate = true; } else { + $null_gci = array_map(function ($ele) { + if (intval($ele->COLI_OPI_ID)===435 && $ele->senderIP==='' + && $ele->gci===null + ) { + return $ele->COLI_ID; + } else { + return null; + } + }, $getInfo_byGroupCodeArr); + foreach (array_unique(array_filter($null_gci)) as $knull => $vnull) { + $this->order_cancel($vnull); + } foreach ($getInfo_byGroupCodeArr as $kg => $vg) { // 同步的订单, 修改了团号, 用地接社id匹配 if(intval($order->COLI_OPI_ID)===435 && $order->GCI_VendorOrderId == $vg->gci) { diff --git a/webht/third_party/trippestOrderSync/models/orders_model.php b/webht/third_party/trippestOrderSync/models/orders_model.php index 270d6f97..3deaaabe 100644 --- a/webht/third_party/trippestOrderSync/models/orders_model.php +++ b/webht/third_party/trippestOrderSync/models/orders_model.php @@ -593,12 +593,13 @@ class Orders_model extends CI_Model { */ public function get_order_by_groupcode($code, $order_id=0, $vei_sn=0) { - $vei_sn_sql = $vei_sn===0 ? " " : " AND COLD_PlanVEI_SN=$vei_sn "; + $vei_sn_sql = $vei_sn===0 ? " " : " AND isnull(COLD_PlanVEI_SN,1343) in (1343,$vei_sn) "; $sql = "SELECT COLI_SN,gri.GRI_SN,cold.COLD_PlanVEI_SN,cold.COLD_SN,coli.COLI_ID, (select top 1 case gci_vendororderId when $order_id then gci_vendororderId else 0 end from groupcombineinfo where gci_gri_sn=coli_gri_sn order by case gci_vendororderId when $order_id then 0 else 1 end asc ) as gci, + ISNULL(coli.COLI_SenderIP,'') senderIP, coli.COLI_OrderDetailText,coli.COLI_GroupCode,coli.COLI_GRI_SN, coli.COLI_State,coli.COLI_OPI_ID,coli.COLI_Price,coli.COLI_CUrrency GRI_OPI_ID,GRI_operator,GRI_No,GRI_Name,