shjung 2 år sedan
förälder
incheckning
50816d99c0

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

@@ -225,16 +225,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.getDegAI() + 180);
-                if (dto.getDegAI() > 360) {
-                    dto.setDegAI(dto.getDegAI() - 360);
-                }
-                if (dto.getDegAO() > 360) {
-                    dto.setDegAO(dto.getDegAO() - 360);
-                }
-            }
+//            if (5 == dto.getDirA()) {
+//                dto.setDegAI(dto.getDegAI() + 90);
+//                dto.setDegAO(dto.getDegAI() + 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);
@@ -247,16 +247,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.getDegBI() + 180);
-                if (dto.getDegBI() > 360) {
-                    dto.setDegBI(dto.getDegBI() - 360);
-                }
-                if (dto.getDegBO() > 360) {
-                    dto.setDegBO(dto.getDegBO() - 360);
-                }
-            }
+//            if (5 == dto.getDirB()) {
+//                dto.setDegBI(dto.getDegBI() + 90);
+//                dto.setDegBO(dto.getDegBI() + 180);
+//                if (dto.getDegBI() > 360) {
+//                    dto.setDegBI(dto.getDegBI() - 360);
+//                }
+//                if (dto.getDegBO() > 360) {
+//                    dto.setDegBO(dto.getDegBO() - 360);
+//                }
+//            }
         }
         return dto;
     }

+ 30 - 18
src/main/resources/static/application/wall/main/main-func.js

@@ -36,17 +36,21 @@ drctMap.set(7, 225);
 drctMap.set(8, 315);
 
 _arrowSize[16] = 8;
+_arrowSize[15] = 8;
 _arrowSize[17] = 12;
 _arrowSize[18] = 24;
 
+_lineSize[15] = 3;
 _lineSize[16] = 3;
 _lineSize[17] = 5;
 _lineSize[18] = 8;
 
+_strokeWidth[15] = 3;
 _strokeWidth[16] = 3;
 _strokeWidth[17] = 5;
 _strokeWidth[18] = 10;
 
+_imgSize[15] = 55;
 _imgSize[16] = 55;
 _imgSize[17] = 90;
 _imgSize[18] = 175;
@@ -192,7 +196,11 @@ class SigDrawer {
             this.endArrawA = true;
         } else if (a === 5) {
             // 보행신호
-            Adeg = ai + 270;
+            // Adeg = ai + 270;
+            // if (Adeg >= 360) Adeg = Adeg - 360;
+            // this.posA = getDestinationPoint(this.coordinates[1], this.coordinates[0], Adeg, 8);
+            gapAngle = 90; // FOR 평택
+            Adeg = ai + gapAngle;
             if (Adeg >= 360) Adeg = Adeg - 360;
             this.posA = getDestinationPoint(this.coordinates[1], this.coordinates[0], Adeg, 8);
         }
@@ -207,15 +215,22 @@ class SigDrawer {
             if (Bdeg >= 360) Bdeg = Bdeg - 360;
             this.posB = getDestinationPoint(this.coordinates[1], this.coordinates[0], Bdeg, 8);
             this.endArrawB = true;
-        } else if (a === 5) {
-            Bdeg = bi + 270;
+        } else if (b === 5) {
+            // Bdeg = bi + 270;
+            // if (Bdeg >= 360) Bdeg = Bdeg - 360;
+            // this.posB = getDestinationPoint(this.coordinates[1], this.coordinates[0], Bdeg, 8);
+            gapAngle = 270; // FOR 평택
+            Bdeg = bi + gapAngle;
             if (Bdeg >= 360) Bdeg = Bdeg - 360;
             this.posB = getDestinationPoint(this.coordinates[1], this.coordinates[0], Bdeg, 8);
         }
-        this.coordBPointArr.push(getDestinationPoint(this.posB[1], this.posB[0], bi, 24));
-        this.coordBPointArr.push(this.posB);
-        this.coordBPointArr.push(getDestinationPoint(this.posB[1], this.posB[0], bo, 24));
-
+        if (a === 5 && b === 5) {
+            this.coordBPointArr = this.coordAPointArr;
+        } else {
+            this.coordBPointArr.push(getDestinationPoint(this.posB[1], this.posB[0], bi, 24));
+            this.coordBPointArr.push(this.posB);
+            this.coordBPointArr.push(getDestinationPoint(this.posB[1], this.posB[0], bo, 24));
+        }
         if (ai != 0 && ao != 0 && bi != 0 && bo != 0) {
             this.drawSignalMap();
         }
@@ -234,13 +249,12 @@ class SigDrawer {
                 this.lineAFeatrue = feature;
             } else {
                 if (this.coordAPointArr.length === 3) {
-                    console.log(this);
                     const feature = new ol.Feature({
                         geometry: new ol.geom.LineString([this.coordAPointArr[0], this.coordAPointArr[1], this.coordAPointArr[2]]),
                         obj: this,
                     });
-                    _dotLyr.getSource().addFeature( feature );
-                     this.lineAdote = feature;
+                    _dotLyr.getSource().addFeature(feature);
+                    this.lineAdote = feature;
                 }
             }
         }
@@ -259,8 +273,8 @@ class SigDrawer {
                         geometry: new ol.geom.LineString([this.coordBPointArr[0], this.coordBPointArr[1], this.coordBPointArr[2]]),
                         obj: this,
                     });
-                    _dotLyr.getSource().addFeature( feature );
-                     this.lineBdote = feature;
+                    _dotLyr.getSource().addFeature(feature);
+                    this.lineBdote = feature;
                 }
             }
         }
@@ -500,10 +514,9 @@ function onSocketReceived(AClientType, AMessage) {
         initLayer();
         const end1 = new Date();
         jsonData.map((sig) => {
-            // if (sig.dir_a === 5 || sig.dir_b === 5) {
-            //     console.log(sig);
-            // }
-            //if (sig.sgnl_ixr_nmbr === 1) {
+            if (sig.sgnl_ixr_nmbr === 675) {
+                console.log(sig);
+            }
             let obj = new SigDrawer(sig, _mapManager.layerArr[LayerIndex.Sig].objMap.get(sig.sgnl_ixr_nmbr));
             _sigDrawerArr.push(obj);
             try {
@@ -518,7 +531,6 @@ function onSocketReceived(AClientType, AMessage) {
             } catch (error) {
                 console.error(error);
             }
-            //}
         });
         const end = new Date();
         console.log(end1 - start, end - start);
@@ -572,7 +584,7 @@ export function doMap() {
 }
 
 function onMapMoveEndFunc(AZoom, ACenterX, ACenterY, ALeft, ABottom, ARight, ATop) {
-    let stts = AZoom >= 16;
+    let stts = AZoom >= 15;
     console.log(stts);
     if ($(".itsSIG").prop("src").indexOf("btnSIGOn.png") > -1) {
         _mapManager.showFacilityLayer("신호제어기", !stts);