钉邮签名没有更新成功的同学请看这里:
-
拖动鼠标选中上方的三个按钮(在按钮下方鼠标左键三击试试),然后按下Ctrl+C键进行复制到自己的outlook签名里即可。
温馨提示:不能直接用鼠标右键功能进行复制
+
拖动鼠标选中上方的三个按钮(在按钮下方鼠标左键三击试试),然后按下Ctrl+C键进行复制到自己的钉邮签名里即可。
温馨提示:不能直接用鼠标右键功能进行复制
diff --git a/webht/third_party/pay/models/Online_payment_account_model.php b/webht/third_party/pay/models/Online_payment_account_model.php
index d1c33493..c2118335 100644
--- a/webht/third_party/pay/models/Online_payment_account_model.php
+++ b/webht/third_party/pay/models/Online_payment_account_model.php
@@ -375,55 +375,102 @@ class Online_payment_account_model extends CI_Model {
public function get_refund_imported()
{
$ret = array();
- $paypal_sql = "SELECT 'paypal' as 'payment_type', pn_sn note_sn, pn_txn_id transaction_id,
- (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN
- where OPI_SN=ISNULL(coli.COLI_OPI_ID, bcoli.COLI_OPI_ID)) as department,
- (select GRI_Name from GRoupInfo where gri_sn=ISNULL(coli.COLI_GRI_SN,bcoli.COLI_GRI_SN)) as gri_name,
+ $send_flag = "send-to-finance";
+ $paypal_sql = "SELECT 'paypal' as payment_type,
+ pn_sn note_sn,pn_txn_id transaction_id,
+ (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN
+ where OPI_SN=ISNULL(table_t.COLI_OPI_ID, isnull(table_b.COLI_OPI_ID,table_app.COLI_OPI_ID))
+ ) as department,
+ case when ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) is null
+ then isnull(table_app.COLI_GroupCode,table_app.COLI_ID)
+ else (select GRI_Name from GRoupInfo
+ where gri_sn=ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN)
+ ) end as gri_name,
pn.pn_payment_date payment_date,
pn.pn_mc_gross amount,pn_mc_currency currency,
- isnull(gai.GAI_SSJE,bgai.GAI_SSJE) amount_CNY,
+ isnull(table_t.GAI_SSJE,isnull(table_b.GAI_SSJE,table_app.GAI_SSJE)) amount_CNY,
pn_payer payer,pn_payer_email payer_email
from paypal_note pn
- left join GroupAccountInfo gai on gai.GAI_AccreditNo=pn.pn_txn_id
- left join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN
- left join BIZ_GroupAccountInfo bgai on bgai.GAI_AccreditNo=pn.pn_txn_id
- left join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
- where pn_send='send-to-finance' ";
+ left join (
+ select gai.GAI_SSJE,gai.GAI_AccreditNo ,coli.COLI_GRI_SN,coli.COLI_OPI_ID,coli.COLI_SN
+ from GroupAccountInfo gai inner join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN
+ ) as table_t on table_t.GAI_AccreditNo=pn.pn_txn_id
+ left join (
+ select bgai.GAI_AccreditNo,bgai.GAI_SSJE ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN
+ from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
+ ) as table_b on table_b.GAI_AccreditNo=pn.pn_txn_id
+ left join (
+ select bgai.GAI_AccreditNo,bgai.GAI_SSJE,bgai.GAI_SQJE,bgai.GAI_SQJECurrency ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN ,bcoli.COLI_id ,bcoli.COLI_GroupCode
+ from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
+ ) as table_app on table_app.COLI_ID=REPLACE ( pn_invoice , '_B' , '' )
+ and pn.pn_mc_gross=table_app.GAI_SQJE and pn.pn_mc_currency=table_app.GAI_SQJECurrency
+ where pn_send='$send_flag'
+ order by department ";
$ret = $paypal_list = $this->HT->query($paypal_sql)->result_array();
$ipaylinks_sql = "SELECT 'ipaylinks' as 'payment_type', IPL_sn note_sn,IPL_dealId transaction_id,
- (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN
- where OPI_SN=ISNULL(coli.COLI_OPI_ID, bcoli.COLI_OPI_ID)) as department,
- (select GRI_Name from GRoupInfo where gri_sn=ISNULL(coli.COLI_GRI_SN,bcoli.COLI_GRI_SN)) as gri_name,
+ (select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN
+ where OPI_SN=ISNULL(table_t.COLI_OPI_ID, isnull(table_b.COLI_OPI_ID,table_app.COLI_OPI_ID))
+ ) as department,
+ case when ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) is null
+ then isnull(table_app.COLI_GroupCode,table_app.COLI_ID)
+ else (select GRI_Name from GRoupInfo
+ where gri_sn=ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN)
+ ) end as gri_name,
pn.IPL_completeTime payment_date,
pn.IPL_orderAmount amount,
- isnull(IPL_currencyCode,isnull(gai.GAI_SQJECurrency,bgai.GAI_SQJECurrency)) currency,
- isnull(gai.GAI_SSJE,bgai.GAI_SSJE) amount_CNY,
- isnull(IPL_payerName,isnull(gai.GAI_CusName,bgai.GAI_CusName)) payer,
- isnull(IPL_payerEmail,ISNULL(gai.gai_cusEmail,bgai.gai_cusemail)) payer_email
+ isnull(IPL_currencyCode,isnull(table_t.GAI_SQJECurrency,isnull(table_b.GAI_SQJECurrency,table_app.GAI_SQJECurrency))) currency,
+ isnull(table_t.GAI_SSJE,isnull(table_b.GAI_SSJE,table_app.GAI_SSJE)) amount_CNY,
+ isnull(IPL_payerName,isnull(table_t.GAI_CusName,isnull(table_b.GAI_CusName,table_app.GAI_CusName))) payer,
+ isnull(IPL_payerEmail,ISNULL(table_t.gai_cusEmail,isnull(table_b.gai_cusemail,table_app.gai_cusemail))) payer_email
from InfoManager.dbo.IPayLinksLog pn
- left join GroupAccountInfo gai on gai.GAI_AccreditNo=pn.IPL_dealId
- left join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN
- left join BIZ_GroupAccountInfo bgai on bgai.GAI_AccreditNo=pn.IPL_dealId
- left join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
- where IPL_sent='send-to-finance' ";
+ left join (
+ select gai.GAI_SQJECurrency,gai.GAI_CusName,gai.gai_cusEmail, gai.GAI_SSJE,gai.GAI_AccreditNo ,coli.COLI_GRI_SN,coli.COLI_OPI_ID,coli.COLI_SN
+ from GroupAccountInfo gai inner join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN
+ ) as table_t on table_t.GAI_AccreditNo=pn.IPL_dealId
+ left join (
+ select bgai.GAI_AccreditNo,bgai.GAI_CusName,bgai.gai_cusEmail,bgai.GAI_SQJECurrency,bgai.GAI_SSJE ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN
+ from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
+ ) as table_b on table_b.GAI_AccreditNo=pn.IPL_dealId
+ left join (
+ select bgai.GAI_AccreditNo,bgai.GAI_CusName,bgai.gai_cusEmail,bgai.GAI_SSJE,bgai.GAI_SQJE,bgai.GAI_SQJECurrency ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN ,bcoli.COLI_id ,bcoli.COLI_GroupCode
+ from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
+ ) as table_app on table_app.COLI_ID=REPLACE ( IPL_orderId , '_B' , '' )
+ and pn.IPL_orderAmount=table_app.GAI_SQJE and pn.IPL_currencyCode=table_app.GAI_SQJECurrency
+ where IPL_sent='$send_flag'
+ order by department ";
$ipaylinks_list = $this->HT->query($ipaylinks_sql)->result_array();
empty($ipaylinks_list) ? $ipaylinks_list=array() : false;
$alipay_sql = "SELECT 'alipay' as 'payment_type', ALI_sn note_sn,ALI_dealId transaction_id,
(select DEI_DepartmentName from OperatorInfo inner join DepartmentInfo on OPI_DEI_SN=DEI_SN
- where OPI_SN=ISNULL(coli.COLI_OPI_ID, bcoli.COLI_OPI_ID)) as department,
- (select GRI_Name from GRoupInfo where gri_sn=ISNULL(coli.COLI_GRI_SN,bcoli.COLI_GRI_SN)) as gri_name,
- pn.ALI_completeTime payment_date,
- pn.ALI_orderAmount amount,
- isnull(ALI_currencyCode,isnull(gai.GAI_SQJECurrency,bgai.GAI_SQJECurrency)) currency,
- isnull(gai.GAI_SSJE,bgai.GAI_SSJE) amount_CNY,
- isnull(ALI_payerName,isnull(gai.GAI_CusName,bgai.GAI_CusName)) payer,
- isnull(ALI_payerEmail,ISNULL(gai.gai_cusEmail,bgai.gai_cusemail)) payer_email
- from InfoManager.dbo.AlipayLog pn
- left join GroupAccountInfo gai on gai.GAI_AccreditNo=SUBSTRING(pn.ALI_dealId,0,31)
- left join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN
- left join BIZ_GroupAccountInfo bgai on bgai.GAI_AccreditNo=SUBSTRING(pn.ALI_dealId,0,31)
- left join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
- where ALI_sent='send-to-finance' ";
+ where OPI_SN=ISNULL(table_t.COLI_OPI_ID, isnull(table_b.COLI_OPI_ID,table_app.COLI_OPI_ID))
+ ) as department,
+ case when ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN) is null
+ then isnull(table_app.COLI_GroupCode,table_app.COLI_ID)
+ else (select GRI_Name from GRoupInfo
+ where gri_sn=ISNULL(table_t.COLI_GRI_SN,table_b.COLI_GRI_SN)
+ ) end as gri_name,
+ pn.ALI_completeTime payment_date,
+ pn.ALI_orderAmount amount,
+ isnull(ALI_currencyCode,isnull(table_t.GAI_SQJECurrency,isnull(table_b.GAI_SQJECurrency,table_app.GAI_SQJECurrency))) currency,
+ isnull(table_t.GAI_SSJE,isnull(table_b.GAI_SSJE,table_app.GAI_SSJE)) amount_CNY,
+ isnull(ALI_payerName,isnull(table_t.GAI_CusName,isnull(table_b.GAI_CusName,table_app.GAI_CusName))) payer,
+ isnull(ALI_payerEmail,ISNULL(table_t.gai_cusEmail,isnull(table_b.gai_cusemail,table_app.gai_cusemail))) payer_email
+ from InfoManager.dbo.AlipayLog pn
+ left join (
+ select gai.GAI_SQJECurrency,gai.GAI_CusName,gai.gai_cusEmail, gai.GAI_SSJE,gai.GAI_AccreditNo ,coli.COLI_GRI_SN,coli.COLI_OPI_ID,coli.COLI_SN
+ from GroupAccountInfo gai inner join ConfirmLineInfo coli on coli.COLI_SN=gai.GAI_COLI_SN
+ ) as table_t on table_t.GAI_AccreditNo=SUBSTRING( pn.ALI_dealId,0,31)
+ left join (
+ select bgai.GAI_AccreditNo,bgai.GAI_CusName,bgai.gai_cusEmail,bgai.GAI_SQJECurrency,bgai.GAI_SSJE ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN
+ from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
+ ) as table_b on table_b.GAI_AccreditNo=SUBSTRING( pn.ALI_dealId,0,31)
+ left join (
+ select bgai.GAI_AccreditNo,bgai.GAI_CusName,bgai.gai_cusEmail,bgai.GAI_SSJE,bgai.GAI_SQJE,bgai.GAI_SQJECurrency ,bcoli.COLI_GRI_SN,bcoli.COLI_OPI_ID,bcoli.COLI_SN ,bcoli.COLI_id ,bcoli.COLI_GroupCode
+ from BIZ_GroupAccountInfo bgai inner join BIZ_ConfirmLineInfo bcoli on bcoli.COLI_SN=bgai.GAI_COLI_SN
+ ) as table_app on table_app.COLI_ID=REPLACE ( REPLACE ( ALI_orderId , '_A' , '' ) , '_B' , '' )
+ and pn.ALI_orderAmount=table_app.GAI_SQJE --and pn.ALI_currencyCode=table_app.GAI_SQJECurrency
+ where ALI_sent ='$send_flag'
+ order by department ";
$alipay_list = $this->HT->query($alipay_sql)->result_array();
empty($alipay_list) ? $alipay_list=array() : false;
$ret = array_merge($paypal_list, $ipaylinks_list, $alipay_list);
diff --git a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php
index e2652c2f..d26cb5af 100644
--- a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php
+++ b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php
@@ -443,8 +443,8 @@ class TulanduoApi extends CI_Controller
$travel_fee_currency = $partner_fee_currency;
}
$coli_update_column = array(
- "COLI_Memo" => substr($new_memo, 0, 400)
- ,"COLI_OrderDetailText" => $new_detail
+ "COLI_Memo" => mb_convert_encoding(substr($new_memo, 0, 400), 'UTF-8')
+ ,"COLI_OrderDetailText" => mb_convert_encoding($new_detail, 'UTF-8')
);
if (intval($coli_opi_id)===435) {
$coli_update_column["COLI_IsSuccess"] = 1; // 表示成行订单
@@ -996,6 +996,7 @@ class TulanduoApi extends CI_Controller
$this->Orders_model->BIZ_COLI_OrderDetailText = "来自图兰朵系统同步" . $list_ele["orderId"] . ";线路:" . $list_ele['routeName'] . "; 团名: " . $list_ele['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;
+ $this->Orders_model->BIZ_COLI_IsSuccess = 1;
$this->Orders_model->BIZ_COLI_PayManner = PAY_TO_AGENCY;
return $this->Orders_model->biz_confirm_save();
}
diff --git a/webht/third_party/trippestOrderSync/models/orders_model.php b/webht/third_party/trippestOrderSync/models/orders_model.php
index cbf63595..0453ce8c 100644
--- a/webht/third_party/trippestOrderSync/models/orders_model.php
+++ b/webht/third_party/trippestOrderSync/models/orders_model.php
@@ -148,7 +148,11 @@ class Orders_model extends CI_Model {
$sql .= " and GCI_VendorOrderId='$get_vendorID' ";
}
if ($startDate !== NULL) {
- $sql .= " and gci.GCI_travelDate between '$startDate' and '$endDate'
+ $sql .= " and (
+ gci.GCI_travelDate between '$startDate' and '$endDate'
+ OR
+ CONVERT(DATE, COLI_ApplyDate) = CONVERT(DATE, GETDATE())
+ )
and gci.GCI_createTime < '" . date($createTime_format) . "' ";
}
// 近期的订单同步完成之后, 同步历史数据
@@ -176,8 +180,8 @@ class Orders_model extends CI_Model {
public function get_groupCombineInfo_finance()
{
// return array(); // 历史数据已获取完毕
- $to_update_month_begin = date('Y-m-01', strtotime("-3 months", strtotime(date("Y-m-d"))));
- $to_update_month_end = date('Y-m-01', strtotime("-2 months", strtotime(date("Y-m-d"))));
+ $to_update_month_begin = date('Y-m-01', strtotime("-2 months", strtotime(date("Y-m-d"))));
+ $to_update_month_end = date('Y-m-01', strtotime("-1 months", strtotime(date("Y-m-d"))));
$end_d = strtotime($to_update_month_end)-1;
$to_update_month_end = date("Y-m-d 23:59:59", $end_d);
$set_time = date("Y-m-d 00:00:00", strtotime("+50 days",$end_d));
@@ -652,6 +656,7 @@ class Orders_model extends CI_Model {
var $BIZ_COLI_PayManner;
var $BIZ_COLI_State;
var $BIZ_COLI_OPI_ID;
+ var $BIZ_COLI_IsSuccess;
/**
* 商务订单主表入库
@@ -689,6 +694,7 @@ class Orders_model extends CI_Model {
. " COLI_OPI_ID, \n"
. " COLI_GroupCode, \n"
. " COLI_PayManner, \n"
+ . " COLI_IsSuccess, \n"
. " COLI_OriginalText \n"
. ") \n"
. "VALUES \n"
@@ -717,6 +723,7 @@ class Orders_model extends CI_Model {
. " ?, \n"
. " N?, \n"
. " ?, \n"
+ . " ?, \n"
. " N? \n"
. ")";
$query = $this->HT->query($sql, array(
@@ -746,6 +753,7 @@ class Orders_model extends CI_Model {
$this->BIZ_COLI_OPI_ID,
$this->BIZ_COLI_GroupCode,
$this->BIZ_COLI_PayManner,
+ $this->BIZ_COLI_IsSuccess,
$this->BIZ_COLI_OriginalText
));
$this->BIZ_COLI_SN = $this->HT->query('select MAX(COLI_SN) as insert_id FROM BIZ_ConfirmLineInfo WHERE COLI_AddCode=' . $AddCode)->row('insert_id');
diff --git a/webht/third_party/vendorPlanSync/controllers/index.php b/webht/third_party/vendorPlanSync/controllers/index.php
index 0feb4228..a9f8da3e 100644
--- a/webht/third_party/vendorPlanSync/controllers/index.php
+++ b/webht/third_party/vendorPlanSync/controllers/index.php
@@ -24,13 +24,13 @@ class Index extends CI_Controller {
* * 使用供应商平台登陆账号获取接口的key
*/
- public function index($GRI_SN=0, $vendor=null)
+ public function index($GRI_SN=0, $vendor=null, $set_pvt=0)
{
$auto_vendor_str = $vendor===null ? implode(",", $this->vendor->auto_vendor) : $vendor;
- return $this->push($GRI_SN, $auto_vendor_str);
+ return $this->push($GRI_SN, $auto_vendor_str, $set_pvt);
}
- public function push($GRI_SN=0, $vendor_str=null)
+ public function push($GRI_SN=0, $vendor_str=null, $set_pvt=0)
{
$start_date = date('Y-m-d');
$end_date = date('Y-m-d 23:59:59', strtotime("+2 months"));
@@ -43,7 +43,7 @@ class Index extends CI_Controller {
$vendor_class = $this->vendor->vendor_fun[strval($order->VAS_VEI_SN)];
$this->load->library($vendor_class);
$vendor_class_name = mb_strtolower($vendor_class);
- $call_fun = $this->$vendor_class_name->order_push($order);
+ $call_fun = $this->$vendor_class_name->order_push($order, $set_pvt);
log_message('error',"Call [$vendor_class>order_push] " . $order->GRI_SN . ". " . $call_fun);
return $this->output->set_output($call_fun . ". " . $order->GRI_SN);
}
diff --git a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php
index 494a9460..4ecf5e32 100644
--- a/webht/third_party/vendorPlanSync/libraries/Tulanduo.php
+++ b/webht/third_party/vendorPlanSync/libraries/Tulanduo.php
@@ -74,7 +74,7 @@ class Tulanduo
$this->vendor_ids = array(1343,30548,29188);
}
- public function order_push($order=null)
+ public function order_push($order=null, $set_pvt=0)
{
// 初始化所有Trippest合作项目的包价产品
$this->tulanduo_trippest_pag = $this->ci->BIZ_order->get_packageDetails('', implode(',', $this->vendor_ids));
@@ -87,11 +87,11 @@ class Tulanduo
}
// 商务
if (strval($order->GRI_OrderType) === "227002") {
- return $this->push_biz($order);
+ return $this->push_biz($order, $set_pvt);
}
// 传统订单
if (strval($order->GRI_OrderType) === "227001") {
- return $this->push_tour($order);
+ return $this->push_tour($order, $set_pvt);
}
return "[Tulanduo>order_push] No function match. ";
@@ -100,7 +100,7 @@ class Tulanduo
/*!
* 发送线路订单计划
*/
- public function push_tour($vas=null)
+ public function push_tour($vas=null, $set_pvt=0)
{
$gri_sn = $vas->GRI_SN;
$vas_sn = $vas->VAS_SN;
@@ -127,7 +127,7 @@ class Tulanduo
}
$reduce_package_code = array_filter($reduce_package_code);
*/
- $grd_apart_info = $this->tour_apart($grd_info);
+ $grd_apart_info = $this->tour_apart($grd_info, $set_pvt);
$big_order_index = 0;
$expect_order_cnt = count($grd_apart_info['com'])+intval(!empty($grd_apart_info['big_pvt']))+intval(!empty($grd_apart_info['pvt']));
foreach ($grd_apart_info as $group_key => $grd_a) {
@@ -246,7 +246,7 @@ class Tulanduo
$this_otherinfo .= "; " . $vg->Gender;
}
if (strval($vg->BirthDay) !== '') {
- $this_otherinfo .= "; 生日:". $vg->BirthDay . "; " . calc_age($vg->BirthDay) . "岁";
+ $this_otherinfo .= "; 生日:". substr($vg->BirthDay,0,10) . "; " . calc_age($vg->BirthDay) . "岁";
}
if (strval($vg->PassportValidDate) !== '') {
$this_otherinfo .= "; 护照有效期:" . $vg->PassportValidDate;
@@ -317,6 +317,7 @@ class Tulanduo
$sync_orderstate = 10;
$set_update = false;
$this->ci->tldOrderBuilder->clearModifyLogInfo();
+ // echo $this->ci->tldOrderBuilder->getBizContent();exit;
$resp = $this->excute_curl($this->neworder_url, $this->ci->tldOrderBuilder);
$response = json_decode($resp);
if ($response->status == 1) {
@@ -353,7 +354,7 @@ class Tulanduo
* )
* )
*/
- public function tour_apart($all_pag_info)
+ public function tour_apart($all_pag_info, $set_pvt=0)
{
$apart = array(); $ret = array();
foreach ($all_pag_info as $key => $pag) {
@@ -379,7 +380,7 @@ class Tulanduo
}
// 合作的产品
// 商务订单全部按PVT || isset($pag->is_biz)
- if ($this->ci->trippest->if_tour_pvt(array($pag))===1) {
+ if ($this->ci->trippest->if_tour_pvt(array($pag))===1 || $set_pvt!==0) {
$apart["pvt"]['details'][] = $pag;
} else {
$apart["com"]['details'][$pag->PAG_Code][] = $pag;
@@ -429,7 +430,7 @@ class Tulanduo
* @Date: 2019-06-04 11:47:38
* @Desc: 发送商务订单计划
*/
- public function push_biz($vas=null)
+ public function push_biz($vas=null, $set_pvt=0)
{
$userId = $this->send_host["1"]["userId"];
$userKey = $this->send_host["1"]["key"];
@@ -556,12 +557,12 @@ class Tulanduo
}
}
if ( ! empty($pag_coldsn_arr)) {
- $this->biz_pag_order_exec($vas,$grd_info);
+ $this->biz_pag_order_exec($vas,$grd_info, $set_pvt);
}
return false;
}
- private function biz_pag_order_exec($vas, $grd)
+ private function biz_pag_order_exec($vas, $grd, $set_pvt=0)
{
if (empty($grd)) {
return false;
@@ -629,7 +630,7 @@ class Tulanduo
}
$complete_grd = array_merge($special_grd, $normal_grd);
$complete_grd = json_decode(json_encode($complete_grd));
- $grd_apart_info = $this->tour_apart($complete_grd);
+ $grd_apart_info = $this->tour_apart($complete_grd, $set_pvt);
// echo json_encode($grd_apart_info);exit;
$request_info = $this->ci->Group_model->get_plan_request($vas->GRI_SN);
$big_order_index = 0;
diff --git a/webht/third_party/vendorPlanSync/libraries/trippest.php b/webht/third_party/vendorPlanSync/libraries/trippest.php
index e566e32e..11007cea 100644
--- a/webht/third_party/vendorPlanSync/libraries/trippest.php
+++ b/webht/third_party/vendorPlanSync/libraries/trippest.php
@@ -92,7 +92,10 @@ class Trippest
public function if_tour_pvt($all_pag_info)
{
$tour_pvt_arr = array_filter(array_map(function($pag) {
- if(intval($pag->PAG_ExtendType)===39009 && !in_array(intval($pag->PAG_Type), array(35003,35007)))
+ // 扩展类型:接送
+ // 交通:非-[大车]
+ if(intval($pag->PAG_ExtendType)===39009
+ && ! in_array(intval($pag->PAG_Vehicle), array(60002)))
{
return 1;
} else if (stripos($pag->PAG_Title,"PVT") !== false) {
diff --git a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php
index 9b0068c3..94159878 100644
--- a/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php
+++ b/webht/third_party/vendorPlanSync/models/BIZ_orders_model.php
@@ -82,7 +82,7 @@ class BIZ_Orders_model extends CI_Model {
public function get_packageDetails($pag_code_str='', $vei_sn_str='', $is_trippest=true)
{
$code_sql = $pag_code_str=='' ? " " : " and pag.PAG_Code IN ($pag_code_str) ";
- $vei_sql = $vei_sn_str=='' ? " " : " and pag.PAG_DefaultVEI_SN IN ($vei_sn_str) ";
+ $vei_sql = $vei_sn_str=='' ? " " : " and isnull(pag.PAG_DefaultVEI_SN,0) IN (0,$vei_sn_str) ";
$trippest_sql = $is_trippest===true ? " and pag.PAG_DEI_SN=30 " : " ";
$sql = "SELECT *,
(select CII2_name from CItyInfo2 where CII2_CII_SN=PAG_CII_SN and CII2_LGC=2) as city_chinese,
diff --git a/webht/third_party/vendorPlanSync/models/Group_model.php b/webht/third_party/vendorPlanSync/models/Group_model.php
index e4dd44bf..41303b4e 100644
--- a/webht/third_party/vendorPlanSync/models/Group_model.php
+++ b/webht/third_party/vendorPlanSync/models/Group_model.php
@@ -78,6 +78,7 @@ class Group_model extends CI_Model {
$vgrd->PAG_Code = mb_strtoupper($vaci->PAG_Code);
$vgrd->PAG_ExtendType = mb_strtoupper($vaci->PAG_ExtendType);
$vgrd->PAG_Type = trim($vaci->PAG_Type);
+ $vgrd->PAG_Vehicle = $vaci->PAG_Vehicle;
$vgrd->pag_code_arr[] = mb_strtoupper($vaci->PAG_Code);
break;
}
@@ -112,6 +113,7 @@ class Group_model extends CI_Model {
$vgrd->PAG_Code = mb_strtoupper($vcold->PAG_Code);
$vgrd->PAG_ExtendType = mb_strtoupper($vcold->PAG_ExtendType);
$vgrd->PAG_Type = trim($vcold->PAG_Type);
+ $vgrd->PAG_Vehicle = $vcold->PAG_Vehicle;
$vgrd->pag_code_arr[] = mb_strtoupper($vcold->PAG_Code);
break;
}
@@ -151,11 +153,12 @@ class Group_model extends CI_Model {
isnull(pag_for_channel.PAG_ExtendType,pag_tp.PAG_ExtendType) as PAG_ExtendType,
isnull(pag_for_channel.PAG_Type,pag_tp.PAG_Type) as PAG_Type,
isnull(pag_for_channel.PAG_DEI_SN,pag_tp.PAG_DEI_SN) as PAG_DEI_SN,
+ isnull(pag_for_channel.PAG_Vehicle,pag_tp.PAG_Vehicle) as PAG_Vehicle,
-- (select PAG_DEI_SN from BIZ_PackageInfo where PAG_SN=ACI_ServiceSN) as raw_PAG_DEI_SN,
aci.*
from ArrangeConfirmInfo aci
left join [Tourmanager].[dbo].[BIZ_PackageInfoRelate] pl on pl.PAGR_PAG_SN_channel=ACI_ServiceSN
- and isnull(pl.PAGR_DeleteFlag,0) = 0
+ and isnull(pl.PAGR_DeleteFlag,0) = 0 and ACI_ServiceType='D'
left join BIZ_PackageInfo pag_for_channel on pag_for_channel.PAG_SN=pl.PAGR_PAG_SN_host
and pag_for_channel.PAG_DEI_SN=30
left join BIZ_PackageInfo pag_tp on pag_tp.PAG_SN=ACI_ServiceSN
@@ -179,6 +182,7 @@ class Group_model extends CI_Model {
isnull(pag_for_channel.PAG_ExtendType,pag_tp.PAG_ExtendType) as PAG_ExtendType,
isnull(pag_for_channel.PAG_Type,pag_tp.PAG_Type) as PAG_Type,
isnull(pag_for_channel.PAG_DEI_SN,pag_tp.PAG_DEI_SN) as PAG_DEI_SN,
+ isnull(pag_for_channel.PAG_Vehicle,pag_tp.PAG_Vehicle) as PAG_Vehicle,
-- (select PAG_DEI_SN from BIZ_PackageInfo where PAG_SN=COLD_ServiceSN) as raw_PAG_DEI_SN,
cold.* from BIZ_ConfirmLineDetail cold
left join [Tourmanager].[dbo].[BIZ_PackageInfoRelate] pl on pl.PAGR_PAG_SN_channel=COLD_ServiceSN