bug
This commit is contained in:
@@ -18,5 +18,12 @@ namespace Tnb.BasicData.Interfaces
|
||||
/// <param name="queryInput"></param>
|
||||
/// <returns></returns>
|
||||
public Task<dynamic> GetCanCreateSubWorkOrderMaterial(MaterialSelectQueryInput queryInput);
|
||||
|
||||
/// <summary>
|
||||
/// 根据物料类型获取物料列表
|
||||
/// </summary>
|
||||
/// <param name="dic"></param>
|
||||
/// <returns></returns>
|
||||
public Task<dynamic> GetMaterialByType(Dictionary<string, string> dic);
|
||||
}
|
||||
}
|
||||
@@ -160,6 +160,21 @@ namespace Tnb.BasicData
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetMaterialByType(Dictionary<string, string> dic)
|
||||
{
|
||||
string types = dic["types"];
|
||||
string[] typeArr = types.Split(",");
|
||||
List<BasMaterial> list = await _repository.AsSugarClient().Queryable<BasMaterial>().Where(x => x.state=="1").ToListAsync();
|
||||
List<BasMaterial> result = new List<BasMaterial>();
|
||||
foreach (var type in typeArr)
|
||||
{
|
||||
result.AddRange(list.Where(x=>x.category_id.Contains(type)));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取物料清单下所子集物料id
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user