20261008-ide1.0发布 #1

Merged
zzh merged 42 commits from test into master 2026-10-08 09:18:00 +08:00
4 changed files with 16 additions and 5 deletions
Showing only changes of commit 955a3c8c6d - Show all commits

View File

@ -388,6 +388,9 @@ public class PickupOpenApiPushFeeResult
public class PickupOpenApiPushFeeInput
{
/// <summary>
/// 承运运单号,对应库字段 CarrierWaybillNo。
/// </summary>
public string? WaybillNumber { get; set; }
public decimal ActualWeight { get; set; }

View File

@ -70,10 +70,10 @@ public class PickupOrderFeePushService : IScopedDependency
throw new BusinessException("请求体不能为空");
}
var pickupNo = (input.WaybillNumber ?? string.Empty).Trim();
if (string.IsNullOrWhiteSpace(pickupNo))
var carrierWaybillNo = (input.WaybillNumber ?? string.Empty).Trim();
if (string.IsNullOrWhiteSpace(carrierWaybillNo))
{
throw new BusinessException("waybillNumber 不能为空");
throw new BusinessException("waybillNumber(承运运单号 CarrierWaybillNo)不能为空");
}
if (input.ActualWeight <= 0)
@ -87,8 +87,8 @@ public class PickupOrderFeePushService : IScopedDependency
throw new BusinessException("goodsSizeList 不能为空");
}
var pickup = await _pickupOrderRepository.GetByPickupNoAsync(pickupNo)
?? throw new BusinessException("揽收单不存在");
var pickup = await _pickupOrderRepository.GetByCarrierWaybillNoAsync(carrierWaybillNo)
?? throw new BusinessException($"揽收单不存在:承运运单号 {carrierWaybillNo}");
await EnsureAppKeyAsync(key, pickup);

View File

@ -7,6 +7,8 @@ public interface IPickupOrderRepository : IRepository<PickupOrder>
{
Task<PickupOrder?> GetByPickupNoAsync(string pickupNo, CancellationToken cancellationToken = default);
Task<PickupOrder?> GetByCarrierWaybillNoAsync(string carrierWaybillNo, CancellationToken cancellationToken = default);
Task<PickupOrder?> GetOwnedAsync(int id, int customerId, CancellationToken cancellationToken = default);
Task<PickupWorkplaceCountRow> GetWorkplaceCountsAsync(

View File

@ -14,6 +14,12 @@ public class PickupOrderRepository : OmsSqlSugarRepository<PickupOrder>, IPickup
return FirstOrDefaultAsync(x => x.PickupNo == no, cancellationToken);
}
public Task<PickupOrder?> GetByCarrierWaybillNoAsync(string carrierWaybillNo, CancellationToken cancellationToken = default)
{
var no = carrierWaybillNo.Trim();
return FirstOrDefaultAsync(x => x.CarrierWaybillNo == no, cancellationToken);
}
public Task<PickupOrder?> GetOwnedAsync(int id, int customerId, CancellationToken cancellationToken = default)
{
return FirstOrDefaultAsync(x => x.Id == id && x.CustomerId == customerId, cancellationToken);