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

OA数据同步生产环境测试

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