using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.Cells.Drawing;
using JNPF.DependencyInjection;
using JNPF.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Tnb.EquipMgr.Entities;
using Tnb.EquipMgr.Interfaces;
namespace Tnb.EquipMgr
{
///
/// 模具库位服务
///
[ApiDescriptionSettings(Tag = ModuleConsts.Tag, Area = ModuleConsts.Area, Order = 700)]
[Route("api/[area]/[controller]/[action]")]
public class ToolMoldLocationService : IToolMoldLocationService, IDynamicApiController, ITransient
{
private readonly ISqlSugarClient _db;
public ToolMoldLocationService(ISqlSugarRepository repository)
{
_db = repository.AsSugarClient();
}
public async Task> GetLocationDictionary()
{
return await _db.Queryable().ToDictionaryAsync(x => x.id, x => x.location_code);
}
}
}