|
|
|
@ -6,6 +6,7 @@ import com.gaotao.modules.autoWareHourceHaian.api.entity.HaiAnGroundLocationQuer |
|
|
|
import com.gaotao.modules.autoWareHourceHaian.api.entity.HaiAnOutsideTransferTaskRequest; |
|
|
|
import com.gaotao.modules.autoWareHourceHaian.api.service.HaiAnWcsApiService; |
|
|
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnWmsOrderTaskData; |
|
|
|
import com.gaotao.modules.autoWareHourceHaian.entity.pda.HaiAnPalletInfoResult; |
|
|
|
import com.gaotao.modules.autoWareHourceHaian.entity.HaiAnWmsOrderTaskDetailData; |
|
|
|
import com.gaotao.modules.autoWareHourceHaian.entity.cache.HaiAnCacheArea; |
|
|
|
import com.gaotao.modules.autoWareHourceHaian.entity.cache.HaiAnCachePallet; |
|
|
|
@ -346,10 +347,17 @@ public class HaiAnCacheTransportDispatchServiceImpl implements HaiAnCacheTranspo |
|
|
|
detail.setErrorMsg(null); |
|
|
|
// 同事务保存明细和主单调度状态,任一失败整体回滚。- rqrq |
|
|
|
persist(detail); |
|
|
|
// 齐套运输同样走库外搬运,托盘类型必须和组盘一致,从 haian_pallet_type 取出再下发 - rqrq |
|
|
|
HaiAnPalletInfoResult palletTypeInfo = haiAnPdaAutoWarehouseMapper.getPalletInfoWithTypeDetails(site, detail.getPalletId()); |
|
|
|
if (palletTypeInfo == null) { |
|
|
|
throw new RuntimeException("栈板不存在,无法解析库外搬运托盘类型:" + detail.getPalletId()); |
|
|
|
} |
|
|
|
HaiAnOutsideTransferTaskRequest transferRequest = new HaiAnOutsideTransferTaskRequest(); |
|
|
|
transferRequest.setSite(site); |
|
|
|
transferRequest.setTaskId(detail.getTaskNo()); |
|
|
|
transferRequest.setPalletBarcode(detail.getPalletId()); |
|
|
|
transferRequest.setPalletType(parseWcsInteger(palletTypeInfo.getWcsPalletType())); |
|
|
|
transferRequest.setBasePalletType(parseWcsInteger(palletTypeInfo.getWcsBasePalletType())); |
|
|
|
transferRequest.setOriStation(pallet.getLocationCode()); |
|
|
|
transferRequest.setToArea(target.getWcsAreaCode()); |
|
|
|
transferRequest.setToStation(selected); |
|
|
|
@ -592,6 +600,23 @@ public class HaiAnCacheTransportDispatchServiceImpl implements HaiAnCacheTranspo |
|
|
|
return areas.stream().anyMatch(areaInfo -> "Y".equals(areaInfo.getCacheAreaFlag()) && Objects.equals(areaInfo.getAreaId(), area)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @author rqrq |
|
|
|
* @Description 把 haian_pallet_type 的 WCS 类型转成整数。空值或非数字回落 1,与组盘报文口径一致,避免库外搬运缺 palletType/basePalletType。- rqrq |
|
|
|
* @param rawValue haian_pallet_type.wcs_pallet_type 或 wcs_base_pallet_type - rqrq |
|
|
|
* @return 立库整数类型,解析失败为 1 - rqrq |
|
|
|
*/ |
|
|
|
private Integer parseWcsInteger(String rawValue) { |
|
|
|
if (!StringUtils.hasText(rawValue)) { |
|
|
|
return 1; |
|
|
|
} |
|
|
|
try { |
|
|
|
return Integer.parseInt(rawValue.trim()); |
|
|
|
} catch (NumberFormatException ignored) { |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @author rqrq |
|
|
|
* @Description 限制数据库错误描述长度,保留托盘/接口错误信息。- rqrq |
|
|
|
|