|
|
|
@ -112,6 +112,8 @@ class AggregateFinanceSetController extends Controller {
|
|
|
|
|
];
|
|
|
|
|
$dataurl .= $this->apihost."&".http_build_query($arr);
|
|
|
|
|
$html = file_get_contents($dataurl);
|
|
|
|
|
// echo $dataurl;die();
|
|
|
|
|
sleep(5);
|
|
|
|
|
$rsp = json_decode($html,true);
|
|
|
|
|
if($rsp['code'] != 1){
|
|
|
|
|
echo $rsp['error'].PHP_EOL;die;
|
|
|
|
@ -135,8 +137,20 @@ class AggregateFinanceSetController extends Controller {
|
|
|
|
|
$v['create_time'] = time();
|
|
|
|
|
$v['admin_name'] = "system";
|
|
|
|
|
$v['admin_id'] = 0;
|
|
|
|
|
$v['second_party_info'] = json_encode([
|
|
|
|
|
"partner"=>$v['channel_name']
|
|
|
|
|
$v['second_party_info'] =
|
|
|
|
|
json_encode([
|
|
|
|
|
"partner"=>$v['channel_name'],
|
|
|
|
|
"invoice_type"=>$v['invoice_type'],
|
|
|
|
|
"invoice_item"=>$v['invoice_item'],
|
|
|
|
|
"company_tax_no"=>$v['tax_identification_number'],
|
|
|
|
|
"link_man"=>$v['connection_person'],
|
|
|
|
|
"link_phone"=>$v['phone'],
|
|
|
|
|
"address"=>$v['send_address'],
|
|
|
|
|
"register_address"=>$v['register_address'],
|
|
|
|
|
"register_phone"=>$v['register_phone'],
|
|
|
|
|
"payee_name"=>$v['bank_user'],
|
|
|
|
|
"bank_account"=>$v['bank_card'],
|
|
|
|
|
"opening_bank"=>$v['bank_name'],
|
|
|
|
|
],JSON_UNESCAPED_UNICODE);
|
|
|
|
|
$Aggregate->add($v);
|
|
|
|
|
}
|
|
|
|
@ -193,12 +207,48 @@ class AggregateFinanceSetController extends Controller {
|
|
|
|
|
$v['admin_id'] = $_SESSION['onethink_admin']['user_auth']['uid'];
|
|
|
|
|
$v['verify_status'] = 0;
|
|
|
|
|
|
|
|
|
|
$first_party_info = json_decode($info['first_party_info'], 1);
|
|
|
|
|
if($first_party_info['partner'] == $info['channel_name']){
|
|
|
|
|
$v['second_party_info'] = $info['first_party_info'];
|
|
|
|
|
$v['first_party_info'] = $info['second_party_info'];
|
|
|
|
|
// $first_party_info = json_decode($info['first_party_info'], 1);
|
|
|
|
|
// if($first_party_info['partner'] == $info['channel_name']){
|
|
|
|
|
|
|
|
|
|
$v['second_party_info'] =
|
|
|
|
|
json_encode([
|
|
|
|
|
"partner"=>$v['channel_name'],
|
|
|
|
|
"invoice_type"=>$v['invoice_type'],
|
|
|
|
|
"invoice_item"=>$v['invoice_item'],
|
|
|
|
|
"company_tax_no"=>$v['tax_identification_number'],
|
|
|
|
|
"link_man"=>$v['connection_person'],
|
|
|
|
|
"link_phone"=>$v['phone'],
|
|
|
|
|
"address"=>$v['send_address'],
|
|
|
|
|
"register_address"=>$v['register_address'],
|
|
|
|
|
"register_phone"=>$v['register_phone'],
|
|
|
|
|
"payee_name"=>$v['bank_user'],
|
|
|
|
|
"bank_account"=>$v['bank_card'],
|
|
|
|
|
"opening_bank"=>$v['bank_name'],
|
|
|
|
|
],JSON_UNESCAPED_UNICODE);
|
|
|
|
|
|
|
|
|
|
$v['first_party_info'] = '';
|
|
|
|
|
|
|
|
|
|
$v['pay_type'] =0;
|
|
|
|
|
}
|
|
|
|
|
// } else {
|
|
|
|
|
// $v['second_party_info'] =
|
|
|
|
|
// json_encode([
|
|
|
|
|
// "partner"=>$v['channel_name'],
|
|
|
|
|
// "invoice_type"=>$v['invoice_type'],
|
|
|
|
|
// "invoice_item"=>$v['invoice_item'],
|
|
|
|
|
// "company_tax_no"=>$v['tax_identification_number'],
|
|
|
|
|
// "link_man"=>$v['connection_person'],
|
|
|
|
|
// "link_phone"=>$v['phone'],
|
|
|
|
|
// "address"=>$v['send_address'],
|
|
|
|
|
// "register_address"=>$v['register_address'],
|
|
|
|
|
// "register_phone"=>$v['register_phone'],
|
|
|
|
|
// "payee_name"=>$v['bank_user'],
|
|
|
|
|
// "bank_account"=>$v['bank_card'],
|
|
|
|
|
// "opening_bank"=>$v['bank_name'],
|
|
|
|
|
// ],JSON_UNESCAPED_UNICODE);
|
|
|
|
|
//
|
|
|
|
|
// $v['pay_type'] =1;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$res = $Aggregate->where("id='{$id}'")->save($v);
|
|
|
|
|
if(empty($res)){
|
|
|
|
@ -220,6 +270,7 @@ class AggregateFinanceSetController extends Controller {
|
|
|
|
|
if($first_party_info['partner'] == $info['channel_name']){
|
|
|
|
|
$savedata['second_party_info'] = $info['first_party_info'];
|
|
|
|
|
$savedata['first_party_info'] = $info['second_party_info'];
|
|
|
|
|
|
|
|
|
|
$savedata['pay_type'] =0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|