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

费用报销脚本

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