From 4e19566bf0e3c8e5bafda1cc0863a62c45a313bc Mon Sep 17 00:00:00 2001 From: thkim Date: Fri, 14 Nov 2025 16:12:26 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B0=9C=EC=A3=BC=EA=B8=B0=EA=B4=80=20?= =?UTF-8?q?=ED=86=B5=EA=B3=84=20=EC=95=8C=EB=A6=BC=20=EB=82=B4=EC=97=AD=20?= =?UTF-8?q?5=EA=B0=9C=EB=A1=9C=20=EC=A6=9D=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../input/service/DrillingInputMapper.java | 1 + .../impl/DrillingInputServiceImpl.java | 66 +++-- .../impl/DrillingInquiryServiceImpl.java | 4 +- .../drilling/input/DrillingInputMapper.xml | 7 + .../views/drilling/input/drilling_input.jsp | 2 +- .../drilling/inquiry/drilling_inquiry.jsp | 2 +- .../drilling/statistics/drilling_notice.jsp | 231 ++++++++++++------ .../statistics/drilling_statistics.jsp | 42 +++- ...homeEducationApplicationInquiryHistory.jsp | 6 +- 9 files changed, 246 insertions(+), 115 deletions(-) diff --git a/src/main/java/geoinfo/drilling/input/service/DrillingInputMapper.java b/src/main/java/geoinfo/drilling/input/service/DrillingInputMapper.java index e47b33aa..8eac99ba 100644 --- a/src/main/java/geoinfo/drilling/input/service/DrillingInputMapper.java +++ b/src/main/java/geoinfo/drilling/input/service/DrillingInputMapper.java @@ -20,6 +20,7 @@ public interface DrillingInputMapper { public List sPGetTblCsiByCid(HashMap params) throws SQLException; public EgovMap getItemByCid(HashMap params) throws SQLException; + public EgovMap getItemByProjectCode(HashMap params) throws SQLException; public int updateProjectCodeAndProjectStateCodeByCid(HashMap params) throws SQLException; public int updateProjectCodeAndProjectStateCodeByProjectCode(HashMap params) throws SQLException; diff --git a/src/main/java/geoinfo/drilling/input/service/impl/DrillingInputServiceImpl.java b/src/main/java/geoinfo/drilling/input/service/impl/DrillingInputServiceImpl.java index cae37cbf..687e6816 100644 --- a/src/main/java/geoinfo/drilling/input/service/impl/DrillingInputServiceImpl.java +++ b/src/main/java/geoinfo/drilling/input/service/impl/DrillingInputServiceImpl.java @@ -138,7 +138,14 @@ public class DrillingInputServiceImpl implements DrillingInputService { try { - EgovMap tbl = drillingInputMapper.getItemByCid( params ); + EgovMap tbl = null; + Long lCid = MyUtil.getLongFromObject( params.get("CID") ); + if( lCid == null ) { + tbl = drillingInputMapper.getItemByProjectCode( params ); + params.put("CID", tbl.get("cid")); + } else { + tbl = drillingInputMapper.getItemByCid( params ); + } if( tbl != null ) { HashMap updateProjectCodeParams = new HashMap(); @@ -154,20 +161,11 @@ public class DrillingInputServiceImpl implements DrillingInputService { } } - if (nResult > 0) { // 업데이트가 성공했을 경우에만 이력 기록 - HashMap histParams = new HashMap(); - - // 이전 상태값 (EgovMap은 보통 camelCase로 키를 반환합니다) - Object preStateCode = tbl.get("projectStateCode"); - - histParams.put("CID", params.get("CID")); - histParams.put("PROJECT_CODE", params.get("PROJECT_CODE")); - histParams.put("PRE_PROJECT_STATE_CODE", preStateCode != null ? preStateCode.toString() : null); // 이전 상태 - histParams.put("PROJECT_STATE_CODE", params.get("PROJECT_STATE_CODE")); // 현재 변경된 상태 - histParams.put("MOD_REASON", "지반정보 등록 프로젝트 연결"); // 변경 사유 (필요에 따라 파라미터로 받아서 설정 가능) - histParams.put("userId", userId); - - drillingInputMapper.insertConstructSiteHist(histParams); + if ( 0 < nResult) { // 업데이트가 성공했을 경우에만 이력 기록 + int nAffectedRows = insertTempConstructSiteInfo(request, tbl, updateProjectCodeParams, userId); // TEMP_CONSTRUCT_SITE_HIST에 이력도 남겨준다. + if( nAffectedRows == 0) { + System.out.println("TEMP_CONSTRUCT_SITE_HIST insert에 실패하였습니다. cid:" + tbl.get("cid")); + } } } return params; @@ -185,8 +183,14 @@ public class DrillingInputServiceImpl implements DrillingInputService { params.put("userId", userId); try { - - EgovMap tbl = drillingInputMapper.getItemByCid( params ); + EgovMap tbl = null; + Long lCid = MyUtil.getLongFromObject( params.get("CID") ); + if( lCid == null ) { + tbl = drillingInputMapper.getItemByProjectCode( params ); + params.put("CID", tbl.get("cid")); + } else { + tbl = drillingInputMapper.getItemByCid( params ); + } if( tbl != null ) { HashMap updateProjectCodeParams = new HashMap(); @@ -200,7 +204,14 @@ public class DrillingInputServiceImpl implements DrillingInputService { int nResult = drillingInputMapper.updateProjectCodeAndProjectStateCodeByProjectCode(updateProjectCodeParams); if( nResult == 0 ) { - } + } else { + int nAffectedRows = insertTempConstructSiteInfo(request, tbl, updateProjectCodeParams, userId); // TEMP_CONSTRUCT_SITE_HIST에 이력도 남겨준다. + if( nAffectedRows == 0) { + System.out.println("TEMP_CONSTRUCT_SITE_HIST insert에 실패하였습니다. cid:" + tbl.get("cid")); + } + } + } else { + System.out.println("TEMP_CONSTRUCT_SITE_INFO에서 대상을 찾을 수 없습니다."); } return params; } catch (SQLException e) { @@ -256,4 +267,23 @@ public class DrillingInputServiceImpl implements DrillingInputService { throw new Exception( e.getMessage() ); } } + + + private int insertTempConstructSiteInfo(HttpServletRequest request, EgovMap tbl, HashMap params, String userId) throws SQLException { + HashMap histParams = new HashMap(); + + // 이전 상태값 (EgovMap은 보통 camelCase로 키를 반환합니다) + Object preStateCode = tbl.get("projectStateCode"); + + histParams.put("CID", params.get("CID")); + histParams.put("PROJECT_CODE", params.get("PROJECT_CODE")); + histParams.put("PRE_PROJECT_STATE_CODE", preStateCode != null ? preStateCode.toString() : null); // 이전 상태 + histParams.put("PROJECT_STATE_CODE", params.get("PROJECT_STATE_CODE")); // 현재 변경된 상태 + histParams.put("MOD_REASON", "지반정보 등록 프로젝트 연결"); // 변경 사유 (필요에 따라 파라미터로 받아서 설정 가능) + histParams.put("userId", userId); + + return drillingInputMapper.insertConstructSiteHist(histParams); + } + + } diff --git a/src/main/java/geoinfo/drilling/inquiry/service/impl/DrillingInquiryServiceImpl.java b/src/main/java/geoinfo/drilling/inquiry/service/impl/DrillingInquiryServiceImpl.java index ba9724bc..d53f5490 100644 --- a/src/main/java/geoinfo/drilling/inquiry/service/impl/DrillingInquiryServiceImpl.java +++ b/src/main/java/geoinfo/drilling/inquiry/service/impl/DrillingInquiryServiceImpl.java @@ -175,10 +175,10 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService { projectStateCodeName = "검수 중"; break; case 4: - projectStateCodeName = "수정 요청_"; + projectStateCodeName = "수정 요청"; break; case 5: - projectStateCodeName = "수정 요청"; + projectStateCodeName = "검수 완료"; break; case 6: projectStateCodeName = "등록 완료"; diff --git a/src/main/resources/egovframework/sqlmap/mapper/drilling/input/DrillingInputMapper.xml b/src/main/resources/egovframework/sqlmap/mapper/drilling/input/DrillingInputMapper.xml index 90c6bc33..628aea1e 100644 --- a/src/main/resources/egovframework/sqlmap/mapper/drilling/input/DrillingInputMapper.xml +++ b/src/main/resources/egovframework/sqlmap/mapper/drilling/input/DrillingInputMapper.xml @@ -119,6 +119,13 @@ + + +

건설현장 관리

-

프로젝트 조회

+

관리 시추정보 현황

건설현장 조회

건설현장 입력

diff --git a/src/main/webapp/WEB-INF/views/drilling/inquiry/drilling_inquiry.jsp b/src/main/webapp/WEB-INF/views/drilling/inquiry/drilling_inquiry.jsp index 860b7958..3a65ca8c 100644 --- a/src/main/webapp/WEB-INF/views/drilling/inquiry/drilling_inquiry.jsp +++ b/src/main/webapp/WEB-INF/views/drilling/inquiry/drilling_inquiry.jsp @@ -423,7 +423,7 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe

건설현장 관리

-

프로젝트 조회

+

관리 시추정보 현황

건설현장 조회

건설현장 입력

diff --git a/src/main/webapp/WEB-INF/views/drilling/statistics/drilling_notice.jsp b/src/main/webapp/WEB-INF/views/drilling/statistics/drilling_notice.jsp index a11a0a28..1d0c008a 100644 --- a/src/main/webapp/WEB-INF/views/drilling/statistics/drilling_notice.jsp +++ b/src/main/webapp/WEB-INF/views/drilling/statistics/drilling_notice.jsp @@ -4,10 +4,7 @@ <% - - if (request.getSession().getAttribute("USERID") == null) { - %> <% @@ -15,9 +12,7 @@ if (request.getSession().getAttribute("USERID") == null) { } %> <% - if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSession().getAttribute("CLS") ) == false ) { - %> <% @@ -30,33 +25,161 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe <%@ include file="/include/inc_head_2021_new.jsp" %> - - - - + - - - - - -
- -
+

알림

@@ -65,84 +188,32 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
- - - -
+
- -
+
  • 알림 내역
도움말
- -

알림 내역

- -
- -
+

알림 내역

+
+

건설현장 프로젝트 상태 변경 이력

-
- -
-
- -
-
-

'충북선 달천 충주간' 프로젝트

-

상태가 검수중에서 검수 완료로 변경되었습니다.

-
-
-

2025-08-27

-

14:30

-
-
- -
-
- -
-
-

'제3연륙교 건설 공사' 프로젝트

-

상태가 검수 완료에서 수정 요청으로 변경되었습니다.

-
-
-

2025-08-26

-

11:15

-
-
- -
-
- -
-
-

'수도권 제2순환고속도로' 프로젝트

-

상태가 미입력에서 검수중으로 변경되었습니다.

-
-
-

2025-08-25

-

09:05

-
-
+
+
알림 목록을 불러오는 중입니다...
-
+
- -
+
- -
+
- -
-<%@ include file="/include/inc_footer_2021_new.jsp" %> +<%@ include file="/include/inc_footer_2021_new.jsp" %> \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/drilling/statistics/drilling_statistics.jsp b/src/main/webapp/WEB-INF/views/drilling/statistics/drilling_statistics.jsp index bd068801..6aab8dbd 100644 --- a/src/main/webapp/WEB-INF/views/drilling/statistics/drilling_statistics.jsp +++ b/src/main/webapp/WEB-INF/views/drilling/statistics/drilling_statistics.jsp @@ -290,7 +290,7 @@ document.addEventListener('DOMContentLoaded', function() { */ function loadHistoryList() { // 알림 내역은 최신 3개만 가져오도록 설정 - var url = '/drilling/statistics/hist-list.do?page=1&rows=3'; + var url = '/drilling/statistics/hist-list.do?page=1&rows=5'; requesetGet(url, displayHistoryList, null); } @@ -300,6 +300,7 @@ function loadHistoryList() { function getStatusInfo(statusCode) { var status = { name: '알 수 없음', + // 기본 아이콘: 캘린더 (기존 코드와 동일) icon: '', bgColor: 'bg-gray-500', textColor: 'text-gray-600' @@ -308,30 +309,51 @@ function getStatusInfo(statusCode) { switch (String(statusCode)) { case '0': status.name = '미입력'; - break; + // 아이콘: 마이너스 (MinusCircle) - 비어있거나 시작 안 함 + status.icon = ''; + status.bgColor = 'bg-gray-500'; // 회색 (중립) + status.textColor = 'text-gray-600'; + break; // case '1': status.name = '입력 중'; + // 아이콘: 연필 (Pencil) - 수정/작성 중 (기존과 동일) status.icon = ''; - status.bgColor = 'bg-blue-500'; + status.bgColor = 'bg-blue-500'; // 파란색 (진행중) status.textColor = 'text-blue-600'; break; case '2': + status.name = '검수 준비 대기중'; + // 아이콘: 시계 (Clock) - 대기 중 + status.icon = ''; + status.bgColor = 'bg-yellow-500'; // 노란색 (대기) + status.textColor = 'text-yellow-600'; + break; // case '3': status.name = '검수중'; - status.icon = ''; - status.bgColor = 'bg-yellow-500'; + // 아이콘: 돋보기 (Search) - 검토 중 + status.icon = ''; + status.bgColor = 'bg-yellow-500'; // 노란색 (대기/검토) status.textColor = 'text-yellow-600'; break; - case '5': + case '4': status.name = '수정 요청'; - status.icon = ''; - status.bgColor = 'bg-red-500'; + // 아이콘: 느낌표 (ExclamationCircle) - 주의/수정 필요 + status.icon = ''; + status.bgColor = 'bg-red-500'; // 빨간색 (거절/오류) status.textColor = 'text-red-600'; break; + case '5': + status.name = '검수 완료'; + // 아이콘: 체크 (CheckCircle) - 성공 (기존과 동일) + status.icon = ''; + status.bgColor = 'bg-green-500'; // 초록색 (완료/성공) + status.textColor = 'text-green-600'; + break; case '6': status.name = '등록 완료'; + // 아이콘: 체크 (CheckCircle) - 성공 (기존과 동일) status.icon = ''; - status.bgColor = 'bg-green-500'; + status.bgColor = 'bg-green-500'; // 초록색 (완료/성공) status.textColor = 'text-green-600'; break; } @@ -368,7 +390,7 @@ function displayHistoryList(response) { '

\'' + item.constName + '\'

' + '

' + '상태가 ' + preStateInfo.name + '에서 ' + - '' + currentStateInfo.name + '으로 변경되었습니다.' + + '' + currentStateInfo.name + '상태로 변경되었습니다.' + '

' + '
' + ''; diff --git a/src/main/webapp/WEB-INF/views/homeEducationApplication/inquiry/homeEducationApplicationInquiryHistory.jsp b/src/main/webapp/WEB-INF/views/homeEducationApplication/inquiry/homeEducationApplicationInquiryHistory.jsp index 2e3b1790..3bb35223 100644 --- a/src/main/webapp/WEB-INF/views/homeEducationApplication/inquiry/homeEducationApplicationInquiryHistory.jsp +++ b/src/main/webapp/WEB-INF/views/homeEducationApplication/inquiry/homeEducationApplicationInquiryHistory.jsp @@ -225,7 +225,7 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe

건설현장 관리

-

프로젝트 조회

+

관리 시추정보 현황

건설현장 조회

건설현장 입력

@@ -240,12 +240,12 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
  • -
  • 프로젝트 조회
  • +
  • 관리 시추정보 현황
도움말
-

프로젝트 조회

+

관리 시추정보 현황