first commit
This commit is contained in:
46
src/main/kotlin/net/ipksindia/dao/TellerDao.kt
Normal file
46
src/main/kotlin/net/ipksindia/dao/TellerDao.kt
Normal file
@@ -0,0 +1,46 @@
|
||||
package dao
|
||||
|
||||
import model.Teller
|
||||
|
||||
class TellerDao {
|
||||
companion object {
|
||||
private val tellerMap = mapOf(
|
||||
"0016" to mapOf(
|
||||
"008" to "118"
|
||||
),
|
||||
"0012" to mapOf(
|
||||
"008" to "8",
|
||||
"022" to "22",
|
||||
"012" to "12",
|
||||
"014" to "14",
|
||||
"003" to "1003",
|
||||
"015" to "15",
|
||||
"013" to "13",
|
||||
"018" to "18",
|
||||
"001" to "1001",
|
||||
"004" to "4",
|
||||
"017" to "1234",
|
||||
"005" to "5",
|
||||
"011" to "11",
|
||||
"020" to "1234",
|
||||
"021" to "1234",
|
||||
"016" to "016",
|
||||
"009" to "9",
|
||||
"010" to "10",
|
||||
"007" to "7",
|
||||
"006" to "6"
|
||||
)
|
||||
|
||||
)
|
||||
fun getTeller(dccbCode: String, branchCode: String): Teller? {
|
||||
val branchList = tellerMap[dccbCode] ?: return null
|
||||
val tellerId = branchList[branchCode] ?: return null
|
||||
val teller = Teller(
|
||||
tellerId,
|
||||
dccbCode,
|
||||
branchCode
|
||||
)
|
||||
return teller
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user