가상 수정

This commit is contained in:
Macbook
2026-05-25 16:02:52 +09:00
parent 3102169541
commit 182b82e990
18 changed files with 747 additions and 105 deletions
@@ -197,6 +197,7 @@ public class LiveConditionStatusService {
private LiveConditionRowDto toRowUnevaluated(PendingCond p) {
JsonNode c = p.condition();
String indType = c.path("indicatorType").asText("");
String plotKey = plotKeyFromCondition(c, indType);
String condType = c.path("conditionType").asText("GT");
String condLabel = CONDITION_LABEL.getOrDefault(condType, condType);
Double target = readTargetNumeric(c);
@@ -212,6 +213,7 @@ public class LiveConditionStatusService {
.satisfied(null)
.timeframe(p.timeframe())
.side(p.side())
.plotKey(plotKey)
.build();
}
@@ -240,6 +242,7 @@ public class LiveConditionStatusService {
Map<String, Map<String, Object>> params, int index) {
JsonNode c = p.condition();
String indType = c.path("indicatorType").asText("");
String plotKey = plotKeyFromCondition(c, indType);
String condType = c.path("conditionType").asText("GT");
String condLabel = CONDITION_LABEL.getOrDefault(condType, condType);
@@ -255,6 +258,7 @@ public class LiveConditionStatusService {
.satisfied(satisfied)
.timeframe(p.timeframe())
.side(p.side())
.plotKey(plotKey)
.build();
}
@@ -310,4 +314,12 @@ public class LiveConditionStatusService {
return null;
}
private static String plotKeyFromCondition(JsonNode cond, String indicatorType) {
String left = cond.path("leftField").asText("");
if (left != null && !left.isBlank() && !"none".equalsIgnoreCase(left)) {
return left;
}
return indicatorType;
}
}