修改更新接口

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)
{

View File

@@ -53,6 +53,11 @@ namespace NX.ERP.U8.Mom
}
public IEnumerable<NX.ERP.Model.Response.MOM.Bom> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,a.Ufts) >@Pubufts", new { Pubufts });
}
public IEnumerable<NX.ERP.Model.Response.MOM.Bom> GetList(NX.ERP.Model.Request.Bom bom)
{

View File

@@ -73,6 +73,16 @@ namespace NX.ERP.U8.Mom
}
public IEnumerable<Model.MOM.MomOrder> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,a.Ufts) > @Pubufts", new { Pubufts });
}
/// <summary>
///
/// </summary>
@@ -99,7 +109,7 @@ namespace NX.ERP.U8.Mom
where.Add(" a.MoId >= @ProductOrderendID ");
}
if (Params.ModifyDate!=null)
if (Params.ModifyDate != null)
{
where.Add(" ISNULL( a.ModifyDate,createDate) >= @ModifyDate or a.RelsTime>=@ModifyDate ");
}
@@ -108,10 +118,10 @@ namespace NX.ERP.U8.Mom
if (Params.Pubufts != null)
{
where.Add("CONVERT(BIGINT,a.Ufts) > @Pubufts ");
}
if (Params.Status!=null)
if (Params.Status != null)
{
where.Add(" b.Status in @Status ");

View File

@@ -7,7 +7,7 @@ namespace NX.ERP.U8.Purchase
{
public class ArrivalDAL
{
public IEnumerable<Model.Purchase.Arrival> GetList(List<string> strWhere , object param = null)
public IEnumerable<Model.Purchase.Arrival> GetList(string where , object param = null)
{
using (var conn = U8LoginContext.Instance.Connection)
{
@@ -39,11 +39,11 @@ namespace NX.ERP.U8.Purchase
";
var aa = string.Join(" and ", strWhere.ToArray());
if (!string.IsNullOrEmpty(aa))
if (!string.IsNullOrEmpty(where))
{
strSQL += " and " + aa;
strSQL += " and " + where;
}
var lookup = new Dictionary<int, Model.Purchase.Arrival>();
@@ -66,6 +66,24 @@ namespace NX.ERP.U8.Purchase
}
}
public IEnumerable<Model.Purchase.Arrival> GetList(IEnumerable<string> where, object param = null)
{
return this.GetList(string.Join(" and ", where.ToArray()), param);
}
public IEnumerable<Model.Purchase.Arrival> GetList(long Pubufts)
{
return this.GetList("CONVERT(BIGINT,a.Ufts) > @Pubufts", new { Pubufts });
}
public Model.Purchase.Arrival GetModel(int id)
{
List<string> where = new List<string>();