From 51e7ee6980e310f4bf73e33fed975c77453835b3 Mon Sep 17 00:00:00 2001 From: gongxh Date: Fri, 28 May 2021 09:21:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.Model/Request/Supplier.cs | 5 ++++- NX.ERP.Model/Response/Base/Supplier.cs | 3 +++ NX.ERP.U8/Base/MaterielDAL.cs | 2 +- NX.ERP.U8/Base/SupplierDAL.cs | 9 ++++++++- NX.ERP.U8/Store/MaterialAppDAL.cs | 2 +- NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs | 9 +++++++++ 6 files changed, 26 insertions(+), 4 deletions(-) diff --git a/NX.ERP.Model/Request/Supplier.cs b/NX.ERP.Model/Request/Supplier.cs index c0d7216..c69290b 100644 --- a/NX.ERP.Model/Request/Supplier.cs +++ b/NX.ERP.Model/Request/Supplier.cs @@ -13,6 +13,9 @@ namespace NX.ERP.Model.Request public string SupplierCode { get => supplierCode; set => supplierCode = value; } public string SupplierName { get => supplierName; set => supplierName = value; } - + + public DateTime? ModifyDate { get; set; } + + } } diff --git a/NX.ERP.Model/Response/Base/Supplier.cs b/NX.ERP.Model/Response/Base/Supplier.cs index eaca025..e0f6eb8 100644 --- a/NX.ERP.Model/Response/Base/Supplier.cs +++ b/NX.ERP.Model/Response/Base/Supplier.cs @@ -20,5 +20,8 @@ namespace NX.ERP.Model public string Contract { get => contract; set => contract = value; } public string ContractPhone { get; set; } + + + public DateTime ModifyDate { get; set; } } } diff --git a/NX.ERP.U8/Base/MaterielDAL.cs b/NX.ERP.U8/Base/MaterielDAL.cs index d2cd032..e517f90 100644 --- a/NX.ERP.U8/Base/MaterielDAL.cs +++ b/NX.ERP.U8/Base/MaterielDAL.cs @@ -376,7 +376,7 @@ namespace NX.ERP.U8 if (Material.ModifyDate != null) { - where.Add(" dModifyDate >= @ModifyDate "); + where.Add(" ISNULL(dModifyDate,dVenCreateDatetime) >= @ModifyDate "); } return this.GetList(string.Join(" and ", where.ToArray()), new diff --git a/NX.ERP.U8/Base/SupplierDAL.cs b/NX.ERP.U8/Base/SupplierDAL.cs index 73ad8b0..f2496dc 100644 --- a/NX.ERP.U8/Base/SupplierDAL.cs +++ b/NX.ERP.U8/Base/SupplierDAL.cs @@ -21,6 +21,7 @@ namespace NX.ERP.U8 cVenPostCode AS PostalCode, cVenAddress AS Address, cVenPhone as ContractPhone, + ISNULL(dModifyDate,dVenCreateDatetime) as ModifyDate, cVenPerson AS Contract from Vendor "; if (!string.IsNullOrEmpty(strWhere)) { @@ -45,10 +46,16 @@ namespace NX.ERP.U8 where.Add(" cVenName like @SupplierName "); } + + if (Params.ModifyDate != null) + { + where.Add(" ISNULL(dModifyDate,dVenCreateDatetime) >= @ModifyDate "); + } return this.GetList(string.Join(" and ", where.ToArray()), new { SupplierCode = $"%{Params.SupplierCode}%", - SupplierName = $"%{Params.SupplierName}%" + SupplierName = $"%{Params.SupplierName}%", + Params.ModifyDate }); diff --git a/NX.ERP.U8/Store/MaterialAppDAL.cs b/NX.ERP.U8/Store/MaterialAppDAL.cs index 7fe379d..09a8b5b 100644 --- a/NX.ERP.U8/Store/MaterialAppDAL.cs +++ b/NX.ERP.U8/Store/MaterialAppDAL.cs @@ -11,7 +11,7 @@ namespace NX.ERP.U8.Store /// public class MaterialAppDAL : VoucherBase { - public MaterialAppDAL() : base("64", "U8API/AppVouchs") + public MaterialAppDAL() : base("64", "U8API/MaterialApp") { } diff --git a/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs b/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs index 76648f8..fc0dd52 100644 --- a/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs +++ b/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs @@ -76,6 +76,15 @@ namespace NX.ERP.WebAPi.Controllers.Store } + [Route("api/MaterialApp/Add")] + [HttpGet] + + public string Add() + { + var dal = new NX.ERP.U8.Store.MaterialAppDAL(); + return dal.AddVoucher(null); + } +