|
|
|
@ -221,9 +221,8 @@ class Paypal_model extends CI_Model {
|
|
|
|
|
,DeleteFlag,LastEditTime
|
|
|
|
|
) VALUES (?,?,15010,?,?,?,?,?,?,?,?,?,?,?,?,0,0,GETDATE())";
|
|
|
|
|
$query = $this->HT->query($sql, array($GAI_COLI_SN, $GAI_SQJE, $GAI_COLI_SN, $GAI_COLI_ID, $GAI_SQJE, $GAI_SQDate, $GAI_SQJECurrency, $GAI_SSJE, $GAI_SSDate, $GAI_AccountDate, $GAI_SubmitDate, $GAI_CusName, $GAI_CusEmail, $GAI_AccreditNo, $GAI_Memo,$GAI_API));
|
|
|
|
|
// $insertid = $this->HT->last_id('BIZ_GroupAccountInfo');
|
|
|
|
|
log_message('error','test:$query ' . __METHOD__ . ': ' . __LINE__ . PHP_EOL . var_export($query->num_rows(), 1));
|
|
|
|
|
return $query->num_rows() > 0;
|
|
|
|
|
$insertid = ($query && $query->num_rows() > 0) ? $this->HT->last_id('BIZ_GroupAccountInfo') : false;
|
|
|
|
|
return $insertid;
|
|
|
|
|
|
|
|
|
|
// affected_rows() doesn't work with the 'sqlsrv' driver in CI2
|
|
|
|
|
// The solution: Upgrade to the latest CodeIgniter 3.0.x version
|
|
|
|
@ -265,8 +264,8 @@ class Paypal_model extends CI_Model {
|
|
|
|
|
,DeleteFlag,LastEditTime
|
|
|
|
|
) VALUES (?,?,15002,?,?,?,?,?,?,?,?,?,?,?,?,?,0,0,GETDATE())";
|
|
|
|
|
$query = $this->HT->query($sql, array($GAI_AccreditNo, $GAI_COLI_SN, $GAI_COLI_ID, $GAI_SQJE, $GAI_SQDate, $GAI_SQJECurrency, $GAI_Money, $GAI_SSJE, $GAI_SSDate, $GAI_AccountDate, $GAI_SubmitDate, $GAI_CusName, $GAI_CusEmail, $GAI_AccreditNo, $GAI_Memo,$GAI_API));
|
|
|
|
|
$insertid = $this->HT->last_id('BIZ_GroupAccountInfo');
|
|
|
|
|
return $query;
|
|
|
|
|
$insertid = ($query && $query->num_rows() > 0) ? $this->HT->last_id('BIZ_GroupAccountInfo') : false;
|
|
|
|
|
return $insertid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//添加收款记录(传统订单)
|
|
|
|
@ -297,7 +296,8 @@ class Paypal_model extends CI_Model {
|
|
|
|
|
,DeleteFlag,LastEditTime
|
|
|
|
|
) VALUES (?,15002,?,?,?,?,?,?,?,?,?,?,?,?,0,0,GETDATE())";
|
|
|
|
|
$query = $this->HT->query($sql, array($GAI_AccreditNo, $GAI_COLI_SN, $GAI_SQJE, $GAI_SQDate, $GAI_SQJECurrency, $GAI_SSJE, $GAI_SSDate, $GAI_AccountDate, $GAI_SubmitDate, $GAI_CusName, $GAI_CusEmail, $GAI_AccreditNo, $GAI_Memo,$GAI_API));
|
|
|
|
|
$insertid = $this->HT->last_id('GroupAccountInfo');
|
|
|
|
|
$insertid = ($query && $query->num_rows() > 0) ? $this->HT->last_id('GroupAccountInfo') : false;
|
|
|
|
|
|
|
|
|
|
return $insertid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -657,13 +657,17 @@ class Paypal_model extends CI_Model {
|
|
|
|
|
return $query;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** JJH: 添加订单收款记录之后执行 */
|
|
|
|
|
public function exec_addToTask($GAI_SN)
|
|
|
|
|
/**
|
|
|
|
|
* JJH: 添加订单收款记录之后执行
|
|
|
|
|
* @OrderSourceType: 线路订单填写 227001, 商务订单填写227002
|
|
|
|
|
**/
|
|
|
|
|
public function exec_addToTask($GAI_SN, $OrderSourceType =227001)
|
|
|
|
|
{
|
|
|
|
|
if (empty($GAI_SN)) return false;
|
|
|
|
|
$sql = " if not exists (
|
|
|
|
|
select top 1 1 from Sysautotask
|
|
|
|
|
where SAT_Type=1 and SAT_SourceSN=$GAI_SN
|
|
|
|
|
) exec SP_AddToSystask 1," . $GAI_SN;
|
|
|
|
|
where SAT_Type=1 and SAT_SourceSN=$GAI_SN and SAT_OrderSourceType= $OrderSourceType
|
|
|
|
|
) exec SP_AddToSystask 1," . $GAI_SN . "," . $OrderSourceType;
|
|
|
|
|
$query = $this->HT->query($sql);
|
|
|
|
|
return $query;
|
|
|
|
|
}
|
|
|
|
@ -674,9 +678,13 @@ class Paypal_model extends CI_Model {
|
|
|
|
|
**/
|
|
|
|
|
public function exec_BIZ_TrainCostAdd($COLI_SN, $ssje)
|
|
|
|
|
{
|
|
|
|
|
$sql = " EXEC dbo.SP_BIZ_TrainCostAdd $COLI_SN, $ssje ";
|
|
|
|
|
$query = $this->HT->query($sql);
|
|
|
|
|
return $query;
|
|
|
|
|
// return false; // todo: 暂时关闭
|
|
|
|
|
log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' exec_BIZ_TrainCostAdd' . PHP_EOL . var_export(1, 1));
|
|
|
|
|
$sql = " exec SP_BIZ_TrainCostAdd $COLI_SN,$ssje ;";
|
|
|
|
|
log_message('error','test: ' . __METHOD__ . ': ' . __LINE__ . ' ' . PHP_EOL . var_export($sql, 1));
|
|
|
|
|
$this->HT->query($sql);
|
|
|
|
|
return false;
|
|
|
|
|
// return $query;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 写入商务订单操作记录 */
|
|
|
|
|