123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <?php
- namespace logistics;
- use app\common\model\LogisticsCompany;
- use fast\Arr;
- abstract class QueryInterface{
- protected $no;
- protected $username;
- protected $phone;
- protected $fromMobile;
- protected $fromUsername;
- protected $extend=[];
- /** @var LogisticsCompany */
- protected $logistics;
- protected $fromArea;
- protected $toArea;
- protected $cargo;
- abstract public function query();
- abstract public function maptrack();
- abstract public function labelOrder();
- public function setNo($value){
- $this->no=$value;
- return $this;
- }
- public function setUserName($value){
- $this->username=$value;
- return $this;
- }
- public function setPhone($phone)
- {
- $this->phone = $phone;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getNo()
- {
- return $this->no;
- }
- /**
- * @return mixed
- */
- public function getUsername()
- {
- return $this->username;
- }
- /**
- * @return mixed
- */
- public function getPhone()
- {
- return $this->phone;
- }
- /**
- * @param LogisticsCompany $logistics
- */
- public function setLogistics(LogisticsCompany $logistics)
- {
- $this->logistics = $logistics;
- return $this;
- }
- /**
- * @return LogisticsCompany
- */
- public function getLogistics($field=null)
- {
- if(is_null($field)) {
- return $this->logistics;
- }
- return Arr::get($this->logistics,$field);
- }
- public static function init():self{
- $provider=[
- 'kd100'=>Kd100::class,
- ];
- return new $provider['kd100'];
- }
- /**
- * @param array $extend
- */
- public function setExtend(array $extend)
- {
- $this->extend = $extend;
- return $this;
- }
- /**
- * @param mixed $fromArea
- */
- public function setFromArea($fromArea)
- {
- $this->fromArea = $fromArea;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getFromArea()
- {
- return $this->fromArea;
- }
- /**
- * @param mixed $toArea
- */
- public function setToArea($toArea)
- {
- $this->toArea = $toArea;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getToArea()
- {
- return $this->toArea;
- }
- /**
- * @param mixed $fromMobile
- */
- public function setFromMobile($fromMobile)
- {
- $this->fromMobile = $fromMobile;
- return $this;
- }
- /**
- * @param mixed $fromUsername
- */
- public function setFromUsername($fromUsername)
- {
- $this->fromUsername = $fromUsername;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getFromMobile()
- {
- return $this->fromMobile;
- }
- /**
- * @return mixed
- */
- public function getFromUsername()
- {
- return $this->fromUsername;
- }
- /**
- * @param mixed $cargo
- */
- public function setCargo($cargo)
- {
- $this->cargo = $cargo;
- return $this;
- }
- /**
- * @return mixed
- */
- public function getCargo()
- {
- return $this->cargo;
- }
- protected $count=1;
- /**
- * @return int
- */
- public function getCount(): int
- {
- return $this->count;
- }
- /**
- * @param int $count
- */
- public function setCount($count)
- {
- $this->count = $count;
- return $this;
- }
- /** @var string */
- protected $orderNo;
- /**
- * @param string $orderNo
- */
- public function setOrderNo(string $orderNo)
- {
- $this->orderNo = $orderNo;
- return $this;
- }
- /**
- * @return string
- */
- public function getOrderNo(): string
- {
- return $this->orderNo;
- }
- }
|