|
|
@ -53,12 +53,14 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
/// 获取商品下拉列表-客户端
|
|
|
|
/// 获取商品下拉列表-客户端
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public async Task<DataResult<List<CodeGoodsSelectRes>>> GetClientGoodsList(string code ="")
|
|
|
|
public async Task<DataResult<List<CodeGoodsSelectRes>>> GetClientGoodsList(string queryKey ="")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var list = await tenantDb.Queryable<CodeGoods>()
|
|
|
|
var list = await tenantDb.Queryable<CodeGoods>()
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(code), a => a.GoodsCode.Contains(code))
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.GoodsCode.Contains(queryKey) || a.GoodName.Contains(queryKey))
|
|
|
|
.Select<CodeGoodsSelectRes>()
|
|
|
|
.Select<CodeGoodsSelectRes>()
|
|
|
|
|
|
|
|
.Take(20)
|
|
|
|
|
|
|
|
.WithCache(SqlSugarCacheConst.Goods)
|
|
|
|
.ToListAsync();
|
|
|
|
.ToListAsync();
|
|
|
|
return await Task.FromResult(DataResult<List<CodeGoodsSelectRes>>.Success("获取数据成功!", list));
|
|
|
|
return await Task.FromResult(DataResult<List<CodeGoodsSelectRes>>.Success("获取数据成功!", list));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1562,36 +1564,48 @@ public class ClientCommonService : IClientCommonService
|
|
|
|
/// 获取包装类型下拉列表
|
|
|
|
/// 获取包装类型下拉列表
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList()
|
|
|
|
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList(string queryKey ="")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var data = tenantDb.Queryable<CodePackage>()
|
|
|
|
var data = tenantDb.Queryable<CodePackage>()
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable)
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable)
|
|
|
|
.Select<CodePackageSelectRes>().ToList();
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.PackageName.Contains(queryKey) || a.EdiCode.Contains(queryKey))
|
|
|
|
|
|
|
|
.Select<CodePackageSelectRes>()
|
|
|
|
|
|
|
|
.Take(20)
|
|
|
|
|
|
|
|
.WithCache(SqlSugarCacheConst.Package)
|
|
|
|
|
|
|
|
.ToList();
|
|
|
|
return DataResult<List<CodePackageSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
return DataResult<List<CodePackageSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 获取船名下拉列表
|
|
|
|
/// 获取船名下拉列表
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public DataResult<List<CodeVesselSelectRes>> GetVesselSelectList()
|
|
|
|
public DataResult<List<CodeVesselSelectRes>> GetVesselSelectList(string queryKey = "")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var data = tenantDb.Queryable<CodeVessel>()
|
|
|
|
var data = tenantDb.Queryable<CodeVessel>()
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable)
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable)
|
|
|
|
.Select<CodeVesselSelectRes>().ToList();
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.VesselName.Contains(queryKey) || a.EdiCode.Contains(queryKey))
|
|
|
|
|
|
|
|
.Select<CodeVesselSelectRes>()
|
|
|
|
|
|
|
|
.Take(20)
|
|
|
|
|
|
|
|
.WithCache(SqlSugarCacheConst.Vessel)
|
|
|
|
|
|
|
|
.ToList();
|
|
|
|
return DataResult<List<CodeVesselSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
return DataResult<List<CodeVesselSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 获取航次下拉列表
|
|
|
|
/// 获取航次下拉列表
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
public DataResult<List<CodeVoynoSelectRes>> GetVoynoSelectList()
|
|
|
|
public DataResult<List<CodeVoynoSelectRes>> GetVoynoSelectList(string queryKey = "")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var data = tenantDb.Queryable<CodeVoyno>()
|
|
|
|
var data = tenantDb.Queryable<CodeVoyno>()
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable)
|
|
|
|
.Where(a => a.Status == StatusEnum.Enable)
|
|
|
|
.Select<CodeVoynoSelectRes>().ToList();
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.VoyNo.Contains(queryKey))
|
|
|
|
|
|
|
|
.Select<CodeVoynoSelectRes>()
|
|
|
|
|
|
|
|
.Take(20)
|
|
|
|
|
|
|
|
.WithCache(SqlSugarCacheConst.Voyno)
|
|
|
|
|
|
|
|
.ToList();
|
|
|
|
return DataResult<List<CodeVoynoSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
return DataResult<List<CodeVoynoSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|