Compare commits
2 Commits
0b037c1a75
...
ee1f36f263
| Author | SHA1 | Date |
|---|---|---|
|
|
ee1f36f263 | |
|
|
425920e8e2 |
|
|
@ -94,17 +94,26 @@ public class AdminController {
|
||||||
model.addAttribute("standFieldData", standFieldData);
|
model.addAttribute("standFieldData", standFieldData);
|
||||||
|
|
||||||
// 일, 월 방문자 수
|
// 일, 월 방문자 수
|
||||||
BaseSearchVO searchVO = new BaseSearchVO();
|
/*BaseSearchVO searchVO = new BaseSearchVO();
|
||||||
LocalDate searchStartDate = LocalDate.now();
|
LocalDate searchStartDate = LocalDate.now();
|
||||||
searchVO.setSearchStartDate(searchStartDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
searchVO.setSearchStartDate(searchStartDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
searchVO.setSearchEndDate(searchStartDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
searchVO.setSearchEndDate(searchStartDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
model.addAttribute("dayLoginCount", logService.selectLoginCnt(searchVO));
|
model.addAttribute("dayLoginCount", logService.selectLoginCnt(searchVO));
|
||||||
searchVO.setSearchStartDate(searchStartDate.minusMonths(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
searchVO.setSearchStartDate(searchStartDate.minusMonths(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
model.addAttribute("monthLoginCount", logService.selectLoginCnt(searchVO));
|
model.addAttribute("monthLoginCount", logService.selectLoginCnt(searchVO));*/
|
||||||
|
|
||||||
|
UseHistorySearchVO useHistorySearchVO = new UseHistorySearchVO();
|
||||||
|
LocalDate searchStartDate = LocalDate.now();
|
||||||
|
useHistorySearchVO.setSearchStartDate(searchStartDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
|
useHistorySearchVO.setSearchEndDate(searchStartDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
|
model.addAttribute("userVisitDay", useHistoryService.selectUseVisit(useHistorySearchVO));
|
||||||
|
useHistorySearchVO.setSearchStartDate(searchStartDate.minusMonths(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
|
model.addAttribute("userVisitMonth", useHistoryService.selectUseVisit(useHistorySearchVO));
|
||||||
|
|
||||||
|
|
||||||
//일별 지도사용 수
|
//일별 지도사용 수
|
||||||
UseHistorySearchVO useHistorySearchVO = new UseHistorySearchVO();
|
useHistorySearchVO = new UseHistorySearchVO();
|
||||||
useHistorySearchVO.setSearchEndDate(searchVO.getSearchEndDate());
|
useHistorySearchVO.setSearchEndDate(searchStartDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
useHistorySearchVO.setSearchStartDate(searchStartDate.minusDays(14).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
useHistorySearchVO.setSearchStartDate(searchStartDate.minusDays(14).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
|
||||||
List<ChartVO> dayMapUseDataList = useHistoryService.selectDayMapUseData(useHistorySearchVO);
|
List<ChartVO> dayMapUseDataList = useHistoryService.selectDayMapUseData(useHistorySearchVO);
|
||||||
model.addAttribute("dayMapUseDataList", dayMapUseDataList);
|
model.addAttribute("dayMapUseDataList", dayMapUseDataList);
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,8 @@ public interface UseHistoryMapper {
|
||||||
int selectUseHistoryCnt(UseHistorySearchVO useHistorySearchVO);
|
int selectUseHistoryCnt(UseHistorySearchVO useHistorySearchVO);
|
||||||
|
|
||||||
List<ChartVO> selectDayMapUseData(UseHistorySearchVO useHistorySearchVO);
|
List<ChartVO> selectDayMapUseData(UseHistorySearchVO useHistorySearchVO);
|
||||||
|
|
||||||
|
|
||||||
|
int selectUseVisit(UseHistorySearchVO useHistorySearchVO); // 방문자수
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import com.mca.cmmn.vo.BaseSearchVO;
|
||||||
import com.mca.map.vo.ChartVO;
|
import com.mca.map.vo.ChartVO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.mca.map.mapper.UseHistoryMapper;
|
import com.mca.map.mapper.UseHistoryMapper;
|
||||||
|
|
@ -29,4 +30,12 @@ public class UseHistoryService {
|
||||||
public List<ChartVO> selectDayMapUseData(UseHistorySearchVO useHistorySearchVO) {
|
public List<ChartVO> selectDayMapUseData(UseHistorySearchVO useHistorySearchVO) {
|
||||||
return useHistoryMapper.selectDayMapUseData(useHistorySearchVO);
|
return useHistoryMapper.selectDayMapUseData(useHistorySearchVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 방문자수.
|
||||||
|
public int selectUseVisit(UseHistorySearchVO useHistorySearchVO) {
|
||||||
|
return useHistoryMapper.selectUseVisit(useHistorySearchVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,13 @@ public class UseHistorySearchVO extends BaseSearchVO{
|
||||||
private String company;
|
private String company;
|
||||||
private String area;
|
private String area;
|
||||||
|
|
||||||
|
private int useVisit;
|
||||||
|
|
||||||
|
public int getUseVisit() {
|
||||||
|
return useVisit;
|
||||||
|
}
|
||||||
|
public void setUseVisit(int useVisit) { this.useVisit = useVisit; }
|
||||||
|
|
||||||
public String getUserid() {
|
public String getUserid() {
|
||||||
return userid;
|
return userid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,18 @@
|
||||||
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
LIMIT #{recordCountPerPage} OFFSET #{firstIndex}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 방문자수-->
|
||||||
|
<select id="selectUseVisit" parameterType="useHistorySearchVO" resultType="int">
|
||||||
|
SELECT
|
||||||
|
COUNT(*)
|
||||||
|
FROM
|
||||||
|
map_use_history
|
||||||
|
WHERE
|
||||||
|
log_type = '0'
|
||||||
|
AND log_date >= CONCAT(#{searchStartDate}, ' 00:00:00')
|
||||||
|
AND log_date <= CONCAT(#{searchEndDate}, ' 23:59:59')
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectUseHistoryCnt" resultType="int" >
|
<select id="selectUseHistoryCnt" resultType="int" >
|
||||||
SELECT
|
SELECT
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<p class="mb-0 text-black-50">오늘 방문자 수</p>
|
<p class="mb-0 text-black-50">오늘 방문자 수</p>
|
||||||
<h3><c:out value="${dayLoginCount}"/></h3>
|
<h3><c:out value="${userVisitDay}"/></h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card my-2">
|
<div class="card my-2">
|
||||||
|
|
@ -79,7 +80,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<p class="mb-0 text-black-50">최근 한달 방문자 수</p>
|
<p class="mb-0 text-black-50">최근 한달 방문자 수</p>
|
||||||
<h3><c:out value="${monthLoginCount}"/></h3>
|
<h3><c:out value="${userVisitMonth}"/></h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -15,117 +15,54 @@
|
||||||
<form:form commandName="UseHistorySearchVO" name="searchForm" action="/admin/history" method="get">
|
<form:form commandName="UseHistorySearchVO" name="searchForm" action="/admin/history" method="get">
|
||||||
|
|
||||||
<div class="row justify-content-end bg-white mx-3 py-2">
|
<div class="row justify-content-end bg-white mx-3 py-2">
|
||||||
<div class="col-12 col-sm-4 row">
|
<div class="col-auto row">
|
||||||
<div class="col-12 col-sm-4">
|
<div class="col-auto">
|
||||||
<select class="form-select" name="searchCondition">
|
<select class="form-select" name="searchCondition">
|
||||||
<option value="all" ${UseHistorySearchVO.searchCondition eq 'all'?'selected':''}>통합검색</option>
|
<option value="all" ${UseHistorySearchVO.searchCondition eq 'all'?'selected':''}>통합검색</option>
|
||||||
<option value="name" ${UseHistorySearchVO.searchCondition eq 'name'?'selected':''}>이름</option>
|
<option value="name" ${UseHistorySearchVO.searchCondition eq 'name'?'selected':''}>이름</option>
|
||||||
<option value="company" ${UseHistorySearchVO.searchCondition eq 'company'?'selected':''}>소속</option>
|
<option value="company" ${UseHistorySearchVO.searchCondition eq 'company'?'selected':''}>소속</option>
|
||||||
<option value="req_area" ${UseHistorySearchVO.searchCondition eq 'req_area'?'selected':''}>위치</option>
|
<option value="req_area" ${UseHistorySearchVO.searchCondition eq 'req_area'?'selected':''}>위치</option>
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" class="form-control" name="searchKeyword" value="${UseHistorySearchVO.searchKeyword}"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input class="btn btn-outline-secondary" type="submit" value="검색"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-8 col-sm-5">
|
|
||||||
<input type="text" class="form-control" name="searchKeyword" value="${UseHistorySearchVO.searchKeyword}"/>
|
|
||||||
</div>
|
|
||||||
<div class="col-4 col-sm-3">
|
|
||||||
<input class="btn btn-outline-secondary w-100" type="submit" value="검색"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row m-3 p-2 bg-white">
|
<div class="row m-3 p-2 bg-white">
|
||||||
<div class="col-12 d-none d-sm-block">
|
|
||||||
<table class="table table-hover text-center">
|
<table class="table table-hover text-center">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
|
||||||
<th>소속</th>
|
|
||||||
<th>담당자</th>
|
|
||||||
<th>동작</th>
|
|
||||||
<th>위치</th>
|
|
||||||
<th>날짜</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<c:if test="${count >= 1}">
|
|
||||||
<c:forEach var="item" items="${useHistoryList}">
|
|
||||||
<tr>
|
|
||||||
<td><c:out value="${item.company}"/></td>
|
|
||||||
<td><c:out value="${item.name}"/></td>
|
|
||||||
<td>
|
|
||||||
<c:choose>
|
|
||||||
<c:when test="${item.log_type eq '0'}">
|
|
||||||
<span class="status-bar status-success w-50 mx-auto">로그인</span>
|
|
||||||
</c:when>
|
|
||||||
<c:when test="${item.log_type eq '1'}">
|
|
||||||
<span class="status-bar status-danger w-50 mx-auto">로그아웃</span>
|
|
||||||
</c:when>
|
|
||||||
<c:when test="${item.log_type eq '2'}">
|
|
||||||
<span class="status-bar status-warning w-50 mx-auto">지도사용</span>
|
|
||||||
</c:when>
|
|
||||||
</c:choose>
|
|
||||||
</td>
|
|
||||||
<td><c:out value="${item.reqArea}"/></td>
|
|
||||||
<td class="td_date"><c:out value="${item.logDate}"/></td>
|
|
||||||
</tr>
|
|
||||||
</c:forEach>
|
|
||||||
</c:if>
|
|
||||||
<c:if test="${count == 0}">
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5">요청한 목록이 없습니다.</td>
|
<th>위치</th>
|
||||||
|
<th>소속</th>
|
||||||
|
<th>담당자</th>
|
||||||
|
<th>날짜</th>
|
||||||
</tr>
|
</tr>
|
||||||
</c:if>
|
</thead>
|
||||||
</tbody>
|
<tbody>
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 d-block d-sm-none">
|
|
||||||
<table class="table table-hover text-center">
|
|
||||||
<tbody class="border-0 border-top border-bottom border-2 border-dark">
|
|
||||||
<c:if test="${count >= 1}">
|
<c:if test="${count >= 1}">
|
||||||
<c:forEach var="item" items="${useHistoryList}">
|
<c:forEach var="item" items="${useHistoryList}">
|
||||||
<tr class="border-bottom">
|
<tr>
|
||||||
<th class="bg-secondary" style="--bs-bg-opacity: .5">소속</th>
|
<td><c:out value="${item.reqArea}"/></td>
|
||||||
<td><c:out value="${item.company}"/></td>
|
<td><c:out value="${useVisit}"/></td>
|
||||||
</tr>
|
<td><c:out value="${item.company}"/></td>
|
||||||
<tr class="border-bottom">
|
<td><c:out value="${item.name}"/></td>
|
||||||
<th class="bg-secondary" style="--bs-bg-opacity: .5">담당자</th>
|
<td class="td_date"><c:out value="${item.logDate}"/></td>
|
||||||
<td><c:out value="${item.name}"/></td>
|
</tr>
|
||||||
</tr>
|
</c:forEach>
|
||||||
<tr class="border-bottom">
|
|
||||||
<th class="bg-secondary" style="--bs-bg-opacity: .5">동작</th>
|
|
||||||
<td>
|
|
||||||
<c:choose>
|
|
||||||
<c:when test="${item.log_type eq '0'}">
|
|
||||||
<span class="status-bar status-success">로그인</span>
|
|
||||||
</c:when>
|
|
||||||
<c:when test="${item.log_type eq '1'}">
|
|
||||||
<span class="status-bar status-danger">로그아웃</span>
|
|
||||||
</c:when>
|
|
||||||
<c:when test="${item.log_type eq '2'}">
|
|
||||||
<span class="status-bar status-warning">지도사용</span>
|
|
||||||
</c:when>
|
|
||||||
</c:choose>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="border-bottom">
|
|
||||||
<th class="bg-secondary" style="--bs-bg-opacity: .5">위치</th>
|
|
||||||
<td><c:out value="${item.reqArea}"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr class="border-0 border-bottom border-2 border-dark">
|
|
||||||
<th class="bg-secondary" style="--bs-bg-opacity: .5">날짜</th>
|
|
||||||
<td class="td_date"><c:out value="${item.logDate}"/></td>
|
|
||||||
</tr>
|
|
||||||
</c:forEach>
|
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${count == 0}">
|
<c:if test="${count == 0}">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5">요청한 목록이 없습니다.</td>
|
<td colspan="5">요청한 목록이 없습니다.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:if>
|
</c:if>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-page">
|
<div class="text-page">
|
||||||
<form:hidden path="pageIndex"/></form:form>
|
<form:hidden path="pageIndex"/></form:form>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue