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

OA数据同步生产环境测试

上级 ef4bec13
...@@ -189,23 +189,23 @@ class flow_emfkClassModel extends flowModel ...@@ -189,23 +189,23 @@ class flow_emfkClassModel extends flowModel
$num=$array['Result']['Number']; $num=$array['Result']['Number'];
$this->update("`fbillno`='$num'", $this->rs['id']); $this->update("`fbillno`='$num'", $this->rs['id']);
$this->erplog($this->rs['docnum'],'fininfom','保存成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],1); $this->erplog($this->rs['docnum'],'c_emfk','保存成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],1);
if($this->emfk_submit($cloudUrl,$cookie_jar,$array['Result']['Id'],$array['Result']['Number'])){ if($this->emfk_submit($cloudUrl,$cookie_jar,$array['Result']['Id'],$array['Result']['Number'])){
$this->erplog($this->rs['docnum'],'fininfom','提交成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],2); $this->erplog($this->rs['docnum'],'c_emfk','提交成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],2);
}else{ }else{
$this->erplog($this->rs['docnum'],'fininfom','提交失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],2); $this->erplog($this->rs['docnum'],'c_emfk','提交失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],2);
} }
}else{ }else{
$this->erplog($this->rs['docnum'],'fininfom','保存失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],1); $this->erplog($this->rs['docnum'],'c_emfk','保存失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],1);
m('erplog')->insert($erp_log); m('erplog')->insert($erp_log);
} }
......
...@@ -316,98 +316,37 @@ class flow_finfybxClassModel extends flowModel ...@@ -316,98 +316,37 @@ class flow_finfybxClassModel extends flowModel
$post_content = self::create_postdata($data); $post_content = self::create_postdata($data);
$result = self::invoke_add($cloudUrl,$post_content,$cookie_jar); $result = self::invoke_add($cloudUrl,$post_content,$cookie_jar);
$array = json_decode($result,true); $array = json_decode($result,true);
var_dump($array);
if($array['Result']['ResponseStatus']['IsSuccess']){ if($array['Result']['ResponseStatus']['IsSuccess']){
$num=$array['Result']['Number']; $num=$array['Result']['Number'];
$this->update("`fbillno`='$num'", $this->rs['id']); $this->update("`fsrcbillno`='$num'", $this->rs['id']);
$this->erplog($this->rs['docnum'],'fininfom','保存成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],1);
$erp_log=array( m('erplog')->insert($erp_log);
'sericnum'=> $this->rs['docnum'],
'table'=>'fininfom',
'name' => '保存成功',
'remark' => json_encode($array),
'optdt' =>date("Y-m-d H:i:s"),
'level'=>2,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>1,
);
m('erplog')->insert($erp_log);
if($this->supplier_submit($cloudUrl,$cookie_jar,$array['Result']['Id'],$array['Result']['Number'])){ if($this->supplier_submit($cloudUrl,$cookie_jar,$array['Result']['Id'],$array['Result']['Number'])){
$erp_log=array(
'sericnum'=> $this->rs['docnum'], $this->erplog($this->rs['docnum'],'fininfom','提交成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],2);
'table'=>'fininfom', m('erplog')->insert($erp_log);
'name' => '提交成功',
'remark' => json_encode($array),
'optdt' =>date("Y-m-d H:i:s"),
'level'=>2,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>2,
);
m('erplog')->insert($erp_log);
}else{ }else{
$erp_log=array(
'sericnum'=> $this->rs['docnum'], $this->erplog($this->rs['docnum'],'fininfom','提交失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],2);
'table'=>'fininfom', m('erplog')->insert($erp_log);
'name' => '提交失败',
'remark' => json_encode($array),
'optdt' =>date("Y-m-d H:i:s"),
'level'=>1,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>2,
);
m('erplog')->insert($erp_log);
} }
if($this->supplier_audit($cloudUrl,$cookie_jar,$array['Result']['Id'],$array['Result']['Number'])){ if($this->supplier_audit($cloudUrl,$cookie_jar,$array['Result']['Id'],$array['Result']['Number'])){
$erp_log=array(
'sericnum'=> $this->rs['docnum'], $this->erplog($this->rs['docnum'],'fininfom','审核成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],3);
'table'=>'fininfom', m('erplog')->insert($erp_log);
'name' => '审核成功',
'remark' => json_encode($array),
'optdt' =>date("Y-m-d H:i:s"),
'level'=>2,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>3,
);
m('erplog')->insert($erp_log);
}else{ }else{
$erp_log=array(
'sericnum'=> $this->rs['docnum'], $this->erplog($this->rs['docnum'],'fininfom','审核失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],3);
'table'=>'fininfom', m('erplog')->insert($erp_log);
'name' => '审核失败',
'remark' => json_encode($array),
'optdt' =>date("Y-m-d H:i:s"),
'level'=>1,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>3,
);
m('erplog')->insert($erp_log);
} }
}else{ }else{
$erp_log=array(
'sericnum'=> $this->rs['docnum'], $this->erplog($this->rs['docnum'],'fininfom','保存失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],1);
'table'=>'fininfom', m('erplog')->insert($erp_log);
'name' => '保存失败',
'remark' => json_encode($array),
'optdt' =>date("Y-m-d H:i:s"),
'level'=>1,
'fbillno'=>$num,
'fbillnoid'=>$array['Result']['Id'],
'fbillno_type'=>1,
);
m('erplog')->insert($erp_log);
} }
} }
...@@ -416,7 +355,23 @@ var_dump($array); ...@@ -416,7 +355,23 @@ var_dump($array);
} }
private function erplog($sericnum,$table,$name,$remark,$optdt,$level,$fbillno,$fbillnoid,$fbillno_type){
$erp_log=array(
'sericnum'=> $sericnum,
'table'=>$table,
'name' => $name,
'remark' => $remark,
'optdt' =>$optdt,
'level'=>$level,
'fbillno'=>$fbillno,
'fbillnoid'=>$fbillnoid,
'fbillno_type'=>$fbillno_type,
);
m('erplog')->insert($erp_log);
}
//流程全部完成后调用 //流程全部完成后调用
protected function flowcheckfinsh($zt){ protected function flowcheckfinsh($zt){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论