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

View File

@ -133,10 +133,12 @@ type
[MVCSwagSummary('V<>roba - v<>robn<62> p<><70>kaz', 'Vr<56>t<EFBFBD> v<>robn<62> p<><70>kaz', 'VyrobniPrikazGetByID')]
[MVCSwagResponses(200, 'Success', TVyrobniPrikaz)]
[MVCSwagParam(plPath, 'id', 'ID p<><70>kazu', ptString, false)]
[MVCSwagParam(plQuery, 'stav', 'P<><50>kazy jen v po<70>adovan<61>m stavu (<28><>seln<6C>, nap<61>. 30=zad<61>no)', ptString, false)]
[MVCSwagParam(plQuery, 'operace', '1=vr<76>t<EFBFBD> seznam v<>robn<62> operace', ptString, false, '0')]
[MVCSwagParam(plQuery, 'material', '1=vr<76>t<EFBFBD> seznam materi<72>lov<6F>ch po<70>adavk<76>', 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');