修改代码

This commit is contained in:
gongxh
2021-05-19 13:55:55 +08:00
parent 8ebbb1e0f8
commit 0e1f347014
7 changed files with 62 additions and 16 deletions

View File

@@ -12,5 +12,8 @@ namespace NX.ERP.BLL.Model
public int SourceDtlId { get; set; } public int SourceDtlId { get; set; }
public string BinCode { get; set; } public string BinCode { get; set; }
public string UniqueLabel { get; set; }
} }
} }

View File

@@ -33,7 +33,8 @@ namespace NX.ERP.BLL.Store
Invcode = m.MaterialCode, Invcode = m.MaterialCode,
SorceDetailId = m.SourceDtlId, SorceDetailId = m.SourceDtlId,
Position = m.BinCode, Position = m.BinCode,
Quantity = m.Qty Quantity = m.Qty,
}; };
}) })
@@ -63,7 +64,8 @@ namespace NX.ERP.BLL.Store
InvCode = m.MaterialCode, InvCode = m.MaterialCode,
SourceDetailId = m.SourceDtlId, SourceDetailId = m.SourceDtlId,
Position = m.BinCode, Position = m.BinCode,
Quantity = m.Qty Quantity = m.Qty,
UniqueLabel = m.UniqueLabel
}; };
}) })
}); });

View File

@@ -11,12 +11,12 @@ namespace NX.ERP.Model.Request
private int allocateId; private int allocateId;
private string materialCode; private string materialCode;
private decimal qty; private decimal qty;
private IEnumerable<string> sn; private IEnumerable<string> uniqueLabel;
public int AllocateId { get => allocateId; set => allocateId = value; } public int AllocateId { get => allocateId; set => allocateId = value; }
public string MaterialCode { get => materialCode; set => materialCode = value; } public string MaterialCode { get => materialCode; set => materialCode = value; }
public decimal Qty { get => qty; set => qty = value; } public decimal Qty { get => qty; set => qty = value; }
public IEnumerable<string> Sn { get => sn; set => sn = value; } public IEnumerable<string> UniqueLabel { get => uniqueLabel; set => uniqueLabel = value; }
} }
@@ -27,7 +27,7 @@ namespace NX.ERP.Model.Request
private int orderDetailId; private int orderDetailId;
private string workCenter; private string workCenter;
private DateTime issueDate; private DateTime dueDate;
private IEnumerable<MaterialAppProvideDetail> Detail = new List<MaterialAppProvideDetail>(); private IEnumerable<MaterialAppProvideDetail> Detail = new List<MaterialAppProvideDetail>();
@@ -36,6 +36,6 @@ namespace NX.ERP.Model.Request
public IEnumerable<MaterialAppProvideDetail> Detail1 { get => Detail; set => Detail = value; } public IEnumerable<MaterialAppProvideDetail> Detail1 { get => Detail; set => Detail = value; }
public string WorkCenter { get => workCenter; set => workCenter = 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; }
} }
} }

View File

@@ -12,5 +12,9 @@ namespace NX.ERP.Model.Request
public string Batch { get; set; } public string Batch { get; set; }
public string Position { get; set; } public string Position { get; set; }
public int SourceDetailId { get; set; } public int SourceDetailId { get; set; }
public string UniqueLabel { get; set; }
} }
} }

View File

@@ -35,10 +35,22 @@ namespace NX.ERP.Model.Response.Store
public int MaterialAppDtlId { get => materialAppDtlId; set => materialAppDtlId = value; } public int MaterialAppDtlId { get => materialAppDtlId; set => materialAppDtlId = value; }
public int MaterialAppId { get => materialAppId; set => materialAppId = value; } public int MaterialAppId { get => materialAppId; set => materialAppId = value; }
public string MaterialCode { get => materialCode; set => materialCode = value; } public string MaterialCode { get => materialCode; set => materialCode = value; }
public decimal Qty { get => qty; set => qty = value; } /// <summary>
/// 待发货数量
/// </summary>
public decimal Quantit { get => qty; set => qty = value; }
/// <summary>
/// 已发货数量
/// </summary>
public decimal OutQuantity { get; set; }
public int Pesodid { get => pesodid; set => pesodid = value; } public int Pesodid { get => pesodid; set => pesodid = value; }
/// <summary>
/// 订单编号
/// </summary>
public string MoCode { get; set; } public string MoCode { get; set; }
/// <summary>
/// 订单明细ID
/// </summary>
public int AllocateId { get; set; } public int AllocateId { get; set; }

View File

@@ -37,11 +37,9 @@ namespace NX.ERP.U8.Store
public IEnumerable<Model.Response.Store.MaterialApp> GetList(string strWhere = "", object Params = null) public IEnumerable<Model.Response.Store.MaterialApp> 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, 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 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 left join
MaterialAppVouchs b on a.id=b.ID MaterialAppVouchs b on a.id=b.ID";
";
if (!string.IsNullOrEmpty(strWhere)) if (!string.IsNullOrEmpty(strWhere))
{ {
strSQL += $" where {strWhere} "; strSQL += $" where {strWhere} ";
@@ -69,7 +67,21 @@ left join
/// <summary> /// <summary>
/// /// 查询等待未完成可出库的单子
/// </summary>
/// <returns></returns>
public IEnumerable<Model.Response.Store.MaterialApp> GetPendingList()
{
return this.GetList(" b.cDefine22='是' and iQuantity<>ISNULL( fOutQuantity,0)");
}
/// <summary>
/// 获取
/// </summary> /// </summary>
/// <param name="Code"></param> /// <param name="Code"></param>
/// <returns></returns> /// <returns></returns>
@@ -149,7 +161,7 @@ left join
conn.Execute(strSql, new conn.Execute(strSql, new
{ {
DueDate = provide.IssueDate, DueDate = provide.DueDate,
SN ="", SN ="",
WorkCenter = provide.WorkCenter, WorkCenter = provide.WorkCenter,
MoCode = provide.OrderCode, MoCode = provide.OrderCode,

View File

@@ -18,6 +18,19 @@ namespace NX.ERP.WebAPi.Controllers.Store
} }
[Route("api/MaterialAppVoucher/PendingList")]
[HttpPost]
public IEnumerable<Model.Response.Store.MaterialApp> GetPendingList()
{
var dal = new NX.ERP.U8.Store.MaterialAppVoucher();
return dal.GetPendingList();
}
[Route("api/MaterialAppVoucher/Model")] [Route("api/MaterialAppVoucher/Model")]
[HttpGet] [HttpGet]