불법조업 외국어선 정보 작업중.
parent
84185f8df4
commit
9c0a598fb2
|
|
@ -0,0 +1,100 @@
|
|||
package com.dbnt.faisp.main.faStatistics.crackdownsStatus;
|
||||
|
||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CrackdownStatus;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.FishingBoat;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.ProcessResult;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.CrackdownStatusRepository;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.FishingBoatRepository;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.ViolationRepository;
|
||||
import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.ProcessResultService;
|
||||
import com.dbnt.faisp.main.userInfo.model.UserInfo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/faStatistics")
|
||||
public class FishingBoatController {
|
||||
|
||||
private final AuthMgtService authMgtService;
|
||||
private final ProcessResultService processResultService;
|
||||
private final ViolationRepository violationRepository;
|
||||
private final CrackdownStatusRepository crackdownStatusRepository;
|
||||
private final FishingBoatRepository fishingBoatRepository;
|
||||
|
||||
@RequestMapping("/fishingBoat")
|
||||
public ModelAndView fishingBoat(@AuthenticationPrincipal UserInfo loginUser, FishingBoat fishingBoat) {
|
||||
ModelAndView mav = new ModelAndView("faStatistics/fishingBoat/fishingBoatMgt");
|
||||
|
||||
//메뉴권한 확인
|
||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/fishingBoat").get(0).getAccessAuth();
|
||||
|
||||
mav.addObject("accessAuth", accessAuth);
|
||||
|
||||
fishingBoat.setQueryInfo();
|
||||
/*List<ProcessResult> processResultList = processResultService.selectProcessResultList(fishingBoat);
|
||||
|
||||
for (ProcessResult pr:processResultList) {
|
||||
pr.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(pr.getCdsKey()));
|
||||
pr.setFishingBoat(fishingBoatRepository.findByCdsKey(pr.getCdsKey()));
|
||||
pr.setViolationList(violationRepository.findByFbKey(pr.getFishingBoat().getFbKey()));
|
||||
}
|
||||
|
||||
mav.addObject("processResultList", processResultList);
|
||||
fishingBoat.setContentCnt(processResultService.selectProcessResultListCnt(fishingBoat));
|
||||
*/
|
||||
fishingBoat.setPaginationInfo();
|
||||
mav.addObject("searchParams", fishingBoat);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/fishingBoatViewModal")
|
||||
public ModelAndView fishingBoatViewModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
||||
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultViewModal");
|
||||
processResult = processResultService.selectProcessResult(processResult.getPrKey());
|
||||
processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey()));
|
||||
processResult.setFbKey(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).getFbKey());
|
||||
processResult.setBoatNameKr(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).getBoatNameKr());
|
||||
processResult.setViolationList(violationRepository.findByFbKey(processResult.getFbKey()));
|
||||
|
||||
mav.addObject("processResult", processResult);
|
||||
mav.addObject("userSeq",loginUser.getUserSeq());
|
||||
//메뉴권한 확인
|
||||
mav.addObject("accessAuth", authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faStatistics/processResult").get(0).getAccessAuth());
|
||||
return mav;
|
||||
}
|
||||
|
||||
@GetMapping("/fishingBoatEditModal")
|
||||
public ModelAndView crackdownStatusEditModal(@AuthenticationPrincipal UserInfo loginUser, ProcessResult processResult){
|
||||
ModelAndView mav = new ModelAndView("faStatistics/processResult/processResultEditModal");
|
||||
if(processResult.getPrKey()!=null){
|
||||
processResult = processResultService.selectProcessResult(processResult.getPrKey());
|
||||
processResult.setCrackdownStatus(crackdownStatusRepository.findByCdsKey(processResult.getCdsKey()));
|
||||
processResult.setFbKey(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).getFbKey());
|
||||
processResult.setBoatNameKr(fishingBoatRepository.findByCdsKey(processResult.getCdsKey()).getBoatNameKr());
|
||||
processResult.setViolationList(violationRepository.findByFbKey(processResult.getFbKey()));
|
||||
}else{
|
||||
processResult.setWrtOrgan(loginUser.getOgCd());
|
||||
processResult.setWrtNm(loginUser.getUserNm());
|
||||
processResult.setWrtDt(LocalDateTime.now());
|
||||
}
|
||||
mav.addObject("processResult", processResult);
|
||||
return mav;
|
||||
}
|
||||
|
||||
@PostMapping("/saveFishingBoat")
|
||||
public Integer saveFishingBoat(@AuthenticationPrincipal UserInfo loginUser,
|
||||
FishingBoat fishingBoat){
|
||||
return 0;
|
||||
// return processResultService.saveProcessResult(processResult);
|
||||
}
|
||||
}
|
||||
|
|
@ -120,6 +120,19 @@ public class FishingBoat extends BaseModel {
|
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime wrtDt;
|
||||
|
||||
@Transient
|
||||
private String caseAgency;
|
||||
@Transient
|
||||
private String crackdownPolice;
|
||||
@Transient
|
||||
private String crackdownBoat;
|
||||
@Transient
|
||||
private String boatNny;
|
||||
@Transient
|
||||
private String processStatus;
|
||||
@Transient
|
||||
private String violation;
|
||||
|
||||
@Transient
|
||||
private String boatMaterialEtc;
|
||||
@Transient
|
||||
|
|
|
|||
|
|
@ -0,0 +1,212 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout/layout}">
|
||||
<th:block layout:fragment="script">
|
||||
<script type="text/javascript" th:src="@{/js/publicBoard/publicBoard.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/js/publicBoard/notice.js}"></script>
|
||||
</th:block>
|
||||
<div layout:fragment="content">
|
||||
<main class="pt-3">
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-auto"><h4>불법조업 외국어선 정보</h4></div>
|
||||
<div class="col-auto"><p>외사통계 > 불법조업외국어선 > 불법조업 외국어선 정보</p></div>
|
||||
</div>
|
||||
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
<div class="row mx-0">
|
||||
<div class="col-12 card text-center">
|
||||
<div class="card-body">
|
||||
<form method="get" th:action="@{/faStatistics/fishingBoat}">
|
||||
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||
<div class="row pe-3 py-1">
|
||||
<div class="col-1">
|
||||
<select class="form-select form-select-sm" name="rowCnt" id="rowCnt">
|
||||
<th:block th:each="num : ${#numbers.sequence(1,5)}">
|
||||
<option th:value="${num*10}" th:text="${num*10}" th:selected="${searchParams.rowCnt eq num*10}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<div class="row justify-content-end pb-1">
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm">
|
||||
<option value="">사건담당경찰서</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.caseAgency}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm">
|
||||
<option value="">단속경찰서</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.crackdownPolice}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm">
|
||||
<option value="">단속함정</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('CDB')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.crackdownBoat}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="단속기간 시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
|
||||
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="단속기간 종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="선적지" name="boatNny" th:value="${searchParams.boatNny}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-auto">
|
||||
|
||||
<select class="form-select form-select-sm">
|
||||
<option value="">선질</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('BM')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.boatMaterial}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" class="form-control form-control-sm" placeholder="톤수" name="tonCnt" th:value="${searchParams.tonCnt}">
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm">
|
||||
<option value="">어업종류</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('FT')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.fisheryType}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm">
|
||||
<option value="">처리현황</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('PR')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.processStatus}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<select class="form-select form-select-sm">
|
||||
<option value="">위반형태</option>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('VT')}">
|
||||
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq searchParams.violation}"></option>
|
||||
</th:block>
|
||||
</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>
|
||||
</form>
|
||||
<div class="row justify-content-start">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>나포일시</th>
|
||||
<th>나포해점</th>
|
||||
<th>사건담당<br>경찰서</th>
|
||||
<th>단속경찰서</th>
|
||||
<th>단속함정</th>
|
||||
<th>선명</th>
|
||||
<th>선장명</th>
|
||||
<th>어업종류</th>
|
||||
<th>선적지</th>
|
||||
<th>톤수</th>
|
||||
<th>선질</th>
|
||||
<th>위반형태</th>
|
||||
<th>처리결과</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!--<tbody class="table-group-divider">
|
||||
<tr class="noticeTr" th:each="notice:${noticeList}">
|
||||
<input type="hidden" class="publicKey" th:value="${notice.publicKey}">
|
||||
<td><input type="checkbox" class="trChkBox"></td>
|
||||
<td th:text="${notice.title}"></td>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
|
||||
<td th:if="${notice.wrtOrgan eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
|
||||
<td th:if="${notice.wrtPart eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
|
||||
<td th:if="${notice.wrtUserGrd eq commonCode.itemCd}" th:text="${commonCode.itemValue}"></td>
|
||||
</th:block>
|
||||
<td th:text="${notice.wrtUserNm}"></td>
|
||||
<td th:text="${#temporals.format(notice.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
<td th:text="${notice.fileCnt eq null?'파일 없음':#strings.concat(notice.fileCnt,' 건')}"></td>
|
||||
<td th:text="${notice.commentCnt eq null?'0':notice.commentCnt}"></td>
|
||||
</tr>
|
||||
</tbody>-->
|
||||
</table>
|
||||
</div>
|
||||
<div class="row justify-content-between">
|
||||
<div class="col-auto"></div>
|
||||
<div class="col-auto">
|
||||
<nav aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<th:block th:if="${searchParams.pageIndex>3}">
|
||||
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)-3}">
|
||||
<a class="page-link" href="#" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:each="num : ${#numbers.sequence(searchParams.startNum, searchParams.endNum)}">
|
||||
<li class="page-item" th:data-pageindex="${num}" th:classappend="${searchParams.pageIndex eq num?'active':''}">
|
||||
<a class="page-link" href="#" th:text="${num}"></a>
|
||||
</li>
|
||||
</th:block>
|
||||
<th:block th:if="${searchParams.maxNum>searchParams.endNum+2}">
|
||||
<li class="page-item" th:data-pageindex="${(searchParams.pageIndex)+3}">
|
||||
<a class="page-link" href="#" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
</a>
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="button" class="btn btn-success" value="등록" id="addNoticeBtn" sec:authorize="hasRole('ROLE_SUB_ADMIN')">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div class="modal fade" id="editModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="editModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="editContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="viewModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="viewModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content" id="viewContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
Loading…
Reference in New Issue