接口优化
@ -249,6 +249,7 @@ public class CrossAreaTransferServiceImpl extends ServiceImpl<CrossAreaTransferM
logger.info("跨区调拨保存成功,模式: {}, 扫描码: {}, 源库位: {}, 目标库位: {}", transferMode, scanCode, sourceLocation, targetLocation);
return true;
} catch (Exception e) {
logger.error("保存跨区调拨失败", e);
throw new RuntimeException(e.getMessage());
@ -12,6 +12,7 @@ public interface ErpInterfaceService {
* @param transactionId 事务ID
*/
void asyncCallErpInterface(String site, String buNo, String transactionId);
/**
* 按顺序异步调用ERP接口(用于跨区调拨等需要保证顺序的场景)
@ -58,6 +58,7 @@ public class ErpInterfaceServiceImpl implements ErpInterfaceService {
try {
// 1. 查询StockTransactionLog数据
List<StockTransactionLogEntity> transactionLogs = stockTransactionLogDao.queryByTransactionId(site, buNo, transactionId);
if (transactionLogs == null || transactionLogs.isEmpty()) {
logger.warn("未找到事务记录 - transactionId: {}", transactionId);
@ -46,6 +46,7 @@
umid, interface_name , batch_flag ,erp_order_no
</select>
<!-- 批量更新同步状态为成功 -->
<update id="updateSyncedSuccess">
UPDATE StockTransactionLog