Commit 150f873a by zhoujinhui

新增盘点类型筛选

parent 3adb634e
using System; using Domain.TakeStock;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using static Domain.TakeStock.TakeStockEnum; using static Domain.TakeStock.TakeStockEnum;
...@@ -36,5 +37,10 @@ namespace TakeStock.Application.TakeStock.Dto ...@@ -36,5 +37,10 @@ namespace TakeStock.Application.TakeStock.Dto
/// 交易流水号 /// 交易流水号
/// </summary> /// </summary>
public string SysOrderCode { get; set; } public string SysOrderCode { get; set; }
/// <summary>
/// 盘点类型
/// </summary>
public TakeStockType? TakeStockType { get; set; }
} }
} }
...@@ -129,7 +129,12 @@ namespace TakeStock.Application.TakeStock ...@@ -129,7 +129,12 @@ namespace TakeStock.Application.TakeStock
// expr = Expression.Lambda<Func<TakeStockSchedule, bool>>(Expression.And(expr.Body, temp.Body), expr.Parameters); // expr = Expression.Lambda<Func<TakeStockSchedule, bool>>(Expression.And(expr.Body, temp.Body), expr.Parameters);
//} //}
if (search.TakeStockType.HasValue)
{
Expression<Func<TakeStockSchedule, bool>> temp = s => s.TakeStockType == search.TakeStockType.Value;
expr = Expression.Lambda<Func<TakeStockSchedule, bool>>(Expression.And(expr.Body, temp.Body), expr.Parameters);
//expr.And(s => s.Code.Equals(search.Code));
}
return expr; return expr;
} }
...@@ -219,8 +224,12 @@ namespace TakeStock.Application.TakeStock ...@@ -219,8 +224,12 @@ namespace TakeStock.Application.TakeStock
{ {
sqlStr.Append(" AND DATE(t2.CreationTime)>=@StartTime AND DATE(t2.CreationTime)<=@EndTime "); sqlStr.Append(" AND DATE(t2.CreationTime)>=@StartTime AND DATE(t2.CreationTime)<=@EndTime ");
} }
if (input.TakeStockType.HasValue)
{
sqlStr.Append(" AND t2.`TakeStockType` = @TakeStockType");
}
sqlStr.Append(" ORDER BY t2.CreationTime DESC "); sqlStr.Append(" ORDER BY t2.CreationTime DESC ");
var dataList = takeStockService.ExportTakeStockData<ExportTakeStockOutputDto>(sqlStr.ToString(), new { Code = input.Code, WarehouseCode = input.WarehouseCode, StartTime = input.CreDateTime[0], EndTime = input.CreDateTime[1] }); var dataList = takeStockService.ExportTakeStockData<ExportTakeStockOutputDto>(sqlStr.ToString(), new { Code = input.Code, WarehouseCode = input.WarehouseCode, StartTime = input.CreDateTime[0], EndTime = input.CreDateTime[1], TakeStockType = input.TakeStockType });
return dataList; return dataList;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment