This commit is contained in:
DESKTOP-E401PHE\Administrator 2026-02-05 17:16:14 +08:00
parent d4ae257c00
commit c8169edc6d

View File

@ -1345,7 +1345,7 @@ begin
Close; Close;
SQL.Clear; SQL.Clear;
sql.Add('select Top 1 MJXH,MJID from WFB_MJJY A '); sql.Add('select Top 1 MJXH,MJID from WFB_MJJY A ');
sql.Add(' where A.mainID=''' + Trim(FMainId) + ''' and isnull(A.MJStr4,'''')=''' + Trim(MJStr4.Text) + ''''); sql.Add(' where A.mainID=''' + Trim(FMainId) + ''' and A.subID=''' + Trim(FSubId) + ''' and isnull(A.MJStr4,'''')=''' + Trim(MJStr4.Text) + '''');
sql.Add(' order by MJXH Desc'); sql.Add(' order by MJXH Desc');
Open; Open;
end; end;
@ -1410,7 +1410,7 @@ begin
begin begin
Close; Close;
sql.Clear; sql.Clear;
sql.Add('select subid,MJStr4,MJXH from WFB_MJJY X where X.mainID=''' + Trim(FMainId) + ''' and isnull(X.MJStr4,'''')=''' + Trim(MJStr4.Text) + ''''); sql.Add('select subid,MJStr4,MJXH from WFB_MJJY X where X.mainID=''' + Trim(FMainId) + ''' and X.Subid=''' + Trim(FsubId) + ''' and isnull(X.MJStr4,'''')=''' + Trim(MJStr4.Text) + '''');
sql.Add(' Group by subid,MJStr4,MJXH having count(*)>1'); sql.Add(' Group by subid,MJStr4,MJXH having count(*)>1');
Open; Open;
end; end;