//using Admin.NET.Core.TaskModule.Enum;
|
//using iWareSql.MyDbContext;
|
//using System;
|
//using System.Collections.Generic;
|
//using System.ComponentModel;
|
//using System.Linq;
|
|
//namespace iWareSql.DataAccess
|
//{
|
// public class ContainerHandler
|
// {
|
// /// <summary>
|
// /// 查找该库位是否存在 未结束的任务
|
// /// </summary>
|
// /// <param name="dbContext"></param>
|
// /// <param name="location"></param>
|
// /// <returns></returns>
|
// public static int ReCalcUseNumber(MyDbContext.MyDbContext dbContext, string continerCode)
|
// {
|
// //重新计算栅格数
|
// List<ware_container_vs_material> db_wareContainerVsMaterials = dbContext.ware_container_vs_material.
|
// Where(x => x.WareContainerCode == continerCode && (x.IsDeleted == null || x.IsDeleted == false)).ToList();
|
// if (db_wareContainerVsMaterials != null && db_wareContainerVsMaterials.Count > 0)
|
// {
|
// return CalcUseNumberForContainer(db_wareContainerVsMaterials);//动态计算 栅格使用数量 【Editby shaocx,2022-12-29】
|
// }
|
// else
|
// {
|
// return 0;//动态计算 栅格使用数量 【Editby shaocx,2022-12-29】
|
// }
|
// }
|
|
|
// /// <summary>
|
// /// 动态计算 托盘的栅格使用数量
|
// /// </summary>
|
// /// <param name="cvmList"></param>
|
// /// <returns></returns>
|
// private static int CalcUseNumberForContainer(List<wms_stock_quan> cvmList)
|
// {
|
// return cvmList.Where(x => (x.Quantity - x.) > 0).GroupBy(x => x.WareMaterialCode).Count();
|
// }
|
|
// }
|
//}
|