support group query
parent
4fe306089a
commit
60455e9552
|
|
@ -54,36 +54,33 @@ public class SupportGroup {
|
||||||
|
|
||||||
System.out.println(api.isAdministrator());
|
System.out.println(api.isAdministrator());
|
||||||
|
|
||||||
|
this.supportGroups = api
|
||||||
|
.queryFieldsById("\'1000000172\' == 5000 OR \'1000000172\' == 6000", querySupportGroups.getFieldIds(),
|
||||||
|
querySupportGroups.getFormName(), null, 0, 0)
|
||||||
|
.stream()
|
||||||
|
.map(entry -> new SupportGroupGetResponse(
|
||||||
|
entry.get(querySupportGroups.getFieldId("SupportGroup")).toString(),
|
||||||
|
entry.get(querySupportGroups.getFieldId("SupportGroupId")).toString()))
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toCollection(ArrayList::new));
|
||||||
|
|
||||||
// if (!api.isAdministrator()) {
|
// nur zum testen
|
||||||
// this.supportGroups = api
|
var test = api
|
||||||
// .queryFieldsById("\'1000000172\' == 5000 OR \'1000000172\' == 6000", querySupportGroups.getFieldIds(),
|
.queryFieldsById("\'1000000172\' == 5000 OR \'1000000172\' == 6000", querySupportGroups.getFieldIds(),
|
||||||
// querySupportGroups.getFormName(), null, 0, 0)
|
querySupportGroups.getFormName(), null, 0, 0);
|
||||||
// .stream()
|
for (var t : test)
|
||||||
// .map(entry -> new SupportGroupGetResponse(
|
System.out.println(t);
|
||||||
// entry.get(querySupportGroups.getFieldId("SupportGroup")).toString(),
|
|
||||||
// entry.get(querySupportGroups.getFieldId("SupportGroupId")).toString()))
|
|
||||||
// .distinct()
|
|
||||||
// .collect(Collectors.toCollection(ArrayList::new));
|
|
||||||
|
|
||||||
// // nur zum testen
|
|
||||||
// var test = api
|
|
||||||
// .queryFieldsById("\'1000000172\' == 5000 OR \'1000000172\' == 6000", querySupportGroups.getFieldIds(),
|
|
||||||
// querySupportGroups.getFormName(), null, 0, 0);
|
|
||||||
// for (var t : test) System.out.println(t);
|
|
||||||
|
|
||||||
// } else {
|
|
||||||
this.supportGroups = api
|
|
||||||
.queryFieldsById("\'4\' != \"_\"", querySupportGroups.getFieldIds(),
|
|
||||||
querySupportGroups.getFormName(), null, 0, 0)
|
|
||||||
.stream()
|
|
||||||
.map(entry -> new SupportGroupGetResponse(
|
|
||||||
entry.get(querySupportGroups.getFieldId("SupportGroup")).toString(),
|
|
||||||
entry.get(querySupportGroups.getFieldId("SupportGroupId")).toString()))
|
|
||||||
.distinct()
|
|
||||||
.collect(Collectors.toCollection(ArrayList::new));
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
// ALLE SUPPORTGRUPPEN
|
||||||
|
// this.supportGroups = api
|
||||||
|
// .queryFieldsById("\'4\' != \"_\"", querySupportGroups.getFieldIds(),
|
||||||
|
// querySupportGroups.getFormName(), null, 0, 0)
|
||||||
|
// .stream()
|
||||||
|
// .map(entry -> new SupportGroupGetResponse(
|
||||||
|
// entry.get(querySupportGroups.getFieldId("SupportGroup")).toString(),
|
||||||
|
// entry.get(querySupportGroups.getFieldId("SupportGroupId")).toString()))
|
||||||
|
// .distinct()
|
||||||
|
// .collect(Collectors.toCollection(ArrayList::new));
|
||||||
|
|
||||||
if (this.supportGroups.isEmpty()) {
|
if (this.supportGroups.isEmpty()) {
|
||||||
throw new NotFoundError("No support groups found in this context");
|
throw new NotFoundError("No support groups found in this context");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue