Selaa lähdekoodia

Merge branch 'dev' of http://123.60.180.165:4647/ZZYDOP/DOPCore into dev

heteng 2 vuotta sitten
vanhempi
commit
2f68cfe4bf

+ 5 - 1
MicroServices/Business/Business.Application/ReplenishmentManagement/ReplenishmentAppService.cs

@@ -3283,7 +3283,7 @@ namespace Business.Replenishment
                 //热封标准工时
                 var HeatSealing = routingOp.Where(x => x.Ufld1 == "热封" && x.MilestoneOp).FirstOrDefault();
                 //包装标准工时
-                var Packaging = routingOp.Where(x => x.Descr == "包装" && x.MilestoneOp).FirstOrDefault();
+                var Packaging = routingOp.Where(x => x.Ufld1 == "包装" && x.MilestoneOp).FirstOrDefault();
                 if (moItem != null)
                 {
                     if (moItem.kitting_times < a.PlanStartDate)
@@ -4904,6 +4904,10 @@ namespace Business.Replenishment
                         var childs = exm.BomChildExamineList.Where(s => s.is_use == true).ToList();
 
                         var child = childs.Find(s => s.item_number == workord.product_code);
+                        if (workord.morder_type == "返工工单")
+                        {
+                            child = childs.Find(s => s.item_number == workord.product_code && s.level == 1);
+                        }
                         if (child == null)
                         {
                             continue;

+ 7 - 31
MicroServices/Business/Business.Application/ResourceExamineManagement/CalcBomViewAppService.cs

@@ -357,19 +357,11 @@ namespace Business.ResourceExamineManagement
                                 mesorder.ooentry_stime = plan_date.GetValueOrDefault().AddDays(-srmprDto.totalLeadTime.GetValueOrDefault());
 
                                 //先计算末级数据的齐套时间。
-                                if (childList.Count > 0 && LongPeriod)//按业务要求,委外件向下展开子料
+                                if (childList.Count > 0)//按业务要求,委外件向下展开子料
                                 {
                                     MatterTileDevelop(level1Dto, childList, returnlist, sklist, bangid, mesorder.ooentry_stime, sentrys, icitemlist);
-                                    
-                                    var itemTime = childList.Max(s => s.kitting_time).GetValueOrDefault().AddDays(srmprDto.totalLeadTime.GetValueOrDefault());//加上物料的采购提前期
-                                    if (LongPeriod)
-                                    {
-                                        level1Dto.kitting_time = itemTime;
-                                    }
-                                    else if (itemTime > level1Dto.kitting_time)
-                                    {
-                                        level1Dto.kitting_time = itemTime;
-                                    }
+
+                                    level1Dto.kitting_time = childList.Max(s => s.kitting_time).GetValueOrDefault().AddDays(srmprDto.totalLeadTime.GetValueOrDefault());//加上物料的采购提前期
                                     if (IsStraight)
                                     {
                                         mesorder.ooentry_stime = childList.Max(s => s.kitting_time).GetValueOrDefault().AddDays(1);
@@ -915,18 +907,10 @@ namespace Business.ResourceExamineManagement
                         if (item.erp_cls == 2 && wwCount > 0)
                         {
                             //先计算末级数据的齐套时间。
-                            if (cilList.Count > 0 && LongPeriod)//按业务要求,委外件不向下展开子料
+                            if (cilList.Count > 0)//按业务要求,委外件打开向下展开子料
                             {
                                 CalcIcitem(cilList, returnlist, bangid, sklist, wwPlan_data, icitemlist, sentrys, childidList);
-                                var itemTime = cilList.Max(s => s.kitting_time).GetValueOrDefault().AddDays((int)maxLeadTime);//加上物料的采购提前期
-                                if (LongPeriod)
-                                {
-                                    item.kitting_time = itemTime;
-                                }
-                                else if (itemTime > item.kitting_time)
-                                {
-                                    item.kitting_time = itemTime;
-                                }
+                                item.kitting_time = cilList.Max(s => s.kitting_time).GetValueOrDefault().AddDays((int)maxLeadTime);//加上物料的采购提前期
                             }
                             item.subcontracting_qty = wwCount;
                             item.subcontracting_list = new List<ooder>();
@@ -1532,18 +1516,10 @@ namespace Business.ResourceExamineManagement
                                 if (sct.erp_cls == 2 && wwCount > 0)
                                 {
                                     //先计算末级数据的齐套时间。
-                                    if (cilList.Count > 0 && LongPeriod)//按业务要求,委外件向下展开子料
+                                    if (cilList.Count > 0)//按业务要求,委外件向下展开子料
                                     {
                                         CalcIcitem(cilList, returnlist, bangid, sklist, wwPlan_data, icitemlist, sentrys, childidList);
-                                        var itemTime = cilList.Max(s => s.kitting_time).GetValueOrDefault().AddDays((int)maxLeadTime);//加上物料的采购提前期
-                                        if (LongPeriod)
-                                        {
-                                            sct.kitting_time = itemTime;
-                                        }
-                                        else if (itemTime > sct.kitting_time)
-                                        {
-                                            sct.kitting_time = itemTime;
-                                        }
+                                        sct.kitting_time = cilList.Max(s => s.kitting_time).GetValueOrDefault().AddDays((int)maxLeadTime);//加上物料的采购提前期
                                     }
                                     sct.subcontracting_qty = wwCount;
                                     sct.subcontracting_list = new List<ooder>();