Ver código fonte

2024-09-06 modify plan no error

junggilpark 11 meses atrás
pai
commit
121dff5fba

+ 2 - 1
src/main/java/com/siginfo/common/CommonUtil.java

@@ -33,6 +33,7 @@ import javax.net.ssl.X509TrustManager;
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.codec.binary.Base64;
+import org.apache.poi.util.SystemOutLogger;
 
 /**
  * Project : TICS_REV File : com.common.util.CommonUtil.java Desc : 공통 유틸 기능 제공
@@ -249,7 +250,7 @@ public class CommonUtil {
 	 * @return
 	 */
 	public static String checkNull(String str) {
-		if (str == null || str == "undefined") {
+		if (str == null || str.equals("undefined")) {
 			str = "";
 		}
 		return str;

+ 1 - 1
src/main/java/com/siginfo/controller/MainController.java

@@ -286,7 +286,7 @@ public class MainController extends BaseController{
 		paramMap.put("regionCd", CommonUtil.checkNull(req.getParameter("regionCd")));
 		paramMap.put("intNo", CommonUtil.checkNull(req.getParameter("intNo")));
 		paramMap.put("planNo", CommonUtil.checkNull(req.getParameter("planNo")));
-		paramMap.put("queryId", "getDayInfo");
+	    paramMap.put("queryId", "getDayInfo");
 		
 		return mainService.cropInfoList(paramMap);
 	}

+ 1 - 1
src/main/resources/conf/mappers/main.xml

@@ -737,7 +737,7 @@
                ) A, TB_INT_OPER_PLAN TIOP 
           WHERE 1=1
           	AND A.REGION_CD = TIOP.REGION_CD
-            <if test='planNo != null'>
+            <if test="planNo != null and !planNo.equals('')">
             AND A.INT_PLAN_NO = #{planNo}
             </if>
             AND A.REGION_CD = TIOP.REGION_CD

+ 0 - 1
src/main/webapp/WEB-INF/views/cvibInfoDetail.jsp

@@ -8,7 +8,6 @@
 	<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>
 	<meta name="Description" content="사이트설명" />
 	<meta name="Keywords" content="키워드" />
-	
 	<%@ include file="/WEB-INF/views/common.jsp" %>
 	
 	<link rel="stylesheet" type="text/css" href="${contextRoot }/css/common.css" />

+ 2 - 2
src/main/webapp/WEB-INF/views/main.jsp

@@ -21,9 +21,9 @@
 	<script src="${contextRoot }/js/common/common-all.js" type="text/javascript" ></script>
 	<script src="${contextRoot }/js/common/common.js" type="text/javascript" ></script>
 	<script src="${contextRoot }/js/common/jstree.min.js" type="text/javascript" ></script>
-	<script src="${contextRoot }/js/common/webSocket.js" type="text/javascript" ></script>
-	<script src="${contextRoot }/js/map.js" type="text/javascript" ></script>
+	<!-- <script src="${contextRoot }/js/common/webSocket.js" type="text/javascript" ></script> -->
 	<script src="${contextRoot }/js/signal.js" type="text/javascript" ></script>
+	<script src="${contextRoot }/js/map.js" type="text/javascript" ></script>
 	<script src="${contextRoot }/js/ims.js" type="text/javascript" ></script>
 	<script src="${contextRoot }/js/cvib.js" type="text/javascript" ></script>
 	

+ 26 - 28
src/main/webapp/WEB-INF/views/sigInfoPhaseDetail.jsp

@@ -10,7 +10,6 @@
 	<meta name="Keywords" content="키워드" />
 	
 	<%@ include file="/WEB-INF/views/common.jsp" %>
-	
 	<link rel="stylesheet" type="text/css" href="${contextRoot }/css/common.css" />
 	<link rel="stylesheet" type="text/css" href="${contextRoot }/css/main.css" />
 	<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css" />
@@ -110,14 +109,9 @@
 				<div class="holydayPlanBody">
 					<table>
 						<colgroup>
-							<col width="10%" />
-							<col width="10%" />
-							<col width="10%" />
-							<col width="10%" />
-							<col width="10%" />
-							<col width="10%" />
-							<col width="10%" />
-							<col width="30%" />
+							<col width="33.3%"/>
+							<col width="33.3%"/>
+							<col width="33.3%"/>
 						</colgroup>
 						<tbody id="holyInfoList"></tbody>
 					</table>
@@ -704,14 +698,11 @@ function getCrwdInfoList() {
 }
 
 function getCrwdInfoListCallback(data) {
-	if(data.length > 0)
+	var weekHtml = '<tr>';
+	if(data && data.length > 6)
 	{
-		var weekHtml = '';
 		var intPlanNo;
 		var planDy;
-		weekHtml += '<tr>';
-		if(data.length > 6)
-		{
 			for(var ii = 0; ii < data.length; ii++)
 			{
 				var backColor = '#fff';
@@ -721,24 +712,24 @@ function getCrwdInfoListCallback(data) {
 				if(planDy == thisDy)
 				{
 					backColor = 'yellow';
+					$('#dayPlanNo').val(data[ii].int_PLAN_NO);
+					_TodayPlanNo = intPlanNo;
 				}
 				if(dyNo == planDy) 
 				{
 					weekHtml += '<td style="background-color:'+backColor+'" id="planId_'+(ii+1)+'" >'+intPlanNo+'</td>';
-					_TodayPlanNo = intPlanNo;
-					$('#dayPlanNo option[value="'+intPlanNo+'"]').prop('selected',true);
 				}
 				else weekHtml += '<td>-</td>';
 			}
-		}
-		else
-		{
-			for(var jj = 0; jj < 7; jj++) weekHtml += '<td>-</td>';
-		}
-		weekHtml += '</tr>';
 		
-		$('#weekInfoList').empty().html(weekHtml);
 	}
+	else {
+		for(var jj = 0; jj < 7; jj++) weekHtml += '<td>-</td>';
+	}
+	
+	weekHtml += '</tr>';
+	$('#weekInfoList').empty().html(weekHtml);
+	
 	getCrhdInfoList();
 }
 
@@ -789,7 +780,7 @@ function getCrhdInfoListCallback(data) {
 	
 	//if(thisDy == 0) thisDy = 7;
 	//var todayPlanNo = $('#planId_'+_TodayPlanNo).text();
-	$('#dayPlanNo option[value="'+intPlanNo+'"]').prop('selected',true);
+	//$('#dayPlanNo option[value="'+intPlanNo+'"]').prop('selected',true);
 	
 	getCrrsInfoList();
 }
@@ -842,9 +833,10 @@ function getCrrsInfoListCallback(data) {
 			{
 				if (resrvPlanNo < 6)
 				{
-					// 시차제인경우에 계획번호가 6~10번으로 들어오지않고 0~5번으로 들어오는 경우 6~10번으로 계획번호를 조정해 준다.
+					// 시차제인경우에 계획번호가 6~10번으로 들어오지않고 0~4번으로 들어오는 경우 6~10번으로 계획번호를 조정해 준다.
 					resrvPlanNo = resrvPlanNo + 6;
 				}
+				console.log(resrvPlanNo);
 				$('#planId_'+resrvDy).text(resrvPlanNo);
 			}
 			
@@ -879,8 +871,9 @@ function getCrrsInfoListCallback(data) {
 							var d = new Date();
 							var thisHour = d.getHours();
 							
-							if(thisHour >= resrvStrtHh && thisHour < resrvEndHh)
+							if(thisHour >= resrvStrtHh && thisHour < resrvEndHh && thisDy == resrvDy)
 							{
+								
 								//$('#planId_'+resrvDy).text(resrvPlanNo);
 								_TodayPlanNo = resrvPlanNo;
 							}
@@ -926,6 +919,9 @@ function getCrrsInfoListCallback(data) {
 		{
 			$('#planId_'+i).text(monToFri);
 		}
+		if (thisDy < 6) {
+			_TodayPlanNo = monToFri;
+		}
 	}
 	
 	if(satToSun != 0)
@@ -934,18 +930,20 @@ function getCrrsInfoListCallback(data) {
 		{
 			$('#planId_'+j).text(satToSun);
 		}
+		if (thisDy > 5) {
+			_TodayPlanNo = satToSun;
+		}
 	}
 	
 	//var todayPlanNo = $('#planId_'+thisDy).text();
 	$('#dayPlanNo option[value="'+Number(_TodayPlanNo)+'"]').prop('selected',true);
-	
+
 	//DAY PLAN 가저온다..
 	getCropInfoList(_TodayPlanNo);
 }
 
 //DAY PLAN
 function getCropInfoList(planNo) {
-	
 	var regionCd = _RegionCd;
 	var intNo = _IntNo;
 	var url = 'getCropInfoList.do';

+ 6 - 2
src/main/webapp/WEB-INF/views/treeListFrame.jsp

@@ -16,7 +16,7 @@
 			<li><a href="javascript:goGroupMenu()" class="tab" id="tab2"><img src="images/tab02_off.png" alt="신호그룹메뉴" /></a></li>
 		</ul>
 		<div class="search-box">
-			<input type="text" id="searchText" placeholder="검색어를 입력해주세요" style="width: 210px;padding:5px;">
+			<input type="text" id="searchText" placeholder="검색어를 입력해주세요" style="width: 210px;padding:5px;" onkeyup="searchTreeData(event)">
 			<div class="search-button" onclick="searchTreeData()">검색</div>
 		</div>
 		<div id="onOffTree"></div>
@@ -50,7 +50,11 @@ var _Tab = "int";
 	setTreeList();
 	getIntTreeList();
 	
-	function searchTreeData() {
+	function searchTreeData(el) {
+		if (el && el.code !== "Enter") {
+			return;
+		}
+		
 		const $searchText = $('#searchText');
 		_searchText = $searchText.val();
 		if (_Tab === 'int') {

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
src/main/webapp/js/map.js


+ 25 - 5
src/main/webapp/js/signal.js

@@ -160,7 +160,14 @@ function mapZoomBound() {
 		imsFlag = false;
 	}
 	
-	const circleArr = $('#iframeTreeList')[0].contentWindow.getIntGroupCircle();
+	let circleArr;
+	
+	if (window.opener) {
+		circleArr = window.opener.$('#iframeTreeList')[0].contentWindow.getIntGroupCircle();
+	}
+	else {
+		circleArr = $('#iframeTreeList')[0].contentWindow.getIntGroupCircle();
+	}
 	if (circleArr && circleArr.length) {
 		var radius = 30;
 		if (_Level >= 6) {
@@ -1339,8 +1346,14 @@ SignalDraw.prototype = {
 			{
 				if(_ToggleSiginfo)
 					getSigPop(lat,lng,regionCd,regionNm,intNo,intNm,groupNo,mapNo,commOnOffFlag,intSigCycleCnt,intSigCycleLen);
-				else
-					customOverlayFnc(intNm,lng,lat);
+				else {
+					if (window.opener) {
+						window.opener.customOverlayFnc(intNm,lng,lat);
+					}
+					else {
+						customOverlayFnc(intNm,lng,lat);
+					}
+				}
 			}
 		});
 		
@@ -1504,8 +1517,15 @@ Signal.prototype = {
 			{
 				if(_ToggleSiginfo)
 					getSigPop(Lat,Lng,regionCd,regionNm,intNo,intNm,groupNo,mapNo,commOnOffFlag,intSigCycleCnt,intSigCycleLen);
-				else
-					customOverlayFnc(intNm,Lng,Lat);
+				else {
+					if (window.opener) {
+						window.opener.customOverlayFnc(intNm,Lng,Lat);
+					}
+					else {
+						
+						customOverlayFnc(intNm,Lng,Lat);
+					}
+				}
 			}
 		});
 		

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff