Merge branch 'KV_and_IH'

main
manueltauber 2023-06-01 12:09:56 +02:00
commit 4cb9c65bea
3 changed files with 24 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.checkerframework.common.util.report.qual.ReportCall;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -150,6 +150,12 @@ public class Change {
// change.setFlagReject(flagApproval(inApproval, state)); // change.setFlagReject(flagApproval(inApproval, state));
// change.setFlagCancel(flagCancel(getValueStringByID(entry, "SupportGroupId"), state)); // change.setFlagCancel(flagCancel(getValueStringByID(entry, "SupportGroupId"), state));
try {
change.setPackageName(queryPackageName(getValueStringByID(entry, "PackageType").toString()));
} catch (ARException e) {
e.printStackTrace();
}
changes.add(change); changes.add(change);
} }
@ -221,6 +227,11 @@ public class Change {
// : approversOI.get(0).get(queryApprovalList.getFieldId("Approvers")).toString(); // : approversOI.get(0).get(queryApprovalList.getFieldId("Approvers")).toString();
// return approvers != null ? approvers.contains(user) : false; // return approvers != null ? approvers.contains(user) : false;
// } // }
private String queryPackageName(String packageType) throws ARException{
var queryPackage = new Query.QueryBuilder("CTR:GenericContractJoinCFG_Package").addFieldId("PackageName", 200000020).build();
var packageName = api.queryFieldsById("\'InstanceId_Package\' = \"" + packageType + "\"", queryPackage.getFieldIds(), queryPackage.getFormName(), null, 0, 0).get(0);
return packageName.get(queryPackage.getFieldId("PackageName")).toString();
}
/** /**
* Returns the {@link Value} of an entry based on the provided description. * Returns the {@link Value} of an entry based on the provided description.

View File

@ -27,6 +27,7 @@ public class ChangeItem {
private String changeImplementerPersonId; private String changeImplementerPersonId;
private boolean implementerEdit; private boolean implementerEdit;
private String packageType; private String packageType;
private String packageName;
private Date D1; private Date D1;
private Date D2; private Date D2;
private Date D3; private Date D3;
@ -160,6 +161,7 @@ public class ChangeItem {
this.changeImplementerPersonId = changeImplementerPersonId; this.changeImplementerPersonId = changeImplementerPersonId;
} }
<<<<<<< HEAD
// /** // /**
// * Retrieves the flag indicating whether the change item has a permit. // * Retrieves the flag indicating whether the change item has a permit.
// * // *
@ -239,6 +241,16 @@ public class ChangeItem {
// public void setFlagCancel(boolean flagCancel) { // public void setFlagCancel(boolean flagCancel) {
// this.flagCancel = flagCancel; // this.flagCancel = flagCancel;
// } // }
=======
public String getPackageName() {
return this.packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
>>>>>>> KV_and_IH
/** /**
* Gets the status reason of the change item. * Gets the status reason of the change item.