Merge branch 'main' of https://dev.azure.com/asfinag/Tech-Supporting.ITSM/_git/Tech-Supporting.ITSM.ChangeKalender
commit
fbd207b31a
|
|
@ -49,13 +49,15 @@ public class SupportGroup {
|
||||||
var querySupportGroups = new Query.QueryBuilder(formAssoc)
|
var querySupportGroups = new Query.QueryBuilder(formAssoc)
|
||||||
.addFieldId("SupportGroup", 1000000015)
|
.addFieldId("SupportGroup", 1000000015)
|
||||||
.addFieldId("SupportGroupId", 1000000079)
|
.addFieldId("SupportGroupId", 1000000079)
|
||||||
|
.addFieldId("FunctionalRole", 1000000172)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
System.out.println(api.isAdministrator());
|
System.out.println(api.isAdministrator());
|
||||||
|
|
||||||
if (api.isAdministrator()) {
|
|
||||||
|
if (!api.isAdministrator()) {
|
||||||
this.supportGroups = api
|
this.supportGroups = api
|
||||||
.queryFieldsById("\'4\' != \"_\"", querySupportGroups.getFieldIds(),
|
.queryFieldsById("\'1000000172\' == 5000 OR \'1000000172\' == 6000", querySupportGroups.getFieldIds(),
|
||||||
querySupportGroups.getFormName(), null, 0, 0)
|
querySupportGroups.getFormName(), null, 0, 0)
|
||||||
.stream()
|
.stream()
|
||||||
.map(entry -> new SupportGroupGetResponse(
|
.map(entry -> new SupportGroupGetResponse(
|
||||||
|
|
@ -63,9 +65,16 @@ public class SupportGroup {
|
||||||
entry.get(querySupportGroups.getFieldId("SupportGroupId")).toString()))
|
entry.get(querySupportGroups.getFieldId("SupportGroupId")).toString()))
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toCollection(ArrayList::new));
|
.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 {
|
} else {
|
||||||
this.supportGroups = api
|
this.supportGroups = api
|
||||||
.queryFieldsById("\'4\' == \"" + api.getUser() + "\"", querySupportGroups.getFieldIds(),
|
.queryFieldsById("\'4\' != \"_\"", querySupportGroups.getFieldIds(),
|
||||||
querySupportGroups.getFormName(), null, 0, 0)
|
querySupportGroups.getFormName(), null, 0, 0)
|
||||||
.stream()
|
.stream()
|
||||||
.map(entry -> new SupportGroupGetResponse(
|
.map(entry -> new SupportGroupGetResponse(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue