|
|
@ -1987,10 +1987,10 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe |
|
|
* 任一查询失败或校验不通过均中断当前事务,不生成WOT且不下发WCS。- rqrq |
|
|
* 任一查询失败或校验不通过均中断当前事务,不生成WOT且不下发WCS。- rqrq |
|
|
* @param site 海安工厂,限定托盘与明细范围 - rqrq |
|
|
* @param site 海安工厂,限定托盘与明细范围 - rqrq |
|
|
* @param palletId 当前被分拣源盘编码 - rqrq |
|
|
* @param palletId 当前被分拣源盘编码 - rqrq |
|
|
* @param sourceStation 当前源盘实际位置,供WCS查询和工作位映射 - rqrq |
|
|
|
|
|
|
|
|
* @param sourceStation 当前源盘实际位置,只用于映射配对工作位,不直接作为立库查询点位 - rqrq |
|
|
*/ |
|
|
*/ |
|
|
private void validateSortedSourceReturn(String site, String palletId, String sourceStation) throws Exception { |
|
|
private void validateSortedSourceReturn(String site, String palletId, String sourceStation) throws Exception { |
|
|
// 用源盘当前位置实时获取WCS拣选清单,不能依赖PDA扫码时缓存;接口或报文异常阻断回库。- rqrq |
|
|
|
|
|
|
|
|
// 立库按请求点位原样返回清单;源盘位查不到工作位任务,必须先换成配对工作位再查。失败阻断回库。- rqrq |
|
|
List<String> pickingLabels = querySourceSortingLabels(site, palletId, sourceStation); |
|
|
List<String> pickingLabels = querySourceSortingLabels(site, palletId, sourceStation); |
|
|
// 在已锁定的本盘明细范围内查当前标签,只有清单标签仍在本源盘时才提示未分拣。- rqrq |
|
|
// 在已锁定的本盘明细范围内查当前标签,只有清单标签仍在本源盘时才提示未分拣。- rqrq |
|
|
List<HaiAnPalletDetailRow> palletDetails = haiAnPdaAutoWarehouseMapper.getPalletDetails(site, palletId, "", null); |
|
|
List<HaiAnPalletDetailRow> palletDetails = haiAnPdaAutoWarehouseMapper.getPalletDetails(site, palletId, "", null); |
|
|
@ -2028,11 +2028,13 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 按源盘位置请求WCS拣选清单,响应按配对工作位识别并兼容返回源盘位的旧报文。- rqrq |
|
|
|
|
|
* 空站点数组代表无待拣标签;非空报文缺少本组站点、重复站点或标签无效时失败,防止误放行。- rqrq |
|
|
|
|
|
|
|
|
* 通知回库按配对工作位请求WCS拣选清单。立库传什么点位就返回什么点位,不能把 ST-MP-01 当成 ST-MP-05 去查。- rqrq |
|
|
|
|
|
* 空站点数组代表无待拣标签;非空报文缺少所查工作位、重复站点或标签无效时失败,防止误放行。- rqrq |
|
|
|
|
|
* @param sourceStation 被分拣源盘当前位置,仅用于映射工作位 - rqrq |
|
|
* @return 本组待拣标签号,按WCS顺序去重 - rqrq |
|
|
* @return 本组待拣标签号,按WCS顺序去重 - rqrq |
|
|
*/ |
|
|
*/ |
|
|
private List<String> querySourceSortingLabels(String site, String palletId, String sourceStation) throws Exception { |
|
|
private List<String> querySourceSortingLabels(String site, String palletId, String sourceStation) throws Exception { |
|
|
|
|
|
// ST-MP-01→05、02→06、03→07、04→08;映射失败说明站点未配置,不能拿源盘位硬查。- rqrq |
|
|
String workStation = HaiAnStationStaticData.resolveSortingWorkStation(sourceStation); |
|
|
String workStation = HaiAnStationStaticData.resolveSortingWorkStation(sourceStation); |
|
|
if (!StringUtils.hasText(workStation)) { |
|
|
if (!StringUtils.hasText(workStation)) { |
|
|
throw new RuntimeException("被分拣托盘位置未配置对应分拣工作位:" + sourceStation); |
|
|
throw new RuntimeException("被分拣托盘位置未配置对应分拣工作位:" + sourceStation); |
|
|
@ -2040,8 +2042,9 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe |
|
|
HaiAnAutoSortingInfoRequest queryRequest = new HaiAnAutoSortingInfoRequest(); |
|
|
HaiAnAutoSortingInfoRequest queryRequest = new HaiAnAutoSortingInfoRequest(); |
|
|
queryRequest.setSite(site); |
|
|
queryRequest.setSite(site); |
|
|
queryRequest.setPalletId(palletId); |
|
|
queryRequest.setPalletId(palletId); |
|
|
queryRequest.setLocationCode(sourceStation); |
|
|
|
|
|
// WCS查询入参是源盘位置,接口失败直接抛错;不得把失败当成空清单放行回库。- rqrq |
|
|
|
|
|
|
|
|
// HTTP体只有这一个点位字符串;传源盘位会原样返回源盘清单,待拣标签会对错工作位。- rqrq |
|
|
|
|
|
queryRequest.setLocationCode(workStation); |
|
|
|
|
|
// 按工作位查清单,接口失败直接抛错;不得把失败当成空清单放行回库。- rqrq |
|
|
String response = haiAnWcsApiService.queryAutoSortingInfo(queryRequest); |
|
|
String response = haiAnWcsApiService.queryAutoSortingInfo(queryRequest); |
|
|
JsonNode root = new ObjectMapper().readTree(response); |
|
|
JsonNode root = new ObjectMapper().readTree(response); |
|
|
if (root == null) { |
|
|
if (root == null) { |
|
|
@ -2064,7 +2067,8 @@ public class HaiAnPdaAutoWarehouseServiceImpl implements HaiAnPdaAutoWarehouseSe |
|
|
if (!StringUtils.hasText(stationCode)) { |
|
|
if (!StringUtils.hasText(stationCode)) { |
|
|
stationCode = station.path("stationCode").asText(""); |
|
|
stationCode = station.path("stationCode").asText(""); |
|
|
} |
|
|
} |
|
|
if (!workStation.equals(HaiAnStationStaticData.resolveSortingWorkStation(stationCode))) { |
|
|
|
|
|
|
|
|
// 立库回显的就是请求点位,只收本次发出的工作位,不再把源盘位反查成工作位。- rqrq |
|
|
|
|
|
if (!workStation.equalsIgnoreCase(stationCode.trim())) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
if (matched) { |
|
|
if (matched) { |
|
|
|