提交 2f5f763b authored 作者: fengzy's avatar fengzy

oa付款单

上级 ff13b4dd
......@@ -222,6 +222,7 @@ class flow_oafkClassModel extends flowModel
$cookie_jar = tempnam('/tmp', 'CloudSession');
$post_content = self::create_postdata($data);
$result = self::invoke_login($cloudUrl, $post_content, $cookie_jar);
header("Content-type: text/html; charset=utf8");
$starttime = microtime(true);
$applicant = $this->rs['applicant'];//申请人
......@@ -279,65 +280,65 @@ class flow_oafkClassModel extends flowModel
}
}
}
$data_model = '{
"Creator": "",
"NeedUpDateFields": [],
"NeedReturnFields": [],
"IsDeleteEntry": "true",
"SubSystemId": "",
"IsVerifyBaseDataField": "false",
"IsEntryBatchFill": "true",
"ValidateFlag": "true",
"NumberSearch": "true",
"InterationFlags": "",
"IsAutoSubmitAndAudit": "false",
"Model": {
"FID": 0,
"FBillTypeID": {
"FNUMBER": "FKDLX06_SYS"
},
"FDATE": "2020-07-02 00:00:00",
"FCONTACTUNITTYPE": "BD_Supplier",
"FCONTACTUNIT": {
"FNumber": "GDGYS-0001"
},
"FRECTUNITTYPE": "BD_Supplier",
"FRECTUNIT": {
"FNumber": "GDGYS-0001"
},
"FISINIT": false,
"FCURRENCYID": {
"FNumber": "PRE001"
},
"FEXCHANGERATE": 1.0,
"FSETTLERATE": 1.0,
"FSETTLEORGID": {
"FNumber": "1000"
},
"FDOCUMENTSTATUS": "Z",
"FCancelStatus": "A",
"FPAYORGID": {
"FNumber": "1000"
},
"FISSAMEORG": true,
"FIsCredit": false,
"FSETTLECUR": {
"FNUMBER": "PRE001"
},
"FIsWriteOff": false,
"FREALPAY": false,
"FREMARK": "211111112121",
"FISCARRYRATE": false,
"FSETTLEMAINBOOKID": {
"FNUMBER": "PRE001"
},
"F_PAEZ_Cbzx1": {
"FNUMBER": "CBZX000022"
},
"F_PAEZ_OADJBH": "321123213213"
}
}';
$data_model = '{
"Creator": "",
"NeedUpDateFields": [],
"NeedReturnFields": [],
"IsDeleteEntry": "true",
"SubSystemId": "",
"IsVerifyBaseDataField": "false",
"IsEntryBatchFill": "true",
"ValidateFlag": "true",
"NumberSearch": "true",
"InterationFlags": "",
"IsAutoSubmitAndAudit": "false",
"Model": {
"FID": 0,
"FBillTypeID": {
"FNUMBER": "FKDLX06_SYS"
},
"FDATE": "2020-07-02 00:00:00",
"FCONTACTUNITTYPE": "BD_Supplier",
"FCONTACTUNIT": {
"FNumber": "GDGYS-0001"
},
"FRECTUNITTYPE": "BD_Supplier",
"FRECTUNIT": {
"FNumber": "GDGYS-0001"
},
"FISINIT": false,
"FCURRENCYID": {
"FNumber": "PRE001"
},
"FEXCHANGERATE": 1.0,
"FSETTLERATE": 1.0,
"FSETTLEORGID": {
"FNumber": "1000"
},
"FDOCUMENTSTATUS": "Z",
"FCancelStatus": "A",
"FPAYORGID": {
"FNumber": "1000"
},
"FISSAMEORG": true,
"FIsCredit": false,
"FSETTLECUR": {
"FNUMBER": "PRE001"
},
"FIsWriteOff": false,
"FREALPAY": false,
"FREMARK": "211111112121",
"FISCARRYRATE": false,
"FSETTLEMAINBOOKID": {
"FNUMBER": "PRE001"
},
"F_PAEZ_Cbzx1": {
"FNUMBER": "CBZX000022"
},
"F_PAEZ_OADJBH": "321123213213"
}
}';
......@@ -364,43 +365,63 @@ class flow_oafkClassModel extends flowModel
var_dump($array);
if ($array['Result']['ResponseStatus']['IsSuccess']) {
$log='付款单单据编号:'.$this->rs['docnum'];
$erp_log=array(
'type' => '保存成功',
'remark' => $log,
'sericnum'=> $this->rs['docnum'],
'table'=>'c_fininfom_oafk',
'name' => '保存成功',
'remark' => $array,
'optdt' =>date("Y-m-d H:i:s"),
'level'=>1,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>1,
);
m('log_erp')->insert($erp_log);
$num = $array['Result']['Number'];
$this->update("`fbillno`='$num'", $this->rs['id']);
if($this->supplier_submit($cloudUrl, $cookie_jar, $array['Result']['Id'], $array['Result']['Number'])){
$log='付款单单据编号:'.$this->rs['docnum'];
$erp_log=array(
'type' => '提交成功',
'remark' => $log,
'sericnum'=> $this->rs['docnum'],
'table'=>'c_fininfom_oafk',
'name' => '提交成功',
'remark' => $array,
'optdt' =>date("Y-m-d H:i:s"),
'level'=>1,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>1,
);
m('log_erp')->insert($erp_log);
}else{
$log='付款单单据编号:'.$this->rs['docnum'];
$erp_log=array(
'type' => '提交失败',
'remark' => $log,
$erp_log=array(
'sericnum'=> $this->rs['docnum'],
'table'=>'c_fininfom_oafk',
'name' => '提交失败',
'remark' => $array,
'optdt' =>date("Y-m-d H:i:s"),
'level'=>2,
'level'=>1,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>1,
);
m('log_erp')->insert($erp_log);
}
}else{
$log='付款单单据编号:'.$this->rs['docnum'];
$erp_log=array(
'type' => '保存失败',
'remark' => $log,
$erp_log=array(
'sericnum'=> $this->rs['docnum'],
'table'=>'c_fininfom_oafk',
'name' => '保存失败',
'remark' => $array,
'optdt' =>date("Y-m-d H:i:s"),
'level'=>2,
'level'=>1,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>1,
);
m('log_erp')->insert($erp_log);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论