통계 작업중. 중간저장.

master
강석 최 2023-09-04 18:09:07 +09:00
parent b9e4d5b33f
commit f0c5318b67
8 changed files with 41 additions and 23 deletions

View File

@ -406,7 +406,6 @@ public class UnlawfulFishingController {
break; break;
case "type2": case "type2":
mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType2(params)); mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType2(params));
mav.addObject("organConfigList", organConfigService.selectOrganListToUnlawfulFishingStatistics());
break; break;
case "type3": case "type3":
mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType3(params)); mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType3(params));

View File

@ -15,6 +15,7 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
public class StatisticsModel{ public class StatisticsModel{
private String type; private String type;
private String yearStr=""; private String yearStr="";
private Integer year; private Integer year;
private Integer captureCnt=0; private Integer captureCnt=0;
@ -33,4 +34,8 @@ public class StatisticsModel{
private Integer forfeitCnt=0; private Integer forfeitCnt=0;
private Integer disposeCnt=0; private Integer disposeCnt=0;
private String etc=""; private String etc="";
private String fieldIvsgt;
private String crackdownPolice;
} }

View File

@ -328,7 +328,12 @@ public class UnlawfulFishingService {
return statisticsList; return statisticsList;
} }
public List<StatisticsModel> selectStatisticsListType2(StatisticsModel params) { public List<StatisticsModel> selectStatisticsListType2(StatisticsModel params) {
return unlawfulFishingMapper.selectStatisticsListType2(params); List<StatisticsModel> statisticsList = unlawfulFishingMapper.selectStatisticsListType2(params);
for(StatisticsModel stat: statisticsList){
}
return statisticsList;
} }
public List<StatisticsModel> selectStatisticsListType3(StatisticsModel params) { public List<StatisticsModel> selectStatisticsListType3(StatisticsModel params) {
return unlawfulFishingMapper.selectStatisticsListType3(params); return unlawfulFishingMapper.selectStatisticsListType3(params);

View File

@ -452,6 +452,14 @@
order by year desc order by year desc
</select> </select>
<select id="selectStatisticsListType2" parameterType="StatisticsModel" resultType="StatisticsModel"> <select id="selectStatisticsListType2" parameterType="StatisticsModel" resultType="StatisticsModel">
select
a.field_ivsgt,
a.crackdown_police,
count(*) as captureCnt
from crackdown_info a
inner join illegal_ship_info b on a.cds_key = b.cds_key
where EXTRACT(YEAR FROM a.napo_dt) = ${year}
group by a.field_ivsgt, a.crackdown_police
</select> </select>
<select id="selectStatisticsListType3" parameterType="StatisticsModel" resultType="StatisticsModel"> <select id="selectStatisticsListType3" parameterType="StatisticsModel" resultType="StatisticsModel">
</select> </select>

View File

@ -1,4 +1,4 @@
$(document).on('click', '.nav-item', function (event){ $(document).on('click', '.statTab', function (event){
location.href = "/unlawfulFishing/statistics?type="+event.target.id.replace("Tab", ""); location.href = "/unlawfulFishing/statistics?type="+event.target.id.replace("Tab", "");
}) })

View File

@ -124,7 +124,7 @@ function addTr(tbody){
'<option value="">선택해주세요</option>' + '<option value="">선택해주세요</option>' +
options+ options+
'</select></td>' + '</select></td>' +
'<td><input type="checkbox" class="cpChk"> </td>' + /*'<td><input type="checkbox" class="cpChk"> </td>' +*/
'</tr>' '</tr>'
) )
} }
@ -141,7 +141,7 @@ function setUsedOrganTr(parentOrgan, organType){
'<td><select class="organSelector form-select-sm">' + '<td><select class="organSelector form-select-sm">' +
'<option value="'+organ.organCd+'">'+organ.organNm+'</option>' + '<option value="'+organ.organCd+'">'+organ.organNm+'</option>' +
'</select></td>' + '</select></td>' +
(organType!=="OGC002"?'<td><input type="checkbox" class="cpChk"' + (organ.cpChk==="T"?'checked':'') + '> </td>':'') + /*(organType!=="OGC002"?'<td><input type="checkbox" class="cpChk"' + (organ.cpChk==="T"?'checked':'') + '> </td>':'') +*/
'</tr>' '</tr>'
) )
} }

View File

@ -48,7 +48,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-3"> <div class="col-2"><!--col-3-->
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="row"> <div class="row">
@ -57,7 +57,6 @@
<tr> <tr>
<th></th> <th></th>
<th>관할서</th> <th>관할서</th>
<th>불법조업 외국어선<br>단속 여부</th>
</tr> </tr>
</thead> </thead>
<tbody id="bottomTbody"> <tbody id="bottomTbody">

View File

@ -7,7 +7,9 @@
</th:block> </th:block>
<th:block layout:fragment="css"> <th:block layout:fragment="css">
<style> <style>
.etc{
word-break: break-all;
}
</style> </style>
</th:block> </th:block>
<div layout:fragment="content"> <div layout:fragment="content">
@ -26,13 +28,13 @@
<div class="col-12 card bg-light"> <div class="col-12 card bg-light">
<div class="card-body"> <div class="card-body">
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation"> <li class="nav-item statTab" role="presentation">
<button class="nav-link" th:classappend="${searchParams.type eq 'type1'?'active':''}" id="type1Tab" data-bs-toggle="tab" type="button" role="tab">통계1</button> <button class="nav-link" th:classappend="${searchParams.type eq 'type1'?'active':''}" id="type1Tab" data-bs-toggle="tab" type="button" role="tab">통계1</button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item statTab" role="presentation">
<button class="nav-link" th:classappend="${searchParams.type eq 'type2'?'active':''}" id="type2Tab" data-bs-toggle="tab" type="button" role="tab">통계2</button> <button class="nav-link" th:classappend="${searchParams.type eq 'type2'?'active':''}" id="type2Tab" data-bs-toggle="tab" type="button" role="tab">통계2</button>
</li> </li>
<li class="nav-item" role="presentation"> <li class="nav-item statTab" role="presentation">
<button class="nav-link" th:classappend="${searchParams.type eq 'type3'?'active':''}" id="type3Tab" data-bs-toggle="tab" type="button" role="tab">통계3</button> <button class="nav-link" th:classappend="${searchParams.type eq 'type3'?'active':''}" id="type3Tab" data-bs-toggle="tab" type="button" role="tab">통계3</button>
</li> </li>
</ul> </ul>
@ -106,25 +108,25 @@
<th:block th:if="${searchParams.type eq 'type2'}"> <th:block th:if="${searchParams.type eq 'type2'}">
<colgroup> <colgroup>
<col style="width: 10%"> <col style="width: 10%">
<th:block th:each="num : ${#numbers.sequence(1,12)}"> <th:block th:each="code:${session.commonCode.get('CPO')}">
<col style="width: 7.5%"> <col th:style="|width:${90/#lists.size(session.commonCode.get('CPO'))}%|">
</th:block> </th:block>
</colgroup> </colgroup>
<thead class="align-middle text-center"> <thead class="align-middle text-center">
<tr class="table-secondary"> <tr class="table-secondary">
<th rowspan="2">구분</th> <th>구분</th>
<th:block th:each="parent:${organConfigList}"> <th:block th:each="code:${session.commonCode.get('CPO')}">
<th th:colspan="${#lists.size(parent.childList)}" th:text="${parent.organNm}"></th> <th th:if="${code.useChk eq 'T'}" th:text="${code.itemValue}"></th>
</th:block>
</tr>
<tr class="table-secondary">
<th:block th:each="parent:${organConfigList}">
<th:block th:each="child:${parent.childList}">
<th th:text="${child.organNm}"></th>
</th:block>
</th:block> </th:block>
</tr> </tr>
</thead> </thead>
<tbody>
<tr>
<!--<th:block th:each="${}">
</th:block>-->
</tr>
</tbody>
</th:block> </th:block>
<th:block th:if="${searchParams.type eq 'type3'}"> <th:block th:if="${searchParams.type eq 'type3'}">