Merge branch 'master' of http://118.219.150.34:50501/DBNT/FAISP
# Conflicts: # src/main/java/com/dbnt/faisp/main/userInfo/FaispController.java
commit
5cc28b0cd2
|
|
@ -207,12 +207,21 @@ public class FaispController {
|
|||
mav.addObject("searchParams", userInfo);
|
||||
return mav;
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/eduEditModal")
|
||||
public ModelAndView eduEditModal(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo){
|
||||
ModelAndView mav = new ModelAndView("/faisp/eduEditModal");
|
||||
//메뉴권한 확인
|
||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth();
|
||||
mav.addObject("accessAuth", accessAuth);
|
||||
return mav;
|
||||
|
||||
}
|
||||
|
||||
private List<PersonnelStatus> calcStatusList(List<PersonnelStatus> statusList){
|
||||
for(PersonnelStatus status: statusList){
|
||||
status.setSumMax(status.getJt001Max()+status.getJt002Max()+status.getJt003Max()+status.getJt004Max()+status.getJt005Max()+status.getJt006Max()+status.getJt007Max());
|
||||
status.setSumNow(status.getJt001Now()+status.getJt002Now()+status.getJt003Now()+status.getJt004Now()+status.getJt005Now()+status.getJt006Now()+status.getJt007Now());
|
||||
}
|
||||
return statusList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
package com.dbnt.faisp.main.userInfo.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 javax.persistence.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@IdClass(UserEdu.UserEduId.class)
|
||||
@Table(name = "user_edu")
|
||||
public class UserEdu extends BaseModel{
|
||||
@Id
|
||||
@Column(name = "edu_seq")
|
||||
private Integer eduSeq;
|
||||
@Id
|
||||
@Column(name = "user_seq")
|
||||
private Integer userSeq;
|
||||
@Column(name = "edu_name")
|
||||
private String eduName;
|
||||
@Column(name = "edu_sdate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate eduSdate;
|
||||
@Column(name = "edu_edate")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate eduEdate;
|
||||
@Column(name = "edu_ra")
|
||||
private String eduRa;
|
||||
@Column(name = "wrt_organ")
|
||||
private String wrtOrgan;
|
||||
@Column(name = "wrt_part")
|
||||
private String wrtPart;
|
||||
@Column(name = "wrt_title")
|
||||
private String wrtTitle;
|
||||
@Column(name = "wrt_user_seq")
|
||||
private Integer wrtUserSeq;
|
||||
@Column(name = "wrt_nm")
|
||||
private String wrtNm;
|
||||
@Column(name = "wrt_dt")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime wrtDt;
|
||||
|
||||
@Embeddable
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class UserEduId implements Serializable {
|
||||
private Integer eduSeq;
|
||||
private Integer userSeq;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.dbnt.faisp.main.userInfo.repository;
|
||||
|
||||
import com.dbnt.faisp.main.userInfo.model.UserEdu;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
|
||||
|
||||
|
||||
public interface UserEduRepository extends JpaRepository<UserEdu, UserEdu.UserEduId> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
let eduList=[];
|
||||
let selectedIdx=0;
|
||||
|
||||
$(document).on('click', '.policeTr', function (event){
|
||||
const target = event.target;
|
||||
if(!(target.className === "checkBoxTd" ||$(target).parents("td").length>0)){
|
||||
const userSeq = (Number($(this).find(".userSeq").val()));
|
||||
showModal(1);
|
||||
}
|
||||
});
|
||||
|
||||
function showModal(userSeq){
|
||||
$.ajax({
|
||||
url: '/faisp/eduEditModal',
|
||||
data: {userSeq: userSeq},
|
||||
type: 'GET',
|
||||
dataType:"html",
|
||||
success: function(html){
|
||||
$("#eduEditModalContent").empty().append(html);
|
||||
$(".dateSelector").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
language: "ko",
|
||||
autoclose: true
|
||||
});
|
||||
$("#eduEditModal").modal('show');
|
||||
},
|
||||
error:function(){
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', '#previousTab', function (){
|
||||
const userStatus = $(this).data('userstatus');
|
||||
location.href = "/faisp/educationMgt?userStatus="+userStatus;
|
||||
})
|
||||
|
||||
$(document).on('click', '#presentTab', function (){
|
||||
const userStatus = $(this).data('userstatus');
|
||||
location.href = "/faisp/educationMgt?userStatus="+userStatus;
|
||||
})
|
||||
$(document).on('click', '#notPoliceTab', function (){
|
||||
const userStatus = $(this).data('userstatus');
|
||||
location.href = "/faisp/educationMgt?userStatus="+userStatus;
|
||||
})
|
||||
|
||||
$(document).on('click', '#eduAddBtn', function (){
|
||||
const userSeq = (Number(1));
|
||||
$('#insertEdu').append(
|
||||
'<div id="eduDiv">'+
|
||||
'<div class="mb-4 row">'+
|
||||
'<label for="ogCd" class="col-sm-1 col-form-label col-form-label-sm text-center">교육명</label>'+
|
||||
'<div class="col-sm-2">'+
|
||||
'<input type="text" class="form-control form-control-sm tcDt eduInput" name="eduName">'+
|
||||
'</div>'+
|
||||
'<label for="ofcCd" class="col-sm-1 col-form-label col-form-label-sm text-center">교육시작</label>'+
|
||||
'<div class="col-sm-2">'+
|
||||
'<input type="text" class="form-control form-control-sm eduSdate eduInput" name="eduSdate" readonly>'+
|
||||
'</div>'+
|
||||
'<label for="ofcCd" class="col-sm-1 col-form-label col-form-label-sm text-center">교육종료</label>'+
|
||||
'<div class="col-sm-2">'+
|
||||
'<input type="text" class="form-control form-control-sm eduEdate eduInput" name="eduEdate" readonly>'+
|
||||
'</div>'+
|
||||
'<label for="ofcCd" class="col-sm-1 col-form-label col-form-label-sm text-center">담당기관</label>'+
|
||||
'<div class="col-sm-2">'+
|
||||
'<input type="text" class="form-control form-control-sm eduInput" name="eduRa">'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div class="row justify-content-center">'+
|
||||
'<div class="col-sm-1">'+
|
||||
'<button type="button" class="btn btn-sm btn-outline-danger rowDeleteBtn"><i class="bi bi-x"></i></button>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'
|
||||
)
|
||||
$(".eduSdate").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
language: "ko"
|
||||
});
|
||||
$(".eduEdate").datepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
language: "ko"
|
||||
});
|
||||
eduList.push({useSeq:userSeq, eduName:"",eduSdate:"",eduEdate:"",eduRa:""});
|
||||
})
|
||||
|
||||
$(document).on('click', '.rowDeleteBtn', function (){
|
||||
selectedIdx = $(this).parents("#eduDiv").index()-1;
|
||||
eduList.splice(selectedIdx,1);
|
||||
$(this).parents('#eduDiv').remove();
|
||||
})
|
||||
|
||||
$(document).on('change', '.eduInput', function (){
|
||||
selectedIdx = $(this).parents("#eduDiv").index()-1;
|
||||
const target = eduList[selectedIdx];
|
||||
switch (this.name){
|
||||
case "eduName":
|
||||
target.eduName = this.value
|
||||
break;
|
||||
case "eduSdate":
|
||||
target.eduSdate = this.value
|
||||
break;
|
||||
case "eduEdate":
|
||||
target.eduEdate = this.value
|
||||
break;
|
||||
case "eduRa":
|
||||
target.eduRa = this.value
|
||||
break;
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('click', '#saveBtn', function (){
|
||||
console.log(eduList);
|
||||
})
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" th:text="${userInfo.userStatus eq 'USC003' ? '現 외사경찰 상세' : userInfo.userStatus eq 'USC006' ? '前 외사경찰 상세' : userInfo.userStatus eq 'USC007' ? '非 외사경찰 상세' : null}"></h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3 mt-3 row">
|
||||
<label for="dicCode" class="col-sm-2 col-form-label col-form-label-sm text-center ">직급</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm" id="dicCode" name="dicCode" autocomplete="off" >
|
||||
</div>
|
||||
<label for="userId" class="col-sm-2 col-form-label col-form-label-sm text-center ">생년월일</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm" id="userId" name="userId" autocomplete="off" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="phoneNo" class="col-sm-2 col-form-label col-form-label-sm text-center">성명</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="tel" class="form-control form-control-sm" id="phoneNo" name="phoneNo" >
|
||||
</div>
|
||||
<label for="email" class="col-sm-2 col-form-label col-form-label-sm text-center">성별</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="email" class="form-control form-control-sm" id="email" name="email" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="sex" class="col-sm-2 col-form-label col-form-label-sm text-center">학력사항</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="email" class="form-control form-control-sm" id="email" name="email" >
|
||||
</div>
|
||||
<label for="sex" class="col-sm-1 col-form-label col-form-label-sm text-center">학교</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="email" class="form-control form-control-sm" id="email" name="email" >
|
||||
</div>
|
||||
<label for="sex" class="col-sm-2 col-form-label col-form-label-sm text-center">외국어</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="email" class="form-control form-control-sm" id="email" name="email" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label for="birthDate" class="col-sm-2 col-form-label col-form-label-sm text-center">전공</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control form-control-sm dateSelector" id="birthDate" name="birthDate" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<table class="table table-striped" id="categoryTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>교육명</th>
|
||||
<th>교육일</th>
|
||||
<th>담당기관</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="overflow-scroll">
|
||||
<tr class="historyInfoTr">
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="insertEdu">
|
||||
<div class="row justify-content-center">
|
||||
<button class="btn btn-sm btn-outline-primary col-auto" id="eduAddBtn"><i class="bi bi-plus-lg"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer row justify-content-between">
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-primary" id="saveBtn" th:if="${accessAuth eq 'ACC003'}">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
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/faisp/police.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/js/faisp/edu.js}"></script>
|
||||
</th:block>
|
||||
<div layout:fragment="content">
|
||||
<main class="pt-3">
|
||||
|
|
@ -96,7 +96,6 @@
|
|||
<th>석사</th>
|
||||
<th>박사</th>
|
||||
<th>전공</th>
|
||||
<th>최종<br>수정일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-group-divider">
|
||||
|
|
@ -117,7 +116,6 @@
|
|||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
@ -152,8 +150,6 @@
|
|||
</nav>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-success" id="outBtn" th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">전출</button>
|
||||
<button type="button" class="btn btn-success" id="inBtn" th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">전입</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -166,9 +162,9 @@
|
|||
</div>
|
||||
</main>
|
||||
|
||||
<div class="modal fade" id="policeEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
|
||||
<div class="modal fade" id="eduEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="eduEditModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content" id="policeEditModalContent">
|
||||
<div class="modal-content" id="eduEditModalContent">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue