Skip to content

Commit

Permalink
Mitgliedsuche auch Sekundaere Beitragsgruppe finden (#251)
Browse files Browse the repository at this point in the history
* Mitgliedsuche auch Sekundaere Beitragsgruppe finden

* Beitragsgruppe Subselect entfernt

* Sekundaerebeitragsgruppe es musste LEFT JOIN sein

---------

Co-authored-by: dippeal <63780296+dippeal@users.noreply.github.com>
  • Loading branch information
lenilsas and dippeal authored Jul 1, 2024
1 parent 5016c5f commit e27dc5f
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/de/jost_net/JVerein/Queries/MitgliedQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,18 @@ public ArrayList<Mitglied> get(int adresstyp) throws RemoteException
}
}
}
if (control.isBeitragsgruppeAuswAktiv())
{
Beitragsgruppe bg = (Beitragsgruppe) control.getBeitragsgruppeAusw()
.getValue();
if (bg != null)
{
sql += " left join sekundaerebeitragsgruppe on sekundaerebeitragsgruppe.mitglied = mitglied.id ";
addCondition("(mitglied.beitragsgruppe = ? OR sekundaerebeitragsgruppe.beitragsgruppe = ?)");
bedingungen.add(Integer.valueOf(bg.getID()));
bedingungen.add(Integer.valueOf(bg.getID()));
}
}
if (adresstyp != 0)
{
addCondition("adresstyp = " + adresstyp);
Expand Down Expand Up @@ -396,16 +408,6 @@ else if (control.getMitgliedStatus().getValue().equals("Abgemeldet"))
// Workaround für einen Bug in IntegerInput
}
}
if (control.isBeitragsgruppeAuswAktiv())
{
Beitragsgruppe bg = (Beitragsgruppe) control.getBeitragsgruppeAusw()
.getValue();
if (bg != null)
{
addCondition("beitragsgruppe = ? ");
bedingungen.add(Integer.valueOf(bg.getID()));
}
}
if (control.isSortierungAktiv())
{
String sort = (String) control.getSortierung().getValue();
Expand Down

0 comments on commit e27dc5f

Please sign in to comment.