|
@@ -25,17 +25,18 @@ class CheckTicket extends Command
|
|
|
protected function execute(Input $input, Output $output)
|
|
|
{
|
|
|
$this->dateTime = date("Y-m-d H:i:s");
|
|
|
- if(Cache::get('checkTicketP')==1)return;
|
|
|
+ # if(Cache::get('checkTicketP')==1)return;
|
|
|
$ticket = $this->getTicket();
|
|
|
while ($ticket->valid()) {
|
|
|
Cache::set('checkTicketP',1,1800);
|
|
|
$data = $ticket->current();
|
|
|
+ echo $data['invNo']."\r\n";
|
|
|
$this->checkTicket($data);
|
|
|
$ticket->next();
|
|
|
}
|
|
|
Cache::set('checkTicketP',0);
|
|
|
// 指令输出
|
|
|
- $output->writeln('checkticket');
|
|
|
+ // $output->writeln('checkticket');
|
|
|
}
|
|
|
protected function getTicket(){
|
|
|
$ticket = InvoiceTicket::where([["is_del","=",0],["type","=",0],["status","=",0],['updatetime','<',date('Y-m-d H:i:s')]])
|
|
@@ -73,7 +74,7 @@ class CheckTicket extends Command
|
|
|
if($result['data']['cyjg']=='0001'){
|
|
|
$data= $result['data'];
|
|
|
$this->changeFiled($data,$info);
|
|
|
- }elseif (in_array($result['data']['cyjg'],['0002','1014',"006"])){
|
|
|
+ }elseif (in_array($result['data']['cyjg'],['0002','1014'])){
|
|
|
$this->lastUpdate($info['invNo']);
|
|
|
}else $this->faild($invoice['id'],$result['data']['cyjgxx']);
|
|
|
}else $this->faild($info['invNo']);
|