add feature enable/disable reception door log
This commit is contained in:
@@ -52,7 +52,37 @@ class ReceptionForm extends Model
|
||||
'verifyCode' => 'Verification Code',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function preReadCard(){
|
||||
|
||||
$this->number = Helper::fixAsciiChars( $this->number );
|
||||
|
||||
$query = Card::find();
|
||||
$query->leftJoin("card_key_assignment", 'card.id_card = card_key_assignment.id_card');
|
||||
$query->leftJoin("key", 'key.id_key = card_key_assignment.id_key');
|
||||
|
||||
$query->andWhere(['or',
|
||||
['and',[ 'in','card.number' , [$this->number]],"trim(coalesce(card.number, '')) <>'' " ],
|
||||
['and', ['in','card.rfid_key' ,[ $this->number] ],"trim(coalesce(card.rfid_key, '')) <>'' "],
|
||||
['and',[ 'in','key.number' , [$this->number]],"trim(coalesce(key.number, '')) <>'' " ],
|
||||
['and', ['in','key.rfid_key' ,[ $this->number] ],"trim(coalesce(key.rfid_key, '')) <>'' "]
|
||||
|
||||
]);
|
||||
|
||||
$this->card = $query->one();
|
||||
|
||||
if ( $this->card == null ){
|
||||
|
||||
}
|
||||
|
||||
if ( $this->card != null ){
|
||||
$this->customer = $this->card->customer;
|
||||
$this->readValidTickets();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function readCard(){
|
||||
|
||||
$this->number = Helper::fixAsciiChars( $this->number );
|
||||
@@ -71,10 +101,7 @@ class ReceptionForm extends Model
|
||||
|
||||
$this->card = $query->one();
|
||||
|
||||
if ( $this->card == null ){
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ( $this->card != null ){
|
||||
$this->customer = $this->card->customer;
|
||||
$this->readValidTickets();
|
||||
|
||||
Reference in New Issue
Block a user