添加基础信息查询的接口
This commit is contained in:
@@ -16,9 +16,9 @@ namespace NX.ERP.U8
|
||||
using (var conn = new System.Data.SqlClient.SqlConnection(U8LoginContext.Instance.Constr4Net))
|
||||
{
|
||||
var sql = @"select
|
||||
cInvCode AS Code ,
|
||||
cInvCode AS MaterielCode ,
|
||||
cInvAddCode AS 存货代码,
|
||||
cInvName AS Name ,
|
||||
cInvName AS MaterielName ,
|
||||
fLength AS Length,
|
||||
fWidth AS Wide,
|
||||
fHeight AS Height,
|
||||
@@ -36,7 +36,7 @@ namespace NX.ERP.U8
|
||||
iMassDate AS 保质期数,
|
||||
cMassUnit AS 保质期单位,
|
||||
iWarnDays AS 保质期预警天数,
|
||||
cInvCCode AS InvCCode,
|
||||
cInvCCode AS MaterielTypeCode,
|
||||
cReplaceItem AS 替换件,
|
||||
cPosition AS 货位编码,
|
||||
bSale AS 是否销售,
|
||||
@@ -46,7 +46,7 @@ namespace NX.ERP.U8
|
||||
bProducing AS 是否在制,
|
||||
bService AS 是否应税劳务,
|
||||
bAccessary AS 是否成套件,
|
||||
iTaxRate AS 税率,
|
||||
iTaxRate AS TaxRate,
|
||||
iInvRCost AS InvRCost,
|
||||
iInvSPrice AS InvSPrice,
|
||||
iInvLSCost AS 最低售价,
|
||||
@@ -279,6 +279,52 @@ namespace NX.ERP.U8
|
||||
}
|
||||
|
||||
|
||||
public IEnumerable<Materiel> GetList(IEnumerable<string> codes)
|
||||
{
|
||||
return this.GetList(" cInvCode=@codes ", codes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public IEnumerable<Materiel> GetList(NX.ERP.Model.Request.Materiel materiel)
|
||||
{
|
||||
List<string> where = new List<string>();
|
||||
if (!string.IsNullOrEmpty(materiel.MaterielCode))
|
||||
{
|
||||
where.Add(" cInvCode like @MaterielCode ");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(materiel.MaterielName))
|
||||
{
|
||||
where.Add(" cInvName like @MaterielName ");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(materiel.SpecsModel))
|
||||
{
|
||||
where.Add(" cInvStd like @SpecsModel ");
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(materiel.MaterielTypeCode))
|
||||
{
|
||||
where.Add(" cInvCCode = @MaterielTypeCode ");
|
||||
}
|
||||
|
||||
|
||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||
{
|
||||
MaterielCode = $"%{materiel.MaterielCode}%",
|
||||
MaterielName = $"%{materiel.MaterielName}%",
|
||||
SpecsModel = materiel.SpecsModel,
|
||||
MaterielTypeCode = materiel.MaterielTypeCode
|
||||
|
||||
}); ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取成本
|
||||
/// </summary>
|
||||
@@ -309,7 +355,6 @@ namespace NX.ERP.U8
|
||||
case "最新成本":
|
||||
|
||||
return inv.InvNCost;
|
||||
|
||||
default:
|
||||
{
|
||||
throw new Exception("取得U8存货档案价格失败!");
|
||||
|
||||
Reference in New Issue
Block a user