|
@@ -633,17 +633,30 @@ namespace WCS.Service.Extensions
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- if (ExDevice.Any(v => v == Entity.CODE)) return;
|
|
|
- if (Entity.CODE == "SRM3" || Entity.CODE == "SRM4") AddExDevice("SRM3-SRM4-Out");
|
|
|
- if (Entity.CODE == "SRM5" || Entity.CODE == "SRM6") AddExDevice("SRM5-SRM6-Out");
|
|
|
- if (Entity.CODE == "SRM7" || Entity.CODE == "SRM8") AddExDevice("SRM7-SRM8-Out");
|
|
|
+ if (Entity.CODE == "SRM3" || Entity.CODE == "SRM4")
|
|
|
+ {
|
|
|
+ if (ExDevice.Any(v => v == "SRM3-SRM4-Out")) return;
|
|
|
+ AddExDevice("SRM3-SRM4-Out");
|
|
|
+ }
|
|
|
+ if (Entity.CODE == "SRM5" || Entity.CODE == "SRM6")
|
|
|
+ {
|
|
|
+ if (ExDevice.Any(v => v == "SRM5-SRM6-Out")) return;
|
|
|
+ AddExDevice("SRM5-SRM6-Out");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (Entity.CODE == "SRM7" || Entity.CODE == "SRM8")
|
|
|
+ {
|
|
|
+ if (ExDevice.Any(v => v == "SRM7-SRM8-Out")) return;
|
|
|
+ AddExDevice("SRM7-SRM8-Out");
|
|
|
+ }
|
|
|
+
|
|
|
act(this);
|
|
|
}
|
|
|
finally
|
|
|
{
|
|
|
- if (Entity.CODE == "SRM3" || Entity.CODE == "SRM4") AddExDevice("SRM3-SRM4-Out");
|
|
|
- if (Entity.CODE == "SRM5" || Entity.CODE == "SRM6") AddExDevice("SRM5-SRM6-Out");
|
|
|
- if (Entity.CODE == "SRM7" || Entity.CODE == "SRM8") AddExDevice("SRM7-SRM8-Out");
|
|
|
+ if (Entity.CODE == "SRM3" || Entity.CODE == "SRM4") RemoveExDevice("SRM3-SRM4-Out");
|
|
|
+ if (Entity.CODE == "SRM5" || Entity.CODE == "SRM6") RemoveExDevice("SRM5-SRM6-Out");
|
|
|
+ if (Entity.CODE == "SRM7" || Entity.CODE == "SRM8") RemoveExDevice("SRM7-SRM8-Out");
|
|
|
}
|
|
|
}
|
|
|
|