jump bridge rework

This commit is contained in:
2021-05-15 07:12:56 +09:00
parent f3c317b505
commit a0c0186337
14 changed files with 255 additions and 80 deletions

View File

@@ -1,53 +0,0 @@
<?php
namespace App\Console\Commands\Structures;
use Illuminate\Console\Command;
//Job
use App\Jobs\Commands\Structures\ProcessStructureJob;
class GetStructuresCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:GetStructures';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the list of structures ';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Get the esi config
$config = config('esi');
//Declare some variables
$charId = $config['primary'];
$corpId = 98287666;
//Dispatch the job to be done when the application has time
ProcessStructureJob::dispatch($charId, $corpId);
}
}

View File

@@ -83,6 +83,6 @@ class FuelController extends Controller
]);
return view('logistics.fuel')->with('jumpGates', $jumpGates)
->with('lava', $lava);
->with('lava', $lava);
}
}

View File

@@ -40,10 +40,14 @@ class MiningTaxesController extends Controller
$this->middleware('role:User');
}
public function DisplayInvoice($invoice) {
public function DisplayInvoice($invoiceId) {
$ores = array();
$totalPrice = 0.00;
$invoice = Invoice::where([
'invoice_id' => $invoiceId,
])->first();
$items = Ledger::where([
'character_id' => auth()->user()->getId(),
'invoice_id' => $invoice,

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Jobs\Commands\JumpBridges;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class FetchJumpBridges implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//
}
}

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Jobs\Commands\JumpBridges;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class FetchLiquidOzoneAssets implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//
}
}

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Jobs\Commands\JumpBridges;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class PurgeJumpBridgeStructures implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace App\Jobs\Commands\JumpBridges;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
//Models
use App\Models\Structure\Asset;
class PurgeLiquidOzoneAssets implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
}
}

View File

@@ -54,15 +54,13 @@ class ProcessMiningTaxesPayments implements ShouldQueue
foreach($outstanding as $invoice) {
//See if we have a reason with the correct uniqid from the player donation journal
$found = AllianceWalletJournal::where([
'reason' => "MMT: " . $invoice->invoice_id,
'reason' => $invoice->invoice_id,
])->count();
//If we have received the invoice, then mark the invoice as paid
if($found > 0) {
//If we have the count, then grab the journal entry in order to do some things with it
$journal = AllianceWalletJournal::where([
'reason' => "MMT: " . $invoice->invoice_id,
])->orWhere([
'reason' => $invoice->invoice_id,
])->first();
@@ -90,8 +88,6 @@ class ProcessMiningTaxesPayments implements ShouldQueue
if($count > 0) {
//If we have the count, then grab the journal entry in order to do some things with it
$journal = AllianceWalletJournal::where([
'reason' => "MMT: " . $invoice->invoice_id,
])->orWhere([
'reason' => $invoice->invoice_id,
])->first();

View File

@@ -118,7 +118,7 @@ class SendMiningTaxesInvoices implements ShouldQueue
$charName = $lookup->CharacterIdToName($charId);
//Generate a unique invoice id
$invoiceId = uniqid();
$invoiceId = "M" . uniqid();
//Set the due date of the invoice
$dateDue = Carbon::now()->addDays(7);
$invoiceDate = Carbon::now();
@@ -136,7 +136,7 @@ class SendMiningTaxesInvoices implements ShouldQueue
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as MMT: " . $invoiceId . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br><br>";
$body .= "You can also send a contract with the following ores in the contract with the reason set as MMT: " . $invoiceId . "<br>";
@@ -153,7 +153,7 @@ class SendMiningTaxesInvoices implements ShouldQueue
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as MMT: " . $invoiceId . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";
@@ -232,7 +232,7 @@ class SendMiningTaxesInvoices implements ShouldQueue
$charName = $lookup->CharacterIdToName($charId);
$invoiceId = uniqid();
$invoiceId = "M" . uniqid();
$dateDue = Carbon::now()->addDays(7);
$invoiceDate = Carbon::now();
@@ -248,7 +248,7 @@ class SendMiningTaxesInvoices implements ShouldQueue
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as MMT: " . $invoiceId . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br><br>";
$body .= "You can also send a contract with the following ores in the contract with the reason set as MMT: " . $invoiceId . "<br>";
@@ -270,7 +270,7 @@ class SendMiningTaxesInvoices implements ShouldQueue
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as MMT: " . $invoiceId . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";

View File

@@ -114,7 +114,7 @@ class SendMiningTaxesInvoicesOld implements ShouldQueue
$charName = $lookup->CharacterIdToName($charId);
//Generate a unique invoice id
$invoiceId = uniqid();
$invoiceId = "M" uniqid();
//Set the due date of the invoice
$dateDue = Carbon::now()->addDays(7);
$invoiceDate = Carbon::now();
@@ -132,7 +132,7 @@ class SendMiningTaxesInvoicesOld implements ShouldQueue
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as MMT: " . $invoiceId . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br><br>";
$body .= "You can also send a contract with the following ores in the contract with the reason set as MMT: " . $invoiceId . "<br>";
@@ -149,7 +149,7 @@ class SendMiningTaxesInvoicesOld implements ShouldQueue
$body .= "Total Value of Ore Mined: " . number_format($totalPrice, 2, ".", ",") . " ISK.";
$body .= "<br><br>";
$body .= "Please remit " . number_format($invoiceAmount, 2, ".", ",") . " ISK to Spatial Forces by " . $dateDue . "<br>";
$body .= "Set the reason for transfer as MMT: " . $invoiceId . "<br>";
$body .= "Set the reason for transfer as " . $invoiceId . "<br>";
$body .= "The mining taxes are currently set to " . $numberMiningTax . "%.<br>";
$body .= "<br>";
$body .= "<br>Sincerely,<br>Warped Intentions Leadership<br>";

View File

@@ -0,0 +1,95 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJumpBridgeFuelLevelsTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('alliance_flex_structures');
Schema::dropIFExists('alliance_assets');
Schema::dropIfExists('alliance_structures');
Schema::dropIfExists('alliance_services');
if(!Schema::hasTable('alliance_structures')) {
Schema::create('alliance_structures', function(Blueprint $table) {
$table->increments('id');
$table->unsignedBigInteger('structure_id')->unique();
$table->string('structure_name');
$table->unsignedBigInteger('solar_system_id');
$table->string('solar_system_name')->nullable();
$table->unsignedBigInteger('type_id');
$table->unsignedBigInteger('corporation_id');
$table->boolean('services');
$table->enum('state'. [
]);
$table->dateTime('state_timer_start')->nullable();
$table->dateTime('state_timer_end')->nullable();
$table->dateTime('fuel_expires')->nullable();
$table->unsignedBigInteger('profile_id');
$table->unsignedBigInteger('position_x');
$table->unsignedBigInteger('position_y');
$table->unsignedBigInteger('position_z');
$table->dateTime('next_reinforce_apply')->nullable();
$table->unsignedInteger('next_reinforce_hour')->nullable();
$table->unsignedInteger('next_reinforce_weekday')->nullable();
$table->unsignedInteger('reinforce_hour');
$table->unsignedInteger('reinforce_weekday')->nullable();
$table->dateTime('unanchors_at')->nullable();
$table->timestamps();
});
}
if(!Schema::hasTable('alliance_services')) {
Schema::create('alliance_services', function(Blueprint $table) {
$table->increments('id');
$table->unsignedBigInteger('structure_id');
$table->string('name');
$table->enum('state', [
]);
$table->timestamps();
});
}
if(!Schema::hasTable('alliance_assets')) {
Schema::create('alliance_assets', function(Blueprint $table) {
$table->increments('id');
$table->boolean('is_blueprint_copy')->nullable();
$table->boolean('is_singleton');
$table->unsignedBigInteger('item_id');
$table->enum('location_flag', [
]);
$table->unsignedBigInteger('location_id');
$table->enum('location_type', [
]);
$table->unsignedBigInteger('quantity');
$table->unsignedBigInteger('type_id');
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('fleet_activity_tracking');
Schema::dropIfExists('alliance_structures');
Schema::dropIfExists('alliance_services');
Schema::dropIfExists('alliance_assets');
}
}

View File

@@ -5,8 +5,10 @@
<div class="card">
<div class="card-header">
<h2>Invoice Details</h2><br>
<h3>Id: {!! $invoice !!}</h3><br>
<h3>Id: {!! $invoice->invoice_id !!}</h3><br>
<h3>Amount: {!! number_format($totalPrice, 2, ".", ",") !!} ISK</h3>
<h3>Invoice Date: {!! $invoice->date_issued !!}</h3><br>
<h3>Invoice Due Date: {!! $invoice->date_due !!}</h3>
</div>
<div class="card-body">
<table class="table table-striped table-bordered">

View File

@@ -20,7 +20,6 @@ return array(
'App\\Console\\Commands\\MiningTaxes\\ExecuteMiningTaxesObserversCommand' => $baseDir . '/app/Console/Commands/MiningTaxes/ExecuteMiningTaxesObserversCommand.php',
'App\\Console\\Commands\\MiningTaxes\\ExecuteProcesssMiningTaxesPaymentsCommand' => $baseDir . '/app/Console/Commands/MiningTaxes/ExecuteProcesssMiningTaxesPaymentsCommand.php',
'App\\Console\\Commands\\MiningTaxes\\ExecuteSendMiningTaxesInvoiceCommand' => $baseDir . '/app/Console/Commands/MiningTaxes/ExecuteSendMiningTaxesInvoiceCommand.php',
'App\\Console\\Commands\\Structures\\GetStructuresCommand' => $baseDir . '/app/Console/Commands/Structures/GetStructuresCommand.php',
'App\\Console\\Commands\\SupplyChain\\EndSupplyChainContractCommand' => $baseDir . '/app/Console/Commands/SupplyChain/EndSupplyChainContractCommand.php',
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
@@ -55,10 +54,10 @@ return array(
'App\\Jobs\\Commands\\Data\\PurgeUsers' => $baseDir . '/app/Jobs/Commands/Data/PurgeUsers.php',
'App\\Jobs\\Commands\\Eve\\ItemPricesUpdate' => $baseDir . '/app/Jobs/Commands/Eve/ItemPricesUpdate.php',
'App\\Jobs\\Commands\\Eve\\SendEveMail' => $baseDir . '/app/Jobs/Commands/Eve/SendEveMail.php',
'App\\Jobs\\Commands\\Eve\\SendEveMailRL' => $baseDir . '/app/Jobs/Commands/Eve/SendEveMailRL.php',
'App\\Jobs\\Commands\\Finances\\UpdateAllianceWalletJournalJob' => $baseDir . '/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalJob.php',
'App\\Jobs\\Commands\\Finances\\UpdateAllianceWalletJournalPage' => $baseDir . '/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalPage.php',
'App\\Jobs\\Commands\\Finances\\UpdateItemPrices' => $baseDir . '/app/Jobs/Commands/Finances/UpdateItemPrices.php',
'App\\Jobs\\Commands\\MiningTaxes\\CreateMiningTaxesInvoice' => $baseDir . '/app/Jobs/Commands/MiningTaxes/CreateMiningTaxesInvoice.php',
'App\\Jobs\\Commands\\MiningTaxes\\FetchMiningTaxesLedgers' => $baseDir . '/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesLedgers.php',
'App\\Jobs\\Commands\\MiningTaxes\\FetchMiningTaxesObservers' => $baseDir . '/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesObservers.php',
'App\\Jobs\\Commands\\MiningTaxes\\PreFetchMiningTaxesLedgers' => $baseDir . '/app/Jobs/Commands/MiningTaxes/PreFetchMiningTaxesLedgers.php',
@@ -107,9 +106,6 @@ return array(
'App\\Models\\SRP\\SrpPayout' => $baseDir . '/app/Models/SRP/SrpPayout.php',
'App\\Models\\SRP\\SrpShipType' => $baseDir . '/app/Models/SRP/SrpShipType.php',
'App\\Models\\ScheduledTask\\ScheduleJob' => $baseDir . '/app/Models/ScheduledTask/ScheduleJob.php',
'App\\Models\\Structure\\Asset' => $baseDir . '/app/Models/Structure/Asset.php',
'App\\Models\\Structure\\Service' => $baseDir . '/app/Models/Structure/Service.php',
'App\\Models\\Structure\\Structure' => $baseDir . '/app/Models/Structure/Structure.php',
'App\\Models\\User\\AvailableUserPermission' => $baseDir . '/app/Models/User/AvailableUserPermission.php',
'App\\Models\\User\\AvailableUserRole' => $baseDir . '/app/Models/User/AvailableUserRole.php',
'App\\Models\\User\\User' => $baseDir . '/app/Models/User/User.php',

View File

@@ -570,7 +570,6 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
'App\\Console\\Commands\\MiningTaxes\\ExecuteMiningTaxesObserversCommand' => __DIR__ . '/../..' . '/app/Console/Commands/MiningTaxes/ExecuteMiningTaxesObserversCommand.php',
'App\\Console\\Commands\\MiningTaxes\\ExecuteProcesssMiningTaxesPaymentsCommand' => __DIR__ . '/../..' . '/app/Console/Commands/MiningTaxes/ExecuteProcesssMiningTaxesPaymentsCommand.php',
'App\\Console\\Commands\\MiningTaxes\\ExecuteSendMiningTaxesInvoiceCommand' => __DIR__ . '/../..' . '/app/Console/Commands/MiningTaxes/ExecuteSendMiningTaxesInvoiceCommand.php',
'App\\Console\\Commands\\Structures\\GetStructuresCommand' => __DIR__ . '/../..' . '/app/Console/Commands/Structures/GetStructuresCommand.php',
'App\\Console\\Commands\\SupplyChain\\EndSupplyChainContractCommand' => __DIR__ . '/../..' . '/app/Console/Commands/SupplyChain/EndSupplyChainContractCommand.php',
'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
@@ -605,10 +604,10 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
'App\\Jobs\\Commands\\Data\\PurgeUsers' => __DIR__ . '/../..' . '/app/Jobs/Commands/Data/PurgeUsers.php',
'App\\Jobs\\Commands\\Eve\\ItemPricesUpdate' => __DIR__ . '/../..' . '/app/Jobs/Commands/Eve/ItemPricesUpdate.php',
'App\\Jobs\\Commands\\Eve\\SendEveMail' => __DIR__ . '/../..' . '/app/Jobs/Commands/Eve/SendEveMail.php',
'App\\Jobs\\Commands\\Eve\\SendEveMailRL' => __DIR__ . '/../..' . '/app/Jobs/Commands/Eve/SendEveMailRL.php',
'App\\Jobs\\Commands\\Finances\\UpdateAllianceWalletJournalJob' => __DIR__ . '/../..' . '/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalJob.php',
'App\\Jobs\\Commands\\Finances\\UpdateAllianceWalletJournalPage' => __DIR__ . '/../..' . '/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalPage.php',
'App\\Jobs\\Commands\\Finances\\UpdateItemPrices' => __DIR__ . '/../..' . '/app/Jobs/Commands/Finances/UpdateItemPrices.php',
'App\\Jobs\\Commands\\MiningTaxes\\CreateMiningTaxesInvoice' => __DIR__ . '/../..' . '/app/Jobs/Commands/MiningTaxes/CreateMiningTaxesInvoice.php',
'App\\Jobs\\Commands\\MiningTaxes\\FetchMiningTaxesLedgers' => __DIR__ . '/../..' . '/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesLedgers.php',
'App\\Jobs\\Commands\\MiningTaxes\\FetchMiningTaxesObservers' => __DIR__ . '/../..' . '/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesObservers.php',
'App\\Jobs\\Commands\\MiningTaxes\\PreFetchMiningTaxesLedgers' => __DIR__ . '/../..' . '/app/Jobs/Commands/MiningTaxes/PreFetchMiningTaxesLedgers.php',
@@ -657,9 +656,6 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
'App\\Models\\SRP\\SrpPayout' => __DIR__ . '/../..' . '/app/Models/SRP/SrpPayout.php',
'App\\Models\\SRP\\SrpShipType' => __DIR__ . '/../..' . '/app/Models/SRP/SrpShipType.php',
'App\\Models\\ScheduledTask\\ScheduleJob' => __DIR__ . '/../..' . '/app/Models/ScheduledTask/ScheduleJob.php',
'App\\Models\\Structure\\Asset' => __DIR__ . '/../..' . '/app/Models/Structure/Asset.php',
'App\\Models\\Structure\\Service' => __DIR__ . '/../..' . '/app/Models/Structure/Service.php',
'App\\Models\\Structure\\Structure' => __DIR__ . '/../..' . '/app/Models/Structure/Structure.php',
'App\\Models\\User\\AvailableUserPermission' => __DIR__ . '/../..' . '/app/Models/User/AvailableUserPermission.php',
'App\\Models\\User\\AvailableUserRole' => __DIR__ . '/../..' . '/app/Models/User/AvailableUserRole.php',
'App\\Models\\User\\User' => __DIR__ . '/../..' . '/app/Models/User/User.php',