diff --git a/application/controllers/info_amp.php b/application/controllers/info_amp.php index 99ac7662..0b7a04e2 100644 --- a/application/controllers/info_amp.php +++ b/application/controllers/info_amp.php @@ -13,6 +13,7 @@ class Info_amp extends CI_Controller $this->load->model('InfoMetas_model'); $this->load->model('InfoContents_model'); $this->load->model('Information_model'); + $this->load->model('Logs_model'); $this->site_code = $this->config->item('site_code'); //CORS header('Access-Control-Allow-Origin:*'); @@ -33,10 +34,12 @@ class Info_amp extends CI_Controller $status = $this->input->get_post('status'); //如果源信息的内容为空,则插入内容。 + /* $info = $this->InfoContents_model->get_ic_contents2($icid); if ($info && empty($info->ic_content)) { $this->InfoContents_model->force_update($icid, ''.$pc_html); } + */ if ($icid && $json && $html) { try { @@ -68,6 +71,7 @@ class Info_amp extends CI_Controller } else { $this->InfoMetas_model->update($icid, 'AMP_JSON', $json); } + $this->Logs_model->backup_meta($icid, $json, 'AMP_JSON'); //css $meta = $this->InfoMetas_model->get($icid, 'AMP_CSS'); if ($meta === FALSE) { diff --git a/application/models/logs_model.php b/application/models/logs_model.php index 38d1353e..4f6eb9f1 100644 --- a/application/models/logs_model.php +++ b/application/models/logs_model.php @@ -150,6 +150,11 @@ class Logs_model extends CI_Model { return $this->write('backup_info', $is_id, $log_content); } + //备份信息meta内容,lmr - 2020/03/12 + function backup_meta($is_id, $log_content, $meta_code) { + return $this->write('backup_meta_'.$meta_code, $is_id, $log_content); + } + //备份信息简介 function backup_summary($is_id, $log_content) { return $this->write('backup_summary', $is_id, $log_content); diff --git a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php index 38b7a11d..ee759e48 100644 --- a/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php +++ b/webht/third_party/trippestOrderSync/controllers/TulanduoApi.php @@ -38,17 +38,17 @@ class TulanduoApi extends CI_Controller ,"COLI_sourcetype" => 32112 ,"routeType" => "上海目的地线路" ), - "BJ" => array( + "北京目的地线路" => array( "PlanVEI_SN" => 1343 ,"COLI_sourcetype" => 32090 ,"routeType" => "北京目的地线路" ), - "XA" => array( + "西安目的地线路" => array( "PlanVEI_SN" => 30548 ,"COLI_sourcetype" => 32116 ,"routeType" => "西安目的地线路" ), - "SH" => array( + "上海目的地线路" => array( "PlanVEI_SN" => 29188 ,"COLI_sourcetype" => 32112 ,"routeType" => "上海目的地线路" @@ -161,7 +161,7 @@ class TulanduoApi extends CI_Controller $this->Orders_model->BIZ_COLI_SN = null; $this->Orders_model->GRI_SN = null; $this->Orders_model->GCI_SN = null; - $tmpv = $this->city_info[$vo['operationDep']]['PlanVEI_SN'] ? $this->city_info[$vo['operationDep']]['PlanVEI_SN'] : 1343; + $tmpv = $this->city_info[$vo['routeType']]['PlanVEI_SN'] ? $this->city_info[$vo['routeType']]['PlanVEI_SN'] : 1343; // set GCI_SN $this->Orders_model->get_SN_by_vendorOrderId($vo['orderId'], $tmpv); // 查询订单是否已经录入过 if ($this->Orders_model->BIZ_COLI_SN === null) { @@ -313,7 +313,7 @@ class TulanduoApi extends CI_Controller return; } /** HT 开始 */ - $vei_SN = $this->city_info[$detail_jsonResp->orderDetail->operationDep]['PlanVEI_SN'] ? $this->city_info[$detail_jsonResp->orderDetail->operationDep]['PlanVEI_SN'] : 1343; + $vei_SN = $this->city_info[$detail_jsonResp->orderDetail->routeType]['PlanVEI_SN'] ? $this->city_info[$detail_jsonResp->orderDetail->routeType]['PlanVEI_SN'] : 1343; $getInfo_byGroupCode = null; $getInfo_byGroupCodeArr = array(); if (isset($detail_jsonResp->orderDetail->agcOrderNo) && $detail_jsonResp->orderDetail->agcOrderNo != "") { @@ -519,7 +519,7 @@ class TulanduoApi extends CI_Controller $coli_update_column["COLI_Price"] = $travel_fee; $coli_update_column["COLI_CUrrency"] = $travel_fee_currency; $coli_update_column["COLI_GroupCode"] = substr(trim_str($detail_jsonResp->orderDetail->agcOrderNo), 0, 49); - $coli_update_column["COLI_sourcetype"] = empty($this->city_info[$detail_jsonResp->orderDetail->operationDep]) ? 32090 : $this->city_info[$detail_jsonResp->orderDetail->operationDep]['COLI_sourcetype']; + $coli_update_column["COLI_sourcetype"] = empty($this->city_info[$detail_jsonResp->orderDetail->routeType]) ? 32090 : $this->city_info[$detail_jsonResp->orderDetail->routeType]['COLI_sourcetype']; } $this->Order_update->biz_confirmlineinfo_update($coli_update_column); /** @@ -888,7 +888,7 @@ class TulanduoApi extends CI_Controller $this->Orders_model->BIZ_COLI_SN = null; $this->Orders_model->GRI_SN = null; $this->Orders_model->GCI_SN = null; - $tmpv = $this->city_info[$vo['operationDep']]['PlanVEI_SN'] ? $this->city_info[$vo['operationDep']]['PlanVEI_SN'] : 1343; + $tmpv = $this->city_info[$vo['routeType']]['PlanVEI_SN'] ? $this->city_info[$vo['routeType']]['PlanVEI_SN'] : 1343; // set GCI_SN $this->Orders_model->get_SN_by_vendorOrderId($vo['orderId'], $tmpv); // 查询订单是否已经录入过 if ($this->Orders_model->BIZ_COLI_SN === null) { @@ -995,7 +995,7 @@ class TulanduoApi extends CI_Controller } $vo['agcOrderNo'] = (isset($vo['agcOrderNo'])&&$vo['agcOrderNo']!="") ? $vo['agcOrderNo'] : $vo['groupOrderNo']; $vo['agcOrderNo'] = (trim($vo['agcOrderNo'])); // 去掉中文的全角空格 - $tmpv = $this->city_info[$vo['operationDep']]['PlanVEI_SN'] ? $this->city_info[$vo['operationDep']]['PlanVEI_SN'] : 1343; + $tmpv = $this->city_info[$vo['routeType']]['PlanVEI_SN'] ? $this->city_info[$vo['routeType']]['PlanVEI_SN'] : 1343; $this->Orders_model->BIZ_COLI_SN = null; $this->Orders_model->GRI_SN = null; if ( isset($vo['agcOrderNo']) && $vo['agcOrderNo'] != "") { @@ -1063,7 +1063,7 @@ class TulanduoApi extends CI_Controller $this->Orders_model->COLD_ChildNum = $list_ele['childNum']; $this->Orders_model->cold_state = $list_ele['orderStatus']==1 ? 9 : 104; // 9订妥 // 104联络地接中 $this->Orders_model->DeleteFlag = 0; - $this->Orders_model->COLD_PlanVEI_SN = $this->city_info[$list_ele['operationDep']]['PlanVEI_SN'] ? $this->city_info[$list_ele['operationDep']]['PlanVEI_SN'] : 1343; + $this->Orders_model->COLD_PlanVEI_SN = $this->city_info[$list_ele['routeType']]['PlanVEI_SN'] ? $this->city_info[$list_ele['routeType']]['PlanVEI_SN'] : 1343; $this->Orders_model->COLD_MemoText = $COLD_MemoText; return $this->Orders_model->biz_confirm_detail_save(); } @@ -1075,7 +1075,7 @@ class TulanduoApi extends CI_Controller $this->Orders_model->BIZ_GUT_SN = $this->Orders_model->GUT_SN; $this->Orders_model->BIZ_COLI_ID = $this->Orders_model->biz_make_order_number(); $this->Orders_model->BIZ_COLI_ApplyDate = $list_ele['orderDate']; - $this->Orders_model->BIZ_COLI_sourcetype = empty($this->city_info[$list_ele['operationDep']]) ? 32090 : $this->city_info[$list_ele['operationDep']]['COLI_sourcetype']; + $this->Orders_model->BIZ_COLI_sourcetype = empty($this->city_info[$list_ele['routeType']]) ? 32090 : $this->city_info[$list_ele['routeType']]['COLI_sourcetype']; $this->Orders_model->BIZ_COLI_State = 9; $this->Orders_model->BIZ_COLI_servicetype = 'D'; $this->Orders_model->BIZ_COLI_ConfirmType = 52001; @@ -1110,7 +1110,7 @@ class TulanduoApi extends CI_Controller { $this->Orders_model->GCI_combineNo = isset($list_ele['groupOrderNo']) ? $list_ele['groupOrderNo'] : ''; $this->Orders_model->GCI_GRI_SN = $this->Orders_model->GRI_SN; - $this->Orders_model->GCI_VEI_SN = $this->city_info[$list_ele['operationDep']]['PlanVEI_SN'] ? $this->city_info[$list_ele['operationDep']]['PlanVEI_SN'] : 1343; + $this->Orders_model->GCI_VEI_SN = $this->city_info[$list_ele['routeType']]['PlanVEI_SN'] ? $this->city_info[$list_ele['routeType']]['PlanVEI_SN'] : 1343; $this->Orders_model->GCI_VendorOrderId = $list_ele['orderId']; $this->Orders_model->GCI_FromAgc = $list_ele['agcName']; $this->Orders_model->GCI_groupType = $list_ele['orderType']; diff --git a/webht/third_party/trippestOrderSync/models/vendor_money_model.php b/webht/third_party/trippestOrderSync/models/vendor_money_model.php index 1d83cdf6..85041a45 100644 --- a/webht/third_party/trippestOrderSync/models/vendor_money_model.php +++ b/webht/third_party/trippestOrderSync/models/vendor_money_model.php @@ -447,11 +447,15 @@ class Vendor_money_model extends CI_Model { select gri.GRI_Name, ro.money total_income, - (select SUM(COLD_TotalPrice) from BIZ_ConfirmLineDetail d where d.DeleteFlag=0 and d.COLD_PlanVEI_SN not in ($all_vendor) + (select SUM(COLD_TotalPrice) from BIZ_ConfirmLineDetail d + LEFT join BIZ_PackageOrderInfo p on p.POI_COLD_SN=d.COLD_SN + where d.DeleteFlag=0 and COLD_COLI_SN=coli.COLI_SN + and ( d.COLD_PlanVEI_SN not in ($all_vendor) or + p.POI_QuotationType=4 ) ) as other_price, - (select isnull(SUM(cast(GCI_priceCNY as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN and GCI_combineNo<>'cancel' ) as TLD_total_price, - (select isnull(SUM(cast(GCI_agencyReceipt as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN and GCI_combineNo is not null ) as TLD_agency_receipt, + (select isnull(SUM(cast(GCI_priceCNY as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN and isnull(GCI_combineNo,'') not in ('','cancel','forbidden') ) as TLD_total_price, + (select isnull(SUM(cast(GCI_agencyReceipt as decimal(10,2))),0) from GroupCombineInfo where GCI_GRI_SN=COLI_GRI_SN and isnull(GCI_combineNo,'') not in ('','cancel','forbidden') ) as TLD_agency_receipt, (select isnull(SUM(cast(GAI_SSJE as decimal(10,2))),0) from BIZ_GroupAccountInfo where GAI_COLI_SN=COLI_SN --and GAI_Type in (" . PAY_OTHER . ") AND GAI_VEI_SN in ($all_vendor,1343) -- 图兰朵的代收 @@ -474,7 +478,7 @@ class Vendor_money_model extends CI_Model { (select isnull(SUM(tourcost),0) from report_tour inner join BIZ_ConfirmLineDetail on COLD_SN=RPT_COLD_SN and COLD_PlanVEI_SN in ($all_vendor) where ordernumber=COLI_ID ) AS cost - ,coli.COLI_OPI_ID,COLI_Memo, COLI_SN + ,coli.COLI_OPI_ID,COLI_Memo, COLI_SN,COLI_Currency ,gri.GRI_SN --,* from diff --git a/webht/third_party/trippestOrderSync/views/order_report_precheck.php b/webht/third_party/trippestOrderSync/views/order_report_precheck.php index 4e2cb109..7ca7b208 100644 --- a/webht/third_party/trippestOrderSync/views/order_report_precheck.php +++ b/webht/third_party/trippestOrderSync/views/order_report_precheck.php @@ -116,8 +116,7 @@

Trippest & 地接账单预审核