finished convertion method

main
Said Gedik 2023-06-13 17:02:55 +02:00
parent d187689518
commit 2053955354
1 changed files with 6 additions and 7 deletions

View File

@ -130,10 +130,9 @@ public class Change {
// change.setFlagCancel(flagCancel(getValueStringByID(entry, "SupportGroupId"),
// state));
var ptMinutes = getValueStringByID(entry, "PlanTimeMinutes");
var ptHours = getValueStringByID(entry, "PlanTimeHours");
convertPlanTime(getValueStringByID(entry, "ChangeNr"), ptHours, ptMinutes);
var ptMinutes = getValueStringByID(entry, "PlanTimeMinutes").isEmpty() ? "00" : getValueStringByID(entry, "PlanTimeMinutes");
var ptHours = getValueStringByID(entry, "PlanTimeHours").isEmpty() ? "00" : getValueStringByID(entry, "PlanTimeHours");
change.setPlanTime(convertPlanTime(ptHours, ptMinutes));
try {
change.setPackageName(
@ -185,9 +184,9 @@ public class Change {
return peopleInfos.get(0).get(queryPerson.getFieldId("FullName")).toString();
}
public double convertPlanTime(String nr, String hours, String minutes) throws ARException {
System.out.println(nr + " -> " + hours +":" + minutes);
return 0.0;
public double convertPlanTime(String hours, String minutes) throws ARException {
double totalHours = Integer.valueOf(hours) + (Integer.valueOf(minutes)/60.0);
return totalHours;
}
// /**