src/Entity/MtbColt.php line 776

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. class MtbColt extends AbstractEntityBase {
  5.     /**
  6.      * @var string
  7.      */
  8.     private $gestione;
  9.     /**
  10.      * @var DateTime
  11.      */
  12.     private $dataCollo;
  13.     /**
  14.      * @var string
  15.      */
  16.     private $serCollo;
  17.     /**
  18.      * @var int
  19.      */
  20.     private $numCollo;
  21.     /**
  22.      * @var string
  23.      */
  24.     private $rifOrd;
  25.     /**
  26.      * @var string
  27.      */
  28.     private $codAnag null;
  29.     /**
  30.      * @var string
  31.      */
  32.     private $codVdes;
  33.     /**
  34.      * @var string
  35.      */
  36.     private $codMdep;
  37.     /**
  38.      * @var string
  39.      */
  40.     private $codVlis;
  41.     /**
  42.      * @var string
  43.      */
  44.     private $codDtip;
  45.     /**
  46.      * @var string
  47.      */
  48.     private $codTcol;
  49.     /**
  50.      * @var string
  51.      */
  52.     private $serDoc;
  53.     /**
  54.      * @var string
  55.      */
  56.     private $filtroOrdini;
  57.     /**
  58.      * @var string
  59.      */
  60.     private $preparatoDa;
  61.     /**
  62.      * @var string
  63.      */
  64.     private $annotazioni;
  65.     /**
  66.      * @var string
  67.      */
  68.     private $posizione;
  69.     /**
  70.      * @var string
  71.      */
  72.     private $codDtipProvv;
  73.     /**
  74.      * @var string
  75.      */
  76.     private $serDocProvv;
  77.     /**
  78.      * @var string
  79.      */
  80.     private $codJfas;
  81.     /**
  82.      * @var DateTime
  83.      */
  84.     private $dataOrd;
  85.     /**
  86.      * @var DateTime
  87.      */
  88.     private $dataDoc;
  89.     /**
  90.      * @var DateTime
  91.      */
  92.     private $oraInizPrep;
  93.     /**
  94.      * @var DateTime
  95.      */
  96.     private $oraFinePrep;
  97.     /**
  98.      * @var DateTime
  99.      */
  100.     private $dataDocProvv;
  101.     /**
  102.      * @var DateTime
  103.      */
  104.     private $dataVers;
  105.     /**
  106.      * @var int
  107.      */
  108.     private $segno;
  109.     /**
  110.      * @var int
  111.      */
  112.     private $numOrd;
  113.     /**
  114.      * @var int
  115.      */
  116.     private $numDoc;
  117.     /**
  118.      * @var int
  119.      */
  120.     private $numDocProvv;
  121.     /**
  122.      * @var float
  123.      */
  124.     private $pesoKg;
  125.     /**
  126.      * @var float
  127.      */
  128.     private $lunghezzaCm;
  129.     /**
  130.      * @var float
  131.      */
  132.     private $larghezzaCm;
  133.     /**
  134.      * @var float
  135.      */
  136.     private $altezzaCm;
  137.     /**
  138.      * @var float
  139.      */
  140.     private $pesoNettoKg;
  141.     /**
  142.      * @var DateTime
  143.      */
  144.     private $dataDistribuzione;
  145.     /**
  146.      * @var string
  147.      */
  148.     private $barcodeUl;
  149.     /**
  150.      * @var MtbColr[]
  151.      */
  152.     private $mtbColr = [];
  153.     /**
  154.      * @var MtbCols[]
  155.      */
  156.     private $mtbCols = [];
  157.     /**
  158.      * @param string|null $gestione
  159.      * @param DateTime|null $dataCollo
  160.      * @param string|null $serCollo
  161.      * @param int|null $numCollo
  162.      */
  163.     public function __construct(string $gestione nullDateTime $dataCollo nullstring $serCollo nullint $numCollo null) {
  164.         $this->gestione $gestione;
  165.         $this->dataCollo $dataCollo;
  166.         $this->serCollo $serCollo;
  167.         $this->numCollo $numCollo;
  168.     }
  169.     /**
  170.      * @return string
  171.      */
  172.     public function getGestione(): string {
  173.         return $this->gestione;
  174.     }
  175.     /**
  176.      * @param string $gestione
  177.      */
  178.     public function setGestione(string $gestione): void {
  179.         $this->gestione $gestione;
  180.     }
  181.     /**
  182.      * @return DateTime
  183.      */
  184.     public function getDataCollo(): DateTime {
  185.         return $this->dataCollo;
  186.     }
  187.     /**
  188.      * @param DateTime $dataCollo
  189.      */
  190.     public function setDataCollo(DateTime $dataCollo): void {
  191.         $this->dataCollo $dataCollo;
  192.     }
  193.     /**
  194.      * @return string
  195.      */
  196.     public function getSerCollo(): string {
  197.         return $this->serCollo;
  198.     }
  199.     /**
  200.      * @param string $serCollo
  201.      */
  202.     public function setSerCollo(string $serCollo): void {
  203.         $this->serCollo $serCollo;
  204.     }
  205.     /**
  206.      * @return int
  207.      */
  208.     public function getNumCollo(): int {
  209.         return $this->numCollo;
  210.     }
  211.     /**
  212.      * @param int $numCollo
  213.      */
  214.     public function setNumCollo(?int $numCollo): void {
  215.         $this->numCollo $numCollo;
  216.     }
  217.     /**
  218.      * @return string
  219.      */
  220.     public function getRifOrd(): ?string {
  221.         return $this->rifOrd;
  222.     }
  223.     /**
  224.      * @param string $rifOrd
  225.      */
  226.     public function setRifOrd(?string $rifOrd): void {
  227.         $this->rifOrd $rifOrd;
  228.     }
  229.     /**
  230.      * @return string
  231.      */
  232.     public function getCodAnag(): ?string {
  233.         return $this->codAnag;
  234.     }
  235.     /**
  236.      * @param string $codAnag
  237.      */
  238.     public function setCodAnag(?string $codAnag): void {
  239.         $this->codAnag $codAnag;
  240.     }
  241.     /**
  242.      * @return string
  243.      */
  244.     public function getCodVdes(): string {
  245.         return $this->codVdes;
  246.     }
  247.     /**
  248.      * @param string $codVdes
  249.      */
  250.     public function setCodVdes(string $codVdes): void {
  251.         $this->codVdes $codVdes;
  252.     }
  253.     /**
  254.      * @return string
  255.      */
  256.     public function getCodMdep(): string {
  257.         return $this->codMdep;
  258.     }
  259.     /**
  260.      * @param string $codMdep
  261.      */
  262.     public function setCodMdep(string $codMdep): void {
  263.         $this->codMdep $codMdep;
  264.     }
  265.     /**
  266.      * @return string
  267.      */
  268.     public function getCodVlis(): string {
  269.         return $this->codVlis;
  270.     }
  271.     /**
  272.      * @param string $codVlis
  273.      */
  274.     public function setCodVlis(string $codVlis): void {
  275.         $this->codVlis $codVlis;
  276.     }
  277.     /**
  278.      * @return string
  279.      */
  280.     public function getCodDtip(): string {
  281.         return $this->codDtip;
  282.     }
  283.     /**
  284.      * @param string $codDtip
  285.      */
  286.     public function setCodDtip(string $codDtip): void {
  287.         $this->codDtip $codDtip;
  288.     }
  289.     /**
  290.      * @return string
  291.      */
  292.     public function getCodTcol(): string {
  293.         return $this->codTcol;
  294.     }
  295.     /**
  296.      * @param string $codTcol
  297.      */
  298.     public function setCodTcol(string $codTcol): void {
  299.         $this->codTcol $codTcol;
  300.     }
  301.     /**
  302.      * @return string
  303.      */
  304.     public function getSerDoc(): string {
  305.         return $this->serDoc;
  306.     }
  307.     /**
  308.      * @param string $serDoc
  309.      */
  310.     public function setSerDoc(string $serDoc): void {
  311.         $this->serDoc $serDoc;
  312.     }
  313.     /**
  314.      * @return string
  315.      */
  316.     public function getFiltroOrdini(): string {
  317.         return $this->filtroOrdini;
  318.     }
  319.     /**
  320.      * @param string $filtroOrdini
  321.      */
  322.     public function setFiltroOrdini(string $filtroOrdini): void {
  323.         $this->filtroOrdini $filtroOrdini;
  324.     }
  325.     /**
  326.      * @return string
  327.      */
  328.     public function getPreparatoDa(): string {
  329.         return $this->preparatoDa;
  330.     }
  331.     /**
  332.      * @param string $preparatoDa
  333.      */
  334.     public function setPreparatoDa(string $preparatoDa): void {
  335.         $this->preparatoDa $preparatoDa;
  336.     }
  337.     /**
  338.      * @return string
  339.      */
  340.     public function getAnnotazioni(): string {
  341.         return $this->annotazioni;
  342.     }
  343.     /**
  344.      * @param string|null $annotazioni
  345.      */
  346.     public function setAnnotazioni(?string $annotazioni): void {
  347.         $this->annotazioni $annotazioni;
  348.     }
  349.     /**
  350.      * @return string
  351.      */
  352.     public function getPosizione(): string {
  353.         return $this->posizione;
  354.     }
  355.     /**
  356.      * @param string $posizione
  357.      */
  358.     public function setPosizione(string $posizione): void {
  359.         $this->posizione $posizione;
  360.     }
  361.     /**
  362.      * @return string
  363.      */
  364.     public function getCodDtipProvv(): string {
  365.         return $this->codDtipProvv;
  366.     }
  367.     /**
  368.      * @param string|null $codDtipProvv
  369.      */
  370.     public function setCodDtipProvv(string $codDtipProvv null): void {
  371.         $this->codDtipProvv $codDtipProvv;
  372.     }
  373.     /**
  374.      * @return string
  375.      */
  376.     public function getSerDocProvv(): string {
  377.         return $this->serDocProvv;
  378.     }
  379.     /**
  380.      * @param string $serDocProvv
  381.      */
  382.     public function setSerDocProvv(string $serDocProvv): void {
  383.         $this->serDocProvv $serDocProvv;
  384.     }
  385.     /**
  386.      * @return string
  387.      */
  388.     public function getCodJfas(): string {
  389.         return $this->codJfas;
  390.     }
  391.     /**
  392.      * @param string $codJfas
  393.      */
  394.     public function setCodJfas(string $codJfas): void {
  395.         $this->codJfas $codJfas;
  396.     }
  397.     /**
  398.      * @return DateTime
  399.      */
  400.     public function getDataOrd(): DateTime {
  401.         return $this->dataOrd;
  402.     }
  403.     /**
  404.      * @param DateTime $dataOrd
  405.      */
  406.     public function setDataOrd(DateTime $dataOrd): void {
  407.         $this->dataOrd $dataOrd;
  408.     }
  409.     /**
  410.      * @return DateTime
  411.      */
  412.     public function getDataDoc(): DateTime {
  413.         return $this->dataDoc;
  414.     }
  415.     /**
  416.      * @param DateTime $dataDoc
  417.      */
  418.     public function setDataDoc(DateTime $dataDoc): void {
  419.         $this->dataDoc $dataDoc;
  420.     }
  421.     /**
  422.      * @return DateTime
  423.      */
  424.     public function getOraInizPrep(): DateTime {
  425.         return $this->oraInizPrep;
  426.     }
  427.     /**
  428.      * @param DateTime $oraInizPrep
  429.      */
  430.     public function setOraInizPrep(DateTime $oraInizPrep): void {
  431.         $this->oraInizPrep $oraInizPrep;
  432.     }
  433.     /**
  434.      * @return DateTime
  435.      */
  436.     public function getOraFinePrep(): DateTime {
  437.         return $this->oraFinePrep;
  438.     }
  439.     /**
  440.      * @param DateTime $oraFinePrep
  441.      */
  442.     public function setOraFinePrep(DateTime $oraFinePrep): void {
  443.         $this->oraFinePrep $oraFinePrep;
  444.     }
  445.     /**
  446.      * @return DateTime
  447.      */
  448.     public function getDataDocProvv(): DateTime {
  449.         return $this->dataDocProvv;
  450.     }
  451.     /**
  452.      * @param DateTime $dataDocProvv
  453.      */
  454.     public function setDataDocProvv(DateTime $dataDocProvv): void {
  455.         $this->dataDocProvv $dataDocProvv;
  456.     }
  457.     /**
  458.      * @return DateTime
  459.      */
  460.     public function getDataVers(): DateTime {
  461.         return $this->dataVers;
  462.     }
  463.     /**
  464.      * @param DateTime $dataVers
  465.      */
  466.     public function setDataVers(DateTime $dataVers): void {
  467.         $this->dataVers $dataVers;
  468.     }
  469.     /**
  470.      * @return int
  471.      */
  472.     public function getSegno(): int {
  473.         return $this->segno;
  474.     }
  475.     /**
  476.      * @param int $segno
  477.      */
  478.     public function setSegno(int $segno): void {
  479.         $this->segno $segno;
  480.     }
  481.     /**
  482.      * @return int
  483.      */
  484.     public function getNumOrd(): int {
  485.         return $this->numOrd;
  486.     }
  487.     /**
  488.      * @param int $numOrd
  489.      */
  490.     public function setNumOrd(int $numOrd): void {
  491.         $this->numOrd $numOrd;
  492.     }
  493.     /**
  494.      * @return int
  495.      */
  496.     public function getNumDoc(): int {
  497.         return $this->numDoc;
  498.     }
  499.     /**
  500.      * @param int $numDoc
  501.      */
  502.     public function setNumDoc(int $numDoc): void {
  503.         $this->numDoc $numDoc;
  504.     }
  505.     /**
  506.      * @return int
  507.      */
  508.     public function getNumDocProvv(): int {
  509.         return $this->numDocProvv;
  510.     }
  511.     /**
  512.      * @param int $numDocProvv
  513.      */
  514.     public function setNumDocProvv(int $numDocProvv): void {
  515.         $this->numDocProvv $numDocProvv;
  516.     }
  517.     /**
  518.      * @return float
  519.      */
  520.     public function getPesoKg(): float {
  521.         return $this->pesoKg;
  522.     }
  523.     /**
  524.      * @param float $pesoKg
  525.      */
  526.     public function setPesoKg(float $pesoKg): void {
  527.         $this->pesoKg $pesoKg;
  528.     }
  529.     /**
  530.      * @return float
  531.      */
  532.     public function getLunghezzaCm(): float {
  533.         return $this->lunghezzaCm;
  534.     }
  535.     /**
  536.      * @param float $lunghezzaCm
  537.      */
  538.     public function setLunghezzaCm(float $lunghezzaCm): void {
  539.         $this->lunghezzaCm $lunghezzaCm;
  540.     }
  541.     /**
  542.      * @return float
  543.      */
  544.     public function getLarghezzaCm(): float {
  545.         return $this->larghezzaCm;
  546.     }
  547.     /**
  548.      * @param float $larghezzaCm
  549.      */
  550.     public function setLarghezzaCm(float $larghezzaCm): void {
  551.         $this->larghezzaCm $larghezzaCm;
  552.     }
  553.     /**
  554.      * @return float
  555.      */
  556.     public function getAltezzaCm(): float {
  557.         return $this->altezzaCm;
  558.     }
  559.     /**
  560.      * @param float $altezzaCm
  561.      */
  562.     public function setAltezzaCm(float $altezzaCm): void {
  563.         $this->altezzaCm $altezzaCm;
  564.     }
  565.     /**
  566.      * @return float
  567.      */
  568.     public function getPesoNettoKg(): float {
  569.         return $this->pesoNettoKg;
  570.     }
  571.     /**
  572.      * @param float $pesoNettoKg
  573.      */
  574.     public function setPesoNettoKg(float $pesoNettoKg): void {
  575.         $this->pesoNettoKg $pesoNettoKg;
  576.     }
  577.     /**
  578.      * @return DateTime
  579.      */
  580.     public function getDataDistribuzione(): DateTime {
  581.         return $this->dataDistribuzione;
  582.     }
  583.     /**
  584.      * @param DateTime $dataDistribuzione
  585.      */
  586.     public function setDataDistribuzione(DateTime $dataDistribuzione): void {
  587.         $this->dataDistribuzione $dataDistribuzione;
  588.     }
  589.     /**
  590.      * @return MtbColr[]
  591.      */
  592.     public function getMtbColr(): array {
  593.         return $this->mtbColr;
  594.     }
  595.     /**
  596.      * @param MtbColr[] $mtbColr
  597.      */
  598.     public function setMtbColr(array $mtbColr): void {
  599.         $this->mtbColr $mtbColr;
  600.     }
  601.     public function addMtbColr(MtbColr $mtbColr) {
  602.         $this->mtbColr[] = $mtbColr;
  603.     }
  604.     /**
  605.      * @return MtbCols[]
  606.      */
  607.     public function getMtbCols(): array {
  608.         return $this->mtbCols;
  609.     }
  610.     /**
  611.      * @param MtbCols[] $mtbCols
  612.      */
  613.     public function setMtbCols(array $mtbCols): void {
  614.         $this->mtbCols $mtbCols;
  615.     }
  616.     public function addMtbCols(MtbCols $mtbCols) {
  617.         $this->mtbCols[] = $mtbCols;
  618.     }
  619.     public function getBarcodeUl(): string {
  620.         return $this->barcodeUl;
  621.     }
  622.     public function setBarcodeUl(string $barcodeUl): void {
  623.         $this->barcodeUl $barcodeUl;
  624.     }
  625.     public function getBarcodeUlFormatted() {
  626.         if (isset($this->dataCollo$this->serCollo$this->numCollo)) {
  627.             return "U" $this->dataCollo->format("Y") . str_pad($this->numCollo7"0"STR_PAD_LEFT) . $this->serCollo;
  628.         } else {
  629.             return null;
  630.         }
  631.     }
  632.     public function fromDto($dto) {
  633.         $this->gestione $this->getFromDto($dto"gestione");
  634.         $this->dataCollo $this->getFromDto($dto"dataCollo");
  635.         $this->serCollo $this->getFromDto($dto"serCollo");
  636.         $this->numCollo $this->getFromDto($dto"numCollo");
  637.         $this->rifOrd $this->getFromDto($dto"rifOrd");
  638.         $this->codAnag $this->getFromDto($dto"codAnag");
  639.         $this->codVdes $this->getFromDto($dto"codVdes");
  640.         $this->codMdep $this->getFromDto($dto"codMdep");
  641.         $this->codVlis $this->getFromDto($dto"codVlis");
  642.         $this->codDtip $this->getFromDto($dto"codDtip");
  643.         $this->codTcol $this->getFromDto($dto"codTcol");
  644.         $this->serDoc $this->getFromDto($dto"serDoc");
  645.         $this->filtroOrdini $this->getFromDto($dto"filtroOrdini");
  646.         $this->preparatoDa $this->getFromDto($dto"preparatoDa");
  647.         $this->annotazioni $this->getFromDto($dto"annotazioni");
  648.         $this->posizione $this->getFromDto($dto"posizione");
  649.         $this->codDtipProvv $this->getFromDto($dto"codDtipProvv");
  650.         $this->serDocProvv $this->getFromDto($dto"serDocProvv");
  651.         $this->codJfas $this->getFromDto($dto"codJfas");
  652.         $this->dataOrd $this->getFromDto($dto"dataOrd");
  653.         $this->dataDoc $this->getFromDto($dto"dataDoc");
  654.         $this->oraInizPrep $this->getFromDto($dto"oraInizPrep");
  655.         $this->oraFinePrep $this->getFromDto($dto"oraFinePrep");
  656.         $this->dataDocProvv $this->getFromDto($dto"dataDocProvv");
  657.         $this->dataVers $this->getFromDto($dto"dataVers");
  658.         $this->segno $this->getFromDto($dto"segno");
  659.         $this->numOrd $this->getFromDto($dto"numOrd");
  660.         $this->numDoc $this->getFromDto($dto"numDoc");
  661.         $this->numDocProvv $this->getFromDto($dto"numDocProvv");
  662.         $this->pesoKg $this->getFromDto($dto"pesoKg");
  663.         $this->lunghezzaCm $this->getFromDto($dto"lunghezzaCm");
  664.         $this->larghezzaCm $this->getFromDto($dto"larghezzaCm");
  665.         $this->altezzaCm $this->getFromDto($dto"altezzaCm");
  666.         $this->pesoNettoKg $this->getFromDto($dto"pesoNettoKg");
  667.         $this->dataDistribuzione $this->getFromDto($dto"dataDistribuzione");
  668.         $this->barcodeUl $this->getFromDto($dto"barcodeUl");
  669.     }
  670.     public static function fromJson($json) {
  671.         $mtbColt = new MtbColt();
  672.         $mtbColt->fromDto($json);
  673.         return $mtbColt;
  674.     }
  675.     public function getType() {
  676.         return "mtb_colt";
  677.     }
  678.     public function jsonSerialize() {
  679.         return [
  680.             "operation" => $this->getOperation(),
  681.             "type" => $this->getType(),
  682.             "gestione" => $this->getForDto($this->gestione),
  683.             "dataCollo" => $this->getForDto($this->dataCollo),
  684.             "serCollo" => $this->getForDto($this->serCollo),
  685.             "numCollo" => $this->getForDto($this->numCollo),
  686.             "rifOrd" => $this->getForDto($this->rifOrd),
  687.             "codAnag" => $this->getForDto($this->codAnag),
  688.             "codVdes" => $this->getForDto($this->codVdes),
  689.             "codMdep" => $this->getForDto($this->codMdep),
  690.             "codVlis" => $this->getForDto($this->codVlis),
  691.             "codDtip" => $this->getForDto($this->codDtip),
  692.             "codTcol" => $this->getForDto($this->codTcol),
  693.             "serDoc" => $this->getForDto($this->serDoc),
  694.             "filtroOrdini" => $this->getForDto($this->filtroOrdini),
  695.             "preparatoDa" => $this->getForDto($this->preparatoDa),
  696.             "annotazioni" => $this->getForDto($this->annotazioni),
  697.             "posizione" => $this->getForDto($this->posizione),
  698.             "codDtipProvv" => $this->getForDto($this->codDtipProvv),
  699.             "serDocProvv" => $this->getForDto($this->serDocProvv),
  700.             "codJfas" => $this->getForDto($this->codJfas),
  701.             "dataOrd" => $this->getForDto($this->dataOrd),
  702.             "dataDoc" => $this->getForDto($this->dataDoc),
  703.             "oraInizPrep" => $this->getForDto($this->oraInizPrep),
  704.             "oraFinePrep" => $this->getForDto($this->oraFinePrep),
  705.             "dataDocProvv" => $this->getForDto($this->dataDocProvv),
  706.             "dataVers" => $this->getForDto($this->dataVers),
  707.             "segno" => $this->getForDto($this->segno),
  708.             "numOrd" => $this->getForDto($this->numOrd),
  709.             "numDoc" => $this->getForDto($this->numDoc),
  710.             "numDocProvv" => $this->getForDto($this->numDocProvv),
  711.             "pesoKg" => $this->getForDto($this->pesoKg),
  712.             "lunghezzaCm" => $this->getForDto($this->lunghezzaCm),
  713.             "larghezzaCm" => $this->getForDto($this->larghezzaCm),
  714.             "altezzaCm" => $this->getForDto($this->altezzaCm),
  715.             "pesoNettoKg" => $this->getForDto($this->pesoNettoKg),
  716.             "barcodeUl" => $this->getForDto($this->barcodeUl),
  717.             "dataDistribuzione" => $this->getForDto($this->dataDistribuzione),
  718.             "mtbColr" => $this->getForDto($this->mtbColr),
  719.             "mtbCols" => $this->getForDto($this->mtbCols),
  720.         ];
  721.     }
  722. }