fix: align dropship acceptance with precreated pallets
This commit is contained in:
@@ -27,6 +27,7 @@ public class DropshipPalletizationService {
|
||||
if (!"ONE_CLICK_DROPSHIP".equals(inbound.getFulfillmentType())) return;
|
||||
if (inbound.getTotalPackageCount()==null || inbound.getTotalPackageCount()<1) throw invalid("一件代发测量完成箱数无效,不能下发清点组托任务");
|
||||
if (inbound.getPalletCount()==null || inbound.getPalletCount()<1) throw invalid("一件代发预计托数无效,不能生成托盘码");
|
||||
if (inbound.getPalletCount()>inbound.getTotalPackageCount()) throw invalid("一件代发预计托数不能超过总箱数");
|
||||
long taskId=IdWorker.getId();
|
||||
if(mapper.insertTask(taskId,inbound.getTenantId(),inbound.getId(),inbound.getWarehouseId(),inbound.getTotalPackageCount())!=1) return;
|
||||
for(int sequence=1;sequence<=inbound.getPalletCount();sequence++){
|
||||
|
||||
@@ -135,6 +135,11 @@ public class InboundMeasurementService {
|
||||
&& (request.expectedPalletCount() == null || request.expectedPalletCount() < 1)) {
|
||||
throw new BizException(ResultCode.VALIDATION_FAILED, "一件代发必须录入预计托数");
|
||||
}
|
||||
if ("ONE_CLICK_DROPSHIP".equals(inbound.getFulfillmentType())
|
||||
&& inbound.getTotalPackageCount() != null
|
||||
&& request.expectedPalletCount() > inbound.getTotalPackageCount()) {
|
||||
throw new BizException(ResultCode.VALIDATION_FAILED, "一件代发预计托数不能超过总箱数");
|
||||
}
|
||||
validateInboundDetails(tenantId, inbound, request.items());
|
||||
request.items().stream().map(InboundMeasurementRequests.ItemRequest::chargeRuleId)
|
||||
.filter(java.util.Objects::nonNull).distinct().forEach(ruleId -> {
|
||||
|
||||
Reference in New Issue
Block a user