详情接口

This commit is contained in:
tongfei
2023-11-15 15:50:49 +08:00
parent 92fff97981
commit db74dc89df
9 changed files with 231 additions and 96 deletions

View File

@@ -8,6 +8,8 @@ using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core;
using WMS.Web.Core.Dto;
using WMS.Web.Core.Dto.InStock;
using WMS.Web.Core.Help;
using WMS.Web.Core.Internal.Results;
using WMS.Web.Domain.Entitys;
using WMS.Web.Domain.Infrastructure;
@@ -178,5 +180,25 @@ namespace WMS.Web.Repositories
{
return await GetPagedList(dto);
}
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async Task<InStockInfoResponse> GetInfo(int id)
{
var res = await _context.Instock
.FirstOrDefaultAsync(f => id == f.Id);
if (res == null) return null;
var response = new InStockInfoResponse()
{
CreateTime = res.CreateTime.DateToStringSeconds(),
SyncTime = res.SyncTime.DateToStringSeconds(),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, res.CreatorId),
Operate = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, res.OperateId)
};
return response;
}
}
}