修改库存查询接口
This commit is contained in:
@@ -14,7 +14,7 @@ namespace NX.ERP.Model.Response.Store
|
||||
private string _Qty;
|
||||
|
||||
public string MaterialCode { get => materialCode; set => materialCode = value; }
|
||||
public string BinName { get => binName; set => binName = value; }
|
||||
public string BinCode { get => binName; set => binName = value; }
|
||||
public string Qty { get => _Qty; set => _Qty = value; }
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,7 @@ namespace NX.ERP.U8.Store
|
||||
{
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
{
|
||||
var sql = @"select a.cInvCode as MaterialCode ,c.cPosName as BinName,(isnull(a.iQuantity,0)-isnull(b.iQuantity,0)) as Qty from (
|
||||
select cInvCode,cPosCode , sum(iQuantity)as iQuantity from InvPosition where bRdFlag=1 group by cInvCode,cPosCode
|
||||
)a full join (
|
||||
select cInvCode,cPosCode , sum(iQuantity)as iQuantity from InvPosition where bRdFlag=0 group by cInvCode,cPosCode)
|
||||
b on isnull(a.cInvCode,'')=isnull(b.cInvCode,'') and a.cPosCode=b.cPosCode
|
||||
left join Position c on a.cPosCode=c.cPosCode where a.iQuantity<>b.iQuantity";
|
||||
var sql = @"select cInvCode as MaterialCode ,cPosCode as BinCode,iQuantity as Qty from InvPositionSum where ISNULL(iQuantity,0)<>0";
|
||||
if (!string.IsNullOrEmpty(strwhere))
|
||||
{
|
||||
sql += $" and {strwhere}";
|
||||
@@ -38,7 +33,7 @@ namespace NX.ERP.U8.Store
|
||||
/// <returns></returns>
|
||||
public IEnumerable<Model.Response.Store.Stock> GetListByMaterialCode(string Code)
|
||||
{
|
||||
return this.GetList(" a.cInvCode like @Code", new { Code = $"%{Code}%" });
|
||||
return this.GetList(" cInvCode like @Code", new { Code = $"%{Code}%" });
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user