新增物料标签查询接口
This commit is contained in:
@@ -7,6 +7,7 @@ using Aop.Api.Domain;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Dtos.VisualDev;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Logging;
|
||||
@@ -26,6 +27,8 @@ using Tnb.WarehouseMgr.Entities.Attributes;
|
||||
using Tnb.WarehouseMgr.Entities.Consts;
|
||||
using Tnb.WarehouseMgr.Entities.Dto;
|
||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||
using Tnb.WarehouseMgr.Entities.Dto.Outputs;
|
||||
using Tnb.WarehouseMgr.Entities.Dto.Queries;
|
||||
using Tnb.WarehouseMgr.Entities.Enums;
|
||||
using Tnb.WarehouseMgr.Interfaces;
|
||||
|
||||
@@ -481,5 +484,31 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
return isSuccessFul;
|
||||
}
|
||||
/// <summary>
|
||||
/// 物料标签查询
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> MesFetchInOutStockInfoByBarCode(MaterialLabelQuery input)
|
||||
{
|
||||
var pagedList = await _db.Queryable<WmsInstockH>().InnerJoin<WmsInstockCode>((a, b) => a.id == b.bill_id)
|
||||
.LeftJoin<WmsOutstockCode>((a, b, c) => b.barcode == c.barcode)
|
||||
.WhereIF(!string.IsNullOrEmpty(input.org_id), (a, b, c) => a.org_id == input.org_id)
|
||||
.Where((a, b, c) => input.barcode.Contains(b.barcode))
|
||||
.Select((a, b, c) => new MaterailLabelOutput
|
||||
{
|
||||
barcode_qty = b.codeqty,
|
||||
in_bill_code = a.bill_code,
|
||||
out_bill_code = SqlFunc.Subqueryable<WmsOutstockH>().Where(it => it.id == c.bill_id).Select(it => it.bill_code),
|
||||
instock_time = a.create_time,
|
||||
outstock_time = SqlFunc.Subqueryable<WmsOutstockH>().Where(it => it.id == c.bill_id).Select(it => it.create_time),
|
||||
}, true)
|
||||
.ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
return PageResult<MaterailLabelOutput>.SqlSugarPageResult(pagedList); ;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user