变更信息每次加上下载链接,新订单接口开放其他信息字段后删除; 增加筛选仅查询支持自动发送的供应商id; 商务订单暂时用传统订单方法

feature/pay
lyt 7 years ago
parent 8f863696f9
commit adbfbc0a37

@ -76,6 +76,7 @@ class Tulanduo extends CI_Controller
} }
// 商务 // 商务
if (strval($order->GRI_OrderType) === "227002") { if (strval($order->GRI_OrderType) === "227002") {
return $this->push_tour($order);
} }
// 传统订单 // 传统订单
if (strval($order->GRI_OrderType) === "227001") { if (strval($order->GRI_OrderType) === "227001") {
@ -187,21 +188,21 @@ class Tulanduo extends CI_Controller
$sync_orderstate = 10; $sync_orderstate = 10;
$vps_sn = 0; $vps_sn = 0;
$vendor_orderid = 0; $vendor_orderid = 0;
$modifyLogInfo = "<br>$change_info<br>"; $plan_detail_page_url = "http://p.mycht.cn/Cooperate/Plan_Detail.aspx?GSN=" . $gri_sn;
$plan_detail_page = "<br>计划下载:<a href='$plan_detail_page_url'>$plan_detail_page_url</a><br>";
if (intval($is_send_vary)===1) { if (intval($is_send_vary)===1) {
$vps = $this->Group_model->get_sync_info($vas_sn); $vps = $this->Group_model->get_sync_info($vas_sn);
if ( ! empty($vps)) { if ( ! empty($vps)) {
$vps_sn = $vps->VPS_SN; $vps_sn = $vps->VPS_SN;
$vendor_orderid = $vps->VPS_externalId; $vendor_orderid = $vps->VPS_externalId;
$sync_orderstate = 11; $sync_orderstate = 11;
// $modifyLogInfo = "<br><a href='https://www.trippest.com'>https://www.trippest.com</a><br>"; $modifyLogInfo = "$plan_detail_page<br>$change_info<br>";
$this->tldOrderBuilder->setOrderId($vendor_orderid) $this->tldOrderBuilder->setOrderId($vendor_orderid)
->setModifyLogInfo($modifyLogInfo) ->setModifyLogInfo($modifyLogInfo)
; ;
} }
} else { } else {
$plan_detail_page = "http://p.mycht.cn/Cooperate/Plan_Detail.aspx?GSN=" . $gri_sn; $modifyLogInfo = $plan_detail_page;
$modifyLogInfo = "<br>计划下载:<a href='$plan_detail_page'>$plan_detail_page</a><br>";
$this->tldOrderBuilder->clearModifyLogInfo(); $this->tldOrderBuilder->clearModifyLogInfo();
$this->tldOrderBuilder->setModifyLogInfo($modifyLogInfo) $this->tldOrderBuilder->setModifyLogInfo($modifyLogInfo)
; ;
@ -469,20 +470,21 @@ class Tulanduo extends CI_Controller
$sync_orderstate = 10; $sync_orderstate = 10;
$vps_sn = 0; $vps_sn = 0;
$vendor_orderid = 0; $vendor_orderid = 0;
$plan_detail_page_url = "http://p.mycht.cn/Cooperate/Plan_Detail.aspx?GSN=" . $gri_sn;
$plan_detail_page = "<br>计划下载:<a href='$plan_detail_page_url'>$plan_detail_page_url</a><br>";
if (intval($is_send_vary)===1) { if (intval($is_send_vary)===1) {
$vps = $this->Group_model->get_sync_info($vas_sn, $tour_code); $vps = $this->Group_model->get_sync_info($vas_sn, $tour_code);
if ( ! empty($vps)) { if ( ! empty($vps)) {
$vps_sn = $vps->VPS_SN; $vps_sn = $vps->VPS_SN;
$vendor_orderid = $vps->VPS_externalId; $vendor_orderid = $vps->VPS_externalId;
$sync_orderstate = 11; $sync_orderstate = 11;
$modifyLogInfo = "<br>$change_info<br>"; $modifyLogInfo = "$plan_detail_page<br>$change_info<br>";
$this->tldOrderBuilder->setOrderId($vendor_orderid) $this->tldOrderBuilder->setOrderId($vendor_orderid)
->setModifyLogInfo($modifyLogInfo) ->setModifyLogInfo($modifyLogInfo)
; ;
} }
} else { } else {
$plan_detail_page = "http://p.mycht.cn/Cooperate/Plan_Detail.aspx?GSN=" . $gri_sn; $modifyLogInfo = $plan_detail_page;
$modifyLogInfo = "<br>计划下载:<a href='$plan_detail_page'>$plan_detail_page</a><br>";
$this->tldOrderBuilder->clearModifyLogInfo(); $this->tldOrderBuilder->clearModifyLogInfo();
$this->tldOrderBuilder->setModifyLogInfo($modifyLogInfo) $this->tldOrderBuilder->setModifyLogInfo($modifyLogInfo)
; ;

@ -23,15 +23,15 @@ class Index extends CI_Controller {
public function index() public function index()
{ {
$vendor_plan = $this->Group_model->get_vendor_plan_info(214600, 1343); $auto_vendor_str = implode(",", $this->vendor->auto_vendor);
return $this->output->set_content_type('application/json')->set_output(json_encode($vendor_plan)); return $this->push(0, $auto_vendor_str);
} }
public function push($GRI_SN=0) public function push($GRI_SN=0, $vendor_str=null)
{ {
$start_date = date('Y-m-d'); $start_date = date('Y-m-d');
$end_date = date('Y-m-d 23:59:59', strtotime("+2 months")); $end_date = date('Y-m-d 23:59:59', strtotime("+2 months"));
$ready_to_send = $this->Group_model->get_plan_not_received(1, $GRI_SN, $start_date, $end_date); $ready_to_send = $this->Group_model->get_plan_not_received(1, $GRI_SN, $vendor_str, $start_date, $end_date);
if (empty($ready_to_send)) { if (empty($ready_to_send)) {
return $this->output->set_output("empty"); return $this->output->set_output("empty");
} }
@ -41,6 +41,7 @@ class Index extends CI_Controller {
require_once($controller_name . ".php"); require_once($controller_name . ".php");
$vendor_class = new $controller_name(); $vendor_class = new $controller_name();
$call_fun = $vendor_class->order_push($order); $call_fun = $vendor_class->order_push($order);
log_message('error',"Call [$controller_name>order_push] " . $order->GRI_SN);
return $this->output->set_output($call_fun . $order->GRI_SN); return $this->output->set_output($call_fun . $order->GRI_SN);
} }
return $this->output->set_output("Not found vendor function. " . $order->GRI_SN); return $this->output->set_output("Not found vendor function. " . $order->GRI_SN);

@ -10,6 +10,8 @@ class Vendor
$this->ci =& get_instance(); $this->ci =& get_instance();
} }
public $auto_vendor = array(1343,29188,30548);
public $vendor_fun = array( public $vendor_fun = array(
"1343" => "Tulanduo" "1343" => "Tulanduo"
,"29188" => "Tulanduo" ,"29188" => "Tulanduo"

@ -8,7 +8,7 @@ class Group_model extends CI_Model {
$this->HT = $this->load->database('HT', TRUE); $this->HT = $this->load->database('HT', TRUE);
} }
public function get_plan_not_received($top=1, $gri_sn=0, $start_date=null, $end_date=null) public function get_plan_not_received($top=1, $gri_sn=0, $vendor_str=null, $start_date=null, $end_date=null)
{ {
$top_sql = $top>0 ? " TOP $top " : ""; $top_sql = $top>0 ? " TOP $top " : "";
$gri_sql = $gri_sn===0 ? "" : " and GRI_SN=$gri_sn "; $gri_sql = $gri_sn===0 ? "" : " and GRI_SN=$gri_sn ";
@ -26,10 +26,11 @@ class Group_model extends CI_Model {
and VAS_IsSendSucceed=1 and VAS_IsSendSucceed=1
and VAS_IsConfirm=0 and VAS_IsConfirm=0
and EOI_GetDate between '$start_date' and '$end_date' and EOI_GetDate between '$start_date' and '$end_date'
-- and VAS_VEI_SN in (29188, 1343, 30548) -- test and VAS_VEI_SN in ($vendor_str)
-- and GRI_OrderType=227002 -- test -- and GRI_OrderType=227002 -- test
and (VAS_IsReceive=0 or (VAS_SendTime > ISNULL(VAS_ReceiveTime,0))) "; and (VAS_IsReceive=0 or (VAS_SendTime > ISNULL(VAS_ReceiveTime,0))) ";
$sql .= " order by EOI_GetDate asc, vas.VAS_IsConfirm asc"; $sql .= " order by EOI_GetDate asc, vas.VAS_IsConfirm asc";
// log_message('error',$sql);
return $this->HT->query($sql)->result(); return $this->HT->query($sql)->result();
} }

Loading…
Cancel
Save