wugg 6 months ago
parent
commit
c07886849f
2 changed files with 4 additions and 4 deletions
  1. 3 4
      app/cxinv/command/CheckInvoice.php
  2. 1 0
      config/console.php

+ 3 - 4
app/cxinv/command/CheckInvoice.php

@@ -39,7 +39,7 @@ class CheckInvoice extends Command
                     'fully_digitalized_normal_electronic'=>'022',
                 ];
         $this->output=$output;
-        if(Cache::get('checkInvoiceP')==1)return;
+       // if(Cache::get('checkInvoiceP')==1)return;
         while ($list->valid()){
             Cache::set('checkInvoiceP',1,1800);
             $invoice = $list->current();
@@ -52,14 +52,13 @@ class CheckInvoice extends Command
     }
 
     protected  function getInvoice(){
-        $list = Invoice::where([['status','=',0],['open_time','<',$this->datetime],['updatetime','<=',date('Y-m-d H:i:s')]])->cursor();
+        $list = Invoice::where([['status','=',0],['updatetime','<=',date('Y-m-d H:i:s')]])->cursor();
         foreach ($list as $item){
             yield $item;
         }
     }
     protected function taxCheck($invoice){
-        $iinvoicenfo=env('tax');
-        $Tax =new \TaxInvoice($iinvoicenfo['appkey'],$iinvoicenfo['appsecret'],$invoice['entcode']);
+        $Tax =new \TaxInvoice(env('tax.appkey'),env('tax.appsecret'),env('tax.entcode'));
 
         $invNum= $this->InvoiceNum[$invoice['invoice_type']];
         $subtotal= $invoice['invoice_subtotal'];

+ 1 - 0
config/console.php

@@ -10,5 +10,6 @@ return [
     	"sysgood"=>sysGood::class,
     	"wxpush"=>\app\command\WxPush::class,
     	"goodcatcheck"=>\app\command\GoodCatCheck::class,
+    	"checkinvoice"=>\app\cxinv\command\CheckInvoice::class
     ],
 ];