|
|
|
@ -480,25 +480,16 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
@Transactional |
|
|
|
public void callPalletToStation(Map<String, Object> params) throws Exception { |
|
|
|
String site = (String) params.get("site"); |
|
|
|
String palletId = (String) params.get("palletId"); |
|
|
|
String station = (String) params.get("station"); |
|
|
|
|
|
|
|
if (!StringUtils.hasText(site) || !StringUtils.hasText(palletId) || !StringUtils.hasText(station)) { |
|
|
|
if (!StringUtils.hasText(site) || !StringUtils.hasText(station)) { |
|
|
|
throw new Exception("参数不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
// 检查栈板calling_flag状态 |
|
|
|
String callingFlag = wcsIntegrationMapper.checkPalletCallingFlag(site, palletId); |
|
|
|
if ("Y".equals(callingFlag)) { |
|
|
|
throw new Exception("栈板正在被调用中,无法执行Call操作"); |
|
|
|
} |
|
|
|
|
|
|
|
String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); |
|
|
|
|
|
|
|
// TODO: 后期在这里调用WCS接口实现Call栈板功能 |
|
|
|
// 示例:wcsApiService.callPalletToStation(site, palletId, station); |
|
|
|
|
|
|
|
// 更新栈板calling_flag为Y |
|
|
|
// wcsIntegrationMapper.updatePalletCallingFlag(site, palletId, "Y", username); |
|
|
|
// TODO: 后期在这里调用WCS接口实现调用空托盘功能 |
|
|
|
// AGV会自动判断并调用合适的空托盘到指定站点 |
|
|
|
// 示例:wcsApiService.callEmptyPalletToStation(site, station); |
|
|
|
} |
|
|
|
} |