Merge branch 'feature/pay'

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

@ -703,8 +703,12 @@ class AlipayTradeService extends CI_Controller
$this->Alipay_note_model->update_send($item->ALI_dealId, 'send-customer');
}
//添加邮件发送记录 end
// TODO 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录
if ($this->payment_model->if_finance_exists($advisor_info->COLI_GRI_SN)===true) {
// 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录
// 更新是否需要发送财务
$refund_finance_day = 20;
$now_day = date('d');
$late_entry_date_set = $now_day<$refund_finance_day ? date('Y-m-01', strtotime("-1 month")) : date('Y-m-01');
if ($this->payment_model->if_finance_done($advisor_info->COLI_GRI_SN, $late_entry_date_set) === true) {
$this->Note_model->update_send($item->ALI_dealId, 'send-to-finance');
}
return ;

@ -770,10 +770,13 @@ class IPayLinksService extends CI_Controller
}
//添加邮件发送记录 end
// 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录
if ($this->payment_model->if_finance_exists($advisor_info->COLI_GRI_SN)===true) {
// 更新是否需要发送财务
$refund_finance_day = 20;
$now_day = date('d');
$late_entry_date_set = $now_day<$refund_finance_day ? date('Y-m-01', strtotime("-1 month")) : date('Y-m-01');
if ($this->payment_model->if_finance_done($advisor_info->COLI_GRI_SN, $late_entry_date_set) === true) {
$this->Note_model->update_send($item->IPL_dealId, 'send-to-finance');
}
return ;
}

@ -348,7 +348,6 @@ class Online_payment_account_model extends CI_Model {
and cgi.CGI_GRI_SN=? ";
return $this->HT->query($sql, array($gri_sn))->num_rows() > 0;
}
// 商务订单没有生成团信息
public function if_finance_done($gri_sn, $late_date)
{
$sql = "SELECT top 1 1
@ -356,6 +355,7 @@ class Online_payment_account_model extends CI_Model {
where GRI_SN=?
and GRI_EntranceDate < ?
";
// 商务订单没有生成团信息
if ($this->HT->query($sql, array($gri_sn,$late_date))->num_rows() === 0) {
$sql = "SELECT top 1 1
from BIZ_ConfirmLineInfo coli

@ -1003,8 +1003,6 @@ class Index extends CI_Controller {
/*!
* 退款处理
* @date 2019-05-05
* TODO:
* * 退款的记录增加发送财务的状态
*/
public function send_refund($item, $handpick, $old_ssje=NULL)
{
@ -1136,7 +1134,11 @@ class Index extends CI_Controller {
}
//添加邮件发送记录 end
// 如果已做账, 标记需要通知财务send-to-finance, 通知时间用订单日志记录
if ($this->Paypal_model->if_finance_exists($advisor_info->COLI_GRI_SN)===true) {
// 更新是否需要发送财务
$refund_finance_day = 20;
$now_day = date('d');
$late_entry_date_set = $now_day<$refund_finance_day ? date('Y-m-01', strtotime("-1 month")) : date('Y-m-01');
if ($this->Paypal_model->if_finance_done($advisor_info->COLI_GRI_SN, $late_entry_date_set) === true) {
$this->Note_model->update_send($item->pn_txn_id, 'send-to-finance', $item->pn_sn);
}
return ;

@ -687,4 +687,22 @@ class Paypal_model extends CI_Model {
and cgi.CGI_GRI_SN=? ";
return $this->HT->query($sql, $gri_sn)->num_rows() > 0;
}
public function if_finance_done($gri_sn, $late_date)
{
$sql = "SELECT top 1 1
from groupinfo gri
where GRI_SN=?
and GRI_EntranceDate < ?
";
// 商务订单没有生成团信息
if ($this->HT->query($sql, array($gri_sn,$late_date))->num_rows() === 0) {
$sql = "SELECT top 1 1
from BIZ_ConfirmLineInfo coli
inner join BIZ_ConfirmLineDetail cold on COLD_COLI_SN=COLI_SN and isnull(cold.DeleteFlag,0)=0
where COLI_GRI_SN=?
and COLD_StartDate<?";
return $this->HT->query($sql, array($gri_sn,$late_date))->num_rows() > 0;
}
return false;
}
}

Loading…
Cancel
Save