Forráskód Böngészése

测试问题修复

Murphy 2 éve
szülő
commit
6101d87dc6

+ 12 - 4
MicroServices/Business/Business.Application/ReplenishmentManagement/ReplenishmentAppService.cs

@@ -826,10 +826,12 @@ namespace Business.Replenishment
             var shipList = _ASNBOLShipperDetail.Select(a => a.Domain == input.factory_id.ToString() && a.IsActive && a.shtype == "SH" && a.Typed != "S" && a.RealQty > 0 
             && listShip.Contains(a.ContainerItem) && a.ShipDate >= dateBegin && a.ShipDate <= dateEnd && !recidList.Contains(a.ASNBOLShipperRecID));//瑞奇只算瑞奇排除国科海王
 
-            var DMSItemListGK = _DMS_IN_ITEMMAPPING.Select(a => planList.Where(p=>p.DistributionChannel=="国科").Select(p => p.SAPItemNumber).ToList().Contains(a.CfnERPCode));
+            var gkItemList = planList.Where(p => p.DistributionChannel == "国科").Select(p => p.SAPItemNumber).ToList();
+            var DMSItemListGK = _DMS_IN_ITEMMAPPING.Select(a => gkItemList.Contains(a.CfnERPCode));
             var shipListGK = _DMS_IN_SHIPPINGDETAIL.Select(a =>
            DMSItemListGK.Select(g=>g.CfnCode).Contains(a.UPN) && a.ParentDealerCode== "RQ000005" && a.ShipmentDate >= DateOnly.FromDateTime(dateBegin) && a.ShipmentDate <= DateOnly.FromDateTime(dateEnd));//国科
-            var DMSItemListHW = _DMS_IN_ITEMMAPPING.Select(a => planList.Where(p => p.DistributionChannel == "国科").Select(p => p.SAPItemNumber).ToList().Contains(a.CfnERPCode));
+            var hwItemList = planList.Where(p => p.DistributionChannel == "海王").Select(p => p.SAPItemNumber).ToList();
+            var DMSItemListHW = _DMS_IN_ITEMMAPPING.Select(a => hwItemList.Contains(a.CfnERPCode));
             var shipListHW = _DMS_IN_SHIPPINGDETAIL.Select(a =>
            DMSItemListHW.Select(g => g.CfnCode).Contains(a.UPN) && a.ParentDealerCode == "RQ000002" && a.ShipmentDate >= DateOnly.FromDateTime(dateBegin) && a.ShipmentDate <= DateOnly.FromDateTime(dateEnd));//海王
 
@@ -839,10 +841,14 @@ namespace Business.Replenishment
             //取本月发货出库记录
             var shipMList = _ASNBOLShipperDetail.Select(a => a.Domain == input.factory_id.ToString() && a.IsActive && a.shtype == "SH" && a.Typed != "S" && a.RealQty > 0 
             && listShip.Contains(a.ContainerItem) && a.ShipDate>= dateCurrent && a.ShipDate <= DateTime.Now && !recidList.Contains(a.ASNBOLShipperRecID));//瑞奇只算瑞奇排除国科海王
+            var gkCNCCodeList = DMSItemListGK.Select(g => g.CfnCode).ToList();
+            var dateOnlyCurrent = DateOnly.FromDateTime(dateCurrent);
+            var dateOnlyNow = DateOnly.FromDateTime(DateTime.Now);
             var shipMListGK = _DMS_IN_SHIPPINGDETAIL.Select(a =>
-           DMSItemListGK.Select(g => g.CfnCode).Contains(a.UPN) && a.ParentDealerCode == "RQ000005" && a.ShipmentDate >= DateOnly.FromDateTime(dateCurrent) && a.ShipmentDate <= DateOnly.FromDateTime(DateTime.Now));//国科
+           gkCNCCodeList.Contains(a.UPN) && a.ParentDealerCode == "RQ000005" && a.ShipmentDate >= dateOnlyCurrent && a.ShipmentDate <= dateOnlyNow);//国科
+            var hwCNCCodeList = DMSItemListHW.Select(g => g.CfnCode).ToList();
             var shipMListHW = _DMS_IN_SHIPPINGDETAIL.Select(a =>
-           DMSItemListHW.Select(g => g.CfnCode).Contains(a.UPN) && a.ParentDealerCode == "RQ000002" && a.ShipmentDate >= DateOnly.FromDateTime(dateCurrent) && a.ShipmentDate <= DateOnly.FromDateTime(DateTime.Now));//海王
+           hwCNCCodeList.Contains(a.UPN) && a.ParentDealerCode == "RQ000002" && a.ShipmentDate >= dateOnlyCurrent && a.ShipmentDate <= dateOnlyNow);//海王
 
             var itemGroup = shipList.GroupBy(p => p.ContainerItem)
                  .Select(p => new ASNBOLShipperDetail
@@ -1097,6 +1103,7 @@ namespace Business.Replenishment
                             rop.rop_revised = Math.Min(rop.rop_computed.Value, rop.max_stock_level.Value);
                             rop.isparam = true;
                             rop.tenant_id = input.tenant_id;
+                            rop.company_id = input.company_id;
                             rop.factory_id = input.factory_id;
                             rop.create_time = DateTime.Now;
                             rop.org_id = input.org_id;
@@ -1300,6 +1307,7 @@ namespace Business.Replenishment
                 rop.rop_revised = Math.Max(rop.rop_computed.Value, rop.max_stock_level.Value);
                 rop.isparam = true;
                 rop.tenant_id = input.tenant_id;
+                rop.company_id = input.company_id;
                 rop.factory_id = input.factory_id;
                 rop.create_time = DateTime.Now;
                 rop.org_id = input.org_id;

+ 0 - 5
MicroServices/Business/Business.Application/ResourceExamineManagement/ProductionScheduleAppService.cs

@@ -335,11 +335,6 @@ namespace Business.ResourceExamineManagement
             zcWorkOrds = zcWorkOrds.OrderBy(p=>p.Priority).ToList();
             foreach (var item in zcWorkOrds)
             {
-                //如果工单预计开工日期在排产时间之后,则跳过
-                if (item.OrdDate > scheTime)
-                {
-                    continue;
-                }
                 //记录产线占用情况
                 allResults.AddRange(scheduleMasters);
                 //当前工单工艺路线主产线的关键工序