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;
///
///
///
///
public WmsStorageBillService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService();
user = _serviceProvider.GetRequiredService();
}
public DataResult> GetListByPage(PageRequest request)
{
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = db.Queryable()
.Select()
.Where(whereList).ToQueryPage(request.PageCondition);
return data;
}
public DataResult GetWmsStorageBillInfo(string id)
{
var gid = Guid.Parse(id);
var data = db.Queryable()
.Select()
.Where((a) => a.WMSDUIID == gid)
.First();
return DataResult.Success(data);
}
public DataResult GetWmsStorageBillDetailList(string id)
{
var data = db.Queryable()
.Select()
.Where(a => a.WMSDUIID == Guid.Parse(id)).ToList();
return DataResult.Successed("查询成功!", data);
}
}