添加了注释,完善了参数校验及空值处理

This commit is contained in:
zxj
2025-07-09 15:29:52 +08:00
parent de80a26c2c
commit 6cf7b4fb9b
42 changed files with 584 additions and 334 deletions
@@ -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 ?: "-"
}
}
/**