schangxiang@126.com
2025-09-17 ff43ddf18764629ff875478e4e47a7281cbd230a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//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();
//        }
 
//    }
//}