Created
March 12, 2020 06:35
-
-
Save kei0425/9ff73c92a9db4aa859e03288083e2f12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val toDataPathMap = getFacilityInfoMap( | |
FacilityExchangeTable | |
.innerJoin( | |
otherTable = RoomExchangeTable, | |
onColumn = { FacilityExchangeTable.facilityId }, | |
otherColumn = { RoomExchangeTable.facilityId }) | |
.innerJoin( | |
otherTable = RiyosyaFcHeyaIdRelTable, | |
onColumn = { RoomExchangeTable.fcHeyaId }, | |
otherColumn = { RiyosyaFcHeyaIdRelTable.fcHeyaId }) | |
.innerJoin( | |
otherTable = RoundVitalTable, | |
onColumn = { RiyosyaFcHeyaIdRelTable.riyosyaCode }, | |
otherColumn = { RoundVitalTable.riyosyaCode }) | |
.slice( | |
FacilityExchangeTable.facilityId, FacilityExchangeTable.toDataPath, RoundVitalTable.riyosyaCode | |
).select { | |
(RoomExchangeTable.enable eq true) | |
}.withDistinct().orderBy(FacilityExchangeTable.toDataPath to SortOrder.ASC).map { | |
mutableMapOf( | |
"facility_id" to it[FacilityExchangeTable.facilityId], | |
"to_data_path" to it[FacilityExchangeTable.toDataPath], | |
"riyosya_code" to it[RoundVitalTable.riyosyaCode] | |
) | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment