건설현장 관리 > 발주기관 로그인 내역 메뉴 추가
parent
69b2ecd80b
commit
18fb65f078
|
|
@ -75,59 +75,6 @@ public class ConstructionProjectManagementController {
|
|||
return "admins/constructionProjectManagement/construction-project-statistics-index";
|
||||
}
|
||||
|
||||
/**
|
||||
* 건설현장 관리 > 발주기관 계정 화면
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/constructionProjectManagement/construction-user-mgmt-index.do")
|
||||
public String goConstructionUserMgmt(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** 2023.10.25 LHJ 검색조건 추가 : 가입기간 시작/종료날짜를 8자리 숫자로 입력하지 않았을 때 처리 **/
|
||||
String searchBgndt = (String) params.get("searchBgndt");
|
||||
if(searchBgndt == null || searchBgndt.length() != 8 || !searchBgndt.matches("[0-9]+")) {
|
||||
params.put("searchBgndt", "");
|
||||
}
|
||||
String searchEnddt = (String) params.get("searchEnddt");
|
||||
if(searchEnddt == null || searchEnddt.length() != 8 || !searchEnddt.matches("[0-9]+")) {
|
||||
params.put("searchEnddt", "");
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> resultList = masterService.selectInfoList(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/constructionProjectManagement/construction-user-mgmt-index";
|
||||
}
|
||||
|
||||
/**
|
||||
* 집합교육 추가
|
||||
* @param request
|
||||
|
|
@ -603,4 +550,110 @@ public class ConstructionProjectManagementController {
|
|||
return "admins/constructionProjectManagement/visit-training-approval-system";
|
||||
}
|
||||
|
||||
/**
|
||||
* 건설현장 관리 > 발주기관 계정 화면
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/constructionProjectManagement/construction-user-mgmt-index.do")
|
||||
public String goConstructionUserMgmt(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** 2023.10.25 LHJ 검색조건 추가 : 가입기간 시작/종료날짜를 8자리 숫자로 입력하지 않았을 때 처리 **/
|
||||
String searchBgndt = (String) params.get("searchBgndt");
|
||||
if(searchBgndt == null || searchBgndt.length() != 8 || !searchBgndt.matches("[0-9]+")) {
|
||||
params.put("searchBgndt", "");
|
||||
}
|
||||
String searchEnddt = (String) params.get("searchEnddt");
|
||||
if(searchEnddt == null || searchEnddt.length() != 8 || !searchEnddt.matches("[0-9]+")) {
|
||||
params.put("searchEnddt", "");
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> resultList = masterService.selectInfoList(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/constructionProjectManagement/construction-user-mgmt-index";
|
||||
}
|
||||
|
||||
/**
|
||||
* 건설현장 관리 > 발주기관 계정 화면
|
||||
* @param params
|
||||
* @param model
|
||||
* @param response
|
||||
* @param request
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "admins/constructionProjectManagement/construction-user-login-history.do")
|
||||
public String goConstructionUserloginHist(@RequestParam HashMap<String, Object> params, ModelMap model, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
if (!UserInfo.isValidSession(request, response, "admin")) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/** 2023.10.25 LHJ 검색조건 추가 : 가입기간 시작/종료날짜를 8자리 숫자로 입력하지 않았을 때 처리 **/
|
||||
String searchBgndt = (String) params.get("searchBgndt");
|
||||
if(searchBgndt == null || searchBgndt.length() != 8 || !searchBgndt.matches("[0-9]+")) {
|
||||
params.put("searchBgndt", "");
|
||||
}
|
||||
String searchEnddt = (String) params.get("searchEnddt");
|
||||
if(searchEnddt == null || searchEnddt.length() != 8 || !searchEnddt.matches("[0-9]+")) {
|
||||
params.put("searchEnddt", "");
|
||||
}
|
||||
|
||||
/** pageing */
|
||||
PaginationInfo paginationInfo = new PaginationInfo();
|
||||
|
||||
if (params.get("pageIndex") == null || "".equals(params.get("pageIndex"))) {
|
||||
paginationInfo.setCurrentPageNo(1);
|
||||
params.put("pageIndex", 1);
|
||||
} else {
|
||||
paginationInfo.setCurrentPageNo(Integer.valueOf((String) params.get("pageIndex")));
|
||||
}
|
||||
|
||||
paginationInfo.setRecordCountPerPage(10);
|
||||
paginationInfo.setPageSize(10);
|
||||
|
||||
params.put("firstRecordIndex", paginationInfo.getFirstRecordIndex());
|
||||
params.put("recordCountPerPage", paginationInfo.getRecordCountPerPage());
|
||||
|
||||
List<?> resultList = masterService.selectUserLoginHistory(params);
|
||||
|
||||
int totalCnt = resultList.size() == 0 ? 0 : Integer.valueOf(((EgovMap) resultList.get(0)).get("totalrows").toString());
|
||||
paginationInfo.setTotalRecordCount(totalCnt);
|
||||
|
||||
model.addAttribute("params", params);
|
||||
model.addAttribute("resultList", resultList);
|
||||
model.addAttribute("paginationInfo", paginationInfo);
|
||||
|
||||
return "admins/constructionProjectManagement/construction-user-login-history";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,5 @@ public interface GeneralUserMngMapper {
|
|||
|
||||
public void updateUserPassInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
public List<?> selectUserLoginHistory(HashMap<String, Object> params) throws Exception;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,5 +46,6 @@ public interface GeneralUserMngService {
|
|||
|
||||
public void updateUserPassInfo(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
|
||||
public List<?> selectUserLoginHistory(HashMap<String, Object> params) throws Exception;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,4 +113,9 @@ public class GeneralUserMngServiceImpl implements GeneralUserMngService {
|
|||
masterMapper.updateUserPassInfo(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<?> selectUserLoginHistory(HashMap<String, Object> params) throws Exception {
|
||||
return masterMapper.selectUserLoginHistory(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -428,5 +428,30 @@
|
|||
userid = #{userId}
|
||||
]]>
|
||||
</update>
|
||||
|
||||
<select id="selectUserLoginHistory" parameterType="map" resultType="egovMap">
|
||||
SELECT
|
||||
NUM
|
||||
,USERID
|
||||
,USER_NAME
|
||||
,COMPANY_NAME
|
||||
,DATETIME
|
||||
,"note"
|
||||
,TOTALROWS
|
||||
FROM (
|
||||
SELECT wmi.USERID
|
||||
,wmi.USER_NAME
|
||||
,wmi.COMPANY_NAME
|
||||
,wrl.DATETIME
|
||||
,'로그인' AS "note"
|
||||
,ROW_NUMBER() OVER (ORDER BY wrl.DATETIME DESC, wmi.USERID) AS NUM
|
||||
,TO_CHAR(LAST_VALUE(ROWNUM) OVER (ORDER BY ROWNUM ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING)) AS TOTALROWS
|
||||
FROM WEB_REQUEST_LOG wrl
|
||||
LEFT JOIN WEB_MEMBER_IN wmi ON wrl.USERID = wmi.USERID
|
||||
WHERE wmi.CLS = 2)
|
||||
<!--<![CDATA[
|
||||
WHERE NUM <= #{firstRecordIndex} + #{recordCountPerPage} AND NUM > #{firstRecordIndex}
|
||||
]]> -->
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<script src="${pageContext.request.contextPath}/js/jquery/jquery-1.10.2.min.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/js/admins/common.js"></script>
|
||||
<link rel="stylesheet" HREF="${pageContext.request.contextPath}/css/admins/style.css" type="text/css">
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var searchTitle = document.getElementById('searchTitle');
|
||||
var searchValue = document.getElementById('searchValue');
|
||||
var searchContainer = searchValue.parentNode;
|
||||
var tildeText = document.createElement('span');
|
||||
tildeText.innerHTML = '~';
|
||||
var searchBgndt = document.createElement('input');
|
||||
var searchEnddt = document.createElement('input');
|
||||
|
||||
function createInput(input, id) {
|
||||
input.type = 'text';
|
||||
input.id = id;
|
||||
input.name = id;
|
||||
input.className = 'search';
|
||||
input.style.display = 'inline-block';
|
||||
input.style.width = '12ch';
|
||||
input.placeholder = 'YYYYMMDD';
|
||||
input.style.color = '#000'; // Text color
|
||||
input.maxLength = 8; // Limit input length
|
||||
input.onfocus = function() {
|
||||
this.placeholder = '';
|
||||
this.style.color = '#000'; // Text color
|
||||
};
|
||||
input.onblur = function() {
|
||||
if (this.value === '') {
|
||||
this.placeholder = 'YYYYMMDD';
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
createInput(searchBgndt, 'searchBgndt');
|
||||
createInput(searchEnddt, 'searchEnddt');
|
||||
searchBgndt.style.marginRight = '2px';
|
||||
searchEnddt.style.marginLeft = '2px';
|
||||
searchBgndt.value = "${params.searchBgndt}";
|
||||
searchEnddt.value = "${params.searchEnddt}";
|
||||
|
||||
function addInputs() {
|
||||
searchValue.style.display = 'none';
|
||||
searchContainer.insertBefore(searchBgndt, searchValue);
|
||||
searchContainer.insertBefore(tildeText, searchValue);
|
||||
searchContainer.insertBefore(searchEnddt, searchValue);
|
||||
}
|
||||
|
||||
function removeInputs() {
|
||||
if (document.getElementById('searchBgndt')) {
|
||||
searchBgndt.remove();
|
||||
tildeText.remove();
|
||||
searchEnddt.remove();
|
||||
}
|
||||
searchValue.style.display = 'inline-block';
|
||||
}
|
||||
|
||||
if (searchTitle.value == '7') {
|
||||
addInputs();
|
||||
}
|
||||
|
||||
searchTitle.addEventListener('change', function() {
|
||||
if (this.value == '7') {
|
||||
addInputs();
|
||||
} else {
|
||||
removeInputs();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var context = "${pageContext.request.contextPath}";
|
||||
|
||||
function linkPage(index){
|
||||
$("#pageIndex").val(index);
|
||||
$("#searchForm").attr("action", "${pageContext.request.contextPath}/admins/user/02.do").submit();
|
||||
}
|
||||
|
||||
/* function excelDownload(){
|
||||
$("#searchForm").attr("action", "${pageContext.request.contextPath}/admins/user/02_excel.do").submit();
|
||||
$("#searchForm").attr("action", "${pageContext.request.contextPath}/admins/user/02.do");
|
||||
}
|
||||
*/
|
||||
$(function(){
|
||||
var searchTitle = "${params.searchTitle}";
|
||||
searchTitle = searchTitle == "" ? "0" : searchTitle;
|
||||
$("#searchTitle").val(searchTitle);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<form id="searchForm" name="searchForm" method="post">
|
||||
<input type="hidden" id="pageIndex" name="pageIndex" value="${params.pageIndex}" />
|
||||
<table id="Table_Main" width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan=2><div style="background: #fff; border-radius: 12px; padding: 5px 10px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.05);"><h3>발주기관 로그인 내역</h3></div></td>
|
||||
</tr>
|
||||
<tr height=20 colspan=2><td> </td></tr>
|
||||
<%-- <tr height=25>
|
||||
<!-- START : 엑셀 다운로드 ------------------------------------------------------------------------->
|
||||
<td>
|
||||
<img src="${pageContext.request.contextPath}/images/admins/excel.gif" style="cursor:hand" onClick="javascript:excelDownload()"></td>
|
||||
<!-- END : 엑셀 다운로드 ------------------------------------------------------------------------->
|
||||
<!-- START : 검색 ---------------------------------------------------------------------------------->
|
||||
<td align="right" class="search">
|
||||
<select id="searchTitle" name="searchTitle">
|
||||
<option value="0" selected>전체</option>
|
||||
<option value="2">아이디</option>
|
||||
<option value="1">이름</option>
|
||||
<option value="4">회사명</option>
|
||||
<option value="3">업종</option>
|
||||
<option value="6">사업자등록번호</option>
|
||||
<option value="5">이메일</option>
|
||||
<option value="7">가입기간</option>
|
||||
</select>
|
||||
<input type="text" class="search" id="searchValue" name="searchValue" value="${params.searchValue}" />
|
||||
<input type="image" src="${pageContext.request.contextPath}/images/admins/search.gif" align="absmiddle">
|
||||
</td>
|
||||
<!-- END : 검색 ---------------------------------------------------------------------------------->
|
||||
</tr>--%>
|
||||
<tr height=12><td colspan=2><img src="${pageContext.request.contextPath}/images/admins/spacer.gif" width="1" height="12"></td></tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<tbody>
|
||||
<table id="Table_List" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D6D6D6">
|
||||
<!-- START : list head ----------------------------------------------------------------------------->
|
||||
<tr height=28 bgcolor="#FBF4E4" class="list_head" align="center">
|
||||
<td width="4%">번호</td>
|
||||
<td width="12%">아이디</td>
|
||||
<td width="8%">이름</td>
|
||||
<td width="13%">소속</td>
|
||||
<td width="13%">로그인일시</td>
|
||||
<td width="8%">로그인여부</td>
|
||||
</tr>
|
||||
<!-- END : list head ----------------------------------------------------------------------------->
|
||||
|
||||
<!-- REPEAT TABLE -->
|
||||
<c:forEach items="${resultList}" var="resultList" varStatus="status">
|
||||
<tr height=28 bgcolor="#FFFFFF" class="list_content" align="center">
|
||||
<td>${resultList.num}</td>
|
||||
<td>${resultList.userid}</td>
|
||||
<td>${resultList.userName}</td>
|
||||
<td>${resultList.companyName}</td>
|
||||
<td><fmt:formatDate value="${resultList.datetime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
|
||||
<td>${resultList.note}</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
<!-- END OF REPEAT TABLE -->
|
||||
</table>
|
||||
</tbody>
|
||||
</td>
|
||||
</tr>
|
||||
<tr height=42>
|
||||
<!-- START : 네비게이션 ---------------------------------------------------------------------------->
|
||||
<!-- <td align=center class="navi" colspan='2'> -->
|
||||
<!-- <table width=100% > -->
|
||||
<!-- <tr align="center"> -->
|
||||
<!-- <td> -->
|
||||
<!-- REPEAT LINK -->
|
||||
<%-- <ui:pagination paginationInfo = "${paginationInfo}" type="image" jsFunction="linkPage"/> --%>
|
||||
<!-- END OF REPEAT LINK -->
|
||||
<!-- </td> -->
|
||||
<!-- </tr> -->
|
||||
<!-- </table> -->
|
||||
<!-- </td> -->
|
||||
<!-- END : 네비게이션 ---------------------------------------------------------------------------->
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue