불법조업외국어선 오류수정중.

master
강석 최 2023-01-11 18:29:33 +09:00
parent ad558fcac1
commit e71b87a754
4 changed files with 56 additions and 47 deletions

View File

@ -96,6 +96,7 @@ public class FishingBoatService extends BaseService {
List<Violation> violationList = crackdownStatus.getViolationList();
List<ViolationVersion> violationVersionList = new ArrayList<>();
int i = 1;
if(violationList!=null){
for(Violation violation: violationList){
violation.setViolationKey(i++);
violation.setFbKey(fbKey);
@ -107,6 +108,7 @@ public class FishingBoatService extends BaseService {
}
violationRepository.saveAll(violationList);
violationVersionRepository.saveAll(violationVersionList);
}
// 처리현황, 처리현황버전 저장.
ProcessResult processResult = crackdownStatus.getProcessResult();
ProcessResultVersion processResultVersion = new ProcessResultVersion();
@ -118,6 +120,7 @@ public class FishingBoatService extends BaseService {
processResultVersionRepository.save(processResultVersion);
// 선원정보, 선원정보버전 저장.
List<Sailor> sailorList = crackdownStatus.getSailorList();
if(sailorList != null){
for(Sailor sailor: sailorList){
sailor.setFbKey(fbKey);
@ -131,11 +134,12 @@ public class FishingBoatService extends BaseService {
Integer versionNo = sailorVersionRepository.save(sailorVersion).getVersionNo();
if(sailor.getPosition().equals("POS001")){
//선장은 사진이 같이 업로드 됨.
if(sailorFiles.size()>0) {
if(sailorFiles!= null && sailorFiles.size()>0) {
saveCaptainPhoto(sailorKey, versionNo, sailorFiles);
}
}
}
}
}else{
// 업데이트시에는 어선정보만 수정.
@ -151,6 +155,7 @@ public class FishingBoatService extends BaseService {
fishingBoatVersionRepository.save(newInfo);
// 위반사항
List<Violation> violationList = crackdownStatus.getViolationList();
if(violationList != null){
List<ViolationVersion> violationVersionList = new ArrayList<>();
int i=1;
ViolationVersion lastViolationVersion = violationVersionRepository.findTop1ByFbKeyOrderByVersionNoDesc(fishingBoat.getFbKey()).orElse(null);
@ -165,6 +170,7 @@ public class FishingBoatService extends BaseService {
violationRepository.saveAll(violationList);
violationVersionRepository.saveAll(violationVersionList);
}
}
return cdsKey;
}
@ -199,7 +205,7 @@ public class FishingBoatService extends BaseService {
crackdownStatus.getProcessResult().setWrtUserNm(fishingBoat.getWrtUserNm());
crackdownStatus.getProcessResult().setWrtUserGrd(fishingBoat.getWrtUserGrd());
crackdownStatus.getProcessResult().setWrtDt(LocalDateTime.now());
if(crackdownStatus.getSailorList()!=null){
for(Sailor sailor: crackdownStatus.getSailorList()){
sailor.setWrtOrgan(fishingBoat.getWrtOrgan());
sailor.setWrtPart(fishingBoat.getWrtPart());
@ -208,6 +214,7 @@ public class FishingBoatService extends BaseService {
sailor.setWrtUserGrd(fishingBoat.getWrtUserGrd());
sailor.setWrtDt(LocalDateTime.now());
}
}
return crackdownStatus;
}

View File

@ -142,7 +142,9 @@ $(document).on('change', '#crimeType', function (){
let smugglingAmount = '';
commonCode.SG.forEach(function (item){
if(item.useChk === 'T'){
smugglingAmount += '<option value="'+ item.itemCd +'">' + item.itemValue +'</option>';
}
})
if ($(this).val() == 'CTH2') {

View File

@ -44,9 +44,9 @@
<div class="col-sm-2">
<select class="form-select form-select-sm" name="crimeType" id="crimeType">
<option value="">선택</option>
<th:block th:each="commonCode:${session.commonCode.get('CTH')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"
th:selected="${commonCode.itemCd eq internationalCrimeArrest.crimeType}"></option>
<th:block th:each="code:${session.commonCode.get('CTH')}">
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}"
th:selected="${code.itemCd eq internationalCrimeArrest.crimeType}"></option>
</th:block>
</select>
</div>

View File

@ -50,10 +50,10 @@
<header th:replace="fragments/header :: headerFragment"></header>
<div sec:authorize="isAnonymous()" layout:fragment="content"></div>
<div sec:authorize="isAuthenticated()" class="d-flex flex-nowrap h-100" style="max-height: 888px;">
<div class="flex-shrink-0 bg-dark border-end overflow-auto" style="width: 240px;">
<div class="flex-shrink-0 bg-dark border-end overflow-auto" style="width: 260px;">
<div th:replace="fragments/leftMenu :: leftMenuFragment"></div>
</div>
<div class="flex-shrink-0 px-3 py-2 bg-white overflow-auto" style="width: 1680px;">
<div class="flex-shrink-0 px-3 py-2 bg-white overflow-auto" style="width: 1660px;">
<div layout:fragment="content"></div>
</div>
</div>