* deploy script updated
* xsl parser year updated * tree type switched from closure table to nested set
This commit is contained in:
parent
8f843a8194
commit
99c10e94e1
@ -7,7 +7,7 @@ set('ssh_multiplexing', true);
|
||||
|
||||
// Configuration
|
||||
|
||||
set('repository', 'ssh://gogs@gogs.ragnarok.yvan.hu:2206/Laterex/webnaplo-gul-api.git');
|
||||
set('repository', 'ssh://gogs@gogs.ragnarok.yvan.hu:2206/Laterex/webnaplo-gulbaba-api.git');
|
||||
set('shared_files', [
|
||||
'config/autoload/local.php',
|
||||
'config/autoload/doctrine.local.php',
|
||||
@ -27,12 +27,12 @@ set('default_stage', 'production');
|
||||
|
||||
host('lxuz.hu')
|
||||
->stage('production')
|
||||
->user('latuzcs_beik_api_access')
|
||||
->user('benkeg_gulbaba_api_access')
|
||||
->forwardAgent()
|
||||
->set('bin/php', '/usr/bin/php7.1')
|
||||
->set('bin/composer', '{{bin/php}} /var/www/clients/client5/web20/bin/composer')
|
||||
->set('bin/composer', '{{bin/php}} /var/www/clients/client4/web38/bin/composer')
|
||||
->set('php_service_name', 'php7.1-fpm')
|
||||
->set('deploy_path', '/var/www/clients/client5/web20/deploy');
|
||||
->set('deploy_path', '/var/www/clients/client4/web38/deploy');
|
||||
|
||||
// Tasks
|
||||
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Gedmo\Mapping\Annotation as Gedmo;
|
||||
use JsonSerializable;
|
||||
|
||||
/**
|
||||
* @Gedmo\Tree(type="closure")
|
||||
* @Gedmo\TreeClosure(class="App\Entity\FacilityLocationClosure")
|
||||
* @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\ClosureTreeRepository")
|
||||
* @Gedmo\Tree(type="nested")
|
||||
* @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository")
|
||||
* @ORM\Table(
|
||||
* name="facility_locations",
|
||||
* indexes={
|
||||
@ -54,18 +54,38 @@ class FacilityLocation implements JsonSerializable
|
||||
*/
|
||||
private $level;
|
||||
|
||||
/**
|
||||
* @Gedmo\TreeLeft
|
||||
* @ORM\Column(name="lft", type="integer")
|
||||
*/
|
||||
private $lft;
|
||||
|
||||
/**
|
||||
* @Gedmo\TreeRight
|
||||
* @ORM\Column(name="rgt", type="integer")
|
||||
*/
|
||||
private $rgt;
|
||||
|
||||
/**
|
||||
* @Gedmo\TreeRoot
|
||||
* @ORM\ManyToOne(targetEntity="FacilityLocation")
|
||||
* @ORM\JoinColumn(name="tree_root", referencedColumnName="id", onDelete="CASCADE")
|
||||
*/
|
||||
private $root;
|
||||
|
||||
/**
|
||||
* @Gedmo\TreeParent
|
||||
* @ORM\JoinColumn(referencedColumnName="id", onDelete="CASCADE")
|
||||
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="CASCADE")
|
||||
* @ORM\ManyToOne(targetEntity="FacilityLocation", inversedBy="children")
|
||||
* @var FacilityLocation
|
||||
*/
|
||||
private $parent;
|
||||
|
||||
/**
|
||||
* @var FacilityLocationClosure[]
|
||||
* @ORM\OneToMany(targetEntity="FacilityLocation", mappedBy="parent")
|
||||
* @ORM\OrderBy({"lft" = "ASC"})
|
||||
*/
|
||||
private $closures = [];
|
||||
private $children;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="active", type="boolean", options={"default": true})
|
||||
@ -73,6 +93,11 @@ class FacilityLocation implements JsonSerializable
|
||||
*/
|
||||
private $active = true;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->children = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
@ -153,16 +178,6 @@ class FacilityLocation implements JsonSerializable
|
||||
return $this->level;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $level
|
||||
* @return FacilityLocation
|
||||
*/
|
||||
public function setLevel($level)
|
||||
{
|
||||
$this->level = $level;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
@ -182,11 +197,11 @@ class FacilityLocation implements JsonSerializable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FacilityLocationClosure $closure
|
||||
* @return FacilityLocation[]|ArrayCollection
|
||||
*/
|
||||
public function addClosure(FacilityLocationClosure $closure)
|
||||
public function getChildren(): ?ArrayCollection
|
||||
{
|
||||
$this->closures[] = $closure;
|
||||
return $this->children;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Gedmo\Tree\Entity\MappedSuperclass\AbstractClosure;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="facility_locations__closure")
|
||||
*/
|
||||
class FacilityLocationClosure extends AbstractClosure
|
||||
{
|
||||
|
||||
}
|
||||
@ -12,7 +12,7 @@ class XlsxParserService
|
||||
{
|
||||
const XLSX_SHEET_NAME = "karbantartás";
|
||||
const XLSX_TIMESTAMP = 'data/cache/xlsx-lastmod_%s.dat';
|
||||
const XLSX_FILE_NAME = 'data/user-upload/beik%s.xlsx';
|
||||
const XLSX_FILE_NAME = 'data/user-upload/webnaplo_%s.xlsx';
|
||||
const XLSX_CACHE_FILE = 'data/cache/xlsx-full-cache_%s.dat';
|
||||
|
||||
/**
|
||||
@ -31,8 +31,8 @@ class XlsxParserService
|
||||
public function __construct()
|
||||
{
|
||||
$this->deviceGroups = new ArrayCollection();
|
||||
// $this->year = date("Y");
|
||||
$this->year = 2018;
|
||||
$this->year = date("Y");
|
||||
// $this->year = 2018;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,7 +99,7 @@ class XlsxParserService
|
||||
$sheet = $objPHPExcel->getSheetByName(self::XLSX_SHEET_NAME);
|
||||
|
||||
$totalRows = $sheet->getHighestRow();
|
||||
$monthColumns = $this->year == 2017
|
||||
$monthColumns = $this->year == 2018
|
||||
? range(43, 58)
|
||||
: range(11, 58);
|
||||
$rowCursor = 7;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user