|
@@ -66,16 +66,46 @@ public class TbScsTConIntFlow implements Serializable {
|
|
|
*/
|
|
|
private Double flowELat;
|
|
|
|
|
|
+ private boolean isValid() {
|
|
|
+ if (this.flowSLng == 0. ||
|
|
|
+ this.flowSLat == 0. ||
|
|
|
+ this.flowMLng == 0. ||
|
|
|
+ this.flowMLat == 0. ||
|
|
|
+ this.flowELng == 0. ||
|
|
|
+ this.flowELat == 0.) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (this.flowNo == 0 || this.flowNo == 18) {
|
|
|
+ // flowNo == 18 --> 무신호, 현시를 그리지 않는다. A링 하나만 있는 경우
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
public HashMap<String, Object> toSig(String regionCd) {
|
|
|
HashMap<String, Object> param = new HashMap<>();
|
|
|
+ if (!isValid()) {
|
|
|
+ // flowNo == 18 --> 무신호, 현시를 그리지 않는다. A링 하나만 있는 경우
|
|
|
+ return new HashMap<>();
|
|
|
+ }
|
|
|
+
|
|
|
// OK
|
|
|
param.put("REGION_CD", regionCd);
|
|
|
param.put("INT_NO", this.intNo);
|
|
|
param.put("MAP_NO", this.intPlanClss > 0 ? this.intPlanClss -1 : this.intPlanClss); // 0~6
|
|
|
param.put("RING_NO", this.intRing == 1 ? 0 : 1); // 0:A링, 1:B링
|
|
|
param.put("PHASE_NO", this.intPhaseNo > 0 ? this.intPhaseNo-1 : this.intPhaseNo); // 0~7
|
|
|
- param.put("FLOW_NO", this.flowNo);
|
|
|
- param.put("FLOW_TP", "A");
|
|
|
+ param.put("FLOW_NO", this.flowNo); //이동류번호(1-16, 17, 18), 21, 23, 26, 27
|
|
|
+
|
|
|
+ String flowTp;
|
|
|
+ if (this.flowNo == 17) {
|
|
|
+ flowTp = "P"; // 보행자
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ flowTp = (this.flowNo % 2) == 1 ? "L" : "S"; // 1,3,5,7,9,11,13,15 --> 홀수 --> 좌회전, 짝수 --> 직진
|
|
|
+ }
|
|
|
+
|
|
|
+ param.put("FLOW_TP", flowTp);
|
|
|
+
|
|
|
param.put("FLOW_S_LAT", this.flowSLat);
|
|
|
param.put("FLOW_S_LNG", this.flowSLng);
|
|
|
param.put("FLOW_M_LAT", this.flowMLat);
|