FAISP/src/main/resources/templates/faStatistics/sailor/sailor.html

364 lines
22 KiB
HTML

<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
<script th:inline="javascript">
const commonCode = [[${session.commonCode}]];
</script>
<script type="text/javascript" th:src="@{/js/faStatistics/sailor.js}"></script>
</th:block>
<div layout:fragment="content">
<main>
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
<div class="row justify-content-between">
<div class="col-auto mb-1">
<div class="d-inline align-middle"><i class="bi bi-square-fill"></i></div>
<h5 class="d-inline align-middle"> 선원 세부 현황</h5>
</div>
<div class="col-auto"><p class="mb-0 mt-2">외사통계 > 불법조업 외국어선 > 선원 세부 현황</p></div>
</div>
<div class="row mx-0">
<div class="col-12 card bg-light text-center">
<div class="card-body">
<form method="get" th:action="@{/faStatistics/sailor}" id="sailorSearchForm">
<div class="row justify-content-between py-1">
<div class="col-auto">
<div class="col-auto">
<select class="form-select form-select-sm" name="year">
<option value="">연도</option>
<th:block th:each="year : ${#numbers.sequence(2020, 2030)}">
<option th:value="${year + '-01-01'}" th:text="${year}" th:selected="${searchParams.year eq year}"></option>
</th:block>
</select>
</div>
</div>
<div class="col-8">
<div class="row">
<div class="col-11">
<div class="row justify-content-end pb-1">
<div class="col-2">
<select class="form-select form-select-sm" name="crackdownPolice">
<option value="">단속경찰서</option>
<th:block th:each="commonCode:${session.commonCode.get('CPO')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${commonCode.itemCd eq searchParams.crackdownPolice}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="crackdownBoat">
<option value="">단속함정</option>
<th:block th:each="num : ${#numbers.sequence(1,#lists.size(session.commonCode.get('CPO')))}">
<th:block th:if="${'CPO'+num == searchParams.crackdownPolice}" th:each="commonCode:${session.commonCode.get('CPO'+num)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.crackdownBoat eq commonCode.itemCd}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-2">
<input type="text" class="form-control form-control-sm" placeholder="선원명(한글)" name="sailorNameKr" th:value="${searchParams.sailorNameKr}">
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="residence">
<option value="">거주지</option>
<th:block th:each="commonCode:${session.commonCode.get('RSC')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${commonCode.itemCd eq searchParams.residence}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="education">
<option value="">학력</option>
<th:block th:each="commonCode:${session.commonCode.get('SED')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${commonCode.itemCd eq searchParams.education}"></option>
</th:block>
</select>
</div>
</div>
<div class="row justify-content-end">
<div class="col-2">
<select class="form-select form-select-sm" name="position">
<option value="">선박 내 직책</option>
<th:block th:each="commonCode:${session.commonCode.get('POS')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${commonCode.itemCd eq searchParams.position}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="career">
<option value="">승선경력</option>
<th:block th:each="commonCode:${session.commonCode.get('BE')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${commonCode.itemCd eq searchParams.career}"></option>
</th:block>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="similarCriminalHistory">
<option value="">동종 범죄경력</option>
<option value="1" th:selected="${searchParams.similarCriminalHistory == 1}">1건</option>
<option value="2" th:selected="${searchParams.similarCriminalHistory == 2}">2건</option>
<option value="3" th:selected="${searchParams.similarCriminalHistory == 3}">3건</option>
<option value="4" th:selected="${searchParams.similarCriminalHistory == 4}">4이상</option>
<option value="0" th:selected="${searchParams.similarCriminalHistory == 0}">없음</option>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="heterogeneousCriminalHistory">
<option value="">이종 범죄경력</option>
<option value="1" th:selected="${searchParams.heterogeneousCriminalHistory == 1}">1건</option>
<option value="2" th:selected="${searchParams.heterogeneousCriminalHistory == 2}">2건</option>
<option value="3" th:selected="${searchParams.heterogeneousCriminalHistory == 3}">3건</option>
<option value="4" th:selected="${searchParams.heterogeneousCriminalHistory == 4}">4이상</option>
<option value="0" th:selected="${searchParams.heterogeneousCriminalHistory == 0}">없음</option>
</select>
</div>
<div class="col-2">
<select class="form-select form-select-sm" name="arrestHistory">
<option value="">검거이력</option>
<option value="1" th:selected="${searchParams.arrestHistory == 1}">1건</option>
<option value="2" th:selected="${searchParams.arrestHistory == 2}">2건</option>
<option value="3" th:selected="${searchParams.arrestHistory == 3}">3건</option>
<option value="4" th:selected="${searchParams.arrestHistory == 4}">4이상</option>
<option value="0" th:selected="${searchParams.arrestHistory == 0}">없음</option>
</select>
</div>
</div>
</div>
<div class="col-1 d-grid gap-2">
<input type="submit" class="btn btn-lg btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</div>
</form>
<div class="card">
<div class="card-body">
<div class="row justify-content-start">
<div class="col-12 overflow-auto">
<table class="table table-sm table-hover table-bordered text-nowrap" id="sailorTable">
<thead class="align-middle">
<tr class="table-secondary">
<!--<th rowspan="2">연번</th>-->
<th rowspan="2">선박명</th>
<th rowspan="2">나포일시</th>
<th rowspan="2">단속경찰서</th>
<th rowspan="2">단속함정</th>
<th rowspan="2">위반장소</th>
<th rowspan="2" class="text-wrap min-width-300">위반내용</th>
<th colspan="2">선원명</th>
<th rowspan="2">생년월일</th>
<th colspan="17">거주지(성기준)</th>
<th colspan="9">학력</th>
<th colspan="5">선박 내 직책</th>
<th colspan="6">승선경력</th>
<th colspan="5">동종 범죄경력</th>
<th colspan="5">이종 범죄경력</th>
<th colspan="5">검거이력<br>(나포이력, 선원 포함)</th>
<th rowspan="2">범죄경력<br>세부내용</th>
<th rowspan="2">임금<br>(0.000위안/월)</th>
<th rowspan="2">비고</th>
<th rowspan="2">최종수정일</th>
</tr>
<tr class="table-secondary">
<th>한글</th>
<th>중문</th>
<th>요녕성</th>
<th>산동성</th>
<th>흑룡강성</th>
<th>하남성</th>
<th>길림성</th>
<th>내몽고</th>
<th>하북성</th>
<th>호남성</th>
<th>안휘성</th>
<th>산서성</th>
<th>강소성</th>
<th>사천성</th>
<th>섬서성</th>
<th>절강성</th>
<th>강동성</th>
<th>기타</th>
<th>확인불가</th>
<th>초등<br>중퇴</th>
<th>초등<br>졸업</th>
<th>중등<br>중퇴</th>
<th>중등<br>졸업</th>
<th>고등<br>중퇴</th>
<th>고등<br>졸업</th>
<th>대학<br>중퇴</th>
<th>대졸<br>이상</th>
<th>확인<br>불가</th>
<th>선장</th>
<th>항해장</th>
<th>기관장</th>
<th>기타<br>간부선원</th>
<th>일반선원<br>또는<br>확인불가</th>
<th>1년미만</th>
<th>1년이상<br>~<br>3년미만</th>
<th>3년이상<br>~<br>5년미만</th>
<th>5년이상<br>~<br>10년미만</th>
<th>10년이상</th>
<th>확인불가</th>
<th>1건</th>
<th>2건</th>
<th>3건</th>
<th>4건<br>이상</th>
<th>없음</th>
<th>1건</th>
<th>2건</th>
<th>3건</th>
<th>4건<br>이상</th>
<th>없음</th>
<th>1건</th>
<th>2건</th>
<th>3건</th>
<th>4건<br>이상</th>
<th>없음</th>
</tr>
</thead>
<tbody class="table-group-divider align-middle">
<th:block th:each="sailor:${sailorList}">
<tr class="tr" th:data-key="${sailor.sailorKey}">
<!--<td th:text="${sailor.sailorKey}"></td>-->
<td th:text="${sailor.fishingBoat.boatNameKr}"></td>
<td th:text="${#temporals.format(sailor.crackdownStatus.napoDt, 'yyyy-MM-dd HH:mm')}"></td>
<th:block th:each="commonCode:${session.commonCode.get('CPO')}">
<td th:if="${sailor.crackdownStatus.crackdownPolice eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block>
<th:block th:if="${!#strings.contains(sailor.crackdownStatus.crackdownPolice, 'CPO')}">
<td th:text="${sailor.crackdownStatus.crackdownPolice}"></td>
</th:block>
<th:block th:each="num : ${#numbers.sequence(1,#lists.size(session.commonCode.get('CPO')))}">
<th:block th:if="${'CPO'+num == sailor.crackdownStatus.crackdownPolice}" th:each="commonCode:${session.commonCode.get('CPO'+num)}">
<td th:if="${sailor.crackdownStatus.crackdownBoat eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
</th:block>
</th:block>
<th:block th:if="${!#strings.contains(sailor.crackdownStatus.crackdownBoat, 'CPO')}">
<td></td>
</th:block>
<td>
<span th:text="${sailor.crackdownStatus.napoSeaPointLon}"> ~ </span>
<span th:text="${sailor.crackdownStatus.napoSeaPointLat}"></span>
<div th:text="${sailor.crackdownStatus.napoSeaPointDetail}"></div>
</td>
<td class="text-wrap min-width-300">
<th:block th:if="${#lists.size(sailor.violationList) >= 1}">
<th:block th:each="violation, i:${sailor.violationList}">
<th:block th:each="commonCode:${session.commonCode.get('VT')}">
<th:block th:if="${violation.violation eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></th:block>
</th:block>
<th:block th:if="${violation.violation ne null && !#strings.contains(violation.violation, 'VT')}" th:text="${violation.violation}"></th:block>
<th:block th:if="${#lists.size(sailor.violationList) >= 1 && i.index < #lists.size(sailor.violationList)-1}">
<th:block>, </th:block>
</th:block>
</th:block>
</th:block>
</td>
<td th:text="${sailor.sailorNameKr}"></td>
<td th:text="${sailor.sailorNameCn}"></td>
<td th:text="${sailor.birthdate}"></td>
<td th:text="${sailor.residence == 'RSC001' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC002' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC003' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC004' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC005' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC006' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC007' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC008' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC009' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC010' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC011' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC012' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC013' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC014' ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC015' ? 1 : 0}"></td>
<td th:text="${sailor.residence ne '' && sailor.residence ne null && !#strings.contains(sailor.residence, 'RSC') ? 1 : 0}"></td>
<td th:text="${sailor.residence == 'RSC016' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED001' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED002' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED003' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED004' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED005' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED006' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED007' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED008' ? 1 : 0}"></td>
<td th:text="${sailor.education == 'SED009' ? 1 : 0}"></td>
<td th:text="${sailor.position eq 'POS001' ? 1 : 0}"></td>
<td th:text="${sailor.position eq 'POS002' ? 1 : 0}"></td>
<td th:text="${sailor.position eq 'POS003' ? 1 : 0}"></td>
<td th:text="${sailor.position eq 'POS005' ? 1 : 0}"></td>
<td th:text="${sailor.position eq 'POS006' ? 1 : 0}"></td>
<td th:text="${sailor.career == 'BE001' ? 1 : 0}"></td>
<td th:text="${sailor.career == 'BE002' ? 1 : 0}"></td>
<td th:text="${sailor.career == 'BE003' ? 1 : 0}"></td>
<td th:text="${sailor.career == 'BE004' ? 1 : 0}"></td>
<td th:text="${sailor.career == 'BE005' ? 1 : 0}"></td>
<td th:text="${sailor.career == 'BE006' ? 1 : 0}"></td>
<td th:text="${sailor.similarCriminalHistory == 1 ? 1 : 0}"></td>
<td th:text="${sailor.similarCriminalHistory == 2 ? 1 : 0}"></td>
<td th:text="${sailor.similarCriminalHistory == 3 ? 1 : 0}"></td>
<td th:text="${sailor.similarCriminalHistory > 3 ? 1 : 0}"></td>
<td th:text="${sailor.similarCriminalHistory == 0 ? 1 : 0}"></td>
<td th:text="${sailor.heterogeneousCriminalHistory == 1 ? 1 : 0}"></td>
<td th:text="${sailor.heterogeneousCriminalHistory == 2 ? 1 : 0}"></td>
<td th:text="${sailor.heterogeneousCriminalHistory == 3 ? 1 : 0}"></td>
<td th:text="${sailor.heterogeneousCriminalHistory > 3 ? 1 : 0}"></td>
<td th:text="${sailor.heterogeneousCriminalHistory == 0 ? 1 : 0}"></td>
<td th:text="${sailor.arrestHistory == 1 ? 1 : 0}"></td>
<td th:text="${sailor.arrestHistory == 2 ? 1 : 0}"></td>
<td th:text="${sailor.arrestHistory == 3 ? 1 : 0}"></td>
<td th:text="${sailor.arrestHistory > 3 ? 1 : 0}"></td>
<td th:text="${sailor.arrestHistory == 0 ? 1 : 0}"></td>
<td th:text="${sailor.criminalHistoryDetail}"></td>
<td th:text="${sailor.monthlyWages}"></td>
<td th:text="${sailor.note}"></td>
<td th:text="${#temporals.format(sailor.updDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</th:block>
</tbody>
</table>
</div>
</div>
<div class="row justify-content-between pt-1">
<div class="col-auto">
<button class="btn btn-success" id="sailorDownExcel">엑셀 다운로드</button>
</div>
<div class="col-auto">
<button class="btn btn-primary" id="sailorAddBtn">등록</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="sailorAddModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="sailorAddModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="sailorAddModalContent">
</div>
</div>
</div>
<div class="modal fade" id="sailorEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="sailorEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="sailorEditModalContent">
</div>
</div>
</div>
<div class="modal fade" id="sailorViewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="sailorViewModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-scrollable">
<div class="modal-content" id="sailorViewBody">
</div>
</div>
</div>
</main>
</div>
</html>