ipaylinks 自动更新付款记录测试: 记录日志, 不更新纪录

feature/trippest
lyt 8 years ago
parent 23e0470ce4
commit b39652478f

@ -12,7 +12,7 @@ $file_list = array_values(array_diff($sftp->nlist($target_folder), array(".","..
// target local
$target_local = "statement_files" . $target_folder;
if ( ! is_dir($target_local)) {
mkdir($target_local, 0777);
mkdir($target_local, 0777, true);
}
// local files
$local_files = array_values(array_diff(scandir($target_local), array('.', '..')));

@ -1112,12 +1112,13 @@ class IPayLinksService extends CI_Controller
$warrant["PW_GAI_SSJE_pre"] = $old_info[0]->GAI_SSJE;
$warrant["PW_orderType"] = $orderid_info->ordertype;
$this->Note_model->new_warrant($warrant);
// 2018.02.05 暂不更新付款记录, 测试观察一段
if (strcasecmp($orderid_info->ordertype, "B") === 0) {
$this->IPayLinks_model
->update_money_b($entry_sum_RMB, trim($settle['pn_invoice']));
// $this->IPayLinks_model
// ->update_money_b($entry_sum_RMB, trim($settle['pn_invoice']));
} else if (strcasecmp($orderid_info->ordertype, "T") === 0){
$this->IPayLinks_model
->update_money_t($entry_sum_RMB, trim($settle['pn_invoice']));
// $this->IPayLinks_model
// ->update_money_t($entry_sum_RMB, trim($settle['pn_invoice']));
}
$warrant = NULL;
$update_cnt++;
@ -1125,7 +1126,10 @@ class IPayLinksService extends CI_Controller
$settlement_record = null; // reset
$settle_cnt++;
}
echo "Found $settle_cnt Excels; Updated $update_cnt records;";
$result = "auto_update_statement result: " . date('Y-m-d H:i:s') . " ------ \r\n";
$result .= "Found $settle_cnt Excels; Updated $update_cnt records;";
log_message('error', $result);
echo $result;
return;
}
@ -1152,6 +1156,7 @@ class IPayLinksService extends CI_Controller
/**取得一共有多少行*/
$allRow = $currentSheet->getHighestRow();
$col_titles = $this->col_title();
/**从第二行开始输出因为excel表中第一行为列名*/
for($currentRow = 2;$currentRow <= $allRow;$currentRow++){
$row_tmp = array();
@ -1159,7 +1164,7 @@ class IPayLinksService extends CI_Controller
for($currentColumn= 'A';$currentColumn<= $allColumn; $currentColumn++){
/**ord()将字符转为十进制数*/
$val = $currentSheet->getCellByColumnAndRow(ord($currentColumn) - 65,$currentRow)->getValue();
$col_mean = $this->col_title()[$currentColumn];
$col_mean = $col_titles[$currentColumn];
if($col_mean == 'data_type' && strcasecmp('清算', $val) !== 0)
{
break;

@ -311,7 +311,7 @@ class IPayLinks_model extends CI_Model {
public function get_money_t($pn_invoice) {
$sql = "SELECT GroupAccountInfo.*
from GroupAccountInfo
where GAI_AccreditNo=?
where GAI_Type='15018' and GAI_AccreditNo=?
";
$query = $this->HT->query($sql, array($pn_invoice));
$result = $query->result();
@ -321,7 +321,7 @@ class IPayLinks_model extends CI_Model {
public function get_money_b($pn_invoice) {
$sql = "SELECT BIZ_GroupAccountInfo.*
from BIZ_GroupAccountInfo
where GAI_AccreditNo=?
where GAI_Type='15018' and GAI_AccreditNo=?
";
$query = $this->HT->query($sql, array($pn_invoice));
$result = $query->result();
@ -330,13 +330,13 @@ class IPayLinks_model extends CI_Model {
// 根据对账单更新实收金额(传统订单)
public function update_money_t($entry_sum_RMB, $pn_invoice)
{
$sql = "UPDATE GroupAccountInfo SET GAI_SSJE=? WHERE GAI_AccreditNo=?";
$sql = "UPDATE GroupAccountInfo SET GAI_SSJE=? WHERE GAI_Type='15018' and GAI_AccreditNo=?";
$query = $this->HT->query($sql, array($entry_sum_RMB, $pn_invoice));
return $query;
}
// 根据对账单更新实收金额(商务订单)
public function update_money_b($entry_sum_RMB, $pn_invoice) {
$sql = "UPDATE BIZ_GroupAccountInfo SET GAI_SSJE=? WHERE GAI_AccreditNo=?";
$sql = "UPDATE BIZ_GroupAccountInfo SET GAI_SSJE=? WHERE GAI_Type='15018' and GAI_AccreditNo=?";
$query = $this->HT->query($sql, array($entry_sum_RMB, $pn_invoice));
return $query;
}

Loading…
Cancel
Save