This commit is contained in:
2026-08-17 20:21:44 +08:00
parent b8c7f9fea2
commit 092c003e3a
6 changed files with 44 additions and 10 deletions
@@ -9,6 +9,7 @@ import com.baiyue.common.core.exception.BizException;
import com.baiyue.firstleg.dto.OrderApprovedInboundCommand;
import com.baiyue.firstleg.dto.InboundOrderReference;
import com.baiyue.firstleg.service.InboundOrderCreationService;
import com.baiyue.firstleg.service.InboundCartonLabelService;
import com.baiyue.firstleg.service.UnifiedInboundQueryService;
import com.baiyue.firstleg.dto.UnifiedInboundDetail;
import com.baiyue.firstleg.dto.UnifiedInboundQuery;
@@ -35,6 +36,8 @@ public class InternalInboundOrderController {
@Resource
private InboundOrderCreationService service;
@Resource
private InboundCartonLabelService cartonLabels;
@Resource
private UnifiedInboundQueryService unifiedQueryService;
@Value("${baiyue.security.internal-service-token}")
private String internalToken;
@@ -59,7 +62,9 @@ public class InternalInboundOrderController {
|| command.totalPackageCount() != null && command.totalPackageCount() < 1) {
throw new BizException(ResultCode.BAD_REQUEST, "订单入库快照不完整");
}
return ApiResponse.success(service.createFromApprovedOrder(command));
long inboundId = service.createFromApprovedOrder(command);
cartonLabels.getOrCreate(command.tenantId(), inboundId);
return ApiResponse.success(inboundId);
}
@PostMapping("/order-preparing")