|
|
|
@ -133,24 +133,26 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
// ==================== 打托相关方法实现 - AI制作 ==================== |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<String, Object> checkPalletExists(Map<String, Object> params) throws Exception { |
|
|
|
public Map<String, Object> checkPalletExists(Map<String, Object> params) { |
|
|
|
String site = (String) params.get("site"); |
|
|
|
String palletId = (String) params.get("palletId"); |
|
|
|
|
|
|
|
if (palletId.length() > 6) { |
|
|
|
palletId = palletId.substring(0, 6); |
|
|
|
} |
|
|
|
if (!StringUtils.hasText(site) || !StringUtils.hasText(palletId)) { |
|
|
|
throw new Exception("参数不能为空"); |
|
|
|
throw new RuntimeException("参数不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
// 检查栈板是否存在 |
|
|
|
Map<String, Object> palletInfo = wcsIntegrationMapper.getPalletInfo(site, palletId); |
|
|
|
if (palletInfo == null) { |
|
|
|
throw new Exception("栈板不存在"); |
|
|
|
throw new RuntimeException("栈板不存在"); |
|
|
|
} |
|
|
|
|
|
|
|
// 检查栈板是否正在被调用 |
|
|
|
String callingFlag = (String) palletInfo.get("calling_flag"); |
|
|
|
if ("Y".equals(callingFlag)) { |
|
|
|
throw new Exception("栈板正在被调用中,无法进行打托操作"); |
|
|
|
throw new RuntimeException("栈板正在被调用中,无法进行打托操作"); |
|
|
|
} |
|
|
|
|
|
|
|
// 获取栈板类型的位置信息 |
|
|
|
@ -162,7 +164,7 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
result.put("positions", positions); |
|
|
|
result.put("palletType", palletType); |
|
|
|
result.put("locationCode", locationCode); // 添加栈板位置信息 |
|
|
|
|
|
|
|
result.put("palletId", palletId); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
|