添加了注释,完善了参数校验及空值处理
This commit is contained in:
@@ -20,26 +20,6 @@ object GlobalData {
|
||||
var warehouseTypeList: List<DictType> = arrayListOf()
|
||||
var supplierTypeList: List<DictType> = arrayListOf()
|
||||
var unitTypeList: List<DictType> = arrayListOf()
|
||||
|
||||
fun getStorageType(id: Int): String {
|
||||
return storageTypeList.find { it.id == id }?.value ?: "默认"
|
||||
}
|
||||
|
||||
fun getGoodsType(id: Int): String {
|
||||
return goodsTypeList.find { it.id == id }?.value ?: "-"
|
||||
}
|
||||
|
||||
fun getWarehouseType(id: Int): String {
|
||||
return warehouseTypeList.find { it.id == id }?.value ?: "-"
|
||||
}
|
||||
|
||||
fun getSupplierType(id: Int): String {
|
||||
return supplierTypeList.find { it.id == id }?.value ?: "-"
|
||||
}
|
||||
|
||||
fun getUnitType(id: Int): String {
|
||||
return unitTypeList.find { it.id == id }?.value ?: "-"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user