Browse Source

调整排产方法名

heteng 2 years ago
parent
commit
297cce762f

+ 1 - 1
MicroServices/Business/Business.Application.Contracts/SystemJob/ISystemJobAppService.cs

@@ -36,6 +36,6 @@ namespace Business.SystemJob
         /// <returns></returns>
         Task<string> SyncBaseDataToMongoDBJob();
 
-        string DoProductShceduleJob();
+        string DoProductScheduleJob();
     }
 }

+ 6 - 2
MicroServices/Business/Business.Application/ResourceExamineManagement/ProductionScheduleAppService.cs

@@ -189,7 +189,7 @@ namespace Business.ResourceExamineManagement
             DateTime dateTime = DateTime.Now.AddDays(30);
             DateTime date = DateTime.Now.AddDays((double)Udecil);
             var workOrds = _workOrdMaster.Select(x => x.IsActive && x.Domain == domain && x.OrdDate < dateTime && x.OrdDate > date && x.Status == "初始").ToList();
-            await DoProductShcedule(workOrds, domain);
+            await DoProductSchedule(workOrds, domain);
         }
 
         /// <summary>
@@ -198,7 +198,7 @@ namespace Business.ResourceExamineManagement
         /// <param name="workOrds">工单:定时任务执行时count=0;资源检查调用count>0</param>
         /// <param name="factoryid">工单的工厂id</param>
         /// <returns></returns>
-        public async Task DoProductShcedule(List<WorkOrdMaster> workOrds, string factoryid)
+        public async Task DoProductSchedule(List<WorkOrdMaster> workOrds, string factoryid)
         {
             //记录工厂id
             domain = factoryid;
@@ -323,6 +323,10 @@ namespace Business.ResourceExamineManagement
 
         }
 
+        public bool BeforeScheduleCheck() {
+            return true;
+        }
+
         /// <summary>
         /// 排产
         /// </summary>

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

@@ -2962,7 +2962,7 @@ namespace Business.ResourceExamineManagement
                 //优先级排序
                 workOrdMasters = workOrdMasters.OrderBy(s => s.OrdDate).ToList();
                 //排产
-                //await _productionScheduleAppService.DoProductShcedule(workOrdMasters, param.factoryId.ToString());
+                //await _productionScheduleAppService.DoProductSchedule(workOrdMasters, param.factoryId.ToString());
                 
                 foreach (var wod in workOrdMasters)
                 {
@@ -3544,7 +3544,7 @@ namespace Business.ResourceExamineManagement
                 return "当前工单已排产,无需重新排产。";
             }
             //排产
-            //await _productionScheduleAppService.DoProductShcedule(workOrdMasters, workOrdMasters[0].Domain);
+            //await _productionScheduleAppService.DoProductSchedule(workOrdMasters, workOrdMasters[0].Domain);
             //AutoCreatePickBill(workOrdMasters.Select(p => p.WorkOrd).ToList());
             return "ok";
         }

+ 1 - 1
MicroServices/Business/Business.Application/SystemJobManagement/SystemJobAppService.cs

@@ -825,7 +825,7 @@ namespace Business.SystemJobManagement
         //    return list;
         //}
 
-        public string DoProductShceduleJob()
+        public string DoProductScheduleJob()
         {
             try
             {

+ 3 - 3
MicroServices/Business/Business.HttpApi/Controllers/SystemJobController.cs

@@ -59,10 +59,10 @@ namespace Business.Controllers
         /// </summary>
         /// <returns></returns>
         [HttpGet]
-        [Route("DoProductShcedule")]
-        public string DoProductShcedule()
+        [Route("DoProductSchedule")]
+        public string DoProductSchedule()
         {
-            return _SystemJobAppService.DoProductShceduleJob();
+            return _SystemJobAppService.DoProductScheduleJob();
         }
     }
 }