异常开始结束带代码提交
This commit is contained in:
33
EquipMgr/Tnb.EquipMgr/ToolMoldLocationService.cs
Normal file
33
EquipMgr/Tnb.EquipMgr/ToolMoldLocationService.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// 模具库位服务
|
||||
/// </summary>
|
||||
[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<ToolLocation> repository)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
}
|
||||
public async Task<Dictionary<string, object>> GetLocationDictionary()
|
||||
{
|
||||
return await _db.Queryable<ToolLocation>().ToDictionaryAsync(x => x.id, x => x.location_code);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user