diff --git a/NX.ERP.BLL/Model/InboundDetail.cs b/NX.ERP.BLL/Model/InboundDetail.cs index 4b0bb3f..09fdafd 100644 --- a/NX.ERP.BLL/Model/InboundDetail.cs +++ b/NX.ERP.BLL/Model/InboundDetail.cs @@ -12,5 +12,8 @@ namespace NX.ERP.BLL.Model public int SourceDtlId { get; set; } public string BinCode { get; set; } + + public string UniqueLabel { get; set; } + } } diff --git a/NX.ERP.BLL/Store/SotreIn.cs b/NX.ERP.BLL/Store/SotreIn.cs index 9322590..0ed4036 100644 --- a/NX.ERP.BLL/Store/SotreIn.cs +++ b/NX.ERP.BLL/Store/SotreIn.cs @@ -33,7 +33,8 @@ namespace NX.ERP.BLL.Store Invcode = m.MaterialCode, SorceDetailId = m.SourceDtlId, Position = m.BinCode, - Quantity = m.Qty + Quantity = m.Qty, + }; }) @@ -63,7 +64,8 @@ namespace NX.ERP.BLL.Store InvCode = m.MaterialCode, SourceDetailId = m.SourceDtlId, Position = m.BinCode, - Quantity = m.Qty + Quantity = m.Qty, + UniqueLabel = m.UniqueLabel }; }) }); diff --git a/NX.ERP.Model/Request/MaterialAppProvide.cs b/NX.ERP.Model/Request/MaterialAppProvide.cs index 61b7623..e14eeba 100644 --- a/NX.ERP.Model/Request/MaterialAppProvide.cs +++ b/NX.ERP.Model/Request/MaterialAppProvide.cs @@ -11,12 +11,12 @@ namespace NX.ERP.Model.Request private int allocateId; private string materialCode; private decimal qty; - private IEnumerable sn; + private IEnumerable uniqueLabel; public int AllocateId { get => allocateId; set => allocateId = value; } public string MaterialCode { get => materialCode; set => materialCode = value; } public decimal Qty { get => qty; set => qty = value; } - public IEnumerable Sn { get => sn; set => sn = value; } + public IEnumerable UniqueLabel { get => uniqueLabel; set => uniqueLabel = value; } } @@ -27,7 +27,7 @@ namespace NX.ERP.Model.Request private int orderDetailId; private string workCenter; - private DateTime issueDate; + private DateTime dueDate; private IEnumerable Detail = new List(); @@ -36,6 +36,6 @@ namespace NX.ERP.Model.Request public IEnumerable Detail1 { get => Detail; set => Detail = value; } public string WorkCenter { get => workCenter; set => workCenter = value; } - public DateTime IssueDate { get => issueDate; set => issueDate = value; } + public DateTime DueDate { get => dueDate; set => dueDate = value; } } } diff --git a/NX.ERP.Model/Request/ProductStoreInDetail.cs b/NX.ERP.Model/Request/ProductStoreInDetail.cs index ff3673f..4a91662 100644 --- a/NX.ERP.Model/Request/ProductStoreInDetail.cs +++ b/NX.ERP.Model/Request/ProductStoreInDetail.cs @@ -12,5 +12,9 @@ namespace NX.ERP.Model.Request public string Batch { get; set; } public string Position { get; set; } public int SourceDetailId { get; set; } + + public string UniqueLabel { get; set; } + + } } diff --git a/NX.ERP.Model/Response/Store/MaterialApp.cs b/NX.ERP.Model/Response/Store/MaterialApp.cs index a61cb4a..780937b 100644 --- a/NX.ERP.Model/Response/Store/MaterialApp.cs +++ b/NX.ERP.Model/Response/Store/MaterialApp.cs @@ -35,10 +35,22 @@ namespace NX.ERP.Model.Response.Store public int MaterialAppDtlId { get => materialAppDtlId; set => materialAppDtlId = value; } public int MaterialAppId { get => materialAppId; set => materialAppId = value; } public string MaterialCode { get => materialCode; set => materialCode = value; } - public decimal Qty { get => qty; set => qty = value; } + /// + /// 待发货数量 + /// + public decimal Quantit { get => qty; set => qty = value; } + /// + /// 已发货数量 + /// + public decimal OutQuantity { get; set; } public int Pesodid { get => pesodid; set => pesodid = value; } - + /// + /// 订单编号 + /// public string MoCode { get; set; } + /// + /// 订单明细ID + /// public int AllocateId { get; set; } diff --git a/NX.ERP.U8/Store/MaterialAppVoucher.cs b/NX.ERP.U8/Store/MaterialAppVoucher.cs index 1aca07f..4035b8b 100644 --- a/NX.ERP.U8/Store/MaterialAppVoucher.cs +++ b/NX.ERP.U8/Store/MaterialAppVoucher.cs @@ -37,11 +37,9 @@ namespace NX.ERP.U8.Store public IEnumerable GetList(string strWhere = "", object Params = null) { var strSQL = @"select a.ID ,a.cCode as Code,a.dDate as Date,a.cMaker as PreparedBy,b.AutoID as id,b.AutoID as MaterialAppDtlId, -b.ID as MaterialAppId,b.cInvCode as MaterialCode,b.iQuantity as Qty, b.imoseq as Pesodid,b.cmocode as MoCode,b.iMpoIds as AllocateId from MaterialAppVouch a -left join - MaterialAppVouchs b on a.id=b.ID - -"; + b.ID as MaterialAppId,b.cInvCode as MaterialCode,b.iQuantity as Quantit, b.imoseq as Pesodid,b.cmocode as MoCode,b.iMpoIds as AllocateId,b.fOutQuantity as OutQuantity from MaterialAppVouch a + left join + MaterialAppVouchs b on a.id=b.ID"; if (!string.IsNullOrEmpty(strWhere)) { strSQL += $" where {strWhere} "; @@ -69,7 +67,21 @@ left join /// - /// + /// 查询等待未完成可出库的单子 + /// + /// + public IEnumerable GetPendingList() + { + return this.GetList(" b.cDefine22='是' and iQuantity<>ISNULL( fOutQuantity,0)"); + + + + } + + + + /// + /// 获取 /// /// /// @@ -149,8 +161,8 @@ left join conn.Execute(strSql, new { - DueDate = provide.IssueDate, - SN = "", + DueDate = provide.DueDate, + SN ="", WorkCenter = provide.WorkCenter, MoCode = provide.OrderCode, OrderDetailId = provide.OrderDetailId diff --git a/NX.ERP.WebAPi/Controllers/Store/MaterialAppVoucherController.cs b/NX.ERP.WebAPi/Controllers/Store/MaterialAppVoucherController.cs index 4e35b97..d99d31d 100644 --- a/NX.ERP.WebAPi/Controllers/Store/MaterialAppVoucherController.cs +++ b/NX.ERP.WebAPi/Controllers/Store/MaterialAppVoucherController.cs @@ -18,6 +18,19 @@ namespace NX.ERP.WebAPi.Controllers.Store } + [Route("api/MaterialAppVoucher/PendingList")] + [HttpPost] + + public IEnumerable GetPendingList() + { + var dal = new NX.ERP.U8.Store.MaterialAppVoucher(); + return dal.GetPendingList(); + } + + + + + [Route("api/MaterialAppVoucher/Model")] [HttpGet]