修正API
This commit is contained in:
@@ -54,8 +54,8 @@ namespace NX.ERP.U8
|
||||
cReplaceItem AS 替换件,
|
||||
cPosition AS 货位编码,
|
||||
bSale AS 是否销售,
|
||||
bPurchase AS 是否外购,
|
||||
bSelf AS 是否自制,
|
||||
bPurchase AS IsPurchase,
|
||||
bSelf AS IsSelf,
|
||||
bComsume AS 是否生产耗用,
|
||||
bProducing AS 是否在制,
|
||||
bService AS 是否应税劳务,
|
||||
@@ -325,13 +325,18 @@ namespace NX.ERP.U8
|
||||
where.Add(" cInvCCode = @MaterialTypeCode ");
|
||||
}
|
||||
|
||||
if (Material.ModifyDate != null)
|
||||
{
|
||||
where.Add(" dModifyDate >= @ModifyDate ");
|
||||
}
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
MaterialCode = Material.MaterialCode,
|
||||
MaterialName = $"%{Material.MaterialName}%",
|
||||
SpecsModel = Material.SpecsModel,
|
||||
MaterialTypeCode = Material.MaterialTypeCode
|
||||
MaterialTypeCode = Material.MaterialTypeCode,
|
||||
ModifyDate = Material.ModifyDate
|
||||
|
||||
}); ;
|
||||
|
||||
|
||||
@@ -54,5 +54,47 @@ namespace NX.ERP.U8.Mom
|
||||
}
|
||||
|
||||
|
||||
public IEnumerable<NX.ERP.Model.Response.MOM.Bom> GetList(NX.ERP.Model.Request.Bom bom)
|
||||
{
|
||||
|
||||
List<string> where = new List<string>();
|
||||
if (!string.IsNullOrEmpty(bom.ParentCode))
|
||||
{
|
||||
where.Add(" c.InvCode = @ParentCode ");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(bom.VersionDesc))
|
||||
{
|
||||
where.Add(" a.VersionDesc like @VersionDesc ");
|
||||
}
|
||||
|
||||
if (bom.BomType.HasValue)
|
||||
{
|
||||
where.Add(" a.BomType = @BomType ");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (bom.Version.HasValue)
|
||||
{
|
||||
where.Add(" a.Version = @Version ");
|
||||
}
|
||||
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
ParentCode = bom.ParentCode,
|
||||
VersionDesc =$"%{bom.VersionDesc}%",
|
||||
BomType = bom.BomType,
|
||||
Version =bom.Version,
|
||||
|
||||
|
||||
}); ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace NX.ERP.U8.Store
|
||||
{
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
{
|
||||
var sql = @"select cInvCode as MaterialCode ,cPosCode as BinCode,iQuantity as Qty from InvPositionSum where ISNULL(iQuantity,0)<>0";
|
||||
var sql = @" select a.cInvCode as MaterialCode ,cPosCode as BinCode,iQuantity as Qty,b.cInvName as MaterialName from InvPositionSum as a
|
||||
left join Inventory as b on a.cInvCode=b.cInvCode where ISNULL(iQuantity,0)<>0";
|
||||
if (!string.IsNullOrEmpty(strwhere))
|
||||
{
|
||||
sql += $" and {strwhere}";
|
||||
@@ -38,6 +39,34 @@ namespace NX.ERP.U8.Store
|
||||
}
|
||||
|
||||
|
||||
public IEnumerable<Model.Response.Store.Stock> GetList(NX.ERP.Model.Request.Stock stock)
|
||||
{
|
||||
List<string> where = new List<string>();
|
||||
if (!string.IsNullOrEmpty(stock.MaterialCode))
|
||||
{
|
||||
where.Add(" a.cInvCode = @MaterialCode ");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(stock.MaterialName))
|
||||
{
|
||||
where.Add(" b.cInvName like @MaterialName ");
|
||||
}
|
||||
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
MaterialCode = stock.MaterialCode,
|
||||
MaterialName = $"%{stock.MaterialName}%",
|
||||
|
||||
|
||||
}); ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user