feat:국제여객선현황 생성
parent
c1066f21a8
commit
10f915845b
|
|
@ -6,6 +6,7 @@ import com.dbnt.faisp.fipTarget.model.PartInfo;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartInfoFile;
|
import com.dbnt.faisp.fipTarget.model.PartInfoFile;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartWork;
|
import com.dbnt.faisp.fipTarget.model.PartWork;
|
||||||
import com.dbnt.faisp.fipTarget.model.PartWorkFile;
|
import com.dbnt.faisp.fipTarget.model.PartWorkFile;
|
||||||
|
import com.dbnt.faisp.fipTarget.model.ShipInfo;
|
||||||
import com.dbnt.faisp.fipTarget.model.VulnFile;
|
import com.dbnt.faisp.fipTarget.model.VulnFile;
|
||||||
import com.dbnt.faisp.fipTarget.model.Vulnerable;
|
import com.dbnt.faisp.fipTarget.model.Vulnerable;
|
||||||
import com.dbnt.faisp.fipTarget.service.FipTargetService;
|
import com.dbnt.faisp.fipTarget.service.FipTargetService;
|
||||||
|
|
@ -467,7 +468,32 @@ public class FipTargetController {
|
||||||
fipTargetService.deleteVulnerable(vulnerable);
|
fipTargetService.deleteVulnerable(vulnerable);
|
||||||
}
|
}
|
||||||
//외사취약지 끝
|
//외사취약지 끝
|
||||||
|
//국제여객선 시작
|
||||||
|
@GetMapping("/ipShipList")
|
||||||
|
public ModelAndView ipShipList(@AuthenticationPrincipal UserInfo loginUser,ShipInfo shipInfo, HttpServletResponse response) {
|
||||||
|
ModelAndView mav = new ModelAndView("fipTarget/ipShipList");
|
||||||
|
shipInfo.setDownOrganCdList(loginUser.getDownOrganCdList());
|
||||||
|
//메뉴권한 확인
|
||||||
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/ipShipList?siType="+shipInfo.getSiType()).get(0).getAccessAuth();
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
shipInfo.setQueryInfo();
|
||||||
|
|
||||||
|
shipInfo.setPaginationInfo();
|
||||||
|
mav.addObject("uesrId", loginUser.getUserId());
|
||||||
|
mav.addObject("searchParams", shipInfo);
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/ipShipEditModal")
|
||||||
|
public ModelAndView ipShipEditModal(@AuthenticationPrincipal UserInfo loginUser,ShipInfo shipInfo) {
|
||||||
|
ModelAndView mav = new ModelAndView("fipTarget/ipShipEditModal");
|
||||||
|
//메뉴권한 확인
|
||||||
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/target/partWorkList").get(0).getAccessAuth();
|
||||||
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
|
||||||
|
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,130 @@
|
||||||
|
package com.dbnt.faisp.fipTarget.model;
|
||||||
|
|
||||||
|
import com.dbnt.faisp.config.BaseModel;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.hibernate.annotations.DynamicInsert;
|
||||||
|
import org.hibernate.annotations.DynamicUpdate;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Entity
|
||||||
|
@NoArgsConstructor
|
||||||
|
@DynamicInsert
|
||||||
|
@DynamicUpdate
|
||||||
|
@IdClass(ShipInfo.ShipInfoId.class)
|
||||||
|
@Table(name = "ship_info")
|
||||||
|
public class ShipInfo extends BaseModel implements Serializable{
|
||||||
|
@Id
|
||||||
|
@Column(name = "si_seq")
|
||||||
|
private Integer siSeq;
|
||||||
|
@Id
|
||||||
|
@Column(name = "si_type")
|
||||||
|
private String siType;
|
||||||
|
@Id
|
||||||
|
@Column(name = "version_no")
|
||||||
|
private Integer versionNo;
|
||||||
|
@Column(name = "start_point")
|
||||||
|
private String startPoint;
|
||||||
|
@Column(name = "end_point")
|
||||||
|
private Integer endPoint;
|
||||||
|
@Column(name = "distance_nm")
|
||||||
|
private String distanceNm;
|
||||||
|
@Column(name = "distance_km")
|
||||||
|
private String distanceKm;
|
||||||
|
@Column(name = "owner_nm")
|
||||||
|
private String ownerNm;
|
||||||
|
@Column(name = "ship_nm")
|
||||||
|
private String shipNm;
|
||||||
|
@Column(name = "operation_cnt")
|
||||||
|
private String operationCnt;
|
||||||
|
@Column(name = "ship_weight")
|
||||||
|
private Integer shipWeight;
|
||||||
|
@Column(name = "passenger_cnt")
|
||||||
|
private Integer passengerCnt;
|
||||||
|
@Column(name = "freight_cnt")
|
||||||
|
private Integer freightCnt;
|
||||||
|
@Column(name = "close_yn")
|
||||||
|
private String closeYn;
|
||||||
|
@Column(name = "description")
|
||||||
|
private String description;
|
||||||
|
@Column(name = "wrt_organ")
|
||||||
|
private String wrtOrgan;
|
||||||
|
@Column(name = "wrt_part")
|
||||||
|
private String wrtPart;
|
||||||
|
@Column(name = "wrt_user_seq")
|
||||||
|
private Integer wrtUserSeq;
|
||||||
|
@Column(name = "wrt_title")
|
||||||
|
private String wrtTitle;
|
||||||
|
@Column(name = "wrt_nm")
|
||||||
|
private String wrtNm;
|
||||||
|
@Column(name = "wrt_dt")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
|
private LocalDateTime wrtDt;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String excel;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ShipInfo [siSeq=" + siSeq + ", siType=" + siType + ", versionNo=" + versionNo + ", startPoint=" + startPoint
|
||||||
|
+ ", endPoint=" + endPoint + ", distanceNm=" + distanceNm + ", distanceKm=" + distanceKm + ", ownerNm="
|
||||||
|
+ ownerNm + ", shipNm=" + shipNm + ", operationCnt=" + operationCnt + ", shipWeight=" + shipWeight
|
||||||
|
+ ", passengerCnt=" + passengerCnt + ", freightCnt=" + freightCnt + ", description=" + description
|
||||||
|
+ ", wrtOrgan=" + wrtOrgan + ", wrtPart=" + wrtPart + ", wrtUserSeq=" + wrtUserSeq + ", wrtTitle="
|
||||||
|
+ wrtTitle + ", wrtNm=" + wrtNm + ", wrtDt=" + wrtDt + ", excel=" + excel + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Embeddable
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public static class ShipInfoId implements Serializable {
|
||||||
|
private Integer siSeq;
|
||||||
|
private String siType;
|
||||||
|
private Integer versionNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
$(document).on('click', '#krcnTab', function (){
|
||||||
|
location.href="/target/ipShipList?siType=KRCN";
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#krjpruTab', function (){
|
||||||
|
location.href="/target/ipShipList?siType=KRJPRU";
|
||||||
|
})
|
||||||
|
|
||||||
|
$(document).on('click', '#addKRCN', function (){
|
||||||
|
const siType = 'KRCN';
|
||||||
|
$.ajax({
|
||||||
|
url: '/target/ipShipEditModal',
|
||||||
|
data: {siType: siType},
|
||||||
|
type: 'GET',
|
||||||
|
dataType:"html",
|
||||||
|
success: function(html){
|
||||||
|
$("#ipShipModalContent").empty().append(html);
|
||||||
|
$("#ipShipModal").modal('show');
|
||||||
|
|
||||||
|
},
|
||||||
|
error:function(){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="menuEditModalLabel">국제여객선 등록</h5>
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form id="partInfoSave" method="post">
|
||||||
|
<input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
|
||||||
|
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||||
|
<h5 class="text-center">항로</h5>
|
||||||
|
<div class="mb-2 row">
|
||||||
|
<label for="startPoint" class="col-sm-2 col-form-label text-center">출발</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<input type="text" class="form-control" id="startPoint" name="startPoint" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
<label for="endPoint" class="col-sm-2 col-form-label text-center">도착</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<input type="text" class="form-control" id="endPoint" name="endPoint" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-2 row">
|
||||||
|
<label for="distanceNm" class="col-sm-2 col-form-label text-center">거리(해리)</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<input type="text" class="form-control" id="distanceNm" name="distanceNm" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
<label for="distanceKm" class="col-sm-2 col-form-label text-center">거리(KM)</label>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<input type="text" class="form-control" id="distanceKm" name="distanceKm" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
<div class="mb-3 row">
|
||||||
|
<label for="shipWeight" class="col-sm-2 col-form-label text-center">국제총톤 수</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="shipWeight" name="shipWeight" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
<label for="passengerCnt" class="col-sm-2 col-form-label text-center">여객</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="passengerCnt" name="passengerCnt" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
<label for="freightCnt" class="col-sm-2 col-form-label text-center">화물</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="freightCnt" name="freightCnt" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
<div class="mb-4 row">
|
||||||
|
<label for="ownerNm" class="col-sm-2 col-form-label text-center">사업자</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="ownerNm" name="ownerNm" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
<label for="shipNm" class="col-sm-2 col-form-label text-center">선명</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="shipNm" name="shipNm" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
<label for="operationCnt" class="col-sm-2 col-form-label text-center">운항횟수</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="operationCnt" name="operationCnt" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-1 row">
|
||||||
|
<label for="closeYn" class="col-sm-2 col-form-label text-center">휴항</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="closeYn" name="closeYn" placeholder="직접입력">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mb-1 row">
|
||||||
|
<label for="description" class="col-sm-2 col-form-label text-center">비고</label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<textarea id="description" name="description" rows="4" cols="50"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer justify-content-between">
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="button" id="btn-close" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||||
|
<button type="button" class="btn btn-primary" id="savePartInfo">저장</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
<!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 type="text/javascript" th:src="@{/js/fipTarget/shipInfo.js}"></script>
|
||||||
|
</th:block>
|
||||||
|
<div layout:fragment="content">
|
||||||
|
<main class="pt-3">
|
||||||
|
<h4>국제여객선 목록</h4>
|
||||||
|
<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">
|
||||||
|
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" th:classappend="${searchParams.siType eq 'KRCN'?' active':''}" id="krcnTab" data-bs-toggle="tab" type="button" role="tab">한-중 국제여객선 현황</button>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item" role="presentation">
|
||||||
|
<button class="nav-link" th:classappend="${searchParams.siType eq 'KRJPRU'?' active':''}" id="krjpruTab" data-bs-toggle="tab" type="button" role="tab">한-일,러 국제여객선 현황</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<form method="get" th:action="@{/equip/List}">
|
||||||
|
<input type="hidden" name="pageIndex" id="pageIndex" th:value="${searchParams.pageIndex}">
|
||||||
|
<div class="row justify-content-between pe-3 py-1">
|
||||||
|
<div class="col-auto">
|
||||||
|
<select class="form-select" 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==num*10}"></option>
|
||||||
|
</th:block>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<div class="row justify-content-end">
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="text" class="form-control form-control-sm">
|
||||||
|
</div>
|
||||||
|
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
|
||||||
|
</div>
|
||||||
|
</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-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>항로</th>
|
||||||
|
<th>사업자<br>(한국대리점)</th>
|
||||||
|
<th>선명</th>
|
||||||
|
<th>국제<br>총톤수</th>
|
||||||
|
<th>수송능력</th>
|
||||||
|
<th>운항횟수</th>
|
||||||
|
<th>휴항</th>
|
||||||
|
<th>최종수정일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<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==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>
|
||||||
|
<div class="col-auto">
|
||||||
|
<input type="button" class="btn btn-primary" value="등록" id="addKRCN" th:if="${accessAuth != 'ACC001'} and ${searchParams.siType eq 'KRCN'}">
|
||||||
|
<input type="button" class="btn btn-primary" value="등록" id="addKRJPRU" th:if="${accessAuth != 'ACC001'} and ${searchParams.siType eq 'KRJPRU'}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<div class="modal fade" id="ipShipModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||||
|
<div class="modal-content" id="ipShipModalContent">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue