|
|
|
@ -207,6 +207,8 @@ class Vendor_money extends CI_Controller {
|
|
|
|
|
}
|
|
|
|
|
// 财务表成本和实际成本不相等
|
|
|
|
|
$result['diff_cost'] = $this->money_model->report_tour_diff($start_date, $end_date, implode(',', $vendors));
|
|
|
|
|
$this->async_fresh_report($result['diff_cost'], 'gci_no');
|
|
|
|
|
$result['diff_cost'] = $this->money_model->report_tour_diff($start_date, $end_date, implode(',', $vendors));
|
|
|
|
|
return $this->load->view('vendor_money_sum', $result);
|
|
|
|
|
// return $this->output->set_content_type('application/json')->set_output(json_encode($result));
|
|
|
|
|
;
|
|
|
|
@ -323,17 +325,7 @@ class Vendor_money extends CI_Controller {
|
|
|
|
|
$xls_data = $this->read_excel($read_path);
|
|
|
|
|
unlink($upload_data['upload_data']['full_path']);
|
|
|
|
|
$xls_ht_diff = $this->diff_xls_ht_cost($xls_data, $HT_combine_cost);
|
|
|
|
|
foreach ($xls_ht_diff['cost_error'] as $kc => $cost_error) {
|
|
|
|
|
$colis = $this->get_gci_coli($cost_error['GCI_combineNo'], false);
|
|
|
|
|
if (array_sum(array_column($colis['data'], 'no_fresh')) > 0
|
|
|
|
|
|| array_sum(array_column($colis['data'], 'cgi_check')) > 0
|
|
|
|
|
) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
foreach ($colis['data'] as $kco => $coli) {
|
|
|
|
|
async_curl("https://www.mycht.cn/webht.php/apps/trippestOrderSync/order_finance/single_order_report_refresh/" . $coli['COLI_SN'], 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$this->async_fresh_report($xls_ht_diff['cost_error']);
|
|
|
|
|
}
|
|
|
|
|
if ( ! empty($xls_data)) {
|
|
|
|
|
// 批量`重新生成账单`之后, 在对比一次
|
|
|
|
@ -345,6 +337,27 @@ class Vendor_money extends CI_Controller {
|
|
|
|
|
return $this->load->view('order_report_precheck', $ret);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* @Author: LYT: lyt@hainatravel.com
|
|
|
|
|
* @Date: 2019-12-06 11:25:16
|
|
|
|
|
* @Desc: 批量重新生成账单, 跳过含有其他供应商的和已审核保存的
|
|
|
|
|
*/
|
|
|
|
|
private function async_fresh_report($gci_nos, $key_name='GCI_combineNo')
|
|
|
|
|
{
|
|
|
|
|
foreach ($gci_nos as $kc => $gci) {
|
|
|
|
|
$colis = $this->get_gci_coli($gci[$key_name], false);
|
|
|
|
|
if (array_sum(array_column($colis['data'], 'no_fresh')) > 0
|
|
|
|
|
|| array_sum(array_column($colis['data'], 'cgi_check')) > 0
|
|
|
|
|
) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
foreach ($colis['data'] as $kco => $coli) {
|
|
|
|
|
async_curl("https://www.mycht.cn/webht.php/apps/trippestOrderSync/order_finance/single_order_report_refresh/" . $coli['COLI_SN'] . "/0/1", 2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function diff_xls_ht_cost($xls_data, $HT_combine_cost)
|
|
|
|
|
{
|
|
|
|
|
$cost_error = array();
|
|
|
|
|