|
@@ -7,7 +7,7 @@ use app\admin\model\CompanyInfo;use app\admin\model\InvoiceInfo;use app\admin\mo
|
|
|
use think\console\Input;
|
|
|
use think\console\input\Argument;
|
|
|
use think\console\input\Option;
|
|
|
-use think\console\Output;use think\facade\Config;use think\facade\Db;
|
|
|
+use think\console\Output;use think\facade\Cache;use think\facade\Config;use think\facade\Db;
|
|
|
|
|
|
class CheckInvoice extends Command
|
|
|
{
|
|
@@ -30,11 +30,14 @@ class CheckInvoice extends Command
|
|
|
$list = $this->getInvoice();
|
|
|
$invoice =Config::get('invoiceType');
|
|
|
$this->InvoiceNum = $invoice['KingInvoice'];
|
|
|
+ if(Cache::get('checkInvoiceP')==1)return;
|
|
|
while ($list->valid()){
|
|
|
+ Cache::set('checkInvoiceP',1,1800);
|
|
|
$invoice = $list->current();
|
|
|
$this->checkTicket($invoice);
|
|
|
$list->next();
|
|
|
}
|
|
|
+ Cache::set('checkInvoiceP',0);
|
|
|
|
|
|
}
|
|
|
|