diff --git a/NX.ERP.Model/Request/ApVouch.cs b/NX.ERP.Model/Request/ApVouch.cs
index abdd589..e104213 100644
--- a/NX.ERP.Model/Request/ApVouch.cs
+++ b/NX.ERP.Model/Request/ApVouch.cs
@@ -11,7 +11,7 @@ namespace NX.ERP.Model.Request
public string DeptName { get; set; }
public string supplierCode { get; set; }
- public string Amount { get; set; }
+ public decimal Amount { get; set; }
public string Digest { get; set; }
diff --git a/NX.ERP.Model/Request/Unit.cs b/NX.ERP.Model/Request/Unit.cs
index 8c4bd0e..68b03f2 100644
--- a/NX.ERP.Model/Request/Unit.cs
+++ b/NX.ERP.Model/Request/Unit.cs
@@ -5,15 +5,19 @@ using System.Text;
namespace NX.ERP.Model.Request
{
- public class Unit:BaseModel
+ public class Unit : BaseModel
{
private string unitCode;
private string unitName;
-
+
public string UnitCode { get => unitCode; set => unitCode = value; }
public string UnitName { get => unitName; set => unitName = value; }
-
+
+
+ public long? Pubufts { get; set; }
+
+
}
}
diff --git a/NX.ERP.Model/Response/Base/Materiel.cs b/NX.ERP.Model/Response/Base/Materiel.cs
index f92addb..2436093 100644
--- a/NX.ERP.Model/Response/Base/Materiel.cs
+++ b/NX.ERP.Model/Response/Base/Materiel.cs
@@ -20,7 +20,7 @@ namespace NX.ERP.Model
private int maxStock;
private int minStock;
private int aql;
- private int invccode;
+
public string MaterialCode { get => _code; set => _code = value; }
public string MaterialName { get => _name; set => _name = value; }
@@ -31,44 +31,53 @@ namespace NX.ERP.Model
public string UnitCode { get => unitCode; set => unitCode = value; }
-
+ [Newtonsoft.Json.JsonIgnore]
public int MinPackageQty { get; set; }
-
+ [Newtonsoft.Json.JsonIgnore]
public int TaxRate { get; set; }
-
+ [Newtonsoft.Json.JsonIgnore]
public decimal Length { get => length; set => length = value; }
+ [Newtonsoft.Json.JsonIgnore]
public decimal Wide { get => wide; set => wide = value; }
+ [Newtonsoft.Json.JsonIgnore]
public decimal Height { get => height; set => height = value; }
+ [Newtonsoft.Json.JsonIgnore]
public int Volume { get => volume; set => volume = value; }
+ [Newtonsoft.Json.JsonIgnore]
public int Weight { get => weight; set => weight = value; }
+ [Newtonsoft.Json.JsonIgnore]
public double UnitPrice { get => unitPrice; set => unitPrice = value; }
-
+ [Newtonsoft.Json.JsonIgnore]
public int MaxStock { get => maxStock; set => maxStock = value; }
+ [Newtonsoft.Json.JsonIgnore]
public int MinStock { get => minStock; set => minStock = value; }
-
+ [Newtonsoft.Json.JsonIgnore]
public int SafeStock { get; set; }
+ [Newtonsoft.Json.JsonIgnore]
public int Aql { get => aql; set => aql = value; }
-
+ [Newtonsoft.Json.JsonIgnore]
public double InvNCost { get; set; }
///
/// 参考成本
///
+ [Newtonsoft.Json.JsonIgnore]
public double InvSPrice { get; set; }
///
/// 计划单价
///
+ [Newtonsoft.Json.JsonIgnore]
public double InvRCost { get; set; }
-
+ [Newtonsoft.Json.JsonIgnore]
public double ImpTaxRate { get; set; }
///
diff --git a/NX.ERP.Model/Response/Base/Unit.cs b/NX.ERP.Model/Response/Base/Unit.cs
index edd0a5c..cae5dfe 100644
--- a/NX.ERP.Model/Response/Base/Unit.cs
+++ b/NX.ERP.Model/Response/Base/Unit.cs
@@ -19,5 +19,10 @@ namespace NX.ERP.Model
public string GroupCode { get => groupCode; set => groupCode = value; }
public decimal Changerate { get; set; }
+
+ public long Pubufts { get; set; }
+
+
+
}
}
diff --git a/NX.ERP.U8/AP/APVouch.cs b/NX.ERP.U8/AP/APVouch.cs
index 9ea9305..4efb198 100644
--- a/NX.ERP.U8/AP/APVouch.cs
+++ b/NX.ERP.U8/AP/APVouch.cs
@@ -219,11 +219,11 @@ namespace NX.ERP.U8.AP
headXml.setAttribute("VT_ID", 8056);
headXml.setAttribute("bd_c", false);
headXml.setAttribute("bStartFlag", false);
- headXml.setAttribute("cVouchID", "");
+ headXml.setAttribute("cVouchID", "664");
headXml.setAttribute("cFlag", "AP");
headXml.setAttribute("cDeptCode", ApVouch.DeptCode);
headXml.setAttribute("cDigest", ApVouch.Digest);
- headXml.setAttribute("cLink", "");
+ headXml.setAttribute("cLink", "664");
IXMLDOMElement bodyXml;
//for (var n = 0; n < storeIn.details.Count(); n++)
@@ -238,7 +238,7 @@ namespace NX.ERP.U8.AP
bodyXml.setAttribute("iAmount", ApVouch.Amount);
bodyXml.setAttribute("iAmount_f", ApVouch.Amount);
bodyXml.setAttribute("iAmt_s", 0);
- bodyXml.setAttribute("cLink", "");
+ bodyXml.setAttribute("cLink", "664");
headXml.setAttribute("cDwCode", ApVouch.supplierCode);
bodyXml.setAttribute("bd_c", true);
diff --git a/NX.ERP.U8/Base/UnitDAL.cs b/NX.ERP.U8/Base/UnitDAL.cs
index 7627fd5..5d6d13c 100644
--- a/NX.ERP.U8/Base/UnitDAL.cs
+++ b/NX.ERP.U8/Base/UnitDAL.cs
@@ -16,7 +16,7 @@ namespace NX.ERP.U8
{
var sql = @"select
cComunitCode AS UnitCode,
- cComUnitName AS UnitName,bMainUnit as MainUnit, cGroupCode as GroupCode from ComputationUnit ";
+ cComUnitName AS UnitName,bMainUnit as MainUnit,CONVERT(BIGINT,pubufts) AS pubufts, cGroupCode as GroupCode from ComputationUnit ";
if (!string.IsNullOrEmpty(strWhere))
{
sql += $" where {strWhere}";
@@ -40,10 +40,21 @@ namespace NX.ERP.U8
where.Add(" cComUnitName like @UnitName ");
}
+
+ if (Params.Pubufts != null)
+ {
+
+ where.Add("CONVERT(BIGINT,pubufts) >=@Pubufts ");
+
+ }
+
+
+
return this.GetList(string.Join(" and ", where.ToArray()), new
{
UnitCode = $"%{Params.UnitCode}%",
- UnitName = $"%{Params.UnitName}%"
+ UnitName = $"%{Params.UnitName}%",
+ Pubufts=Params.Pubufts
});
diff --git a/NX.ERP.U8/Mom/MomOrderDAL.cs b/NX.ERP.U8/Mom/MomOrderDAL.cs
index 953bd3a..24998c3 100644
--- a/NX.ERP.U8/Mom/MomOrderDAL.cs
+++ b/NX.ERP.U8/Mom/MomOrderDAL.cs
@@ -30,10 +30,10 @@ namespace NX.ERP.U8.Mom
left join mom_orderdetail as b on a.MoId=b.MoId
left join mom_morder as d on b.MoDId=d.MoDId
left join mom_SNDetail as e on b.MoDId=e.iVouchsID
- left join mom_moallocate as c on b.MoDId=c.MoDId ";
+ left join mom_moallocate as c on b.MoDId=c.MoDId where b.Status<>4";
if (!string.IsNullOrEmpty(strWhere))
{
- strSQL += $" where {strWhere} ";
+ strSQL += $" and {strWhere} ";
}
var lookupDetail = new Dictionary();
var lookupOrder = new Dictionary();
@@ -59,7 +59,10 @@ namespace NX.ERP.U8.Mom
{
OrderDetail = momDetail;
}
- OrderDetail.SN.Add(SN);
+ if (SN != null)
+ {
+ OrderDetail.SN.Add(SN);
+ }
Order.Allocates.Add(MoAllocate);
OrderDetail.ProductAllocateOrderLst.Add(MoAllocate);
MoAllocate.momDetail = OrderDetail;
@@ -162,9 +165,7 @@ namespace NX.ERP.U8.Mom
a.MoId as id ,a.MoDId as ProductOrderDtlId,a.MoId as ProductOrderId,a.MoCode as ProductOrderNo,a.MakeDate as ProductOrderDate,a.InvCode as ProductCode,a.Qty as Qty
FROM v_st_mom_orderdetail a with (nolock) Where ( (1>0) AND (1>0) )
AND ( 1>0 ) and (case when ISNULL(SfcFlag,0)=1 then iquantity+QualifiedInQty else 1 end)<>0
- and ISNULL(QCFLAG,0)=0 and ISNULL(Status,0) = 3 and (ISNULL(iQuantity,0))>0 and isnull(MrpQty,0)<>0 and 1=1
-
- ";
+ and ISNULL(QCFLAG,0)=0 and ISNULL(Status,0) = 3 and (ISNULL(iQuantity,0))>0 and isnull(MrpQty,0)<>0 and 1=1";
if (!string.IsNullOrEmpty(strWhere))
{
strSQL += $" and {strWhere} ";
diff --git a/NX.ERP.U8/Store/MaterialAppDAL.cs b/NX.ERP.U8/Store/MaterialAppDAL.cs
index 5399111..7fe379d 100644
--- a/NX.ERP.U8/Store/MaterialAppDAL.cs
+++ b/NX.ERP.U8/Store/MaterialAppDAL.cs
@@ -123,9 +123,6 @@ FROM MaterialAppVouch a
public IEnumerable GetDetailByMoCode(string MoCode, int MoDetailId)
{
var models = this.GetListByMoCode(MoCode, MoDetailId);
-
-
-
var reslut = new List();
foreach (var items in models)
{
@@ -138,7 +135,7 @@ FROM MaterialAppVouch a
- public void Provide(NX.ERP.Model.Request.MaterialAppProvide provide)
+ public bool Provide(NX.ERP.Model.Request.MaterialAppProvide provide)
{
using (var conn = U8LoginContext.Instance.Connection)
@@ -159,7 +156,7 @@ FROM MaterialAppVouch a
throw new Exception("未找到");
}
}
-
+ return false;
}
else //整单发出
{
@@ -169,7 +166,7 @@ FROM MaterialAppVouch a
)";
- conn.Execute(strSql, new
+ var info = conn.Execute(strSql, new
{
DueDate = provide.DueDate,
SN = "",
@@ -177,8 +174,11 @@ FROM MaterialAppVouch a
MoCode = provide.OrderCode,
OrderDetailId = provide.OrderDetailId
});
-
-
+ if (info == 0)
+ {
+ throw new Exception("未找到相应的物料");
+ }
+ return true;
}
}
diff --git a/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs b/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs
index 0582597..76648f8 100644
--- a/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs
+++ b/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs
@@ -24,7 +24,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
///
[Route("api/MaterialApp/PendingList")]
[HttpPost]
-
+
public IEnumerable GetPendingList()
{
var dal = new NX.ERP.U8.Store.MaterialAppDAL();
@@ -68,11 +68,11 @@ namespace NX.ERP.WebAPi.Controllers.Store
[Route("api/MaterialApp/Plan")]
[HttpPost]
- public bool Provide([FromBody]NX.ERP.Model.Request.MaterialAppProvide provide)
+ public bool Provide([FromBody] NX.ERP.Model.Request.MaterialAppProvide provide)
{
var dal = new NX.ERP.U8.Store.MaterialAppDAL();
- dal.Provide(provide);
- return true;
+ return dal.Provide(provide);
+
}
diff --git a/NX.ERP.WebAPi/Controllers/Store/ProductStoreInController.cs b/NX.ERP.WebAPi/Controllers/Store/ProductStoreInController.cs
index 9092336..d307214 100644
--- a/NX.ERP.WebAPi/Controllers/Store/ProductStoreInController.cs
+++ b/NX.ERP.WebAPi/Controllers/Store/ProductStoreInController.cs
@@ -9,7 +9,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
public class ProductStoreInController : ApiController
{
- [Obsolete]
+
[Route("api/ProductStoreIn/Add")]
[HttpPost]
public object AddVoucher([FromBody] Model.Request.ProductStoreIn storeIn)