Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
OA
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
OA
Commits
d9adb49c
提交
d9adb49c
authored
7月 05, 2020
作者:
fengzy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
oa付款单
上级
422f3656
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
262 行增加
和
261 行删除
+262
-261
finfybxModel.php
webmain/model/flow/finfybxModel.php
+262
-261
没有找到文件。
webmain/model/flow/finfybxModel.php
浏览文件 @
d9adb49c
...
@@ -152,267 +152,268 @@ class flow_finfybxClassModel extends flowModel
...
@@ -152,267 +152,268 @@ class flow_finfybxClassModel extends flowModel
// $id=$this->rs['id'];
$id
=
$this
->
rs
[
'id'
];
// $sql = " mid ='$id' and `table`='fininfom' ";
$sql
=
" mid ='
$id
' and `table`='fininfom' "
;
// $flow_bill = m('flow_bill')->getone($sql,'allcheckid');
$flow_bill
=
m
(
'flow_bill'
)
->
getone
(
$sql
,
'allcheckid'
);
// $option = m('option')->getall('pid = 1568','num,name,value,sort');
$option
=
m
(
'option'
)
->
getall
(
'pid = 1568'
,
'num,name,value,sort'
);
// foreach ($option as $key => $value) {
foreach
(
$option
as
$key
=>
$value
)
{
// if(in_array($value['value'], $allcheckid)){
if
(
in_array
(
$value
[
'value'
],
$allcheckid
)){
// $checkid= $value['value'];
$checkid
=
$value
[
'value'
];
// $explain= $value['explain'];
$explain
=
$value
[
'explain'
];
// break;
break
;
// }
}
// //查询流程为财务确认
}
// $flowid = $this->getflow();
//查询流程为财务确认
$flowid
=
$this
->
getflow
();
// if($flowid['nowcheckid']==$checkid && $flowid['nowcourseid']==$explain){
if
(
$flowid
[
'nowcheckid'
]
==
$checkid
&&
$flowid
[
'nowcourseid'
]
==
$explain
){
// $data=$this->db->getone('oa_personfile',"name='".$this->rs['applicant']."'");
// $gonncode=$data['gonncode'];
$data
=
$this
->
db
->
getone
(
'oa_personfile'
,
"name='"
.
$this
->
rs
[
'applicant'
]
.
"'"
);
// // $data['pfbanknum'];//对方银行卡号
$gonncode
=
$data
[
'gonncode'
];
// // $data['gonncode'];//员工编号
// $data['pfbanknum'];//对方银行卡号
// $data['gonncode'];//员工编号
// //明细
// $oa_fininfos=$this->db->getrows('oa_fininfos',"mid='".$this->rs['id']."'");
//明细
$oa_fininfos
=
$this
->
db
->
getrows
(
'oa_fininfos'
,
"mid='"
.
$this
->
rs
[
'id'
]
.
"'"
);
// $arr=[];
// foreach ($oa_fininfos as $k=> $value) {
$arr
=
[];
// foreach ($value as $key => $val) {
foreach
(
$oa_fininfos
as
$k
=>
$value
)
{
// switch ($key) {
foreach
(
$value
as
$key
=>
$val
)
{
// case 'bxType':
switch
(
$key
)
{
case
'bxType'
:
// $arr['FPAYAPPLYENTRY'][$k]['FCOSTID']['FNUMBER']=self::getbxlx($val);
$arr
[
'FPAYAPPLYENTRY'
][
$k
][
'FCOSTID'
][
'FNUMBER'
]
=
self
::
getbxlx
(
$val
);
// break;
// case 'money':
break
;
case
'money'
:
// $arr['FPAYAPPLYENTRY'][$k]['FAPPLYAMOUNTFOR']=$val;
$arr
[
'FPAYAPPLYENTRY'
][
$k
][
'FAPPLYAMOUNTFOR'
]
=
$val
;
// break;
// case 'sm':
break
;
case
'sm'
:
// $arr['FPAYAPPLYENTRY'][$k]['FDescription']=$val;
// break;
$arr
[
'FPAYAPPLYENTRY'
][
$k
][
'FDescription'
]
=
$val
;
// default:
break
;
// $arr['FPAYAPPLYENTRY'][$k]['FSETTLETYPEID']['FNumber']='JSFS04_SYS';
default
:
// $arr['FPAYAPPLYENTRY'][$k]['FPAYPURPOSEID']['FNumber']='SFKYT10_SYS';
$arr
[
'FPAYAPPLYENTRY'
][
$k
][
'FSETTLETYPEID'
][
'FNumber'
]
=
'JSFS04_SYS'
;
// $arr['FPAYAPPLYENTRY'][$k]['FENDDATE']=$this->rs['applydt'].' 00:00:00';
$arr
[
'FPAYAPPLYENTRY'
][
$k
][
'FPAYPURPOSEID'
][
'FNumber'
]
=
'SFKYT10_SYS'
;
// $arr['FPAYAPPLYENTRY'][$k]['FEXPECTPAYDATE']=$this->rs['applydt'].' 00:00:00';
$arr
[
'FPAYAPPLYENTRY'
][
$k
][
'FENDDATE'
]
=
$this
->
rs
[
'applydt'
]
.
' 00:00:00'
;
// $arr['FPAYAPPLYENTRY'][$k]['FEACHBANKACCOUNT']=$data['pfbanknum'];
$arr
[
'FPAYAPPLYENTRY'
][
$k
][
'FEXPECTPAYDATE'
]
=
$this
->
rs
[
'applydt'
]
.
' 00:00:00'
;
$arr
[
'FPAYAPPLYENTRY'
][
$k
][
'FEACHBANKACCOUNT'
]
=
$data
[
'pfbanknum'
];
// break;
// }
break
;
// }
}
// }
}
}
// $cloudUrl = "http://36.110.39.211/k3cloud/";
// //登陆参数
$cloudUrl
=
"http://36.110.39.211/k3cloud/"
;
// $data = array(
//登陆参数
// '5ef2c166ad1afa',//帐套Id
$data
=
array
(
// 'Administrator',//用户名
'5ef2c166ad1afa'
,
//帐套Id
// '666666',//密码
'Administrator'
,
//用户名
// '2052'//语言标识359010087
'666666'
,
//密码
// );
'2052'
//语言标识359010087
// //定义记录Cloud服务端返回的Session
);
// $cookie_jar = tempnam('/tmp','CloudSession');
//定义记录Cloud服务端返回的Session
// $post_content = self::create_postdata($data);
$cookie_jar
=
tempnam
(
'/tmp'
,
'CloudSession'
);
// $result = self::invoke_login($cloudUrl,$post_content,$cookie_jar);
$post_content
=
self
::
create_postdata
(
$data
);
// header("Content-type: text/html; charset=utf8");
$result
=
self
::
invoke_login
(
$cloudUrl
,
$post_content
,
$cookie_jar
);
// $starttime = microtime(true);
header
(
"Content-type: text/html; charset=utf8"
);
// $applicant=$this->rs['applicant'];//申请人
$starttime
=
microtime
(
true
);
// $applicationdpt=$this->rs['applicationdpt'];//申请部门
$applicant
=
$this
->
rs
[
'applicant'
];
//申请人
// $applydt=$this->rs['applydt'];//申请日期
$applicationdpt
=
$this
->
rs
[
'applicationdpt'
];
//申请部门
// $cbxmid=$this->rs['cbxmid'];//成本中心
$applydt
=
$this
->
rs
[
'applydt'
];
//申请日期
$cbxmid
=
$this
->
rs
[
'cbxmid'
];
//成本中心
// $cbxmid=substr($cbxmid,0,strpos($cbxmid, "("));
$cbxmid
=
substr
(
$cbxmid
,
0
,
strpos
(
$cbxmid
,
"("
));
// $money=$this->rs['money'];//合计金额
// // $applydt=$this->rs['applydt'];//发票日期
$money
=
$this
->
rs
[
'money'
];
//合计金额
// // $company_scale=$this->rs['company_scale'];//发票类型
// $applydt=$this->rs['applydt'];//发票日期
// // $web_site=$this->rs['web_site'];//发票号
// $company_scale=$this->rs['company_scale'];//发票类型
// // $settle_type=$this->rs['settle_type'];//费用科目
// $web_site=$this->rs['web_site'];//发票号
// // $pay_condition=$this->rs['pay_condition'];// 金额
// $settle_type=$this->rs['settle_type'];//费用科目
// // $tend_type=$this->rs['tend_type'];// *说明
// $pay_condition=$this->rs['pay_condition'];// 金额
// $tend_type=$this->rs['tend_type'];// *说明
// $data_model ='{
// "Creator": "",
$data_model
=
'{
// "NeedUpDateFields": [],
"Creator": "",
// "NeedReturnFields": [],
"NeedUpDateFields": [],
// "IsDeleteEntry": "true",
"NeedReturnFields": [],
// "SubSystemId": "",
"IsDeleteEntry": "true",
// "IsVerifyBaseDataField": "false",
"SubSystemId": "",
// "IsEntryBatchFill": "true",
"IsVerifyBaseDataField": "false",
// "ValidateFlag": "true",
"IsEntryBatchFill": "true",
// "NumberSearch": "true",
"ValidateFlag": "true",
// "InterationFlags": "",
"NumberSearch": "true",
// "IsAutoSubmitAndAudit": "false",
"InterationFlags": "",
// "Model": {
"IsAutoSubmitAndAudit": "false",
// "FID": 0,
"Model": {
// "FBILLTYPEID": {
"FID": 0,
// "FNUMBER": "FKSQ005_SYS"
"FBILLTYPEID": {
// },
"FNUMBER": "FKSQ005_SYS"
// "FDATE": "2020-02-11 00:00:00",
},
// "FCONTACTUNITTYPE": "BD_Empinfo",
"FDATE": "2020-02-11 00:00:00",
// "FCONTACTUNIT": {
"FCONTACTUNITTYPE": "BD_Empinfo",
// "FNumber": "GONN-0002"
"FCONTACTUNIT": {
// },
"FNumber": "GONN-0002"
// "FRECTUNITTYPE": "BD_Empinfo",
},
// "FRECTUNIT": {
"FRECTUNITTYPE": "BD_Empinfo",
// "FNumber": "GONN-0002"
"FRECTUNIT": {
// },
"FNumber": "GONN-0002"
// "FCURRENCYID": {
},
// "FNumber": "PRE001"
"FCURRENCYID": {
// },
"FNumber": "PRE001"
// "FPAYORGID": {
},
// "FNumber": "1000"
"FPAYORGID": {
// },
"FNumber": "1000"
// "FSETTLEORGID": {
},
// "FNumber": "1000"
"FSETTLEORGID": {
// },
"FNumber": "1000"
// "FDEPARTMENT": {
},
// "FNumber": ""
"FDEPARTMENT": {
// },
"FNumber": ""
// "F_PAEZ_OADJBH": "123321",
},
// "FDOCUMENTSTATUS": "Z",
"F_PAEZ_OADJBH": "123321",
// "FCANCELSTATUS": "A",
"FDOCUMENTSTATUS": "Z",
// "FMAINBOOKID": {
"FCANCELSTATUS": "A",
// "FNUMBER": "PRE001"
"FMAINBOOKID": {
// },
"FNUMBER": "PRE001"
// "FIsCredit": false,
},
// "FAPPLYORGID": {
"FIsCredit": false,
// "FNumber": "1000"
"FAPPLYORGID": {
// },
"FNumber": "1000"
// "FSETTLECUR": {
},
// "FNUMBER": "PRE001"
"FSETTLECUR": {
// },
"FNUMBER": "PRE001"
// "FISCARRYRATE": false,
},
// "F_PAEZ_Cbzx": {
"FISCARRYRATE": false,
// "FNUMBER": " GS.BJ.B1"
"F_PAEZ_Cbzx": {
// }
"FNUMBER": " GS.BJ.B1"
}
// }
// }';
}
// $model=json_decode($data_model,true);
}'
;
$model
=
json_decode
(
$data_model
,
true
);
// $model['Model']['F_PAEZ_Cbzx']['FNUMBER']=$cbxmid;
// $model['Model']['FDATE']=$applydt;
$model
[
'Model'
][
'F_PAEZ_Cbzx'
][
'FNUMBER'
]
=
$cbxmid
;
// $model['Model']['FCONTACTUNIT']['FNumber']=$gonncode;
$model
[
'Model'
][
'FDATE'
]
=
$applydt
;
// $model['Model']['F_PAEZ_OADJBH']=$this->rs['docnum'];;
$model
[
'Model'
][
'FCONTACTUNIT'
][
'FNumber'
]
=
$gonncode
;
// $model['Model']['FRECTUNIT']['FNumber']=$gonncode;
$model
[
'Model'
][
'F_PAEZ_OADJBH'
]
=
$this
->
rs
[
'docnum'
];;
// $model['Model']['FPAYAPPLYENTRY']=$arr['FPAYAPPLYENTRY'];
$model
[
'Model'
][
'FRECTUNIT'
][
'FNumber'
]
=
$gonncode
;
$model
[
'Model'
][
'FPAYAPPLYENTRY'
]
=
$arr
[
'FPAYAPPLYENTRY'
];
// $data_model=json_encode($model);
// $data = array(
$data_model
=
json_encode
(
$model
);
// 'CN_PAYAPPLY',//业务对象标识FormId
$data
=
array
(
// $data_model//具体Json字串
'CN_PAYAPPLY'
,
//业务对象标识FormId
// );
$data_model
//具体Json字串
);
// $post_content = self::create_postdata($data);
// $result = self::invoke_add($cloudUrl,$post_content,$cookie_jar);
$post_content
=
self
::
create_postdata
(
$data
);
// $array = json_decode($result,true);
$result
=
self
::
invoke_add
(
$cloudUrl
,
$post_content
,
$cookie_jar
);
// var_dump($array);
$array
=
json_decode
(
$result
,
true
);
// if($array['Result']['ResponseStatus']['IsSuccess']){
var_dump
(
$array
);
// $num=$array['Result']['Number'];
if
(
$array
[
'Result'
][
'ResponseStatus'
][
'IsSuccess'
]){
// $this->update("`fbillno`='$num'", $this->rs['id']);
$num
=
$array
[
'Result'
][
'Number'
];
$this
->
update
(
"`fbillno`='
$num
'"
,
$this
->
rs
[
'id'
]);
// $erp_log=array(
// 'sericnum'=> $this->rs['docnum'],
$erp_log
=
array
(
// 'table'=>'fininfom',
'sericnum'
=>
$this
->
rs
[
'docnum'
],
// 'name' => '保存成功',
'table'
=>
'fininfom'
,
// 'remark' => json_encode($array),
'name'
=>
'保存成功'
,
// 'optdt' =>date("Y-m-d H:i:s"),
'remark'
=>
json_encode
(
$array
),
// 'level'=>2,
'optdt'
=>
date
(
"Y-m-d H:i:s"
),
// 'fbillno'=>$num,
'level'
=>
2
,
// 'fbillnoid'=>$array['Result']['Id'],
'fbillno'
=>
$num
,
// 'fbillno_type'=>1,
'fbillnoid'
=>
$array
[
'Result'
][
'Id'
],
'fbillno_type'
=>
1
,
// );
// m('log_erp')->insert($erp_log);
);
m
(
'log_erp'
)
->
insert
(
$erp_log
);
// if($this->supplier_submit($cloudUrl,$cookie_jar,$array['Result']['Id'],$array['Result']['Number'])){
// $erp_log=array(
if
(
$this
->
supplier_submit
(
$cloudUrl
,
$cookie_jar
,
$array
[
'Result'
][
'Id'
],
$array
[
'Result'
][
'Number'
])){
// 'sericnum'=> $this->rs['docnum'],
$erp_log
=
array
(
// 'table'=>'fininfom',
'sericnum'
=>
$this
->
rs
[
'docnum'
],
// 'name' => '提交成功',
'table'
=>
'fininfom'
,
// 'remark' => json_encode($array),
'name'
=>
'提交成功'
,
// 'optdt' =>date("Y-m-d H:i:s"),
'remark'
=>
json_encode
(
$array
),
// 'level'=>2,
'optdt'
=>
date
(
"Y-m-d H:i:s"
),
// 'fbillno'=>$num,
'level'
=>
2
,
// 'fbillnoid'=>$array['Result']['Id'],
'fbillno'
=>
$num
,
// 'fbillno_type'=>2,
'fbillnoid'
=>
$array
[
'Result'
][
'Id'
],
// );
'fbillno_type'
=>
2
,
// m('log_erp')->insert($erp_log);
);
// }else{
m
(
'log_erp'
)
->
insert
(
$erp_log
);
// $erp_log=array(
}
else
{
// 'sericnum'=> $this->rs['docnum'],
$erp_log
=
array
(
// 'table'=>'fininfom',
'sericnum'
=>
$this
->
rs
[
'docnum'
],
// 'name' => '提交失败',
'table'
=>
'fininfom'
,
// 'remark' => json_encode($array),
'name'
=>
'提交失败'
,
// 'optdt' =>date("Y-m-d H:i:s"),
'remark'
=>
json_encode
(
$array
),
// 'level'=>1,
'optdt'
=>
date
(
"Y-m-d H:i:s"
),
// 'fbillno'=>$num,
'level'
=>
1
,
// 'fbillnoid'=>$array['Result']['Id'],
'fbillno'
=>
$num
,
// 'fbillno_type'=>2,
'fbillnoid'
=>
$array
[
'Result'
][
'Id'
],
'fbillno_type'
=>
2
,
// );
// m('log_erp')->insert($erp_log);
);
// }
m
(
'log_erp'
)
->
insert
(
$erp_log
);
// if($this->supplier_audit($cloudUrl,$cookie_jar,$array['Result']['Id'],$array['Result']['Number'])){
}
// $erp_log=array(
if
(
$this
->
supplier_audit
(
$cloudUrl
,
$cookie_jar
,
$array
[
'Result'
][
'Id'
],
$array
[
'Result'
][
'Number'
])){
// 'sericnum'=> $this->rs['docnum'],
$erp_log
=
array
(
// 'table'=>'fininfom',
'sericnum'
=>
$this
->
rs
[
'docnum'
],
// 'name' => '审核成功',
'table'
=>
'fininfom'
,
// 'remark' => json_encode($array),
'name'
=>
'审核成功'
,
// 'optdt' =>date("Y-m-d H:i:s"),
'remark'
=>
json_encode
(
$array
),
// 'level'=>2,
'optdt'
=>
date
(
"Y-m-d H:i:s"
),
// 'fbillno'=>$num,
'level'
=>
2
,
// 'fbillnoid'=>$array['Result']['Id'],
'fbillno'
=>
$num
,
// 'fbillno_type'=>3,
'fbillnoid'
=>
$array
[
'Result'
][
'Id'
],
'fbillno_type'
=>
3
,
// );
// m('log_erp')->insert($erp_log);
);
// }else{
m
(
'log_erp'
)
->
insert
(
$erp_log
);
// $erp_log=array(
}
else
{
// 'sericnum'=> $this->rs['docnum'],
$erp_log
=
array
(
// 'table'=>'fininfom',
'sericnum'
=>
$this
->
rs
[
'docnum'
],
// 'name' => '审核失败',
'table'
=>
'fininfom'
,
// 'remark' => json_encode($array),
'name'
=>
'审核失败'
,
// 'optdt' =>date("Y-m-d H:i:s"),
'remark'
=>
json_encode
(
$array
),
// 'level'=>1,
'optdt'
=>
date
(
"Y-m-d H:i:s"
),
// 'fbillno'=>$num,
'level'
=>
1
,
// 'fbillnoid'=>$array['Result']['Id'],
'fbillno'
=>
$num
,
// 'fbillno_type'=>3,
'fbillnoid'
=>
$array
[
'Result'
][
'Id'
],
'fbillno_type'
=>
3
,
// );
// m('log_erp')->insert($erp_log);
);
// }
m
(
'log_erp'
)
->
insert
(
$erp_log
);
}
// }else{
// $erp_log=array(
}
else
{
// 'sericnum'=> $this->rs['docnum'],
$erp_log
=
array
(
// 'table'=>'fininfom',
'sericnum'
=>
$this
->
rs
[
'docnum'
],
// 'name' => '保存失败',
'table'
=>
'fininfom'
,
// 'remark' => json_encode($array),
'name'
=>
'保存失败'
,
// 'optdt' =>date("Y-m-d H:i:s"),
'remark'
=>
json_encode
(
$array
),
// 'level'=>1,
'optdt'
=>
date
(
"Y-m-d H:i:s"
),
// 'fbillno'=>$num,
'level'
=>
1
,
// 'fbillnoid'=>$array['Result']['Id'],
'fbillno'
=>
$num
,
// 'fbillno_type'=>1,
'fbillnoid'
=>
$array
[
'Result'
][
'Id'
],
'fbillno_type'
=>
1
,
// );
// m('log_erp')->insert($erp_log);
);
// }
m
(
'log_erp'
)
->
insert
(
$erp_log
);
}
// }
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论