修改更新接口

This commit is contained in:
gongxh
2021-06-04 11:22:42 +08:00
parent 1f55b28602
commit 0644817c17
26 changed files with 174 additions and 64 deletions

View File

@@ -15,7 +15,7 @@ namespace NX.ERP.U8.Base
using (var conn = U8LoginContext.Instance.Connection)
{
var sql = @"select cPosCode as BinCode,cPosName as BinName,iPosGrade,bPosEnd,cWhCode as WarehouseCode,
iMaxCubage as VolumeLimit, iMaxweight as WeightLimit,cMemo,cBarCode from Position";
iMaxCubage as VolumeLimit, iMaxweight as WeightLimit,cMemo,cBarCode,CONVERT(BIGINT,pubufts) AS pubufts from Position";
if (!string.IsNullOrEmpty(strwhere))
{
sql += $" where {strwhere}";
@@ -24,7 +24,12 @@ namespace NX.ERP.U8.Base
}
}
public IEnumerable<Bin> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
}
public IEnumerable<Bin> GetListByWhCode(string Code)
{
@@ -50,7 +55,7 @@ namespace NX.ERP.U8.Base
return this.GetList(string.Join(" and ", where.ToArray()), new
{
BinCode = $"%{Param.BinCode}%",
WarehouseCode=$"%{Param.WarehouseCode}%"
WarehouseCode = $"%{Param.WarehouseCode}%"
});

View File

@@ -20,6 +20,8 @@ namespace NX.ERP.U8
cCusName AS CustomerName,
cCusPostCode AS PostalCode,
cCusAddress AS Address,
CONVERT(BIGINT,pubufts) as pubufts,
cCusPerson AS Contract,cCusPhone AS ContractPhone from Customer ";
if (!string.IsNullOrEmpty(strWhere))
{
@@ -29,6 +31,20 @@ namespace NX.ERP.U8
}
}
public IEnumerable<Customer> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
}
public IEnumerable<Customer> GetList(NX.ERP.Model.Request.Customer Params)
{
IList<string> where = new List<string>();

View File

@@ -324,7 +324,7 @@ namespace NX.ERP.U8
bProxyForeign AS ProxyForeign,
CONVERT(BIGINT,pubufts) as pubufts,
cDTAQL AS Aql
@@ -339,6 +339,17 @@ namespace NX.ERP.U8
}
public IEnumerable<Material> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
}
public Material GetModel(string Code)
{
return this.GetList(" cInvCode=@Code ", new { Code }).FirstOrDefault();

View File

@@ -23,6 +23,18 @@ namespace NX.ERP.U8
}
public IEnumerable<MaterialType> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
}

View File

@@ -23,7 +23,7 @@ namespace NX.ERP.U8
cVenPhone as ContractPhone,
ISNULL(dModifyDate,dVenCreateDatetime) as ModifyDate,
bProxyForeign as ProxyForeign,
CONVERT(BIGINT,pubufts) as pubufts,
cVenPerson AS Contract from Vendor ";
if (!string.IsNullOrEmpty(strWhere))
{
@@ -34,6 +34,17 @@ namespace NX.ERP.U8
}
public IEnumerable<Supplier> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
}
public IEnumerable<Supplier> GetList(NX.ERP.Model.Request.Supplier Params)
{
IList<string> where = new List<string>();

View File

@@ -25,6 +25,11 @@ namespace NX.ERP.U8
}
}
public IEnumerable<Unit> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
}
public IEnumerable<Unit> GetList(NX.ERP.Model.Request.Unit Params)
{
@@ -54,7 +59,7 @@ namespace NX.ERP.U8
{
UnitCode = $"%{Params.UnitCode}%",
UnitName = $"%{Params.UnitName}%",
Pubufts=Params.Pubufts
Pubufts = Params.Pubufts
});

View File

@@ -15,7 +15,7 @@ namespace NX.ERP.U8
using (var conn = U8LoginContext.Instance.Connection)
{
var sql = "select cWhCode as WarehouseCode,cWhName as WarehouseName from Warehouse";
var sql = "select cWhCode as WarehouseCode,cWhName as WarehouseName,CONVERT(BIGINT,pubufts) AS pubufts from Warehouse";
if (!string.IsNullOrEmpty(strWhere))
{
sql += $" where {strWhere}";
@@ -23,6 +23,16 @@ namespace NX.ERP.U8
return conn.Query<Warehouse>(sql, Param);
}
}
public IEnumerable<Warehouse> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,pubufts) > @Pubufts", new { Pubufts });
}
public IEnumerable<Warehouse> GetList(NX.ERP.Model.Request.Warehouse Params)
{