|
|
@ -87,7 +87,7 @@ public class HaiAnPalletTransferServiceImpl implements HaiAnPalletTransferServic |
|
|
* @author rqrq |
|
|
* @author rqrq |
|
|
* @Description 海安自动化托盘移库主流程:目标区域仓库/库位比对差异标签,按site+仓库分组生成trans三表,并将IFS移库分组写入海安专用队列表(不在本方法立即修改标签) - rqrq |
|
|
* @Description 海安自动化托盘移库主流程:目标区域仓库/库位比对差异标签,按site+仓库分组生成trans三表,并将IFS移库分组写入海安专用队列表(不在本方法立即修改标签) - rqrq |
|
|
* @param request 海安移库请求参数,必须包含site/palletId/targetArea,username用于事务审计 - rqrq |
|
|
* @param request 海安移库请求参数,必须包含site/palletId/targetArea,username用于事务审计 - rqrq |
|
|
* @return 入队结果:queueIds 供发料任务关联 IFS 完成;无需搬库时为空列表,message 仅日志说明 - rqrq |
|
|
|
|
|
|
|
|
* @return 入队结果:queueIds 供发料任务关联 IFS 完成;目标区域无配置或无库位、无需搬库时为空列表,message 仅日志说明 - rqrq |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@ -116,10 +116,15 @@ public class HaiAnPalletTransferServiceImpl implements HaiAnPalletTransferServic |
|
|
// 2. 解析目标区域仓库与库位:海安判定不走“托盘首条标签”,统一以haian_area配置为准 - rqrq |
|
|
// 2. 解析目标区域仓库与库位:海安判定不走“托盘首条标签”,统一以haian_area配置为准 - rqrq |
|
|
HaiAnAreaOption targetAreaInfo = haiAnPdaAutoWarehouseMapper.getHaianArea(requestSite, targetArea); |
|
|
HaiAnAreaOption targetAreaInfo = haiAnPdaAutoWarehouseMapper.getHaianArea(requestSite, targetArea); |
|
|
if (targetAreaInfo == null) { |
|
|
if (targetAreaInfo == null) { |
|
|
throw new RuntimeException("目标区域不存在或不属于当前工厂:" + targetArea); |
|
|
|
|
|
|
|
|
// 目标区域未配置时直接返回空队列,不生成移库单据;调用方可继续处理原业务 - rqrq |
|
|
|
|
|
return buildEnqueueResult(new ArrayList<Long>(), "目标区域未配置,跳过移库:" + targetArea); |
|
|
} |
|
|
} |
|
|
if (!StringUtils.hasText(targetAreaInfo.getWarehouseId()) || !StringUtils.hasText(targetAreaInfo.getLocationId())) { |
|
|
|
|
|
throw new RuntimeException("目标区域缺少仓库或库位映射,无法执行移库:" + targetArea); |
|
|
|
|
|
|
|
|
if (!StringUtils.hasText(targetAreaInfo.getLocationId())) { |
|
|
|
|
|
// 区域没有有效location_id时直接返回空队列,避免生成目标库位为空的事务和IFS任务 - rqrq |
|
|
|
|
|
return buildEnqueueResult(new ArrayList<Long>(), "目标区域未配置库位,跳过移库:" + targetArea); |
|
|
|
|
|
} |
|
|
|
|
|
if (!StringUtils.hasText(targetAreaInfo.getWarehouseId())) { |
|
|
|
|
|
throw new RuntimeException("目标区域缺少仓库映射,无法执行移库:" + targetArea); |
|
|
} |
|
|
} |
|
|
String targetWarehouseId = targetAreaInfo.getWarehouseId().trim(); |
|
|
String targetWarehouseId = targetAreaInfo.getWarehouseId().trim(); |
|
|
String targetLocationId = targetAreaInfo.getLocationId().trim(); |
|
|
String targetLocationId = targetAreaInfo.getLocationId().trim(); |
|
|
|