<?php
/**
 * Class Process_PriEnter
 * 根据入库单生成预录入数据
 */
class Process_PriEnter{
    public $receivingCode=[];
    protected $receivingInfo =[];
    public function setReceivingCode($receivingCode){
        $this->receivingCode[]=$receivingCode;
        $this->getReceivingInfo($receivingCode);
    }
    public function getReceivingInfo($receivingCode){
        if($this->receivingInfo[$receivingCode]){
            return $this->receivingInfo[$receivingCode];
        }
        $receivingInfo = Service_Receiving::getByField('receiving_code',$receivingCode);
        $receivingDetail = Service_ReceivingDetail::getByCondition([
            'receiving_code'=>$receivingCode
        ]);
        $receivingInfo['detail'] = $receivingDetail;
        $this->receivingInfo[$receivingCode]=$receivingInfo;
        return $this->receivingInfo[$receivingCode];
    }
    public function makePriEnter(){
        $this->validate();
        //生成
    }
    protected function validate(){

    }
}