|
|
|
@ -454,6 +454,19 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
if (!"Y".equals(inStockFlag)) { |
|
|
|
throw new Exception("标签不在库状态:in_stock_flag不为Y"); |
|
|
|
} |
|
|
|
// 校验栈板里已有物料的仓库库位与要扫入标签的仓库库位是否一致 - rqrq |
|
|
|
List<PalletDetailData> existingPalletDetails = wcsIntegrationMapper.getPalletDetailsData(site, palletId); |
|
|
|
if (existingPalletDetails != null && !existingPalletDetails.isEmpty()) { |
|
|
|
// 栈板有物料,获取第一条记录的仓库和库位 |
|
|
|
PalletDetailData firstDetail = existingPalletDetails.get(0); |
|
|
|
String existingWarehouseId = firstDetail.getWarehouseId(); |
|
|
|
String existingLocationId = firstDetail.getLocationId(); |
|
|
|
|
|
|
|
// 比较仓库和库位是否一致 |
|
|
|
if (!labelWarehouseId.equals(existingWarehouseId)) { |
|
|
|
throw new Exception("扫入的标签和栈板里的标签仓库不同"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 获取栈板当前所在站点 |
|
|
|
AgvStation nowStation = wcsIntegrationMapper.getNowStation(site, palletId); |
|
|
|
@ -478,29 +491,17 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
}else { |
|
|
|
throw new Exception("栈板不在运输点位,无法进行打托操作"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 校验栈板和物料的仓库是否一致(栈板的仓库通过location_code关联agv_station获取warehouse_code) |
|
|
|
nowStation=wcsIntegrationMapper.getNowStation(site, palletId); |
|
|
|
String palletWarehouseCode = nowStation.getWarehouseCode(); |
|
|
|
if (!labelWarehouseId.equals(palletWarehouseCode)) { |
|
|
|
throw new Exception("栈板和物料的仓库不同,无法进行打托操作"); |
|
|
|
} |
|
|
|
}else { |
|
|
|
|
|
|
|
// 校验栈板里已有物料的仓库库位与要扫入标签的仓库库位是否一致 - rqrq |
|
|
|
List<PalletDetailData> existingPalletDetails = wcsIntegrationMapper.getPalletDetailsData(site, palletId); |
|
|
|
if (existingPalletDetails != null && !existingPalletDetails.isEmpty()) { |
|
|
|
// 栈板有物料,获取第一条记录的仓库和库位 |
|
|
|
PalletDetailData firstDetail = existingPalletDetails.get(0); |
|
|
|
String existingWarehouseId = firstDetail.getWarehouseId(); |
|
|
|
String existingLocationId = firstDetail.getLocationId(); |
|
|
|
|
|
|
|
// 比较仓库和库位是否一致 |
|
|
|
if (!labelWarehouseId.equals(existingWarehouseId)) { |
|
|
|
throw new Exception("扫入的标签和栈板里的标签仓库不同"); |
|
|
|
// 校验栈板和物料的仓库是否一致(栈板的仓库通过location_code关联agv_station获取warehouse_code) |
|
|
|
nowStation = wcsIntegrationMapper.getNowStation(site, palletId); |
|
|
|
String palletWarehouseCode = nowStation.getWarehouseCode(); |
|
|
|
if (!labelWarehouseId.equals(palletWarehouseCode)) { |
|
|
|
throw new Exception("栈板和物料的仓库不同,无法进行打托操作"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String oldPalletId=""; |
|
|
|
|
|
|
|
// 2. 检查标签是否已在栈板中(当前栈板或其他栈板) |
|
|
|
|