Merge branch 'feature/trippest'

hotfix/远程访问多媒体中心
lyt 6 years ago
commit 8a3e3d8ad6

@ -359,6 +359,16 @@ class TulanduoApi extends CI_Controller
$this->order_cancel($order->COLI_ID); $this->order_cancel($order->COLI_ID);
} }
} }
// 团款总金额
// 渠道实收
$travel_fee = 0;
$travel_fee_currency = 'RMB';
if (isset($detail_jsonResp->orderDetail->travelFees) ) {
foreach ($detail_jsonResp->orderDetail->travelFees as $ktf => $vtf) {
$travel_fee = bcadd($travel_fee, $vtf->sumMoney);
}
unset($vtf);
}
/** groupcombineinfo */ /** groupcombineinfo */
$this->Order_update->gci_where_update = " GCI_VendorOrderId='" . $detail_jsonResp->orderDetail->orderId . "' and GCI_VEI_SN in (" . implode(',', $this->vendor_ids) . ")"; // 不明确指定供应商id,出现过不对应的情况 $this->Order_update->gci_where_update = " GCI_VendorOrderId='" . $detail_jsonResp->orderDetail->orderId . "' and GCI_VEI_SN in (" . implode(',', $this->vendor_ids) . ")"; // 不明确指定供应商id,出现过不对应的情况
$gci_update_column = array( $gci_update_column = array(
@ -368,6 +378,7 @@ class TulanduoApi extends CI_Controller
,"GCI_travelDate" => $detail_jsonResp->orderDetail->travelDate ,"GCI_travelDate" => $detail_jsonResp->orderDetail->travelDate
,"GCI_leaveDate" => $detail_jsonResp->orderDetail->leaveDate ,"GCI_leaveDate" => $detail_jsonResp->orderDetail->leaveDate
,"GCI_createTime" => date('Y-m-d H:i:s') ,"GCI_createTime" => date('Y-m-d H:i:s')
,"GCI_priceCNY" => $travel_fee
); );
$gci_info = $this->Order_update->biz_groupcombineinfo_update($gci_update_column); $gci_info = $this->Order_update->biz_groupcombineinfo_update($gci_update_column);
/** GRoupInfo */ /** GRoupInfo */
@ -404,16 +415,6 @@ class TulanduoApi extends CI_Controller
$finance_memo .= "备注: 本订单是自营团, 账单收款方应为海纳收款, 同步得到结果是桂林海纳分销渠道, 请注意核对.\r\n"; $finance_memo .= "备注: 本订单是自营团, 账单收款方应为海纳收款, 同步得到结果是桂林海纳分销渠道, 请注意核对.\r\n";
$new_memo .= mb_strstr($new_memo, "orderRemark", true)!==false ? $finance_memo : ("orderRemark " . $finance_memo); $new_memo .= mb_strstr($new_memo, "orderRemark", true)!==false ? $finance_memo : ("orderRemark " . $finance_memo);
} }
// 团款总金额
// 渠道实收
$travel_fee = 0;
$travel_fee_currency = 'RMB';
if (isset($detail_jsonResp->orderDetail->travelFees) ) {
foreach ($detail_jsonResp->orderDetail->travelFees as $ktf => $vtf) {
$travel_fee = bcadd($travel_fee, $vtf->sumMoney);
}
unset($vtf);
}
// 渠道价 // 渠道价
$partner_fee = 0; $partner_fee = 0;
$partner_fee_currency = 'RMB'; $partner_fee_currency = 'RMB';

@ -180,8 +180,8 @@ class Orders_model extends CI_Model {
public function get_groupCombineInfo_finance() public function get_groupCombineInfo_finance()
{ {
// return array(); // 历史数据已获取完毕 // return array(); // 历史数据已获取完毕
$to_update_month_begin = date('Y-m-01', strtotime("-2 months", strtotime(date("Y-m-d")))); $to_update_month_begin = date('Y-m-01', strtotime("-4 months", strtotime(date("Y-m-d"))));
$to_update_month_end = date('Y-m-01', strtotime("-1 months", strtotime(date("Y-m-d")))); $to_update_month_end = date('Y-m-01', strtotime("-3 months", strtotime(date("Y-m-d"))));
$end_d = strtotime($to_update_month_end)-1; $end_d = strtotime($to_update_month_end)-1;
$to_update_month_end = date("Y-m-d 23:59:59", $end_d); $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)); $set_time = date("Y-m-d 00:00:00", strtotime("+50 days",$end_d));
@ -197,11 +197,11 @@ class Orders_model extends CI_Model {
where where
GCI_combineNo is not null and GCI_combineNo not in ('cancel','forbidden') GCI_combineNo is not null and GCI_combineNo not in ('cancel','forbidden')
-- 已生成账单的不再自动同步 -- 已生成账单的不再自动同步
and NOT exists ( -- and NOT exists (
select 1 from report_order where ordernumber=COLI_ID and orderstats=1 -- select 1 from report_order where ordernumber=COLI_ID and orderstats=1
) -- )
and GCI_travelDate between '$to_update_month_begin' and '$to_update_month_end' and GCI_travelDate between '$to_update_month_begin' and '$to_update_month_end'
and gci.GCI_createTime < '$set_time' -- and gci.GCI_createTime < '$set_time'
and GCI_combineNo not like '%取消%' and GCI_combineNo not like '%取消%'
"; ";
$sql .= " ORDER BY isHistory ASC,GCI_createTime ASC "; $sql .= " ORDER BY isHistory ASC,GCI_createTime ASC ";

Loading…
Cancel
Save