Przeglądaj źródła

代码提交。

tangdi 2 lat temu
rodzic
commit
55a1b7a789

+ 5 - 5
MicroServices/Business/Business.Application/ResourceExamineManagement/CalcBomViewAppService.cs

@@ -431,7 +431,7 @@ namespace Business.ResourceExamineManagement
                         //减去提前期
                         LeadTime = plan.self_inspection_date.GetValueOrDefault() + plan.Warehousing_date.GetValueOrDefault() + plan.Shipping_date.GetValueOrDefault();
                     }
-                    mes_Morders.moentry_sys_etime = plan_date.GetValueOrDefault().AddDays(-(int)Math.Floor(LeadTime));
+                    mes_Morders.moentry_sys_etime = plan_date.GetValueOrDefault().AddDays(-(int)Math.Ceiling(LeadTime));
 
                     mes_Morders.moentry_sys_stime = mes_Morders.moentry_sys_etime.GetValueOrDefault().AddDays(-(make_time - 1));
                     MatterTileDevelop(level1Dto, childList, returnlist, sklist, bangid, mes_Morders.moentry_sys_stime, sentrys, icitemlist);
@@ -681,7 +681,7 @@ namespace Business.ResourceExamineManagement
                 //增加前处理时间
                 if (item.clean_leadtime.GetValueOrDefault() != 0)
                 {
-                    plan_date = plan_date.GetValueOrDefault().AddDays(-(int)Math.Floor(item.clean_leadtime.GetValueOrDefault()));
+                    plan_date = plan_date.GetValueOrDefault().AddDays(-(int)Math.Ceiling(item.clean_leadtime.GetValueOrDefault()));
                 }
                 item.use_qty = item.sqty;
                 if (item.erp_cls == 1)
@@ -1206,7 +1206,7 @@ namespace Business.ResourceExamineManagement
                         //增加前处理时间
                         if (item.clean_leadtime.GetValueOrDefault() != 0)
                         {
-                            dateTime = dateTime.AddDays(-(int)Math.Floor(sct.clean_leadtime.GetValueOrDefault()));
+                            dateTime = dateTime.AddDays(-(int)Math.Ceiling(sct.clean_leadtime.GetValueOrDefault()));
                         }
                         if (sct.erp_cls == 1)
                         {
@@ -1548,7 +1548,7 @@ namespace Business.ResourceExamineManagement
             {
                 //-1为提前一天准备
                 srm_Pr.pr_sarrive_date = plan_date.GetValueOrDefault().AddDays(-1 - (int)(Math.Ceiling(plan.clean_leadtime.GetValueOrDefault())));
-                srm_Pr.pr_ssend_date = srm_Pr.pr_sarrive_date.Value.AddDays(-(int)Math.Floor(supplier.lead_time.GetValueOrDefault()));//系统建议下单日期
+                srm_Pr.pr_ssend_date = srm_Pr.pr_sarrive_date.Value.AddDays(-(int)Math.Ceiling(supplier.lead_time.GetValueOrDefault()));//系统建议下单日期
                 if (srm_Pr.pr_ssend_date < DateTime.Now.AddDays(1))
                 {
                     //如果建议下单日期为今天或者过去,则代表物料需求供应时间不够,则需要标记此物料时间不足。
@@ -1560,7 +1560,7 @@ namespace Business.ResourceExamineManagement
                 srm_Pr.pr_ssend_date = DateTime.Now.Date.AddDays(1);//系统建议下单日期
                 srm_Pr.pr_sarrive_date = DateTime.Now.AddDays((double)supplier.lead_time.GetValueOrDefault());//系统建议到达日期(建议到货日期)
             }
-            sRMPR.totalLeadTime = (int)Math.Floor(supplier.lead_time.GetValueOrDefault());
+            sRMPR.totalLeadTime = (int)Math.Ceiling(supplier.lead_time.GetValueOrDefault());
             srm_Pr.pr_sysprice = supplier.order_price;//系统价格(含税)
             srm_Pr.pr_orderprice = qty * supplier.order_price;//订单价格(含税)
             srm_Pr.pr_price = supplier.netpurchase_price;//采购净价(不含税)

+ 2 - 2
MicroServices/Business/Business.Application/ResourceExamineManagement/ProductExamineAppService.cs

@@ -68,7 +68,7 @@ namespace Business.ResourceExamineManagement
                 decimal maxRt = allOps.Max(s => s.RunTime);
                 decimal sumRt = allOps.Sum(s => s.RunTime);
                 decimal totalTime = (param.QtyOrd - 1) * maxRt + sumRt;//总计生产小时
-                return (int)(Math.Floor(totalTime / 8));
+                return (int)(Math.Ceiling(totalTime / 7));
             }
             return 1;
         }
@@ -171,7 +171,7 @@ namespace Business.ResourceExamineManagement
             //获取当天的工作时长(分钟)
             decimal workTime = curCalendars.First(p => p.WeekDay == (int)startTime.DayOfWeek).ShiftsHours1 * 60;
             //计算产能
-            sumQty = Math.Floor((workTime - sumResrt) / 60 * prodLine.Rate);
+            sumQty = Math.Ceiling((workTime - sumResrt) / 60 * prodLine.Rate);
             return sumQty;
         }