Closed petarjov closed 4 years ago
remind me how is a work package related to other entities? from the code in java I see
for (int i = 0; i < SIZE; i++) {
if (slotKinds[i].equalsIgnoreCase("Maintenance") || delays[i] > 0) {
workPackages += "(" + workPackageIDs[i] + ","
+ "'" + executionDates[i] + "'" + ","
+ "'" + executionPlaces[i] + "'" + "),\n";
for (int j = 0; j < MAX_WORK_ORDERS; j++) {
if (workOrder_workOrderKinds[i][j].equalsIgnoreCase("Forecast"))
forecastedOrders +=
"(" + workOrderIDs[i][j] + ","
+ "'" + workOrder_aircraftRegs[i][j] + "'" + ","
+ "'" + workOrder_executionDates[i][j] + "'" + ","
+ "'" + workOrder_executionPlaces[i][j] + "'" + ","
+ workOrder_workPackageIDs[i][j] + "," // dependence between package and order
+ "'" + workOrder_workOrderKinds[i][j] + "'" + ","
+ "'" + workOrder_deadlines[i][j] + "'" + ","
+ "'" + workOrder_plannedDates[i][j] + "'" + ","
+ workOrder_frequencies[i][j] + ","
+ "'" + workOrder_frequencyUnits[i][j] + "'" + ","
+ workOrder_forecastedManHours[i][j] + "),\n";
else if (workOrder_workOrderKinds[i][j].equalsIgnoreCase("TechnicalLogBook"))
technicalLogBookOrders += "(" + workOrderIDs[i][j] + ","
+ "'" + workOrder_aircraftRegs[i][j] + "'" + ","
+ "'" + workOrder_executionDates[i][j] + "'" + ","
+ "'" + workOrder_executionPlaces[i][j] + "'" + ","
+ workOrder_workPackageIDs[i][j] + "," // dependence between package and order
+ "'" + workOrder_workOrderKinds[i][j] + "'" + ","
+ "'" + workOrder_reporteurClasses[i][j] + "'" + ","
+ workOrder_reporteurIDs[i][j] + ","
+ "'" + workOrder_dueDates[i][j] + "'" + ","
+ workOrder_deferreds[i][j] + ","
+ "'" + workOrder_MELs[i][j] + "'" + ","
+ "'" + workOrder_reportingDate[i][j] + "'" + "),\n";
}
}
}
What I understand from this is that
workpackage
column in both ForecastedOrder
and TechnicalLogbookOrder
Is that correct? am I missing something?
Correct! WorkOrdrers table has workPackage column which is supposed to be a foreign key to WorkPackage table so both ForcastedOrder and TLBOrder have a reference to it.
@petarjov I updated the code and the existing tests, and tried
$ airbase-gen sql --prob-noisy 0.3 --prob-bad 0.5 --db-pwd "admin" --hard
against a clean database. Can you check it?
I shouldn't have closed the issue, opening it again until then
I totally missed this one, fixing it asap