|
|
@ -100,9 +100,9 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe |
|
|
private static final String INBOUND_PORT_1 = "INBOUND_PORT_1"; |
|
|
private static final String INBOUND_PORT_1 = "INBOUND_PORT_1"; |
|
|
private static final String INBOUND_PORT_2 = "INBOUND_PORT_2"; |
|
|
private static final String INBOUND_PORT_2 = "INBOUND_PORT_2"; |
|
|
// 入库口1固定站点号(留空待业务确认后手工填写)- rqrq |
|
|
// 入库口1固定站点号(留空待业务确认后手工填写)- rqrq |
|
|
private static final String INBOUND_PORT_1_STATION_CODE = ""; |
|
|
|
|
|
|
|
|
private static final String INBOUND_PORT_1_STATION_CODE = "入库口1"; |
|
|
// 入库口2固定站点号(留空待业务确认后手工填写)- rqrq |
|
|
// 入库口2固定站点号(留空待业务确认后手工填写)- rqrq |
|
|
private static final String INBOUND_PORT_2_STATION_CODE = ""; |
|
|
|
|
|
|
|
|
private static final String INBOUND_PORT_2_STATION_CODE = "入库口2"; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @author rqrq |
|
|
* @author rqrq |
|
|
@ -1902,25 +1902,28 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe |
|
|
|
|
|
|
|
|
// 通知入库(左按钮)必须先选入库口,再映射为固定站点号写入assemblyPosition - rqrq |
|
|
// 通知入库(左按钮)必须先选入库口,再映射为固定站点号写入assemblyPosition - rqrq |
|
|
String assemblyPosition = null; |
|
|
String assemblyPosition = null; |
|
|
if ("N".equalsIgnoreCase(transportFlag)) { |
|
|
|
|
|
assemblyPosition = resolveInboundAssemblyPosition(request.getInboundPort()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 入库并运输(右按钮)按新规则校验:area必须有值且remove_able=Y - rqrq |
|
|
|
|
|
if ("Y".equalsIgnoreCase(transportFlag)) { |
|
|
|
|
|
validateEmptyPalletInboundPermission(palletInfo, site); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String locationCode = palletInfo.getLocationCode(); |
|
|
|
|
|
boolean isOutsideReturn = !StringUtils.hasText(palletInfo.getArea()) || !StringUtils.hasText(locationCode); |
|
|
|
|
|
|
|
|
// 当前托盘站点字段显式拆分检查,避免“只看一个字段”导致回库场景判断偏差 - rqrq |
|
|
|
|
|
String areaCode = StringUtils.hasText(palletInfo.getArea()) ? palletInfo.getArea().trim() : ""; |
|
|
|
|
|
String locationCode = StringUtils.hasText(palletInfo.getLocationCode()) ? palletInfo.getLocationCode().trim() : ""; |
|
|
|
|
|
boolean areaBlank = !StringUtils.hasText(areaCode); |
|
|
|
|
|
boolean locationBlank = !StringUtils.hasText(locationCode); |
|
|
String fromLocation; |
|
|
String fromLocation; |
|
|
if ("N".equalsIgnoreCase(transportFlag)) { |
|
|
if ("N".equalsIgnoreCase(transportFlag)) { |
|
|
// area/location为空视作“外部托盘放入库口回库”,任务起始位使用入库口站点号 - rqrq |
|
|
|
|
|
fromLocation = isOutsideReturn ? assemblyPosition : locationCode.trim(); |
|
|
|
|
|
|
|
|
assemblyPosition = resolveInboundAssemblyPosition(request.getInboundPort()); |
|
|
|
|
|
// 通知入库(左按钮)严格限定为“外部回库”场景:area和location_code都必须为空 - rqrq |
|
|
|
|
|
if (!areaBlank || !locationBlank) { |
|
|
|
|
|
throw new RuntimeException("通知入库仅允许未绑定站点的外部空托盘"); |
|
|
|
|
|
} |
|
|
|
|
|
fromLocation = assemblyPosition; |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
if(locationBlank||areaBlank){ |
|
|
|
|
|
throw new RuntimeException("该托盘没有正确绑定站点"); |
|
|
|
|
|
} |
|
|
|
|
|
// 入库并运输(右按钮)按新规则校验:area必须有值且remove_able=Y - rqrq |
|
|
|
|
|
validateEmptyPalletInboundPermission(palletInfo, site); |
|
|
// 入库并运输保持旧语义:优先当前站位,缺失时兜底Virtual_AS避免任务字段为空 - rqrq |
|
|
// 入库并运输保持旧语义:优先当前站位,缺失时兜底Virtual_AS避免任务字段为空 - rqrq |
|
|
fromLocation = StringUtils.hasText(locationCode) ? locationCode.trim() : "Virtual_AS"; |
|
|
|
|
|
assemblyPosition = fromLocation; |
|
|
|
|
|
|
|
|
fromLocation = locationCode; |
|
|
|
|
|
assemblyPosition = locationCode; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
String operator = resolveOperator(); |
|
|
String operator = resolveOperator(); |
|
|
@ -1958,11 +1961,6 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe |
|
|
taskData.setWmsStatus(haianWarehouseEnabled ? "WCS调用成功" : "haianWarehouse=false,短路通过"); |
|
|
taskData.setWmsStatus(haianWarehouseEnabled ? "WCS调用成功" : "haianWarehouse=false,短路通过"); |
|
|
taskData.setToArea(palletInfo.getArea()); |
|
|
taskData.setToArea(palletInfo.getArea()); |
|
|
haiAnPdaAutoWarehouseMapper.insertHaiAnWmsOrderTask(taskData); |
|
|
haiAnPdaAutoWarehouseMapper.insertHaiAnWmsOrderTask(taskData); |
|
|
|
|
|
|
|
|
if ("Y".equalsIgnoreCase(transportFlag)) { |
|
|
|
|
|
// TODO 海安“空托盘入库并运输”如果后续涉及栈板移库编排,在此补充移库逻辑 - rqrq |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!haianWarehouseEnabled) { |
|
|
if (!haianWarehouseEnabled) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
@ -1982,10 +1980,7 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe |
|
|
assembleRequest.setEndFlag("Y"); |
|
|
assembleRequest.setEndFlag("Y"); |
|
|
assembleRequest.setOriBarcode(""); |
|
|
assembleRequest.setOriBarcode(""); |
|
|
assembleRequest.setCargoInfos(new ArrayList<HaiAnAssembleCargoInfo>()); |
|
|
assembleRequest.setCargoInfos(new ArrayList<HaiAnAssembleCargoInfo>()); |
|
|
// 空托数量用于前端流程控制与任务追溯,当前海安组盘接口无count字段,后续若扩展再补齐 - rqrq |
|
|
|
|
|
if (isOutsideReturn) { |
|
|
|
|
|
// 外部回库场景通过入库口assemblyPosition体现回库口位,避免无站位托盘回库后难追溯 - rqrq |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
haiAnPdaAutoWarehouseMapper.updateHaiAnPalletCallingFlag(site, palletId, "Y", "空托运输入库:" + taskNo, operator); |
|
|
String ifsResponse = haiAnWcsApiService.pushZuPanApi(assembleRequest); |
|
|
String ifsResponse = haiAnWcsApiService.pushZuPanApi(assembleRequest); |
|
|
String wmsTask = extractWmsTaskFromAssembleResponse(ifsResponse); |
|
|
String wmsTask = extractWmsTaskFromAssembleResponse(ifsResponse); |
|
|
if (StringUtils.hasText(wmsTask)) { |
|
|
if (StringUtils.hasText(wmsTask)) { |
|
|
|