提交 deaf0f7e authored 作者: fengzy's avatar fengzy

费用报销脚本

上级 003217f9
...@@ -68,105 +68,105 @@ class flow_projectfkClassModel extends flowModel ...@@ -68,105 +68,105 @@ class flow_projectfkClassModel extends flowModel
} }
} }
var_dump($arr);
$cloudUrl = "http://36.110.39.211/k3cloud/"; // $cloudUrl = "http://36.110.39.211/k3cloud/";
//登陆参数 // //登陆参数
$data = array( // $data = array(
'5e64f6ff0bd47f',//帐套Id // '5e64f6ff0bd47f',//帐套Id
// '5ef2c166ad1afa',//帐套Id // // '5ef2c166ad1afa',//帐套Id
'Administrator',//用户名 // 'Administrator',//用户名
'666666',//密码 // '666666',//密码
'2052'//语言标识359010087 // '2052'//语言标识359010087
); // );
//定义记录Cloud服务端返回的Session // //定义记录Cloud服务端返回的Session
$cookie_jar = tempnam('/tmp','CloudSession'); // $cookie_jar = tempnam('/tmp','CloudSession');
$post_content = self::create_postdata($data); // $post_content = self::create_postdata($data);
$result = self::invoke_login($cloudUrl,$post_content,$cookie_jar); // $result = self::invoke_login($cloudUrl,$post_content,$cookie_jar);
header("Content-type: text/html; charset=utf8"); // header("Content-type: text/html; charset=utf8");
$applicant=$this->rs['applicant'];//申请人 // $applicant=$this->rs['applicant'];//申请人
$applicationdpt=$this->rs['dept'];//申请部门 // $applicationdpt=$this->rs['dept'];//申请部门
$applydt=$this->rs['applydt'];//申请日期 // $applydt=$this->rs['applydt'];//申请日期
$data_model ='{ // $data_model ='{
"Creator": "", // "Creator": "",
"NeedUpDateFields": [], // "NeedUpDateFields": [],
"NeedReturnFields": [], // "NeedReturnFields": [],
"IsDeleteEntry": "true", // "IsDeleteEntry": "true",
"SubSystemId": "", // "SubSystemId": "",
"IsVerifyBaseDataField": "false", // "IsVerifyBaseDataField": "false",
"IsEntryBatchFill": "true", // "IsEntryBatchFill": "true",
"ValidateFlag": "true", // "ValidateFlag": "true",
"NumberSearch": "true", // "NumberSearch": "true",
"InterationFlags": "", // "InterationFlags": "",
"IsAutoSubmitAndAudit": "false", // "IsAutoSubmitAndAudit": "false",
"Model": { // "Model": {
"FID": 0, // "FID": 0,
"FBillTypeID": { // "FBillTypeID": {
"FNUMBER": "FKDLX02_SYS" // "FNUMBER": "FKDLX02_SYS"
}, // },
"FDATE": "2020-08-23 00:00:00", // "FDATE": "2020-08-23 00:00:00",
"FCONTACTUNITTYPE": "BD_Supplier", // "FCONTACTUNITTYPE": "BD_Supplier",
"FCONTACTUNIT": { // "FCONTACTUNIT": {
"FNumber": "GDGYS-0004" // "FNumber": "GDGYS-0004"
}, // },
"FRECTUNITTYPE": "BD_Supplier", // "FRECTUNITTYPE": "BD_Supplier",
"FRECTUNIT": { // "FRECTUNIT": {
"FNumber": "GDGYS-0004" // "FNumber": "GDGYS-0004"
}, // },
"FDepartment": { // "FDepartment": {
"FNumber": "CQ.BM.03" // "FNumber": "CQ.BM.03"
}, // },
"FISINIT": false, // "FISINIT": false,
"FCURRENCYID": { // "FCURRENCYID": {
"FNumber": "PRE001" // "FNumber": "PRE001"
}, // },
"FEXCHANGERATE": 1.0, // "FEXCHANGERATE": 1.0,
"FEXCHANGETYPE": { // "FEXCHANGETYPE": {
"FNumber": "HLTX01_SYS" // "FNumber": "HLTX01_SYS"
}, // },
"FSETTLERATE": 1.0, // "FSETTLERATE": 1.0,
"FSETTLEORGID": { // "FSETTLEORGID": {
"FNumber": "1000" // "FNumber": "1000"
}, // },
"FDOCUMENTSTATUS": "Z", // "FDOCUMENTSTATUS": "Z",
"FCancelStatus": "A", // "FCancelStatus": "A",
"FPAYORGID": { // "FPAYORGID": {
"FNumber": "1000" // "FNumber": "1000"
}, // },
"FISSAMEORG": true, // "FISSAMEORG": true,
"FIsCredit": false, // "FIsCredit": false,
"FSETTLECUR": { // "FSETTLECUR": {
"FNUMBER": "PRE001" // "FNUMBER": "PRE001"
}, // },
"FIsWriteOff": false, // "FIsWriteOff": false,
"FREALPAY": false, // "FREALPAY": false,
"FISCARRYRATE": false, // "FISCARRYRATE": false,
"FSETTLEMAINBOOKID": { // "FSETTLEMAINBOOKID": {
"FNUMBER": "PRE001" // "FNUMBER": "PRE001"
}, // },
"FDepartment": { // "FDepartment": {
"FNumber": "" // "FNumber": ""
}, // },
"FSETTLEEXCHANGETYPE": { // "FSETTLEEXCHANGETYPE": {
"FNUMBER": "HLTX01_SYS" // "FNUMBER": "HLTX01_SYS"
}, // },
"F_PAEZ_OADJBH": "213123213" // "F_PAEZ_OADJBH": "213123213"
} // }
}'; // }';
$model=json_decode($data_model,true); // $model=json_decode($data_model,true);
$model['Model']['FDATE']=$applydt; // $model['Model']['FDATE']=$applydt;
$model['Model']['FCONTACTUNIT']['FNumber']=$supplier['number']; // $model['Model']['FCONTACTUNIT']['FNumber']=$supplier['number'];
$model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum']; // $model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum'];
$model['Model']['FRECTUNIT']['FNumber']=$supplier['number']; // $model['Model']['FRECTUNIT']['FNumber']=$supplier['number'];
$model['Model']['FPAYBILLENTRY']=$arr['FPAYBILLENTRY']; // $model['Model']['FPAYBILLENTRY']=$arr['FPAYBILLENTRY'];
$model['Model']['FDepartment']['FNumber']=self::deptname($applicationdpt); // $model['Model']['FDepartment']['FNumber']=self::deptname($applicationdpt);
$data_model=json_encode($model); // $data_model=json_encode($model);
var_dump($data_model);
// $data = array( // $data = array(
// 'AP_PAYBILL',//业务对象标识FormId // 'AP_PAYBILL',//业务对象标识FormId
// $data_model//具体Json字串 // $data_model//具体Json字串
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论