优化wms项目目录结构
This commit is contained in:
@@ -3,9 +3,11 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities.Consts;
|
||||
using Tnb.WarehouseMgr.Interfaces;
|
||||
|
||||
namespace Tnb.WarehouseMgr
|
||||
@@ -13,13 +15,14 @@ namespace Tnb.WarehouseMgr
|
||||
/// <summary>
|
||||
/// 入库申请服务
|
||||
/// </summary>
|
||||
public class WmsInStockService : BaseService, IWmsInStockService
|
||||
public class WmsInStockService : BaseWareHouseService, IWmsInStockService
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
|
||||
public WmsInStockService(ISqlSugarRepository<WmsInstockH> repository)
|
||||
private readonly IDictionaryDataService _dictionaryDataService;
|
||||
public WmsInStockService(ISqlSugarRepository<WmsInstockH> repository, IDictionaryDataService dictionaryDataService)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
_dictionaryDataService = dictionaryDataService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据入库申请单ID获取申请单明细信息
|
||||
@@ -29,7 +32,10 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpGet]
|
||||
public async Task<dynamic> GetInStockDetailsListById([FromRoute] string billId)
|
||||
{
|
||||
var dic = await _dictionaryDataService.GetDictionaryByTypeId(WmsWareHouseConst.WMS_INSTOCK_D_BILL_STATUS_TYPEID);
|
||||
var items = await _db.Queryable<WmsInstockD>().Where(it => it.bill_id == billId).ToListAsync();
|
||||
_db.ThenMapper(items,
|
||||
it => it.line_status = dic.ContainsKey(it.line_status) ? dic[it.line_status]?.ToString()! : "");
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user