|
@@ -699,6 +699,18 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
|
|
|
schDto.UpdateBy = Appsession.UserName;
|
|
|
bas_plc_test_scheme schEntity = _mapper.Map<BasicPlcTestSchemeDto, bas_plc_test_scheme>(schDto);
|
|
|
_basicPlcTestSchemeService.Add(schEntity);
|
|
|
+
|
|
|
+ //清空已填写的内容
|
|
|
+ ScheduleName = string.Empty;
|
|
|
+ DeviceKindName = string.Empty;
|
|
|
+ SelectTest = string.Empty;
|
|
|
+ TestName = string.Empty;
|
|
|
+ BeforeSelectJudge = string.Empty;
|
|
|
+ SelectLogic = string.Empty;
|
|
|
+ SelectInJudge = string.Empty;
|
|
|
+ InSelectLogic = string.Empty;
|
|
|
+ SelectOutJudge = string.Empty;
|
|
|
+ OutSelectLogic = string.Empty;
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -717,24 +729,24 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ //查找测试方案id
|
|
|
+ var finsScheHave = _basicPlcTestSchemeService.FindByName(ScheduleName);
|
|
|
+ if (finsScheHave != null)
|
|
|
+ {
|
|
|
+ long id = finsScheHave.scheme_id;
|
|
|
+ //增加或修改方案明细表
|
|
|
+ AddOrEditDetailsToDb(id);
|
|
|
|
|
|
+ }
|
|
|
+ //gen'x'g
|
|
|
+ GetExistSchs();
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
_logger.LogError(ex.ToString());
|
|
|
}
|
|
|
|
|
|
- //查找测试方案id
|
|
|
- var finsScheHave = _basicPlcTestSchemeService.FindByName(ScheduleName);
|
|
|
- if (finsScheHave != null)
|
|
|
- {
|
|
|
- long id = finsScheHave.scheme_id;
|
|
|
- //增加或修改方案明细表
|
|
|
- AddOrEditDetailsToDb(id);
|
|
|
-
|
|
|
- }
|
|
|
- //gen'x'g
|
|
|
- GetExistSchs();
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|