2026-05-07 09:47:39 +08:00
|
|
|
using YY.Admin.Core.Entity;
|
|
|
|
|
|
|
|
|
|
namespace YY.Admin.Core.Services;
|
|
|
|
|
|
|
|
|
|
public record MixerMaterialPageResult(List<MesMixerMaterial> Records, long Total, int Current, int Size);
|
|
|
|
|
|
2026-05-07 17:53:48 +08:00
|
|
|
public record MaterialCategoryNode(string Id, string? Name, string? Code, List<MaterialCategoryNode> Children);
|
|
|
|
|
|
2026-05-07 09:47:39 +08:00
|
|
|
public interface IMixerMaterialService
|
|
|
|
|
{
|
|
|
|
|
Task<MixerMaterialPageResult> PageAsync(
|
|
|
|
|
int pageNo,
|
|
|
|
|
int pageSize,
|
|
|
|
|
string? materialCode = null,
|
|
|
|
|
string? materialName = null,
|
|
|
|
|
string? erpCode = null,
|
|
|
|
|
string? majorCategoryId = null,
|
|
|
|
|
string? minorCategoryId = null,
|
|
|
|
|
CancellationToken ct = default);
|
|
|
|
|
|
|
|
|
|
Task<MesMixerMaterial?> GetByIdAsync(string id, CancellationToken ct = default);
|
|
|
|
|
Task<bool> AddAsync(MesMixerMaterial material, CancellationToken ct = default);
|
|
|
|
|
Task<bool> EditAsync(MesMixerMaterial material, CancellationToken ct = default);
|
|
|
|
|
Task<bool> DeleteAsync(string id, CancellationToken ct = default);
|
|
|
|
|
Task<bool> DeleteBatchAsync(string ids, CancellationToken ct = default);
|
2026-05-07 17:53:48 +08:00
|
|
|
|
2026-05-07 09:47:39 +08:00
|
|
|
Task<List<KeyValuePair<string, string>>> GetMajorCategoryOptionsAsync(CancellationToken ct = default);
|
|
|
|
|
Task<List<KeyValuePair<string, string>>> GetMinorCategoryOptionsAsync(string majorCategoryId, CancellationToken ct = default);
|
|
|
|
|
|
2026-05-07 17:53:48 +08:00
|
|
|
Task<List<MaterialCategoryNode>> GetMaterialCategoryTreeAsync(CancellationToken ct = default);
|
|
|
|
|
Task SyncFromRemoteAsync(CancellationToken ct = default);
|
|
|
|
|
}
|