diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index ae94e20..1c02d2a 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,6 +1,7 @@ eclipse.preferences.version=1 encoding//src/main/java=UTF-8 encoding//src/main/java/geoinfo/admins/chLog/DownloadAppController.java=UTF-8 +encoding//src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp=UTF-8 encoding//src/main/webapp/body/map/web3d/web3d.jsp=UTF-8 encoding//src/main/webapp/popups/pop_201705_01.jsp=UTF-8 encoding//src/test/java=UTF-8 diff --git a/2_apply.bat b/2_apply.bat index fed4a40..f5500a1 100644 --- a/2_apply.bat +++ b/2_apply.bat @@ -60,7 +60,7 @@ if /i "!workspace_path:~1,2!" == "\:" ( rem # target_prefix մϴ. set "target_prefix=!workspace_path!\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\geoinfo_admin\" -explorer "!target_prefix!" +#explorer "!target_prefix!" echo target_prefix: "!target_prefix!" @@ -117,7 +117,7 @@ if "!line:~-4!" == ".xml" ( set "target_file=%target_prefix%!relative_path!" ) -rem --- [ κ] --- +rem --- --- if defined source_file ( if exist "!source_file!" ( echo [COPY] diff --git a/admin_list.txt b/admin_list.txt index 820f5a6..2a57f21 100644 --- a/admin_list.txt +++ b/admin_list.txt @@ -1,3 +1,3 @@ #게시판 - 자료실에 파일 업로드 안 되는 문제 수정 건 src\main\webapp\WEB-INF\views\admins\constructionProjectManagement\construction-project-statistics-index.jsp -src\main\resources\geoinfo\sqlmap\mappers\admins\user\DrillingInquiryMapper.xml \ No newline at end of file +src\main\resources\geoinfo\sqlmap\mappers\admins\constructionProjectManagement\ConstructionProjectManagementMapper.xml \ No newline at end of file diff --git a/src/main/java/geoinfo/admins/constructionProjectManagement/ConstructionProjectManagementController.java b/src/main/java/geoinfo/admins/constructionProjectManagement/ConstructionProjectManagementController.java index 3090fa0..e30ade0 100644 --- a/src/main/java/geoinfo/admins/constructionProjectManagement/ConstructionProjectManagementController.java +++ b/src/main/java/geoinfo/admins/constructionProjectManagement/ConstructionProjectManagementController.java @@ -6,6 +6,7 @@ import java.io.UnsupportedEncodingException; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; @@ -25,6 +26,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import egovframework.rte.psl.dataaccess.util.EgovMap; import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; +import geoinfo.admins.constructionProjectManagement.service.ConstructionProjectManagementService; import geoinfo.admins.user.service.DrillingInquiryService; import geoinfo.admins.user.service.GeneralUserMngService; import geoinfo.admins.user.service.HomeTrainingService; @@ -32,8 +34,6 @@ import geoinfo.comm.util.strUtil; import geoinfo.session.UserInfo; import geoinfo.util.MyUtil; - - @Controller public class ConstructionProjectManagementController { @Resource(name = "generalUserMngService") @@ -43,11 +43,16 @@ public class ConstructionProjectManagementController { private HomeTrainingService homeTrainingService; - @Resource(name = "drillingInquiryService") - private DrillingInquiryService drillingInquiryService; + // [변경] 새로 만든 서비스 주입 + @Resource(name = "constructionProjectManagementService") + private ConstructionProjectManagementService constructionProjectManagementService; + + // [추가] 기존 검색/조회 기능을 위해 필요 (변수 선언 추가) + @Resource(name = "drillingInquiryService") + private DrillingInquiryService drillingInquiryService; /** - * 집합교육 화면 + * 건설현장 통계 화면 * @param params * @param model * @param response @@ -66,6 +71,41 @@ public class ConstructionProjectManagementController { return "admins/constructionProjectManagement/construction-project-statistics-index"; } + /** + * 건설현장 통계 데이터 조회 (AJAX) + */ + @RequestMapping(value = "admins/constructionProjectManagement/selectStatistics.do", method = RequestMethod.POST) + @ResponseBody + public JSONObject selectStatistics(HttpServletRequest request, @RequestBody String strJSON, HttpServletResponse response) { + JSONObject jsonResponse = new JSONObject(); + + try { + // 1. 파라미터 파싱 + JSONParser jsonParser = new JSONParser(); + JSONObject jsonObject = (JSONObject) jsonParser.parse(strJSON); + HashMap params = new HashMap<>(); + + if (jsonObject != null) { + for(Object key : jsonObject.keySet()){ + params.put((String)key, jsonObject.get(key)); + } + } + + // 2. 서비스 호출 (새로 만든 서비스 사용) + Map stats = constructionProjectManagementService.selectConstructionProjectStatistics(params); + + jsonResponse.put("result", "true"); + jsonResponse.put("data", stats); + + } catch (Exception e) { + jsonResponse.put("result", "false"); + jsonResponse.put("message", e.getMessage()); + e.printStackTrace(); + } + + return jsonResponse; + } + /** * 집합교육 추가 * @param request @@ -612,42 +652,6 @@ public class ConstructionProjectManagementController { return "admins/constructionProjectManagement/construction-user-detail"; } - // 발주기관 프로젝트목록 가져오기 -// @ResponseBody -// @RequestMapping(value = "/drilling-project-list", method = RequestMethod.GET, produces = "application/json; charset=UTF-8") -// public String getDrillingProjectList(HttpServletRequest request, HttpServletResponse response, @RequestParam HashMap params) throws Exception { -// if (!UserInfo.isValidSession(request, response, "admin")) { -// return ""; -// } -// JSONObject jsonObject = new JSONObject(); -// strUtil sUtil = new strUtil(); -// -// String projectName = sUtil.checkNull((String)params.get("projectName")); -// -// JSONArray jsonListObject = new JSONArray(); -// -//// if( projectName == ""){ -//// jsonObject.put("resultMessage", "OK"); -//// jsonObject.put("resultCode", 200); -//// jsonObject.put("result", new JSONObject().put("list", jsonListObject)); -//// } else { -// JSONObject result = new JSONObject(); -// result.put("list", drillingInquiryService.drillingInquiryAutocompleteList(request, params)); -// -// jsonObject.put("resultMessage", "OK"); -// jsonObject.put("resultCode", 200); -// jsonObject.put("result", result); -//// } -// -// response.setContentType("application/json; charset=UTF-8"); // 응답 헤더 설정 -// response.setCharacterEncoding("UTF-8"); // 응답 데이터 인코딩 설정 (중요) -// -// try (OutputStream os = response.getOutputStream()) { // OutputStream 사용 -// os.write(jsonObject.toString().getBytes("UTF-8")); // UTF-8 인코딩하여 출력 -// } -// -// return null; // @ResponseBody이므로 반환 값은 필요 없습니다. -// } @RequestMapping(value = "/drilling/inquiry/list.do", method = RequestMethod.GET, produces = { "application/json; charset=utf-8" }) @ResponseBody public ResponseEntity drillingInquiryList ( @@ -771,4 +775,4 @@ public class ConstructionProjectManagementController { return "admins/constructionProjectManagement/construction-user-login-history"; } -} +} \ No newline at end of file diff --git a/src/main/java/geoinfo/admins/constructionProjectManagement/service/ConstructionProjectManagementMapper.java b/src/main/java/geoinfo/admins/constructionProjectManagement/service/ConstructionProjectManagementMapper.java new file mode 100644 index 0000000..efb8bf3 --- /dev/null +++ b/src/main/java/geoinfo/admins/constructionProjectManagement/service/ConstructionProjectManagementMapper.java @@ -0,0 +1,48 @@ +package geoinfo.admins.constructionProjectManagement.service; + +import java.sql.SQLException; +import java.util.HashMap; +import java.util.List; + +import egovframework.rte.psl.dataaccess.mapper.Mapper; +import egovframework.rte.psl.dataaccess.util.EgovMap; + +@Mapper("constructionProjectManagementMapper") +public interface ConstructionProjectManagementMapper { + + /** + * 전체 건설현장 등록 건수 조회 + */ + public Long selectTotalCount(HashMap params) throws SQLException; + + /** + * 지역별 통계 조회 + */ + public List selectRegionCount(HashMap params) throws SQLException; + + /** + * 단계별 통계 조회 + */ + public List selectStageCount(HashMap params) throws SQLException; + + /** + * 최근 입력된 건설현장 목록 조회 (상위 N개) + */ + public List selectRecentProjects(HashMap params) throws SQLException; + + /** + * 통계 대상 기관명 목록 조회 + */ + public List selectStatTargetCompanies() throws SQLException; + + /** + * 기관명을 이용해 지역코드(GL, GM, GS) 구하기 (Stored Procedure 호출) + */ + public void spGetMasterCompanyDistrict(HashMap params) throws SQLException; + + /** + * 지역코드로 건설현장 수 구하기 + */ + public int selectSiteCountByDistrictCodes(HashMap params) throws SQLException; + +} \ No newline at end of file diff --git a/src/main/java/geoinfo/admins/constructionProjectManagement/service/ConstructionProjectManagementService.java b/src/main/java/geoinfo/admins/constructionProjectManagement/service/ConstructionProjectManagementService.java new file mode 100644 index 0000000..28b863c --- /dev/null +++ b/src/main/java/geoinfo/admins/constructionProjectManagement/service/ConstructionProjectManagementService.java @@ -0,0 +1,16 @@ +package geoinfo.admins.constructionProjectManagement.service; + +import java.util.HashMap; +import java.util.Map; + +public interface ConstructionProjectManagementService { + + /** + * 건설현장 통계 대시보드 데이터 조회 + * @param params 검색 조건 + * @return 통계 결과 Map (totalCount, regionList, stageList, recentList 등) + * @throws Exception + */ + public Map selectConstructionProjectStatistics(HashMap params) throws Exception; + +} \ No newline at end of file diff --git a/src/main/java/geoinfo/admins/constructionProjectManagement/service/impl/ConstructionProjectManagementServiceImpl.java b/src/main/java/geoinfo/admins/constructionProjectManagement/service/impl/ConstructionProjectManagementServiceImpl.java new file mode 100644 index 0000000..916524c --- /dev/null +++ b/src/main/java/geoinfo/admins/constructionProjectManagement/service/impl/ConstructionProjectManagementServiceImpl.java @@ -0,0 +1,184 @@ +package geoinfo.admins.constructionProjectManagement.service.impl; + +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.Resource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import egovframework.rte.psl.dataaccess.util.EgovMap; +import geoinfo.admins.constructionProjectManagement.service.ConstructionProjectManagementMapper; +import geoinfo.admins.constructionProjectManagement.service.ConstructionProjectManagementService; +import geoinfo.admins.user.service.DrillingInputService; +import geoinfo.util.MyUtil; + +@Service("constructionProjectManagementService") +public class ConstructionProjectManagementServiceImpl implements ConstructionProjectManagementService { + + @Resource(name = "constructionProjectManagementMapper") + private ConstructionProjectManagementMapper constructionProjectManagementMapper; + + @Autowired + private DrillingInputService drillingInputService; + + /** + * 건설현장 통계 대시보드 데이터 조회 + */ + @Override + public Map selectConstructionProjectStatistics(HashMap params) throws Exception { + Map resultMap = new HashMap<>(); + + // 1. 사용자 권한 및 조직 코드 설정 (기존 로직) + String userId = MyUtil.getStringFromObject(params.get("userId")); + if (userId != null && !userId.isEmpty()) { + HashMap orgCodes = drillingInputService.getOrganizationUserGlGmGsGfCodes(userId); + if (orgCodes != null) { + params.put("masterCompanyOCode", orgCodes.get("v_gl")); + params.put("masterCompanyTwCode", orgCodes.get("v_gm")); + params.put("masterCompanyThCode", orgCodes.get("v_gs")); + params.put("masterCompanyName", orgCodes.get("v_gf")); + } + } + + try { + // 2. 전체 등록 수 조회 + Long totalCount = constructionProjectManagementMapper.selectTotalCount(params); + resultMap.put("totalCount", totalCount); + + // ================================================================= + // [기관별 통계 로직] v_gl='01' 필터링 및 코드순 정렬 + // ================================================================= + List> institutionStats = new ArrayList<>(); + + // A. 통계 대상 기관명 목록 조회 + List companyList = constructionProjectManagementMapper.selectStatTargetCompanies(); + + // 부산 지역(v_gl='01') 합계용 변수 + int busanTotalCount = 0; + + if (companyList != null) { + for (String companyName : companyList) { + if (companyName == null || companyName.trim().isEmpty()) continue; + + // B. SP 호출하여 지역코드(GL, GM, GS) 획득 + HashMap spParams = new HashMap<>(); + spParams.put("projectMasterCompanyName", companyName); + + // SP 실행 (OUT 변수는 spParams에 담김: v_gl, v_gm, v_gs) + constructionProjectManagementMapper.spGetMasterCompanyDistrict(spParams); + + String v_gl = (String) spParams.get("v_gl"); + String v_gm = (String) spParams.get("v_gm"); + String v_gs = (String) spParams.get("v_gs"); + + // [필터링 조건] v_gl이 '01'인 경우에만 처리 + if ("01".equals(v_gl)) { + + // C. 해당 지역코드로 건설현장 수 카운트 + HashMap countParams = new HashMap<>(); + countParams.put("v_gl", v_gl); + countParams.put("v_gm", v_gm); + countParams.put("v_gs", v_gs); + + int siteCount = constructionProjectManagementMapper.selectSiteCountByDistrictCodes(countParams); + + // 그래프용 데이터 저장 (기관명, 건수, 정렬용 코드들) + Map stat = new HashMap<>(); + stat.put("name", companyName); + stat.put("count", siteCount); + stat.put("gl", v_gl); + stat.put("gm", v_gm); + stat.put("gs", v_gs); + + institutionStats.add(stat); + + // 부산 지역 합계 누적 + busanTotalCount += siteCount; + } + } + + // [정렬] GL_CODE ASC, GM_CODE ASC, GS_CODE ASC 순서로 정렬 + Collections.sort(institutionStats, new Comparator>() { + @Override + public int compare(Map o1, Map o2) { + String gl1 = (String) o1.get("gl"); + String gl2 = (String) o2.get("gl"); + int result = compareString(gl1, gl2); + if (result != 0) return result; + + String gm1 = (String) o1.get("gm"); + String gm2 = (String) o2.get("gm"); + result = compareString(gm1, gm2); + if (result != 0) return result; + + String gs1 = (String) o1.get("gs"); + String gs2 = (String) o2.get("gs"); + return compareString(gs1, gs2); + } + + // null-safe string comparison + private int compareString(String s1, String s2) { + if (s1 == null) s1 = ""; + if (s2 == null) s2 = ""; + return s1.compareTo(s2); + } + }); + } + + // 결과 맵에 저장 (정렬된 리스트) + resultMap.put("institutionStats", institutionStats); + resultMap.put("busanCount", busanTotalCount); + + + // 3. 지역별 통계 조회 + List regionList = constructionProjectManagementMapper.selectRegionCount(params); + resultMap.put("regionList", regionList); + + // 4. 단계별 통계 조회 + List stageList = constructionProjectManagementMapper.selectStageCount(params); + Map stageCounts = new HashMap<>(); + + // 초기화 + stageCounts.put("feasibility", 0); + stageCounts.put("basicDesign", 0); + stageCounts.put("detailDesign", 0); + stageCounts.put("construction", 0); + stageCounts.put("completion", 0); + stageCounts.put("maintenance", 0); + + for (EgovMap map : stageList) { + String stateCode = String.valueOf(map.get("constStateCode")); + Integer cnt = Integer.parseInt(String.valueOf(map.get("cnt"))); + + if ("1".equals(stateCode)) stageCounts.put("feasibility", cnt); + else if ("2".equals(stateCode)) stageCounts.put("basicDesign", cnt); + else if ("3".equals(stateCode)) stageCounts.put("detailDesign", cnt); + else if ("4".equals(stateCode)) stageCounts.put("construction", cnt); + else if ("5".equals(stateCode)) stageCounts.put("completion", cnt); + else if ("6".equals(stateCode)) stageCounts.put("maintenance", cnt); + } + resultMap.put("stageCounts", stageCounts); + + // 5. 최근 입력된 건설현장 + params.put("firstIndex", 0); + params.put("recordCountPerPage", 5); + + List recentList = constructionProjectManagementMapper.selectRecentProjects(params); + resultMap.put("recentList", recentList); + + } catch (SQLException e) { + e.printStackTrace(); + throw new Exception("통계 데이터 조회 중 오류가 발생했습니다."); + } + + return resultMap; + } + +} \ No newline at end of file diff --git a/src/main/resources/geoinfo/sqlmap/mappers/admins/constructionProjectManagement/ConstructionProjectManagementMapper.xml b/src/main/resources/geoinfo/sqlmap/mappers/admins/constructionProjectManagement/ConstructionProjectManagementMapper.xml new file mode 100644 index 0000000..762fdec --- /dev/null +++ b/src/main/resources/geoinfo/sqlmap/mappers/admins/constructionProjectManagement/ConstructionProjectManagementMapper.xml @@ -0,0 +1,126 @@ + + + + + + + + + + AND A.CONST_NAME LIKE '%' || #{constName} || '%' + + + AND A.MASTER_COMPANY_NAME LIKE '%' || #{masterCompanyName} || '%' + + + AND A.MASTER_COMPANY_ADMIN LIKE '%' || #{masterCompanyAdmin} || '%' + + + AND A.MASTER_COMPANY_TEL LIKE '%' || #{masterCompanyTel} || '%' + + + AND A.CONST_TAG = #{constTag} + + + AND A.MASTER_COMPANY_O_CODE = #{masterCompanyOCode} + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp b/src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp index e0f516b..7f9de79 100644 --- a/src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp +++ b/src/main/webapp/WEB-INF/views/admins/constructionProjectManagement/construction-project-statistics-index.jsp @@ -3,175 +3,261 @@ <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> - - + + + + + + + + - - - + - - + // [1] 문서 로드 완료 시 초기 실행 + document.addEventListener("DOMContentLoaded", function() { + // 초기 로딩 시 검색 조건 없이 전체 통계 조회 + moveConstructionUserDetail(); + }); - - + // [3] 화면 갱신 함수 + function renderStatistics(data) { + // (1) 전체 등록 수 + var totalCountElem = document.getElementById("total-count"); + if(totalCountElem) totalCountElem.textContent = (data.totalCount || 0) + " 건"; - -

건설현장 통계

-
+ // (2) 지역별 통계 + var busanElem = document.getElementById("busan-count"); + var daeguElem = document.getElementById("daegu-count"); + var sejongElem = document.getElementById("sejong-count"); + + if(busanElem) busanElem.textContent = "0 건"; + if(daeguElem) daeguElem.textContent = "0 건"; + if(sejongElem) sejongElem.textContent = "0 건"; + // 서버에서 계산된 부산 카운트가 있으면 우선 적용 + if(data.busanCount !== undefined && busanElem) { + busanElem.textContent = data.busanCount + " 건"; + } -
-
-
-

검색

-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
- -
-
+ // 기존 리스트 기반 지역 카운트 (필요 시 사용) + if(data.regionList) { + data.regionList.forEach(function(item) { + var region = item.regionName || item.REGION_NAME || ""; + var count = item.cnt || item.CNT || 0; + + // 부산은 위에서 처리했으므로 제외하거나 중복 처리 가능 + if(region.indexOf("대구") >= 0 && daeguElem) daeguElem.textContent = count + " 건"; + else if(region.indexOf("세종") >= 0 && sejongElem) sejongElem.textContent = count + " 건"; + }); + } -

건설현장 등록 건수

-
-
-
-

전체 등록 수

-

12 건

-
-
-
-
-

부산광역시

-

12 건

-
-
-
-
-

대구광역시

-

0 건

-
-
-
-
-

세종특별자치시

-

0 건

-
-
-
+ // (3) 최근 입력된 건설현장 + var recentArea = document.getElementById("recent-project-area"); + var recentHtml = '

최근 입력된 건설현장

'; + + if(data.recentList && data.recentList.length > 0) { + data.recentList.forEach(function(project) { + var name = project.constName || project.CONST_NAME || ""; + var spot = project.projectStartSpot || project.PROJECT_START_SPOT || ""; + var spotShort = spot.split(" ")[0]; + recentHtml += '

' + name + ' - ' + spotShort + '

'; + }); + } else { + recentHtml += '

최근 등록된 데이터가 없습니다.

'; + } + recentHtml += '
' + + '
'; + if(recentArea) recentArea.innerHTML = recentHtml; -
-
-
-

최근 입력된 건설현장

-

부산 북항 재개발 사업 - 부산광역시

-

가덕도 신공항 건설공사 - 부산광역시

-

부산 에코델타시티 조성사업 - 부산광역시

-

동해남부선 복선전철화 사업 - 부산광역시

-

부산 도시철도 1호선 연장 공사 - 부산광역시

-
-
- -
-
-
-
-
-
-

단계별 건수

-

타당성조사 및 계획검토: 12건

-

기본설계: 0건

-

실시설계: 0건

-

시공중: 0건

-

준공: 0건

-

유지보수: 0건

-
-
-
-
-

프로젝트 연결률

-

부산광역시: 8.33%

-

대전광역시: 0%

-

세종특별자치시: 0%

-

서울특별시: 0%

-

대구광역시: 0%

-
-
- -
-
-
-
-
-
-
-
-

Text

-
-
-
-
-

Text

-
-
-
-
- -
+ // (4) 단계별 건수 차트 + updateStageChart(data.stageCounts || {}); + + // (5) [신규] 기관별 등록 건수 차트 업데이트 + updateInstitutionChart(data.institutionStats || []); + } -
- - + // 단계별 차트 그리기 + function updateStageChart(stageCounts) { + var chartData = [ + stageCounts.feasibility || 0, + stageCounts.basicDesign || 0, + stageCounts.detailDesign || 0, + stageCounts.construction || 0, + stageCounts.completion || 0, + stageCounts.maintenance || 0 + ]; + + var stageFeasElem = document.getElementById("stage-feasibility"); + if(stageFeasElem) stageFeasElem.textContent = (stageCounts.feasibility || 0) + "건"; + + var ctx = document.getElementById('myChart'); + if(!ctx) return; + + if (myChartInstance) myChartInstance.destroy(); + + myChartInstance = new Chart(ctx, { + type: 'bar', + data: { + labels: ['타당성조사', '기본설계', '실시설계', '시공중', '준공', '유지보수'], + datasets: [{ + label: '건설현장 단계별 건수', + data: chartData, + backgroundColor: 'rgba(54, 162, 235, 0.2)', + borderColor: 'rgba(54, 162, 235, 1)', + borderWidth: 1 + }] + }, + options: { scales: { y: { beginAtZero: true } } } + }); + } + + // [신규] 기관별 차트 그리기 함수 + function updateInstitutionChart(instStats) { + var ctx = document.getElementById('institutionChart'); + if(!ctx) return; + + if (instChartInstance) instChartInstance.destroy(); + + var labels = []; + var data = []; + + // 데이터 분리 및 라벨 보정 + instStats.forEach(function(stat) { + var name = stat.name; + + // [라벨 보정] '울산광역시' -> '한국도로공사' + if (name === '울산광역시') { + name = '한국도로공사'; + } + + labels.push(name); + data.push(stat.count); + }); + + instChartInstance = new Chart(ctx, { + type: 'bar', // 막대 그래프 + data: { + labels: labels, + datasets: [{ + label: '등록 건수', + data: data, + backgroundColor: 'rgba(75, 192, 192, 0.5)', // 색상 설정 + borderColor: 'rgba(75, 192, 192, 1)', + borderWidth: 1 + }] + }, + options: { + responsive: true, + maintainAspectRatio: false, + scales: { + y: { + beginAtZero: true, + ticks: { stepSize: 1 } // 정수 단위 표시 + } + }, + plugins: { + legend: { display: false }, // 범례 숨김 (단일 데이터셋이므로) + title: { + display: true, + text: '기관별 건설현장 등록 현황', + font: { size: 16 } + } + } + } + }); + } + + + + +

건설현장 통계

+
+
+
+
+ + +
+
+
+

기관별 등록 건수

+
+ +
+
+
+
+ +
+ +
+
+

최근 입력된 건설현장

+

로딩 중...

+
+
+ + +
+
+

단계별 건수

+

타당성조사 및 계획검토: 0건

+

기본설계: 0건

+

실시설계: 0건

+

시공중: 0건

+

준공: 0건

+

유지보수: 0건

+
+
+ + +
+
+ +
+
+
+ +
+
+
+
+ + \ No newline at end of file