领料申请单打印和查询条件完善

This commit is contained in:
ehkang
2021-06-19 09:36:00 +08:00
parent d7581d8fe1
commit fe0aec7fef
4 changed files with 45 additions and 39 deletions

View File

@@ -259,11 +259,22 @@ FROM MaterialAppVouch a
/// </summary>
/// <param name="Code"></param>
/// <returns></returns>
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string OrderCode)
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string OrderCode, string invCode)
{
if (!string.IsNullOrEmpty(OrderCode))
if (!string.IsNullOrEmpty(OrderCode) && !string.IsNullOrEmpty(invCode))
{
return this.GetListAndPost(" a.cCode=@OrderCode", new { OrderCode });
return this.GetListAndPost(" MA.cCode=@OrderCode AND MAS.cInvCode = @invCode ", new { OrderCode, invCode });
}
else
if (!string.IsNullOrEmpty(OrderCode))
{
return this.GetListAndPost(" MA.cCode=@OrderCode", new { OrderCode });
}
else if (!string.IsNullOrEmpty(invCode))
{
return this.GetListAndPost(" MAS.cInvCode = @invCode ", new { invCode });
}
else
{