You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.9 KiB
C#
57 lines
1.9 KiB
C#
using DS.Module.Core;
|
|
using DS.Module.Core.Extensions;
|
|
using DS.Module.UserModule;
|
|
using DS.WMS.Core.FeeModule.Dtos;
|
|
using DS.WMS.Core.FeeModule.Entity;
|
|
using DS.WMS.Core.FeeModule.Interface;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using SqlSugar;
|
|
|
|
namespace DS.WMS.Core.FeeModule.Method;
|
|
|
|
public class WmsStorageBillService:IWmsStorageBillService
|
|
{
|
|
private readonly IServiceProvider _serviceProvider;
|
|
private readonly ISqlSugarClient db;
|
|
private readonly IUser user;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="serviceProvider"></param>
|
|
public WmsStorageBillService(IServiceProvider serviceProvider)
|
|
{
|
|
_serviceProvider = serviceProvider;
|
|
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
|
|
user = _serviceProvider.GetRequiredService<IUser>();
|
|
}
|
|
|
|
public DataResult<List<WmsStorageBillListPageModel>> GetListByPage(PageRequest request)
|
|
{
|
|
//序列化查询条件
|
|
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
|
var data = db.Queryable<OP_WMS_FEEDUI_STORAGE>()
|
|
.Select<WmsStorageBillListPageModel>()
|
|
.Where(whereList).ToQueryPage(request.PageCondition);
|
|
return data;
|
|
}
|
|
|
|
public DataResult<WmsStorageBillInfoViewModel> GetWmsStorageBillInfo(string id)
|
|
{
|
|
var gid = Guid.Parse(id);
|
|
|
|
var data = db.Queryable<OP_WMS_FEEDUI_STORAGE>()
|
|
.Select<WmsStorageBillInfoViewModel>()
|
|
.Where((a) => a.WMSDUIID == gid)
|
|
.First();
|
|
return DataResult<WmsStorageBillInfoViewModel>.Success(data);
|
|
}
|
|
|
|
public DataResult GetWmsStorageBillDetailList(string id)
|
|
{
|
|
var data = db.Queryable<OP_WMS_FEEDUI_STORAGE_DETAIL>()
|
|
.Select<WmsStorageBillDetailListModel>()
|
|
.Where(a => a.WMSDUIID == Guid.Parse(id)).ToList();
|
|
return DataResult.Successed("查询成功!", data);
|
|
}
|
|
} |