提交 5d82548e authored 作者: fengzy's avatar fengzy

费用报销脚本

上级 65506816
...@@ -157,34 +157,34 @@ class flow_projectfkClassModel extends flowModel ...@@ -157,34 +157,34 @@ class flow_projectfkClassModel extends flowModel
}'; }';
$model=json_decode($data_model,true); $model=json_decode($data_model,true);
var_dump($model);
// $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);
// $data = array( $data = array(
// 'AP_PAYBILL',//业务对象标识FormId 'AP_PAYBILL',//业务对象标识FormId
// $data_model//具体Json字串 $data_model//具体Json字串
// ); );
// $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);
// $num=$array['Result']['Number']; $num=$array['Result']['Number'];
// if($array['Result']['ResponseStatus']['IsSuccess']){ if($array['Result']['ResponseStatus']['IsSuccess']){
// $this->update("`fbillno`='$num'", $this->rs['id']); $this->update("`fbillno`='$num'", $this->rs['id']);
// $this->erplog($this->rs['docnum'],'c_projectfk','保存成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],1); $this->erplog($this->rs['docnum'],'c_projectfk','保存成功',json_encode($array),date("Y-m-d H:i:s"),2,$num,$array['Result']['Id'],1);
// }else{ }else{
// $this->erplog($this->rs['docnum'],'c_projectfk','保存失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],1); $this->erplog($this->rs['docnum'],'c_projectfk','保存失败',json_encode($array),date("Y-m-d H:i:s"),1,$num,$array['Result']['Id'],1);
// } }
} }
...@@ -217,6 +217,12 @@ var_dump($model); ...@@ -217,6 +217,12 @@ var_dump($model);
$cbzxid = m('tmp_department')->getone($sql, 'id,cost');//查询账户表成本中心id $cbzxid = m('tmp_department')->getone($sql, 'id,cost');//查询账户表成本中心id
return $cbzxid['cost']; return $cbzxid['cost'];
} }
public static function deptname($data)
{
$sql=" name= '$data'";
$data = m('tmp_department')->getone($sql, 'id,number');//查询账户表成本中心id
return $data['number'];
}
public static function project($project_code){ public static function project($project_code){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论