修复bug
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
using Mapster;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
@@ -29,11 +31,18 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
private async Task<dynamic> GetListAsync(VisualDevModelListQueryInput input)
|
||||
{
|
||||
var materialCode = "";
|
||||
if (!input.queryJson.IsNullOrWhiteSpace())
|
||||
{
|
||||
materialCode = JObject.Parse(input.queryJson).Value<string>(nameof(WmsCarryCode.material_code));
|
||||
}
|
||||
|
||||
List<WmsStockReportH> items = await _db.Queryable<WmsCarryCode>().InnerJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||
.InnerJoin<BasMaterialSendWarehouse>((a, b, c) => b.id == c.material_id)
|
||||
.InnerJoin<WmsCarryH>((a, b, c, d) => a.carry_id == d.id)
|
||||
.InnerJoin<BasLocation>((a, b, c, d, e) => d.location_id == e.id)
|
||||
.Where((a, b, c, d, e) => e.is_type == ((int)EnumLocationType.存储库位).ToString())
|
||||
.WhereIF(!string.IsNullOrEmpty(materialCode), (a, b, c, d, e) => a.material_code.Contains(materialCode))
|
||||
.Select((a, b, c, d, e) => new WmsStockReportH
|
||||
{
|
||||
warehouse_id = a.warehouse_id,
|
||||
|
||||
Reference in New Issue
Block a user