|
|
|
@ -395,7 +395,8 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
String position = (String) params.get("position"); |
|
|
|
Integer layer = Integer.valueOf(params.get("layer").toString()); |
|
|
|
String serialNo = (String) params.get("serialNo"); |
|
|
|
|
|
|
|
Object sortFlagObj = params.get("sortFlag"); |
|
|
|
Integer sortFlag = (sortFlagObj != null) ? Integer.parseInt(sortFlagObj.toString()) : 0; |
|
|
|
if (!StringUtils.hasText(site) || !StringUtils.hasText(palletId) || |
|
|
|
!StringUtils.hasText(position) || layer == null || !StringUtils.hasText(serialNo)) { |
|
|
|
throw new Exception("参数不能为空"); |
|
|
|
@ -453,11 +454,15 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
Map<String, Object> existingPalletInfo = wcsIntegrationMapper.findPalletByLabel(site, serialNo); |
|
|
|
if (existingPalletInfo != null) { |
|
|
|
String existingPalletId = (String) existingPalletInfo.get("palletId"); |
|
|
|
String wcsFlag = (String) existingPalletInfo.get("wcsFlag"); |
|
|
|
|
|
|
|
// 如果标签在当前栈板,提示不要重复扫描 |
|
|
|
if (palletId.equals(existingPalletId)) { |
|
|
|
throw new Exception("该条码已在本栈板上,请不要重复扫描"); |
|
|
|
} |
|
|
|
if (sortFlag==0&&"0".equals(wcsFlag)) {//非分拣时判断 |
|
|
|
throw new Exception("该条码已经组盘传输给WCS,不能进行转移操作,请先取消组盘!"); |
|
|
|
} |
|
|
|
|
|
|
|
// 如果标签在其他栈板,先删除旧记录(可能是从别的栈板扫到这里) |
|
|
|
System.out.println("条码" + serialNo + "在栈板" + existingPalletId + "中,先删除旧记录"); |
|
|
|
@ -2174,9 +2179,10 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService { |
|
|
|
if (detailCount == 0) { |
|
|
|
throw new RuntimeException("栈板无明细数据"); |
|
|
|
} |
|
|
|
|
|
|
|
SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
// 删除所有明细 - rqrq |
|
|
|
wcsIntegrationMapper.deleteAllPalletDetail(site, palletId); |
|
|
|
updatePalletEmptyFlag(site, palletId, currentUser.getUsername()); |
|
|
|
System.out.println("已删除所有栈板明细 - rqrq"); |
|
|
|
|
|
|
|
System.out.println("移出全部物料完成 - rqrq"); |
|
|
|
|