통계 작업중. 중간저장.

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;
case "type2":
mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType2(params));
mav.addObject("organConfigList", organConfigService.selectOrganListToUnlawfulFishingStatistics());
break;
case "type3":
mav.addObject("statisticsList", unlawfulFishingService.selectStatisticsListType3(params));

View File

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

View File

@ -328,7 +328,12 @@ public class UnlawfulFishingService {
return statisticsList;
}
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) {
return unlawfulFishingMapper.selectStatisticsListType3(params);

View File

@ -452,6 +452,14 @@
order by year desc
</select>
<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 id="selectStatisticsListType3" parameterType="StatisticsModel" resultType="StatisticsModel">
</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", "");
})

View File

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

View File

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

View File

@ -7,7 +7,9 @@
</th:block>
<th:block layout:fragment="css">
<style>
.etc{
word-break: break-all;
}
</style>
</th:block>
<div layout:fragment="content">
@ -26,13 +28,13 @@
<div class="col-12 card bg-light">
<div class="card-body">
<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>
</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>
</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>
</li>
</ul>
@ -106,25 +108,25 @@
<th:block th:if="${searchParams.type eq 'type2'}">
<colgroup>
<col style="width: 10%">
<th:block th:each="num : ${#numbers.sequence(1,12)}">
<col style="width: 7.5%">
<th:block th:each="code:${session.commonCode.get('CPO')}">
<col th:style="|width:${90/#lists.size(session.commonCode.get('CPO'))}%|">
</th:block>
</colgroup>
<thead class="align-middle text-center">
<tr class="table-secondary">
<th rowspan="2">구분</th>
<th:block th:each="parent:${organConfigList}">
<th th:colspan="${#lists.size(parent.childList)}" th:text="${parent.organNm}"></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>구분</th>
<th:block th:each="code:${session.commonCode.get('CPO')}">
<th th:if="${code.useChk eq 'T'}" th:text="${code.itemValue}"></th>
</th:block>
</tr>
</thead>
<tbody>
<tr>
<!--<th:block th:each="${}">
</th:block>-->
</tr>
</tbody>
</th:block>
<th:block th:if="${searchParams.type eq 'type3'}">