diff --git a/NX.ERP.Model/NX.ERP.Model.csproj b/NX.ERP.Model/NX.ERP.Model.csproj
index 5a5c69e..eb5b5f2 100644
--- a/NX.ERP.Model/NX.ERP.Model.csproj
+++ b/NX.ERP.Model/NX.ERP.Model.csproj
@@ -67,6 +67,7 @@
+
@@ -74,6 +75,7 @@
+
diff --git a/NX.ERP.Model/Request/Bom.cs b/NX.ERP.Model/Request/Bom.cs
new file mode 100644
index 0000000..5dd6d7b
--- /dev/null
+++ b/NX.ERP.Model/Request/Bom.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace NX.ERP.Model.Request
+{
+ public class Bom
+ {
+ // bom_type
+ //version
+ //version_desc
+ //parent_code
+
+
+ public int? BomType { get; set; }
+ public int? Version { get; set; }
+
+ public string VersionDesc { get; set; }
+
+ public string ParentCode { get; set; }
+
+ }
+}
diff --git a/NX.ERP.Model/Request/Materiel.cs b/NX.ERP.Model/Request/Materiel.cs
index 73cb11e..dcf44e7 100644
--- a/NX.ERP.Model/Request/Materiel.cs
+++ b/NX.ERP.Model/Request/Materiel.cs
@@ -18,7 +18,9 @@ namespace NX.ERP.Model.Request
public string SpecsModel { get; set; }
-
+ public DateTime? ModifyDate { get; set; }
+
+
}
diff --git a/NX.ERP.Model/Request/Stock.cs b/NX.ERP.Model/Request/Stock.cs
new file mode 100644
index 0000000..9eb558b
--- /dev/null
+++ b/NX.ERP.Model/Request/Stock.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace NX.ERP.Model.Request
+{
+ public class Stock
+ {
+ private string _code;
+ private string _name;
+
+ public string MaterialCode { get => _code; set => _code = value; }
+ public string MaterialName { get => _name; set => _name = value; }
+ }
+}
diff --git a/NX.ERP.Model/Response/Base/Materiel.cs b/NX.ERP.Model/Response/Base/Materiel.cs
index 6f6522b..094fe0b 100644
--- a/NX.ERP.Model/Response/Base/Materiel.cs
+++ b/NX.ERP.Model/Response/Base/Materiel.cs
@@ -94,6 +94,16 @@ namespace NX.ERP.Model
public DateTime? ModifyDate { get; set; }
+ public bool IsPurchase { get; set; }
+
+ public bool IsSelf { get; set; }
+
+ public bool IsSub { get; set; }
+
+
+ //bPurchase,bSelf,IsSub
+
+
diff --git a/NX.ERP.Model/Response/Store/Stock.cs b/NX.ERP.Model/Response/Store/Stock.cs
index 04ca200..8fe8bc0 100644
--- a/NX.ERP.Model/Response/Store/Stock.cs
+++ b/NX.ERP.Model/Response/Store/Stock.cs
@@ -13,9 +13,13 @@ namespace NX.ERP.Model.Response.Store
private string binName;
private string _Qty;
+ private string materialName;
+
+
public string MaterialCode { get => materialCode; set => materialCode = value; }
public string BinCode { get => binName; set => binName = value; }
public string Qty { get => _Qty; set => _Qty = value; }
+ public string MaterialName { get => materialName; set => materialName = value; }
}
diff --git a/NX.ERP.U8/Base/MaterielDAL.cs b/NX.ERP.U8/Base/MaterielDAL.cs
index ab7a6c8..a7dbc7b 100644
--- a/NX.ERP.U8/Base/MaterielDAL.cs
+++ b/NX.ERP.U8/Base/MaterielDAL.cs
@@ -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
}); ;
diff --git a/NX.ERP.U8/Mom/BomDAL.cs b/NX.ERP.U8/Mom/BomDAL.cs
index f88478c..1da1997 100644
--- a/NX.ERP.U8/Mom/BomDAL.cs
+++ b/NX.ERP.U8/Mom/BomDAL.cs
@@ -54,5 +54,47 @@ namespace NX.ERP.U8.Mom
}
+ public IEnumerable GetList(NX.ERP.Model.Request.Bom bom)
+ {
+
+ List where = new List();
+ 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,
+
+
+ }); ;
+
+
+ }
+
+
+
}
}
diff --git a/NX.ERP.U8/Store/StockDAL.cs b/NX.ERP.U8/Store/StockDAL.cs
index 161beff..102c5d7 100644
--- a/NX.ERP.U8/Store/StockDAL.cs
+++ b/NX.ERP.U8/Store/StockDAL.cs
@@ -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 GetList(NX.ERP.Model.Request.Stock stock)
+ {
+ List where = new List();
+ 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}%",
+
+
+ }); ;
+
+
+
+ }
+
+
+
}
diff --git a/NX.ERP.WebAPi/App_Start/SwaggerConfig.cs b/NX.ERP.WebAPi/App_Start/SwaggerConfig.cs
index 68ef586..7527440 100644
--- a/NX.ERP.WebAPi/App_Start/SwaggerConfig.cs
+++ b/NX.ERP.WebAPi/App_Start/SwaggerConfig.cs
@@ -85,7 +85,7 @@ namespace NX.ERP.WebAPi
// });
// Set this flag to omit descriptions for any actions decorated with the Obsolete attribute
- c.IgnoreObsoleteActions();
+ c.IgnoreObsoleteActions();
// Each operation be assigned one or more tags which are then used by consumers for various reasons.
// For example, the swagger-ui groups operations according to the first tag of each operation.
diff --git a/NX.ERP.WebAPi/Controllers/MOM/BomController.cs b/NX.ERP.WebAPi/Controllers/MOM/BomController.cs
index b29f54a..6cff9c9 100644
--- a/NX.ERP.WebAPi/Controllers/MOM/BomController.cs
+++ b/NX.ERP.WebAPi/Controllers/MOM/BomController.cs
@@ -8,6 +8,7 @@ namespace NX.ERP.WebAPi.Controllers.MOM
{
public class BomController : ApiController
{
+ [Obsolete]
[Route("api/Bom/List")]
[HttpGet]
@@ -15,5 +16,16 @@ namespace NX.ERP.WebAPi.Controllers.MOM
{
return new NX.ERP.U8.Mom.BomDAL().GetList();
}
+
+
+
+
+ [Route("api/Bom/Query")]
+ [HttpPost]
+
+ public IEnumerable GetList(NX.ERP.Model.Request.Bom bom)
+ {
+ return new NX.ERP.U8.Mom.BomDAL().GetList(bom);
+ }
}
}
\ No newline at end of file
diff --git a/NX.ERP.WebAPi/Controllers/MOM/MomOrderController.cs b/NX.ERP.WebAPi/Controllers/MOM/MomOrderController.cs
index d20a8d7..daa966f 100644
--- a/NX.ERP.WebAPi/Controllers/MOM/MomOrderController.cs
+++ b/NX.ERP.WebAPi/Controllers/MOM/MomOrderController.cs
@@ -9,6 +9,7 @@ namespace NX.ERP.WebAPi.Controllers.MOM
public class MomOrderController : ApiController
{
+ [Obsolete]
[Route("api/MomOrder/List")]
[HttpGet]
public IEnumerable List()
@@ -19,7 +20,7 @@ namespace NX.ERP.WebAPi.Controllers.MOM
}
- [Route("api/MomOrder/List")]
+ [Route("api/MomOrder/Query")]
[HttpPost]
public IEnumerable List(NX.ERP.Model.Request.MomOrder momOrder)
{
diff --git a/NX.ERP.WebAPi/Controllers/Pmc/FinanceController.cs b/NX.ERP.WebAPi/Controllers/Pmc/FinanceController.cs
index 5978209..2d47de9 100644
--- a/NX.ERP.WebAPi/Controllers/Pmc/FinanceController.cs
+++ b/NX.ERP.WebAPi/Controllers/Pmc/FinanceController.cs
@@ -10,6 +10,7 @@ namespace NX.ERP.WebAPi.Controllers
{
public class FinanceController : ApiController
{
+ [Obsolete]
[HttpPost]
[Route("api/Finance/InventorySNDetail")]
public IEnumerable