Manuel Tauber 2024-05-17 15:20:36 +02:00
parent 01c1d1ff6b
commit d61190f742
3 changed files with 30 additions and 22 deletions

View File

@ -111,36 +111,43 @@ public class Change {
var entriesSize = api.getFormSize(qualifier, this.queryChange.getFormName());
var changes = new ArrayList<ChangeItem>();
System.out.println("###ABGERUFEN");
for (var entry : entries) {
var change = new ChangeItem(entry.getEntryId());
boolean approval = getValueStringByID(entry, "Approval").equals("0") ? true : false;
if (approval) {
var queryApproval = new Query.QueryBuilder("CHG:ChangeAPDetailSignature")
.addFieldId("Approvers", 13207).build();
// if (approval) {
// var queryApproval = new Query.QueryBuilder("CHG:ChangeAPDetailSignature")
// .addFieldId("Approvers", 13207).build();
String qual = "(\'1000000182\' = \"" + getValueStringByID(entry, "ChangeNr")
+ "\") AND (\'10000\' = \""
+ getValueStringByID(entry, "ApprovalProcessName")
+ "\") AND (\'13207\' LIKE \"%" + api.getUser() + "%\")";
// String qual = "(\'1000000182\' = \"" + getValueStringByID(entry, "ChangeNr")
// + "\") AND (\'10000\' = \""
// + getValueStringByID(entry, "ApprovalProcessName")
// + "\") AND (\'13207\' LIKE \"%" + api.getUser() + "%\")";
var queryApprovalProcessName = api.queryFieldsById(qual,
queryApproval.getFieldIds(), queryApproval.getFormName(), sort, 0, 0);
// var queryApprovalProcessName = api.queryFieldsById(qual,
// queryApproval.getFieldIds(), queryApproval.getFormName(), sort, 0, 0);
log.qualifierLog(queryApproval.getFormName(), qual);
// log.qualifierLog(queryApproval.getFormName(), qual);
if (!queryApprovalProcessName.isEmpty() && queryApprovalProcessName != null
&& queryApprovalProcessName.size() > 0)
change.setApproval(true);
else
change.setApproval(false);
// if (!queryApprovalProcessName.isEmpty() && queryApprovalProcessName != null
// && queryApprovalProcessName.size() > 0)
// change.setApproval(true);
// else
// change.setApproval(false);
// }
if(approval){
change.setApproval(true);
}else{
change.setApproval(false);
}
change.setChangeNr(getValueStringByID(entry, "ChangeNr"));
change.setSupportGroup(getValueStringByID(entry, "SupportGroup"));
change.setStatusReason(getValueStringByID(entry, "StatusReason"));
if(Optional.ofNullable(getValue(entry, "State")).map(Value::getIntValue).orElse(-1)== 10 || Optional.ofNullable(getValue(entry, "State")).map(Value::getIntValue).orElse(-1)== 9){
if(Optional.ofNullable(getValue(entry, "State")).map(Value::getIntValue).orElse(-1)== 10){
if(change.getStatusReason().equals("9000")){
@ -150,7 +157,7 @@ public class Change {
}
}
if(Optional.ofNullable(getValue(entry, "State")).map(Value::getIntValue).orElse(-1)== 9){
System.out.println("\n++++++++"+getValueStringByID(entry, "CurrentStageNumber"));
// System.out.println("\n++++++++"+getValueStringByID(entry, "CurrentStageNumber"));
if(getValueStringByID(entry, "CurrentStageNumber").equals("1")){
change.setState(9);
}else{
@ -165,7 +172,8 @@ public class Change {
}
System.out.println("\nStatus: "+change.getState());
// System.out.println("\nStatus: "+change.getState());
change.setPackageInstanceId(getValueStringByID(entry, "PackageInstanceId"));
change.setResourceName(getValueStringByID(entry, "ResourceName"));
@ -199,7 +207,7 @@ public class Change {
change.setPackageName(queryPackageName(getValueStringByID(entry, "PackageType").toString()));
changes.add(change);
}
System.out.println("###FERTIG");
System.out.println(entries.size());
api.freeImpersonatedUser();

View File

@ -216,7 +216,7 @@
<!-- [filterSettings]="filterSettings" -->
<mat-paginator #paginator [ngStyle]="{'visibility':renderGantt ? 'visible' : 'hidden'}" class="demo-paginator"
(page)="handlePageEvent($event)" [length]="this.dataService.getTotalSize()" [pageSize]="20" [disabled]="false"
(page)="handlePageEvent($event)" [length]="this.dataService.getTotalSize()" [pageSize]="200" [disabled]="false"
[showFirstLastButtons]="true" [pageSizeOptions]="[10, 20, 50, 70, 100, 200, 500]" [hidePageSize]="false"
[pageIndex]="0" aria-label="Seite auswählen">
</mat-paginator>

View File

@ -208,7 +208,7 @@ export class NttGanttComponent implements OnInit {
this.renderGantt = false;
this.firstLoad = true;
this.sliceStart = 0;
this.sliceEnd = 20;
this.sliceEnd = 200;
this.dataService.getUser().then((res: any) => {
console.log(res);