경력현황 작업중.
parent
567ee1a52d
commit
e11fd1e133
|
|
@ -173,7 +173,11 @@ public class PoliceController {
|
||||||
}
|
}
|
||||||
@GetMapping("/nowPersonnelStatus")
|
@GetMapping("/nowPersonnelStatus")
|
||||||
public PersonnelStatus nowPersonnelStatus(String ogCd){
|
public PersonnelStatus nowPersonnelStatus(String ogCd){
|
||||||
return policeService.nowPersonnelStatus(ogCd);
|
PersonnelStatus ps = policeService.nowPersonnelStatus(ogCd);
|
||||||
|
if(ps == null){
|
||||||
|
return new PersonnelStatus();
|
||||||
|
}
|
||||||
|
return ps;
|
||||||
}
|
}
|
||||||
@PostMapping("/savePersonnelStatus")
|
@PostMapping("/savePersonnelStatus")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
@ -217,7 +221,6 @@ public class PoliceController {
|
||||||
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/police/careerMgt").get(0).getAccessAuth();
|
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/police/careerMgt").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
mav.addObject("selectedTab", career.getCareerCd());
|
mav.addObject("selectedTab", career.getCareerCd());
|
||||||
mav.addObject("crcList", codeMgtService.selectCodeMgtList("CRC"));
|
|
||||||
mav.addObject("userInfo", policeService.selectPoliceInfo(career.getUserSeq()));
|
mav.addObject("userInfo", policeService.selectPoliceInfo(career.getUserSeq()));
|
||||||
mav.addObject("careerList", policeService.selectCareerList(career.getUserSeq()));
|
mav.addObject("careerList", policeService.selectCareerList(career.getUserSeq()));
|
||||||
mav.addObject("userSeq", loginUser.getUserSeq());
|
mav.addObject("userSeq", loginUser.getUserSeq());
|
||||||
|
|
@ -226,11 +229,6 @@ public class PoliceController {
|
||||||
@GetMapping("/careerFormModal")
|
@GetMapping("/careerFormModal")
|
||||||
public ModelAndView careerFormModal(@AuthenticationPrincipal UserInfo loginUser, UserCareer career){
|
public ModelAndView careerFormModal(@AuthenticationPrincipal UserInfo loginUser, UserCareer career){
|
||||||
ModelAndView mav = new ModelAndView("police/career/careerFormModal");
|
ModelAndView mav = new ModelAndView("police/career/careerFormModal");
|
||||||
mav.addObject("crcList", codeMgtService.selectCodeMgtList("CRC"));
|
|
||||||
mav.addObject("dsnList", codeMgtService.selectCodeMgtList("DSN"));
|
|
||||||
mav.addObject("ogList", codeMgtService.selectCodeMgtList("OG"));
|
|
||||||
mav.addObject("ofcList", codeMgtService.selectCodeMgtList("OFC"));
|
|
||||||
mav.addObject("jtList", codeMgtService.selectCodeMgtList("JT"));
|
|
||||||
mav.addObject("career", career);
|
mav.addObject("career", career);
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public class PoliceService {
|
||||||
public void saveCareer(UserCareer career) {
|
public void saveCareer(UserCareer career) {
|
||||||
UserCareer lastCareer = userCareerRepository.findTop1ByUserSeqOrderByCareerSeqDesc(career.getUserSeq()).orElse(null);
|
UserCareer lastCareer = userCareerRepository.findTop1ByUserSeqOrderByCareerSeqDesc(career.getUserSeq()).orElse(null);
|
||||||
career.setCareerSeq(lastCareer==null?1:(lastCareer.getCareerSeq()+1));
|
career.setCareerSeq(lastCareer==null?1:(lastCareer.getCareerSeq()+1));
|
||||||
if(!career.getInOfficeYn().equals("Y")){
|
if(career.getInOfficeYn() == null || career.getInOfficeYn().equals("N")){
|
||||||
career.setWorkMonth((int) ChronoUnit.MONTHS.between(career.getStartDate(), career.getEndDate()));
|
career.setWorkMonth((int) ChronoUnit.MONTHS.between(career.getStartDate(), career.getEndDate()));
|
||||||
career.setWorkDay((int) ChronoUnit.DAYS.between(career.getStartDate(), career.getEndDate()));
|
career.setWorkDay((int) ChronoUnit.DAYS.between(career.getStartDate(), career.getEndDate()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@
|
||||||
<label for="careerCd" class="col-sm-2 col-form-label col-form-label-sm text-center">경력구분</label>
|
<label for="careerCd" class="col-sm-2 col-form-label col-form-label-sm text-center">경력구분</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<select class="form-select form-select-sm" id="careerCd" name="careerCd">
|
<select class="form-select form-select-sm" id="careerCd" name="careerCd">
|
||||||
<th:block th:each="code:${crcList}">
|
<th:block th:each="code, idx:${session.commonCode.get('CRC')}">
|
||||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq career.careerCd}"></option>
|
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq career.careerCd}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<select class="form-select form-select-sm" id="designationCd" name="designationCd">
|
<select class="form-select form-select-sm" id="designationCd" name="designationCd">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="code:${dsnList}">
|
<th:block th:each="code:${session.commonCode.get('DSN')}">
|
||||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
|
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -41,8 +41,8 @@
|
||||||
<div class="col-sm-3 selectInputDiv">
|
<div class="col-sm-3 selectInputDiv">
|
||||||
<select class="form-select form-select-sm" id="workOrgan" name="workOrgan">
|
<select class="form-select form-select-sm" id="workOrgan" name="workOrgan">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="code:${ogList}">
|
<th:block th:each="code:${session.commonCode.get('OG')}">
|
||||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
|
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -50,8 +50,10 @@
|
||||||
<div class="col-sm-3 selectInputDiv">
|
<div class="col-sm-3 selectInputDiv">
|
||||||
<select class="form-select form-select-sm" id="workPart" name="workPart">
|
<select class="form-select form-select-sm" id="workPart" name="workPart">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="code:${ofcList}">
|
<th:block th:each="parent:${session.commonCode.get('OG')}">
|
||||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
|
<th:block th:if="${parent.useChk eq 'T'}" th:each="code:${session.commonCode.get(parent.itemCd)}">
|
||||||
|
<option th:if="${code.useChk eq 'T'}" th:class="${parent.itemCd}" th:value="${code.itemCd}" th:text="${code.itemValue}" style="display: none"></option>
|
||||||
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -59,8 +61,8 @@
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<select class="form-select form-select-sm" id="workTitle" name="workTitle">
|
<select class="form-select form-select-sm" id="workTitle" name="workTitle">
|
||||||
<option value="">선택</option>
|
<option value="">선택</option>
|
||||||
<th:block th:each="code:${jtList}">
|
<th:block th:each="code:${session.commonCode.get('JT')}">
|
||||||
<option th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
|
<option th:if="${code.useChk eq 'T'}" th:value="${code.itemCd}" th:text="${code.itemValue}"></option>
|
||||||
</th:block>
|
</th:block>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -21,102 +21,100 @@
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||||
<th:block th:each="code, idx:${crcList}">
|
<th:block th:each="code, idx:${session.commonCode.get('CRC')}">
|
||||||
<li class="nav-item" role="presentation">
|
<th:block th:if="${code.useChk eq 'T'}">
|
||||||
<button class="nav-link" type="button" role="tab" data-bs-toggle="tab" th:id="|${code.itemCd}Tab|"
|
<li class="nav-item" role="presentation">
|
||||||
th:data-bs-target="${#strings.concat('#', code.itemCd, 'TabPanel')}" th:aria-controls="|${code.itemCd}TabPanel|"
|
<button class="nav-link" type="button" role="tab" data-bs-toggle="tab" th:id="|${code.itemCd}Tab|"
|
||||||
th:aria-selected="${code.itemCd eq selectedTab?'true':'false'}" th:classappend="${code.itemCd eq selectedTab?'active':''}"
|
th:data-bs-target="${#strings.concat('#', code.itemCd, 'TabPanel')}" th:aria-controls="|${code.itemCd}TabPanel|"
|
||||||
|
th:aria-selected="${code.itemCd eq selectedTab?'true':'false'}" th:classappend="${code.itemCd eq selectedTab?'active':''}"
|
||||||
th:text="${code.itemValue}"></button>
|
th:text="${code.itemValue}"></button>
|
||||||
</li>
|
</li>
|
||||||
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content bg-white border border-top-0">
|
<div class="tab-content bg-white border border-top-0">
|
||||||
<th:block th:each="code, idx:${crcList}">
|
<th:block th:each="tabCode, idx:${session.commonCode.get('CRC')}">
|
||||||
<div class="tab-pane fade p-2" th:classappend="${code.itemCd eq selectedTab?'show active':''}"
|
<th:block th:if="${tabCode.useChk eq 'T'}">
|
||||||
th:id="|${code.itemCd}TabPanel|" role="tabpanel"
|
<div class="tab-pane fade p-2" th:classappend="${tabCode.itemCd eq selectedTab?'show active':''}"
|
||||||
th:aria-labelledby="|${code.itemCd}Tab|" tabindex="0">
|
th:id="|${tabCode.itemCd}TabPanel|" role="tabpanel"
|
||||||
<table class="table table-sm table-hover">
|
th:aria-labelledby="|${tabCode.itemCd}Tab|" tabindex="0">
|
||||||
<thead>
|
<table class="table table-sm table-hover">
|
||||||
<tr>
|
<thead>
|
||||||
<th>임용구분</th>
|
|
||||||
<th colspan="2">근무지</th>
|
|
||||||
<th>직급</th>
|
|
||||||
<th>시작일</th>
|
|
||||||
<th>종료일</th>
|
|
||||||
<th>일수</th>
|
|
||||||
<th>개월수</th>
|
|
||||||
<th>등록자</th>
|
|
||||||
<th>등록일</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<th:block th:each="career:${careerList}">
|
|
||||||
<th:block th:if="${code.itemCd eq career.careerCd}">
|
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>임용구분</th>
|
||||||
|
<th colspan="2">근무지</th>
|
||||||
|
<th>직급</th>
|
||||||
|
<th>시작일</th>
|
||||||
|
<th>종료일</th>
|
||||||
|
<th>일수</th>
|
||||||
|
<th>개월수</th>
|
||||||
|
<th>등록자</th>
|
||||||
|
<th>등록일</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="career:${careerList}">
|
||||||
|
<th:block th:if="${tabCode.itemCd eq career.careerCd}">
|
||||||
<td>
|
<td>
|
||||||
<th:block th:each="code:${session.commonCode.get('DSN')}">
|
<th:block th:each="code:${session.commonCode.get('DSN')}">
|
||||||
<th:block th:if="${code.itemCd eq career.designationCd}" th:text="${code.itemValue}"></th:block>
|
<th:block th:if="${code.itemCd eq career.designationCd}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</td>
|
</td>
|
||||||
<th:block th:if="${#strings.isEmpty(career.workPositionStr)}">
|
<th:block th:if="${#strings.isEmpty(career.workPositionStr)}">
|
||||||
<th:block th:each="code:${session.commonCode.get('OG')}">
|
<td>
|
||||||
<th:block th:if="${code.itemCd eq career.workOrgan}">
|
<th:block th:each="code:${session.commonCode.get('OG')}">
|
||||||
<td th:text="${code.itemValue}"></td>
|
<th:block th:if="${code.itemCd eq career.workOrgan}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</td>
|
||||||
<th:block th:each="code:${session.commonCode.get(career.workOrgan)}">
|
<td>
|
||||||
<th:block th:if="${code.itemCd eq career.workPart}">
|
<th:block th:each="code:${session.commonCode.get(career.workOrgan)}">
|
||||||
<td th:text="${code.itemValue}"></td>
|
<th:block th:if="${code.itemCd eq career.workPart}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</td>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:unless="${#strings.isEmpty(career.workPositionStr)}">
|
<th:block th:unless="${#strings.isEmpty(career.workPositionStr)}">
|
||||||
<td colspan="2" th:text="${career.workPositionStr}"></td>
|
<td colspan="2" th:text="${career.workPositionStr}"></td>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="code:${session.commonCode.get('JT')}">
|
<td>
|
||||||
<th:block th:if="${code.itemCd eq career.workTitle}">
|
<th:block th:each="code:${session.commonCode.get('JT')}">
|
||||||
<td th:text="${code.itemValue}"></td>
|
<th:block th:if="${code.itemCd eq career.workTitle}" th:text="${code.itemValue}"></th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</td>
|
||||||
<td th:text="${#temporals.format(career.startDate, 'yyyy-MM-dd')}"></td>
|
<td th:text="${#temporals.format(career.startDate, 'yyyy-MM-dd')}"></td>
|
||||||
<td th:text="${career.inOfficeYn eq 'Y'?'재직중':#temporals.format(career.endDate, 'yyyy-MM-dd')}"></td>
|
<td th:text="${career.inOfficeYn eq 'Y'?'재직중':#temporals.format(career.endDate, 'yyyy-MM-dd')}"></td>
|
||||||
<td th:text="${career.workDay}"></td>
|
<td th:text="${career.workDay}"></td>
|
||||||
<td th:text="${career.workMonth}"></td>
|
<td th:text="${career.workMonth}"></td>
|
||||||
<td>
|
<td>
|
||||||
<th:block th:each="code:${session.commonCode.get('OG')}">
|
<th:block th:each="code:${session.commonCode.get('OG')}">
|
||||||
<th:block th:if="${code.itemCd eq career.wrtOrgan}">
|
<th:block th:if="${code.itemCd eq career.wrtOrgan}" th:text="${code.itemValue}"></th:block>
|
||||||
<th:block th:text="${code.itemValue}"></th:block>
|
|
||||||
</th:block>
|
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="code:${session.commonCode.get(career.workOrgan)}">
|
<th:block th:each="code:${session.commonCode.get(career.workOrgan)}">
|
||||||
<th:block th:if="${code.itemCd eq career.workPart}">
|
<th:block th:if="${code.itemCd eq career.workPart}" th:text="${code.itemValue}"></th:block>
|
||||||
<th:block th:text="${code.itemValue}"></th:block>
|
|
||||||
</th:block>
|
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:text="${career.wrtUserNm}"></th:block>
|
<th:block th:text="${career.wrtUserNm}"></th:block>
|
||||||
</td>
|
</td>
|
||||||
<td th:text="${#temporals.format(career.wrtDt, 'yyyy-MM-dd HH:mm:ss')}"></td>
|
<td th:text="${#temporals.format(career.wrtDt, 'yyyy-MM-dd HH:mm:ss')}"></td>
|
||||||
<td>
|
<td>
|
||||||
<button type="button" class="btn btn-sm btn-outline-danger deleteCareerBtn"
|
<button type="button" class="btn btn-sm btn-outline-danger deleteCareerBtn"
|
||||||
th:data-careerseq="${career.careerSeq}" th:data-tab="${code.itemCd}">
|
th:data-careerseq="${career.careerSeq}" th:data-tab="${tabCode.itemCd}">
|
||||||
<i class="bi bi-trash"></i>
|
<i class="bi bi-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
</th:block>
|
||||||
</tr>
|
</tr>
|
||||||
</th:block>
|
</tbody>
|
||||||
</th:block>
|
<tfoot>
|
||||||
</tbody>
|
<tr>
|
||||||
<tfoot>
|
<td colspan="11">
|
||||||
<tr>
|
<button type="button" class="btn btn-sm btn-primary careerAddBtn" th:data-careercd="${tabCode.itemCd}">추가</button>
|
||||||
<td colspan="11">
|
</td>
|
||||||
<button type="button" class="btn btn-sm btn-primary careerAddBtn" th:data-careercd="${code.itemCd}">추가</button>
|
</tr>
|
||||||
</td>
|
</tfoot>
|
||||||
</tr>
|
</table>
|
||||||
</tfoot>
|
</div>
|
||||||
</table>
|
</th:block>
|
||||||
</div>
|
</th:block>
|
||||||
</th:block>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue