Esempio n. 1
0
 public function put($ar = array())
 {
     $bookpath = $this->base . '\\Doc_' . $this->book;
     $newver = $this->getputver();
     //根据book node ver 获取node内容
     $filename = $bookpath . '\\Doc_' . $this->node . "_{$newver}.ME";
     //文档
     $filenamesx = $bookpath . '\\Seq_' . $this->node . "_{$newver}.ME";
     //流程
     $filenamelc = $bookpath . '\\Flo_' . $this->node . "_{$newver}.ME";
     //时序
     !empty($ar['nr']) && \Sham::Fs($filename, $ar['nr']);
     !empty($ar['sx']) && \Sham::Fs($filenamesx, $ar['sx']);
     !empty($ar['lc']) && \Sham::Fs($filenamelc, $ar['lc']);
     return true;
 }
Esempio n. 2
0
    public function save($path='',$wzchr='',$nr='')
    {
        $path   = trim($path);
        $wzchr  = trim($wzchr);
        if(empty($path) || empty($wzchr) || EMPTY($nr)) return array();

        //目录露监测
        $filepath = $this->base.'\Doc_'.$path;
        !is_dir($filepath) && mkdir($filepath);

        //计算版本id
        $list = $this->wzlist($path);
        $verlist = $list[$wzchr];                           //获取到了所有的版本


//        if(!empty($ver)){
//
//        }

if($this->dtype == 'Doc'){
    $nver = !empty($verlist)?max($verlist)+1:1;         //获取到了新的版本id
}else{
    //流程图和时序图
    $nver = max($verlist);         //获取到了新的版本id
}

        //获得文件名
       // $filename  =$this->base.'\\'.$this->dtype.'_'.$path.'\\'.$this->dtype.'_'.$wzchr."_$nver.ME";
        $filename  =$this->base.'\Doc_'.$path.'\\'.$this->dtype.'_'.$wzchr."_$nver.ME";

        //写文件
        \Sham::Fs($filename,$nr);
        return true;
    }