<?php
class flow_hklistClassModel extends flowModel
{

     

			//审核完成后调用
	protected function flowcheckafter($zt, $sm){
	  $flowid=$this->getflow();

	  if($flowid['nowcourseid']== '804'){
  
		$data=$this->db->getrows('oa_hks',"mid='".$this->rs['id']."'");
		foreach ($data as $key => $value) {
	         $statusarr = array(
				'status'        =>2,
				);
            $id=$value['hks_id'];
	m('hkrequest')->update($statusarr,"`id`='$id'");
		}
	}

 if($flowid['nowcourseid']== '807'){
  
		$data=$this->db->getrows('oa_hks',"mid='".$this->rs['id']."'");
		foreach ($data as $key => $value) {
			if($value['hkstatus']=="已回款"){
         $statusarr = array(
			'status'        =>3,
			);
            $id=$value['hks_id'];
	m('hkrequest')->update($statusarr,"`id`='$id'");
			}
		}
	}
     }

 }
	 

