Dalsi zmeny

This commit is contained in:
2026-03-03 16:18:27 +01:00
parent 03ff9ebc84
commit a62b608cfd
97 changed files with 4635 additions and 240 deletions
+10 -1
View File
@@ -133,10 +133,12 @@ type
[MVCSwagSummary('Výroba - výrobní příkaz', 'Vrátí výrobní příkaz', 'VyrobniPrikazGetByID')]
[MVCSwagResponses(200, 'Success', TVyrobniPrikaz)]
[MVCSwagParam(plPath, 'id', 'ID příkazu', ptString, false)]
[MVCSwagParam(plQuery, 'stav', 'Příkazy jen v požadovaném stavu (číselně, např. 30=zadáno)', ptString, false)]
[MVCSwagParam(plQuery, 'operace', '1=vrátí seznam výrobní operace', ptString, false, '0')]
[MVCSwagParam(plQuery, 'material', '1=vrátí seznam materiálových požadavků', ptString, false, '0')]
[MVCSwagParam(plQuery, 'debug', '1=zapise SQL query do log souboru', ptString, false, '0')]
procedure GetByID (id: string='0';
[MVCFromQueryString('stav', '')] stav: string='';
[MVCFromQueryString('operace', '0')] operace: string='';
[MVCFromQueryString('material', '0')] material: string='';
[MVCFromQueryString('debug', '0')] debug: string=''
@@ -1074,6 +1076,9 @@ uses
if (debug='1') then
params.Add('debug', debug);
stav:= sanitizeSQLString(stav);
if (stav='10') or (stav='20') or (stav='30') or (stav='40') or (stav='50') or (stav='60') then
params.Add('stav', stav);
radaVPr:= sanitizeSQLString (radaVPr);
@@ -1168,7 +1173,7 @@ uses
procedure TVyrobniPrikazController.GetByID (id: string='0'; operace: string=''; material: string=''; debug: string='');
procedure TVyrobniPrikazController.GetByID (id: string='0'; stav: string=''; operace: string=''; material: string=''; debug: string='');
var iId: integer;
params: TDictionary<string,string>;
begin
@@ -1180,6 +1185,10 @@ uses
if not(TryStrToInt(id, iId)) then
iId:= 0;
stav:= sanitizeSQLString(stav);
if (stav='10') or (stav='20') or (stav='30') or (stav='40') or (stav='50') or (stav='60') then
params.Add('stav', stav);
operace:= sanitizeSQLString(operace);
if (operace='1') then
params.Add('operace', '1');