trippest 同步到的订单绑定到目的地账户:订单同步账号

feature/pay
lyt 8 years ago
parent 2a17a70584
commit 2a2d7dc741

@ -187,6 +187,7 @@ class TulanduoApi extends CI_Controller
$this->Orders_model->BIZ_COLI_Memo = "";
$this->Orders_model->BIZ_COLI_OrderDetailText = "来自图兰朵系统同步测试" . $vo["orderId"] . ";线路:" . $vo['routeName'] . "; 团名: " . $vo['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;
$coli_sn[] = $this->Orders_model->biz_confirm_save();
/**BIZ_ConfirmLineDetail*/
$this->Orders_model->COLD_COLI_SN = $this->Orders_model->BIZ_COLI_SN;
@ -297,10 +298,12 @@ class TulanduoApi extends CI_Controller
/** BIZ_ConfirmLineInfo */
$this->Order_update->coli_where_update = " COLI_SN=" . $order->COLI_SN;
$old_memo = mb_strstr($order->COLI_Memo, "orderRemark", true)!==false ? mb_strstr($order->COLI_Memo, "orderRemark", true) : $order->COLI_Memo;
$new_memo = trim($detail_jsonResp->orderDetail->orderRemark)=="" ? $old_memo : $old_memo . " orderRemark\r\n" . $detail_jsonResp->orderDetail->orderRemark . "\r\n";
$old_detail = mb_strstr($order->COLI_OrderDetailText, "operations", true)!==false ? mb_strstr($order->COLI_OrderDetailText, "operations", true) : $order->COLI_OrderDetailText;
$new_detail = trim($allDetails_to_HT)=="" ? $old_detail : $old_detail . " operations\r\n" . $allDetails_to_HT . "\r\n";
$coli_update_column = array(
"COLI_Memo" => $old_memo . "orderRemark\r\n" . $detail_jsonResp->orderDetail->orderRemark . "\r\n"
,"COLI_OrderDetailText" => $old_detail . "operations\r\n" . $allDetails_to_HT . "\r\n"
"COLI_Memo" => $new_memo
,"COLI_OrderDetailText" => $new_detail
);
$this->Order_update->biz_confirmlineinfo_update($coli_update_column);
/** BIZ_ConfirmLineDetail */ // nothing to update
@ -762,5 +765,10 @@ log_message('error','in GCI ' . json_decode($resp)->responseData->orderId);
return $ret===$key;
}
public function call_do()
{
$this->Orders_model->test();
}
}

@ -542,6 +542,7 @@ class Orders_model extends CI_Model {
var $BIZ_COLI_GRI_SN;
var $BIZ_COLI_GroupCode='';
var $BIZ_COLI_State;
var $BIZ_COLI_OPI_ID;
/**
* 商务订单主表入库
@ -576,6 +577,7 @@ class Orders_model extends CI_Model {
. " COLI_OrderSource, \n"
. " COLI_Memo, \n"
. " COLI_GRI_SN, \n"
. " COLI_OPI_ID, \n"
. " COLI_GroupCode, \n"
. " COLI_OriginalText \n"
. ") \n"
@ -602,6 +604,7 @@ class Orders_model extends CI_Model {
. " ?, \n"
. " ?, \n"
. " ?, \n"
. " ?, \n"
. " N?, \n"
. " N? \n"
. ")";
@ -629,6 +632,7 @@ class Orders_model extends CI_Model {
$this->COLI_OrderSource,
$this->BIZ_COLI_Memo,
$this->BIZ_COLI_GRI_SN,
$this->BIZ_COLI_OPI_ID,
$this->BIZ_COLI_GroupCode,
$this->BIZ_COLI_OriginalText
));
@ -1695,5 +1699,21 @@ class Orders_model extends CI_Model {
}
}
public function test()
{
return NULL;
// 绑定之前同步的为"订单同步账号"
$sql = "UPDATE BIZ_ConfirmLineInfo
SET COLI_OPI_ID=435
WHERE COLI_SN IN
(SELECT COLI_SN
FROM groupcombineinfo gci
INNER JOIN GRoupInfo gri ON gci.GCI_GRI_SN=gri.GRI_SN
INNER JOIN BIZ_ConfirmLineInfo coli ON GRI_SN=coli.COLI_GRI_SN
AND coli.COLI_OPI_ID IS NULL
)";
$query = $this->HT->query($sql);
}
}

Loading…
Cancel
Save