Commit 61345a6b by zhoujinhui

新增租户字段

parent fcc20a7b
...@@ -134,6 +134,11 @@ namespace Domain.TakeStock ...@@ -134,6 +134,11 @@ namespace Domain.TakeStock
/// sku总金额 /// sku总金额
/// </summary> /// </summary>
public decimal SkuTotalAmount { get; set; } public decimal SkuTotalAmount { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public int TenantId { get; set; }
} }
/// <summary> /// <summary>
......
...@@ -70,5 +70,10 @@ namespace TakeStock.Application.TakeStock.Dto ...@@ -70,5 +70,10 @@ namespace TakeStock.Application.TakeStock.Dto
/// sku总金额 /// sku总金额
/// </summary> /// </summary>
public decimal SkuTotalAmount { get; set; } public decimal SkuTotalAmount { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public int TenantId { get; set; }
} }
} }
...@@ -42,5 +42,10 @@ namespace TakeStock.Application.TakeStock.Dto ...@@ -42,5 +42,10 @@ namespace TakeStock.Application.TakeStock.Dto
/// 盘点类型 /// 盘点类型
/// </summary> /// </summary>
public TakeStockType? TakeStockType { get; set; } public TakeStockType? TakeStockType { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public int TenantId { get; set; }
} }
} }
...@@ -137,6 +137,11 @@ namespace TakeStock.Application.TakeStock ...@@ -137,6 +137,11 @@ 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);
//expr.And(s => s.Code.Equals(search.Code)); //expr.And(s => s.Code.Equals(search.Code));
} }
if (search.TenantId > 0)
{
Expression<Func<TakeStockSchedule, bool>> temp = s => s.TenantId == search.TenantId;
expr = Expression.Lambda<Func<TakeStockSchedule, bool>>(Expression.And(expr.Body, temp.Body), expr.Parameters);
}
return expr; return expr;
} }
...@@ -292,8 +297,12 @@ namespace TakeStock.Application.TakeStock ...@@ -292,8 +297,12 @@ namespace TakeStock.Application.TakeStock
{ {
sqlStr.Append(" AND t2.`TakeStockType` = @TakeStockType"); sqlStr.Append(" AND t2.`TakeStockType` = @TakeStockType");
} }
if (input.TenantId > 0)
{
sqlStr.Append(" AND t2.`TenantId` = @TenantId ");
}
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], TakeStockType = input.TakeStockType }); 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, TenantId = input.TenantId });
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