불법조업외국어선 오류수정중.
parent
ad558fcac1
commit
e71b87a754
|
|
@ -96,17 +96,19 @@ public class FishingBoatService extends BaseService {
|
|||
List<Violation> violationList = crackdownStatus.getViolationList();
|
||||
List<ViolationVersion> violationVersionList = new ArrayList<>();
|
||||
int i = 1;
|
||||
for(Violation violation: violationList){
|
||||
violation.setViolationKey(i++);
|
||||
violation.setFbKey(fbKey);
|
||||
if(violationList!=null){
|
||||
for(Violation violation: violationList){
|
||||
violation.setViolationKey(i++);
|
||||
violation.setFbKey(fbKey);
|
||||
|
||||
ViolationVersion violationVersion = new ViolationVersion();
|
||||
BeanUtils.copyProperties(violation, violationVersion);
|
||||
violationVersion.setVersionNo(1);
|
||||
violationVersionList.add(violationVersion);
|
||||
ViolationVersion violationVersion = new ViolationVersion();
|
||||
BeanUtils.copyProperties(violation, violationVersion);
|
||||
violationVersion.setVersionNo(1);
|
||||
violationVersionList.add(violationVersion);
|
||||
}
|
||||
violationRepository.saveAll(violationList);
|
||||
violationVersionRepository.saveAll(violationVersionList);
|
||||
}
|
||||
violationRepository.saveAll(violationList);
|
||||
violationVersionRepository.saveAll(violationVersionList);
|
||||
// 처리현황, 처리현황버전 저장.
|
||||
ProcessResult processResult = crackdownStatus.getProcessResult();
|
||||
ProcessResultVersion processResultVersion = new ProcessResultVersion();
|
||||
|
|
@ -118,21 +120,23 @@ public class FishingBoatService extends BaseService {
|
|||
processResultVersionRepository.save(processResultVersion);
|
||||
// 선원정보, 선원정보버전 저장.
|
||||
List<Sailor> sailorList = crackdownStatus.getSailorList();
|
||||
for(Sailor sailor: sailorList){
|
||||
sailor.setFbKey(fbKey);
|
||||
if(sailorList != null){
|
||||
for(Sailor sailor: sailorList){
|
||||
sailor.setFbKey(fbKey);
|
||||
|
||||
SailorVersion sailorVersion = new SailorVersion();
|
||||
SailorVersion sailorVersion = new SailorVersion();
|
||||
|
||||
Integer sailorKey = sailorRepository.save(sailor).getSailorKey();
|
||||
Integer sailorKey = sailorRepository.save(sailor).getSailorKey();
|
||||
|
||||
BeanUtils.copyProperties(sailor, sailorVersion);
|
||||
sailorVersion.setVersionNo(1);
|
||||
sailorVersion.setSailorKey(sailorKey);
|
||||
Integer versionNo = sailorVersionRepository.save(sailorVersion).getVersionNo();
|
||||
if(sailor.getPosition().equals("POS001")){
|
||||
//선장은 사진이 같이 업로드 됨.
|
||||
if(sailorFiles.size()>0) {
|
||||
saveCaptainPhoto(sailorKey, versionNo, sailorFiles);
|
||||
BeanUtils.copyProperties(sailor, sailorVersion);
|
||||
sailorVersion.setVersionNo(1);
|
||||
sailorVersion.setSailorKey(sailorKey);
|
||||
Integer versionNo = sailorVersionRepository.save(sailorVersion).getVersionNo();
|
||||
if(sailor.getPosition().equals("POS001")){
|
||||
//선장은 사진이 같이 업로드 됨.
|
||||
if(sailorFiles!= null && sailorFiles.size()>0) {
|
||||
saveCaptainPhoto(sailorKey, versionNo, sailorFiles);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -151,19 +155,21 @@ public class FishingBoatService extends BaseService {
|
|||
fishingBoatVersionRepository.save(newInfo);
|
||||
// 위반사항
|
||||
List<Violation> violationList = crackdownStatus.getViolationList();
|
||||
List<ViolationVersion> violationVersionList = new ArrayList<>();
|
||||
int i=1;
|
||||
ViolationVersion lastViolationVersion = violationVersionRepository.findTop1ByFbKeyOrderByVersionNoDesc(fishingBoat.getFbKey()).orElse(null);
|
||||
for(Violation violation: violationList){
|
||||
violation.setFbKey(fishingBoat.getFbKey());
|
||||
violation.setViolationKey(i++);
|
||||
ViolationVersion violationVersion = new ViolationVersion();
|
||||
BeanUtils.copyProperties(violation, violationVersion);
|
||||
violationVersion.setVersionNo(lastViolationVersion.getVersionNo()+1);
|
||||
violationVersionList.add(violationVersion);
|
||||
if(violationList != null){
|
||||
List<ViolationVersion> violationVersionList = new ArrayList<>();
|
||||
int i=1;
|
||||
ViolationVersion lastViolationVersion = violationVersionRepository.findTop1ByFbKeyOrderByVersionNoDesc(fishingBoat.getFbKey()).orElse(null);
|
||||
for(Violation violation: violationList){
|
||||
violation.setFbKey(fishingBoat.getFbKey());
|
||||
violation.setViolationKey(i++);
|
||||
ViolationVersion violationVersion = new ViolationVersion();
|
||||
BeanUtils.copyProperties(violation, violationVersion);
|
||||
violationVersion.setVersionNo(lastViolationVersion.getVersionNo()+1);
|
||||
violationVersionList.add(violationVersion);
|
||||
}
|
||||
violationRepository.saveAll(violationList);
|
||||
violationVersionRepository.saveAll(violationVersionList);
|
||||
}
|
||||
violationRepository.saveAll(violationList);
|
||||
violationVersionRepository.saveAll(violationVersionList);
|
||||
}
|
||||
return cdsKey;
|
||||
}
|
||||
|
|
@ -199,14 +205,15 @@ public class FishingBoatService extends BaseService {
|
|||
crackdownStatus.getProcessResult().setWrtUserNm(fishingBoat.getWrtUserNm());
|
||||
crackdownStatus.getProcessResult().setWrtUserGrd(fishingBoat.getWrtUserGrd());
|
||||
crackdownStatus.getProcessResult().setWrtDt(LocalDateTime.now());
|
||||
|
||||
for(Sailor sailor: crackdownStatus.getSailorList()){
|
||||
sailor.setWrtOrgan(fishingBoat.getWrtOrgan());
|
||||
sailor.setWrtPart(fishingBoat.getWrtPart());
|
||||
sailor.setWrtUserSeq(fishingBoat.getWrtUserSeq());
|
||||
sailor.setWrtUserNm(fishingBoat.getWrtUserNm());
|
||||
sailor.setWrtUserGrd(fishingBoat.getWrtUserGrd());
|
||||
sailor.setWrtDt(LocalDateTime.now());
|
||||
if(crackdownStatus.getSailorList()!=null){
|
||||
for(Sailor sailor: crackdownStatus.getSailorList()){
|
||||
sailor.setWrtOrgan(fishingBoat.getWrtOrgan());
|
||||
sailor.setWrtPart(fishingBoat.getWrtPart());
|
||||
sailor.setWrtUserSeq(fishingBoat.getWrtUserSeq());
|
||||
sailor.setWrtUserNm(fishingBoat.getWrtUserNm());
|
||||
sailor.setWrtUserGrd(fishingBoat.getWrtUserGrd());
|
||||
sailor.setWrtDt(LocalDateTime.now());
|
||||
}
|
||||
}
|
||||
return crackdownStatus;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,9 @@ $(document).on('change', '#crimeType', function (){
|
|||
|
||||
let smugglingAmount = '';
|
||||
commonCode.SG.forEach(function (item){
|
||||
smugglingAmount += '<option value="'+ item.itemCd +'">' + item.itemValue +'</option>';
|
||||
if(item.useChk === 'T'){
|
||||
smugglingAmount += '<option value="'+ item.itemCd +'">' + item.itemValue +'</option>';
|
||||
}
|
||||
})
|
||||
|
||||
if ($(this).val() == 'CTH2') {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue