异常开始结束带代码提交
This commit is contained in:
34
EquipMgr/Tnb.EquipMgr/ToolMoldHouseService.cs
Normal file
34
EquipMgr/Tnb.EquipMgr/ToolMoldHouseService.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aspose.Cells.Drawing;
|
||||
using JNPF.ClayObject.Extensions;
|
||||
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 ToolMoldHouseService : IToolMoldHouseService, IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
public ToolMoldHouseService(ISqlSugarRepository<ToolWarehouse> repository)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
}
|
||||
public async Task<Dictionary<string, object>> GetHouseDictionary()
|
||||
{
|
||||
return await _db.Queryable<ToolWarehouse>().ToDictionaryAsync(x => x.id, x => x.whcode);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user