shjung 2 жил өмнө
parent
commit
8e9631b0ed

+ 21 - 0
src/main/java/com/its/op/entity/its/scrs/TbScSgnlCtlr.java

@@ -196,6 +196,7 @@ public class TbScSgnlCtlr implements Serializable {
             return dto;
         }
 
+        // Dir, /1: 직진, 2: 좌회전, 5: 보행자
         dto.setCntlMode(this.stts.getCntlMode());   // 제어모드(0: TRC, 1: TOD, 2: MAN)
         dto.setCntlStts(this.stts.getCntlStts());   // 제어상태(0: 온라인, 1: 오프라인, 2: 트랜스, 3: 통신장애)
         dto.setSpclCntl(this.stts.getSpclCntl());   // 특수제어(0: 없음, 1: 점멸, 2: 소등, 3: 수동, 4: 감응)
@@ -233,6 +234,16 @@ public class TbScSgnlCtlr implements Serializable {
             if (dto.getDegAO() > 360) {
                 dto.setDegAO(dto.getDegAO() - 360);
             }
+            if (5 == dto.getDirA()) {
+                dto.setDegAI(dto.getDegAI() + 90);
+                dto.setDegAO(dto.getDegAO() + 180)
+                if (dto.getDegAI() > 360) {
+                    dto.setDegAI(dto.getDegAI() - 360);
+                }
+                if (dto.getDegAO() > 360) {
+                    dto.setDegAO(dto.getDegAO() - 360);
+                }
+            }
         }
         if (bRingPhase >= 1000000) {
             String bPhase = String.format("%07d", bRingPhase);
@@ -245,6 +256,16 @@ public class TbScSgnlCtlr implements Serializable {
             if (dto.getDegBO() > 360) {
                 dto.setDegBO(dto.getDegBO() - 360);
             }
+            if (5 == dto.getDirB()) {
+                dto.setDegBI(dto.getDegBI() + 90);
+                dto.setDegBO(dto.getDegBO() + 180)
+                if (dto.getDegBI() > 360) {
+                    dto.setDegBI(dto.getDegBI() - 360);
+                }
+                if (dto.getDegBO() > 360) {
+                    dto.setDegBO(dto.getDegBO() - 360);
+                }
+            }
         }
         return dto;
     }