@@ -160,10 +160,6 @@ public TDAI updateOrCreateDOAndDAInstances(TAnyLN tAnyLN, DoLinkedToDa doLinkedT
160160 @ Override
161161 public DoLinkedToDa getDoLinkedToDaCompletedFromDAI (TIED tied , String ldInst , TAnyLN anyLN , DoLinkedToDa doLinkedToDa ) {
162162 DoLinkedToDa result = doLinkedToDa .deepCopy ();
163- boolean servicesInIed = tied .isSetServices ()
164- && tied .getServices () != null
165- && tied .getServices ().getSettingGroups () != null
166- && tied .getServices ().getSettingGroups ().getConfSG () != null ;
167163 getDOAndDAInstances (anyLN , doLinkedToDa .getDataRef ())
168164 .ifPresent (tdai -> {
169165 if (tdai .isSetVal ()) {
@@ -174,13 +170,13 @@ public DoLinkedToDa getDoLinkedToDaCompletedFromDAI(TIED tied, String ldInst, TA
174170 }
175171 if (result .dataAttribute ().getFc () == TFCEnum .SG || result .dataAttribute ().getFc () == TFCEnum .SE ) {
176172 if (hasSettingGroup (tdai )) {
177- boolean isIedHasConfSG = tied .isSetAccessPoint () &&
173+ boolean isAccessPointConfSG = tied .isSetAccessPoint () &&
178174 tied .getAccessPoint ().stream ()
179175 .filter (tAccessPoint -> tAccessPoint .getServer () != null
180176 && tAccessPoint .getServer ().getLDevice ().stream ()
181177 .anyMatch (tlDevice -> tlDevice .getInst ().equals (ldInst )))
182- .anyMatch (tAccessPoint1 -> hasConfSg (tAccessPoint1 .getServices ()) || hasConfSg ( tied . getServices ()) );
183- result .dataAttribute ().setValImport ((!tdai .isSetValImport () || tdai .isValImport ()) && (isIedHasConfSG || servicesInIed ));
178+ .anyMatch (tAccessPoint1 -> hasConfSg (tAccessPoint1 .getServices ()));
179+ result .dataAttribute ().setValImport ((!tdai .isSetValImport () || tdai .isValImport ()) && (isAccessPointConfSG || hasConfSg ( tied . getServices ()) ));
184180 } else {
185181 log .warn ("Inconsistency in the SCD file - DAI= {} with fc= {} must have a sGroup attribute" , tdai .getName (), result .dataAttribute ().getFc ());
186182 result .dataAttribute ().setValImport (false );
0 commit comments