27 lines
1.2 KiB
C#
27 lines
1.2 KiB
C#
|
|
using YY.Admin.Core.Entity;
|
||
|
|
|
||
|
|
namespace YY.Admin.Core.Services;
|
||
|
|
|
||
|
|
public interface ISupplierService
|
||
|
|
{
|
||
|
|
Task<SupplierPageResult> PageAsync(int pageNo, int pageSize,
|
||
|
|
string? supplierCode = null, string? supplierName = null,
|
||
|
|
string? supplierShortName = null, string? erpCode = null,
|
||
|
|
string? status = null, CancellationToken ct = default);
|
||
|
|
|
||
|
|
Task<MesXslSupplier?> GetByIdAsync(string id, CancellationToken ct = default);
|
||
|
|
Task<bool> AddAsync(MesXslSupplier supplier, CancellationToken ct = default);
|
||
|
|
Task<bool> EditAsync(MesXslSupplier supplier, CancellationToken ct = default);
|
||
|
|
Task<bool> DeleteAsync(string id, CancellationToken ct = default);
|
||
|
|
Task<bool> UpdateStatusAsync(string id, string status, CancellationToken ct = default);
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 重连后将离线期间的本地改动推送到后端,并检测冲突。
|
||
|
|
/// </summary>
|
||
|
|
Task<PushPendingResult> PushPendingOnReconnectAsync(CancellationToken ct = default);
|
||
|
|
}
|
||
|
|
|
||
|
|
public record SupplierPageResult(List<MesXslSupplier> Records, long Total, int PageNo, int PageSize);
|
||
|
|
|
||
|
|
public record PushPendingResult(int PushedCount, int ConflictCount, int NewRecordsPushed);
|