|
|
@ -273,6 +273,21 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//先检查是否有正在执行的计划
|
|
|
|
|
|
|
|
var hasPlan = planInfoDataGrid.Where(x=>x.PlanStatus== PlanStatusEnum.已开始).FirstOrDefault();
|
|
|
|
|
|
|
|
if(hasPlan != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var result = MessageBox.Show("有正在执行的计划,是否确认切换计划!","确认", MessageBoxButton.YesNo);
|
|
|
|
|
|
|
|
if(result == MessageBoxResult.Yes)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
hasPlan.PlanStatus = PlanStatusEnum.待执行;
|
|
|
|
|
|
|
|
_prodMgmtBusiness.UpdateProdPlan(hasPlan);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
_logger.LogInformation($"开始执行{obj}计划");
|
|
|
|
_logger.LogInformation($"开始执行{obj}计划");
|
|
|
|
var info = planInfoDataGrid.Where(x => x.PlanCode == obj).First();
|
|
|
|
var info = planInfoDataGrid.Where(x => x.PlanCode == obj).First();
|
|
|
|
if (info != null)
|
|
|
|
if (info != null)
|
|
|
|