卷号规则
This commit is contained in:
parent
f4f38fa7dd
commit
f55c19f5e5
|
|
@ -1097,6 +1097,7 @@ begin
|
|||
sql.Add('from WFB_MJJY X where X.subID=''' + trim(FSubId) + ''' ');
|
||||
sql.add('and X.MJStr4=' + quotedstr(trim(MJstr4.text)));
|
||||
sql.add('and X.dingdanhao=' + quotedstr(trim(dingdanhao.text)));
|
||||
sql.add('and X.YS=' + quotedstr(trim(YS.text)));
|
||||
Open;
|
||||
MJXH.Text := Trim(fieldbyname('maxRoll').AsString);
|
||||
end;
|
||||
|
|
@ -1302,8 +1303,8 @@ begin
|
|||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('update WFB_MJJY SET mjxh=1+isnull((select cast (max(mjxh) as int) from WFB_MJJY X ');
|
||||
sql.Add(' where X.subID=WFB_MJJY.subID and isnull(X.mjstr4,'''')=isnull(WFB_MJJY.mjstr4,'''') and isnull(X.dingdanhao,'''')=isnull(WFB_MJJY.dingdanhao,'''') and X.MJID<>WFB_MJJY.MJID),0) ');
|
||||
sql.Add('update WFB_MJJY SET mjxh=1+isnull((select cast (max(mjxh) as int) from WFB_MJJY X where X.subID=WFB_MJJY.subID and isnull(X.mjstr4,'''')=isnull(WFB_MJJY.mjstr4,'''') ');
|
||||
sql.Add(' and isnull(X.dingdanhao,'''')=isnull(WFB_MJJY.dingdanhao,'''')and isnull(X.YS,'''')=isnull(WFB_MJJY.YS,'''') and X.MJID<>WFB_MJJY.MJID),0) ');
|
||||
sql.Add('where MJID=''' + Trim(maxno) + '''');
|
||||
execsql;
|
||||
end;
|
||||
|
|
@ -1450,8 +1451,8 @@ begin
|
|||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
sql.Add('select Top 1 MJXH,MJID from WFB_MJJY A ');
|
||||
sql.Add(' where A.mainID=''' + Trim(FMainId) + ''' and isnull(A.dingdanhao,'''')=''' + Trim(dingdanhao.Text) + ''' and isnull(A.MJStr4,'''')=''' + Trim(MJStr4.Text) + '''');
|
||||
sql.Add('select Top 1 MJXH,MJID from WFB_MJJY A where A.mainID=''' + Trim(FMainId) + ''' and isnull(A.dingdanhao,'''')=''' + Trim(dingdanhao.Text) + ''' ');
|
||||
sql.Add(' and isnull(A.YS,'''')=''' + Trim(YS.Text) + ''' and isnull(A.MJStr4,'''')=''' + Trim(MJStr4.Text) + '''');
|
||||
sql.Add(' order by MJXH Desc');
|
||||
Open;
|
||||
end;
|
||||
|
|
@ -1516,8 +1517,8 @@ begin
|
|||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('select subid,MJStr4,MJXH from WFB_MJJY X where X.mainID=''' + Trim(FMainId) + ''' and isnull(X.dingdanhao,'''')=''' + Trim(dingdanhao.Text) + ''' and isnull(X.MJStr4,'''')=''' + Trim(MJStr4.Text) + '''');
|
||||
sql.Add(' Group by subid,MJStr4,MJXH having count(*)>1');
|
||||
sql.Add('select subid,MJStr4,MJXH from WFB_MJJY X where X.mainID=''' + Trim(FMainId) + ''' and isnull(X.dingdanhao,'''')=''' + Trim(dingdanhao.Text) + ''' ');
|
||||
sql.Add(' and isnull(X.MJStr4,'''')=''' + Trim(MJStr4.Text) + ''' and isnull(X.YS,'''')=''' + Trim(YS.Text) + ''' Group by subid,MJStr4,MJXH having count(*)>1');
|
||||
Open;
|
||||
end;
|
||||
|
||||
|
|
@ -2802,6 +2803,7 @@ begin
|
|||
sql.Add('from WFB_MJJY X where X.subID=''' + trim(FSubId) + ''' ');
|
||||
sql.add('and X.MJStr4=' + quotedstr(trim(MJstr4.text)));
|
||||
sql.add('and X.dingdanhao=' + quotedstr(trim(dingdanhao.text)));
|
||||
sql.add('and X.YS=' + quotedstr(trim(YS.text)));
|
||||
Open;
|
||||
MJXH.Text := Trim(fieldbyname('maxRoll').AsString);
|
||||
end;
|
||||
|
|
@ -2844,6 +2846,7 @@ begin
|
|||
sql.Add('from WFB_MJJY X where X.subID=''' + trim(FSubId) + ''' ');
|
||||
sql.add('and X.MJStr4=' + quotedstr(trim(MJstr4.text)));
|
||||
sql.add('and X.dingdanhao=' + quotedstr(trim(dingdanhao.text)));
|
||||
sql.add('and X.YS=' + quotedstr(trim(YS.text)));
|
||||
Open;
|
||||
MJXH.Text := Trim(fieldbyname('maxRoll').AsString);
|
||||
end;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user