admin/src/Oms.SqlSugarCore/Operations/ShipMasterRepository.cs
zzh 8f43684217
All checks were successful
Build and Deploy / deploy (push) Successful in 1m15s
feat: 出库大包/内部主单 API,并固化 DDL 审计字段规范
支持可选装袋与打板(可绑外部 MAWB),订单冗余归属字段;README/sql 约定对齐 t_outbound_record 审计列写法。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-07 16:53:46 +08:00

28 lines
967 B
C#

using Fake.DependencyInjection;
using Oms.Domain.OperationsAggregate.Entities;
using Oms.Domain.OperationsAggregate.Repositories;
using Oms.SqlSugarCore.Repositories;
namespace Oms.SqlSugarCore.Operations;
public class ShipMasterRepository : OmsSqlSugarRepository<ShipMaster>, IShipMasterRepository, IScopedDependency
{
public Task<ShipMaster?> GetByMasterNoAsync(string masterNo, CancellationToken cancellationToken = default) =>
FirstOrDefaultAsync(x => x.MasterNo == masterNo, cancellationToken);
}
public class ShipMasterItemRepository
: OmsSqlSugarRepository<ShipMasterItem>,
IShipMasterItemRepository,
IScopedDependency
{
public async Task<List<ShipMasterItem>> ListByMasterIdAsync(
int masterId,
CancellationToken cancellationToken = default)
{
_ = cancellationToken;
var list = await GetListAsync(x => x.MasterId == masterId);
return list.OrderBy(x => x.Id).ToList();
}
}