|
|
@ -422,11 +422,13 @@ class api extends CI_Controller{
|
|
|
|
$from_date = $this->input->post("from_date");
|
|
|
|
$from_date = $this->input->post("from_date");
|
|
|
|
$to_date = $this->input->post("to_date");
|
|
|
|
$to_date = $this->input->post("to_date");
|
|
|
|
$examine = $this->input->post("examine");
|
|
|
|
$examine = $this->input->post("examine");
|
|
|
|
|
|
|
|
$importht = $this->input->post("importht");
|
|
|
|
|
|
|
|
|
|
|
|
$reback=array();//返回的数据
|
|
|
|
$reback=array();//返回的数据
|
|
|
|
$reback["from_date"] = $from_date;
|
|
|
|
$reback["from_date"] = $from_date;
|
|
|
|
$reback["to_date"] = $to_date;
|
|
|
|
$reback["to_date"] = $to_date;
|
|
|
|
$reback["examine"] = $examine;
|
|
|
|
$reback["examine"] = $examine;
|
|
|
|
|
|
|
|
$reback["importht"] = $importht;
|
|
|
|
|
|
|
|
|
|
|
|
if(!empty($from_date) && !empty($to_date)){
|
|
|
|
if(!empty($from_date) && !empty($to_date)){
|
|
|
|
//拼接发送的报文
|
|
|
|
//拼接发送的报文
|
|
|
@ -458,6 +460,12 @@ class api extends CI_Controller{
|
|
|
|
$string_r = "";//输出
|
|
|
|
$string_r = "";//输出
|
|
|
|
$arr = array();//整合完成的数组,写进excel表的数据
|
|
|
|
$arr = array();//整合完成的数组,写进excel表的数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//账单导入到汉特。 先删除同一编码的数据,防止重复
|
|
|
|
|
|
|
|
if (!empty($importht)){
|
|
|
|
|
|
|
|
$BillSn = date('Ymd',strtotime($from_date)).date('Ymd',strtotime($to_date)); //这是获取开始结束日期作为编码,一定要和下面获取代码一样。
|
|
|
|
|
|
|
|
$this->BIZ_train_model->del_lanhai_bill($BillSn);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($ResponseData->data->records as $record) {
|
|
|
|
foreach ($ResponseData->data->records as $record) {
|
|
|
|
# code...
|
|
|
|
# code...
|
|
|
|
$arrRecord = array();
|
|
|
|
$arrRecord = array();
|
|
|
@ -475,6 +483,22 @@ class api extends CI_Controller{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$arr[] = $arrRecord;
|
|
|
|
$arr[] = $arrRecord;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//账单导入到汉特。
|
|
|
|
|
|
|
|
if (!empty($importht)){
|
|
|
|
|
|
|
|
$AddHt_data = new stdClass(); //账单保存到汉特
|
|
|
|
|
|
|
|
$AddHt_data->BillSn = date('Ymd',strtotime($from_date)).date('Ymd',strtotime($to_date));
|
|
|
|
|
|
|
|
$AddHt_data->BillDate = $record->saveDay;
|
|
|
|
|
|
|
|
$AddHt_data->OrderId = $record->mainOrderId;
|
|
|
|
|
|
|
|
$AddHt_data->VEIName = LANHAI_appId;
|
|
|
|
|
|
|
|
$AddHt_data->From = "桂林海纳国际旅行社有限公司";
|
|
|
|
|
|
|
|
$AddHt_data->BillType = $record->type;
|
|
|
|
|
|
|
|
$AddHt_data->OrderType = null;
|
|
|
|
|
|
|
|
$AddHt_data->Cost = -($record->price);
|
|
|
|
|
|
|
|
$AddHt_data->Memo = $record->handleTime;
|
|
|
|
|
|
|
|
//入库
|
|
|
|
|
|
|
|
$this->BIZ_train_model->add_lanhai_bill($AddHt_data);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//print_r($arr);
|
|
|
|
//print_r($arr);
|
|
|
|