|
|
@@ -4690,7 +4690,11 @@ namespace Business.ResourceExamineManagement
|
|
|
DateTime startTime = DateTime.Now;
|
|
|
//尚未开始生产的工单+正在生产的工单
|
|
|
var workOrds = _workOrdMaster.Select(p => p.IsActive && p.Domain == domain && ((p.OrdDate < endDate && p.OrdDate >= startTime && p.Status.ToUpper() == "P" && (string.IsNullOrEmpty(p.Typed) || (!string.IsNullOrEmpty(p.Typed) && p.Typed.ToUpper() != "PW" && p.BusinessID > 0))) || p.Status.ToUpper() == "W")).ToList();
|
|
|
- string result = await _productionScheduleAppService.DoProductSchedule(startTime,workOrds, domain, 2);
|
|
|
+ string result = "OK";
|
|
|
+ if (workOrds.Any())
|
|
|
+ {
|
|
|
+ result = await _productionScheduleAppService.DoProductSchedule(startTime, workOrds, domain, 2);
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -4721,7 +4725,11 @@ namespace Business.ResourceExamineManagement
|
|
|
//调用优先级计算算法
|
|
|
workOrds = _replenishmentAppService.CalcPriority(workOrds.Select(p=>p.WorkOrd).ToList(), input.domain);
|
|
|
//执行排产
|
|
|
- string result = await _productionScheduleAppService.DoProductSchedule(startTime, workOrds, input.domain, 2);
|
|
|
+ string result = "OK";
|
|
|
+ if (workOrds.Any())
|
|
|
+ {
|
|
|
+ result = await _productionScheduleAppService.DoProductSchedule(startTime, workOrds, input.domain, 2);
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|