Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
transformMultiColorContent(
elementKomponenten,
[zungenpaar?.elektrischerAntriebAnzahl?.wert],
[zungenpaar?.elektrischerAntriebLage]
[zungenpaar?.elektrischerAntriebLage],
[true]
)
],
"+"
Expand Down Expand Up @@ -680,7 +681,8 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
transformMultiColorContent(
WKrGspKomponenten,
actuatorCount,
actuatorPosition
actuatorPosition,
[kreuzung !== null]
)
],
"+"
Expand Down Expand Up @@ -794,18 +796,19 @@ class SskwTransformator extends AbstractPlanPro2TableModelTransformator {
private def List<MultiColorContent> transformMultiColorContent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest renaming this fn to indicate it's intention/purpose. Maybe the bug wouldn't have been introduced, if it were clear this is also used for filling column K.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it isn't used for column K, column R use it also. The different is only the condition to visualation actutorPosition

Iterable<W_Kr_Gsp_Komponente> components,
(W_Kr_Gsp_Komponente)=>BigInteger actuatorNumberSelector,
(W_Kr_Gsp_Komponente)=>Elektrischer_Antrieb_Lage_TypeClass actuatorPositionSelector
(W_Kr_Gsp_Komponente)=>Elektrischer_Antrieb_Lage_TypeClass actuatorPositionSelector,
(W_Kr_Gsp_Komponente)=>Boolean fillPositionSupplementCondition
) {
return components.map [

val multiColorContent = TablemodelFactory.eINSTANCE.
createMultiColorContent
// Only rendered multicolor by DIFF state
multiColorContent.disableMultiColor = true
val actuator = actuatorNumberSelector.apply(it)
val noOfActuators = actuator !== null ? actuator.intValue : 0
val position = it.getPosition(actuator, actuatorPositionSelector)
val fillPositionCondition = noOfActuators > 0 && position !== null && kreuzung !== null
val fillPositionCondition = noOfActuators > 0 &&
position !== null && fillPositionSupplementCondition.apply(it)
if (austauschAntriebe?.wert === true &&
container.containerType == ContainerType.FINAL) {
multiColorContent.multiColorValue = noOfActuators.toString
Expand Down
Loading