类型转换异常

This commit is contained in:
王奎兴
2026-07-14 09:29:02 +08:00
parent 52172dc3d7
commit fad5eb66fa
@@ -613,7 +613,8 @@ public class StockInOrderDomainService {
} }
int index=0; int index=0;
for (Map<String, Object> stringObjectMap : shelfList) { for (Map<String, Object> stringObjectMap : shelfList) {
BigDecimal shelvesQuantity = (BigDecimal) stringObjectMap.get("shelvesQuantity"); Object shelvesQuantityObj = stringObjectMap.get("shelvesQuantity");
BigDecimal shelvesQuantity = shelvesQuantityObj != null ? new BigDecimal(String.valueOf(shelvesQuantityObj)) : null;
String shelfOrderNumber = (String) stringObjectMap.get("shelfOrderNumber"); String shelfOrderNumber = (String) stringObjectMap.get("shelfOrderNumber");
String warehouseCode = (String) stringObjectMap.get("warehouseCode"); String warehouseCode = (String) stringObjectMap.get("warehouseCode");
String warehouseName = (String) stringObjectMap.get("warehouseName"); String warehouseName = (String) stringObjectMap.get("warehouseName");
@@ -621,9 +622,12 @@ public class StockInOrderDomainService {
String storageName = (String) stringObjectMap.get("storageName"); String storageName = (String) stringObjectMap.get("storageName");
String storageLocationCode = (String) stringObjectMap.get("storageLocationCode"); String storageLocationCode = (String) stringObjectMap.get("storageLocationCode");
String storageLocationName = (String) stringObjectMap.get("storageLocationName"); String storageLocationName = (String) stringObjectMap.get("storageLocationName");
Long warehouseId = (Long) stringObjectMap.get("warehouseId"); Object warehouseIdObj = stringObjectMap.get("warehouseId");
Long storageSectionId = (Long) stringObjectMap.get("storageSectionId"); Long warehouseId = warehouseIdObj != null ? Long.valueOf(String.valueOf(warehouseIdObj)) : null;
Long storageLocationId = (Long) stringObjectMap.get("storageLocationId"); Object storageSectionIdObj = stringObjectMap.get("storageSectionId");
Long storageSectionId = storageSectionIdObj != null ? Long.valueOf(String.valueOf(storageSectionIdObj)) : null;
Object storageLocationIdObj = stringObjectMap.get("storageLocationId");
Long storageLocationId = storageLocationIdObj != null ? Long.valueOf(String.valueOf(storageLocationIdObj)) : null;
// Integer level = (Integer) stringObjectMap.get("level"); // Integer level = (Integer) stringObjectMap.get("level");
// 如果 materialDetailId 不为空,则更新上架单明细 // 如果 materialDetailId 不为空,则更新上架单明细