외사경찰 > 정원/현원 작업중.

강석 최 2022-11-15 15:05:12 +09:00
parent ae96b9da6a
commit 45e239486a
6 changed files with 825 additions and 257 deletions

View File

@ -6,6 +6,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Comparator;
@Getter
@Setter

View File

@ -3,6 +3,7 @@ package com.dbnt.faisp.main.userInfo;
import com.dbnt.faisp.kwms.service.KwmsService;
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
import com.dbnt.faisp.main.fipTarget.model.PartInfo;
import com.dbnt.faisp.main.fipTarget.model.ShipInfo;
@ -15,6 +16,8 @@ import com.dbnt.faisp.util.Utils;
import lombok.RequiredArgsConstructor;
import java.io.IOException;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
@ -32,118 +35,165 @@ public class FaispController {
private final CodeMgtService codeMgtService;
private final UserInfoService userInfoService;
private final KwmsService kwmsService;
@GetMapping("/policeList")
public ModelAndView policeList(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo, HttpServletResponse response) {
ModelAndView mav = new ModelAndView("faisp/policeList");
userInfo.setDownOrganCdList(loginUser.getDownOrganCdList());
if(userInfo.getUserStatus() == null) {
userInfo.setUserStatus("USC003");
}
//엑셀다운
if(userInfo.getExcel() != null && userInfo.getExcel().equals("Y")){
String[] headers = { "rownum", "title_cd", "user_nm", "organ_nm", "ofc_cd", "birth_date", "sex", "police_in_date", "title_in_date", "ofc_in_date", "outturn_cd","", "job_in_cd", "wrt_dt"};
String[] headerNames = { "순번", "계급","성명", "청", "현부서"+System.lineSeparator()+"과", "생년월일","성별", "최초"+System.lineSeparator()+"임용", "현 계급"+System.lineSeparator()+"임용", "현 부서"+System.lineSeparator()+"임용", "수사경과"+System.lineSeparator()+"보유여부", "외사경력", "입직"+System.lineSeparator()+"경로","최종"+System.lineSeparator()+"수정일"};
String[] columnType = {"String", "String", "String","String", "String", "String", "String", "String", "String", "String", "String", "String","String", "String"};
String sheetName ="";
String excelFileName="";
if(userInfo.getUserStatus().equals("USC003")) {
sheetName = "現 외사경찰 현황";
excelFileName = "現 외사경찰 현황";
}
if(userInfo.getUserStatus().equals("USC006")) {
sheetName = "前 외사경찰 현황";
excelFileName = "前 외사경찰 현황";
}
if(userInfo.getUserStatus().equals("USC007")) {
sheetName = "非 외사경찰 현황";
excelFileName = "非 외사경찰 현황";
}
List<UserInfo> policeList= userInfoService.selectPoliceList(userInfo);
try {
Utils.policelistToExcel(policeList, response, headers, headerNames, columnType, sheetName, excelFileName);
} catch (IOException e) {
}
return null;
}
@GetMapping("/policeList")
public ModelAndView policeList(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response) {
ModelAndView mav = new ModelAndView("faisp/policeList");
userInfo.setDownOrganCdList(loginUser.getDownOrganCdList());
if(userInfo.getUserStatus() == null) {
userInfo.setUserStatus("USC003");
}
//엑셀다운
if(userInfo.getExcel() != null && userInfo.getExcel().equals("Y")){
String[] headers = { "rownum", "title_cd", "user_nm", "organ_nm", "ofc_cd", "birth_date", "sex", "police_in_date", "title_in_date", "ofc_in_date", "outturn_cd","", "job_in_cd", "wrt_dt"};
String[] headerNames = { "순번", "계급","성명", "청", "현부서"+System.lineSeparator()+"과", "생년월일","성별", "최초"+System.lineSeparator()+"임용", "현 계급"+System.lineSeparator()+"임용", "현 부서"+System.lineSeparator()+"임용", "수사경과"+System.lineSeparator()+"보유여부", "외사경력", "입직"+System.lineSeparator()+"경로","최종"+System.lineSeparator()+"수정일"};
String[] columnType = {"String", "String", "String","String", "String", "String", "String", "String", "String", "String", "String", "String","String", "String"};
String sheetName ="";
String excelFileName="";
if(userInfo.getUserStatus().equals("USC003")) {
sheetName = "現 외사경찰 현황";
excelFileName = "現 외사경찰 현황";
}
if(userInfo.getUserStatus().equals("USC006")) {
sheetName = "前 외사경찰 현황";
excelFileName = "前 외사경찰 현황";
}
if(userInfo.getUserStatus().equals("USC007")) {
sheetName = "非 외사경찰 현황";
excelFileName = "非 외사경찰 현황";
}
List<UserInfo> policeList= userInfoService.selectPoliceList(userInfo);
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
userInfo.setQueryInfo();
mav.addObject("policeList", userInfoService.selectPoliceList(userInfo));
userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo));
userInfo.setPaginationInfo();
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("userStatus", userInfo.getUserStatus());
mav.addObject("searchParams", userInfo);
return mav;
}
@GetMapping("/policeEditModal")
public ModelAndView policeEditModal(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo){
ModelAndView mav = new ModelAndView("/faisp/policeEditModal");
mav.addObject("ogList", codeMgtService.selectCodeMgtList("OG"));
mav.addObject("ofcList", codeMgtService.selectCodeMgtList("OFC"));
mav.addObject("titleList", codeMgtService.selectCodeMgtList("JT"));
mav.addObject("outturnList", codeMgtService.selectCodeMgtList("OTC"));
mav.addObject("seriesList", codeMgtService.selectCodeMgtList("SRC"));
mav.addObject("languageList", codeMgtService.selectCodeMgtList("LNG"));
mav.addObject("statusList", codeMgtService.selectCodeMgtList("USC"));
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
mav.addObject("userInfo", userInfoService.selectUserInfo(userInfo.getUserSeq()));
return mav;
}
@PostMapping("/updateUserInfo")
public int updateUserInfo(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo) {
userInfoService.updateUserInfo(loginUser,userInfo);
return userInfo.getUserSeq();
}
@GetMapping("/policeHistory")
public ModelAndView policeHistory(@AuthenticationPrincipal UserInfo loginUser,UserInfoHistory userInfoHistory){
ModelAndView mav = new ModelAndView("/faisp/policeHistory");
mav.addObject("userStatus", userInfoService.selectuserStatus(userInfoHistory));
mav.addObject("policeList", userInfoService.selectPoliceHisList(userInfoHistory));
try {
Utils.policelistToExcel(policeList, response, headers, headerNames, columnType, sheetName, excelFileName);
} catch (IOException e) {
return mav;
}
@GetMapping("/policeHistoryView")
@ResponseBody
public UserInfoHistory policeHistoryView(UserInfoHistory userInfoHistory){
return userInfoService.selectpoliceHistoryView(userInfoHistory);
}
@PostMapping("/policeStatusUpdate")
@ResponseBody
public int userCompanion(@RequestBody List<UserInfo> userInfo){
return userInfoService.updateUserCompanion(userInfo);
}
@PostMapping("/syncUserInfoToKwms")
@ResponseBody
public String syncUserInfoToKwms(@AuthenticationPrincipal UserInfo loginUser,@RequestBody List<UserInfo> infoList){
for(UserInfo info: infoList){
UserInfo kwmsInfo = kwmsService.selectEmpInfo(info.getDicCode());
if(kwmsInfo!=null){
kwmsInfo.setUserSeq(info.getUserSeq());
userInfoService.updateUserInfo(loginUser,kwmsInfo);
}
}
if(infoList.size()==1){
return infoList.get(0).getUserSeq().toString();
}else{
return "";
}
}
}
return null;
}
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
userInfo.setQueryInfo();
mav.addObject("policeList", userInfoService.selectPoliceList(userInfo));
userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo));
userInfo.setPaginationInfo();
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("userStatus", userInfo.getUserStatus());
mav.addObject("searchParams", userInfo);
return mav;
}
@GetMapping("/policeEditModal")
public ModelAndView policeEditModal(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo){
ModelAndView mav = new ModelAndView("/faisp/policeEditModal");
mav.addObject("ogList", codeMgtService.selectCodeMgtList("OG"));
mav.addObject("ofcList", codeMgtService.selectCodeMgtList("OFC"));
mav.addObject("titleList", codeMgtService.selectCodeMgtList("JT"));
mav.addObject("outturnList", codeMgtService.selectCodeMgtList("OTC"));
mav.addObject("seriesList", codeMgtService.selectCodeMgtList("SRC"));
mav.addObject("languageList", codeMgtService.selectCodeMgtList("LNG"));
mav.addObject("statusList", codeMgtService.selectCodeMgtList("USC"));
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
mav.addObject("userInfo", userInfoService.selectUserInfo(userInfo.getUserSeq()));
return mav;
}
@PostMapping("/updateUserInfo")
public int updateUserInfo(@AuthenticationPrincipal UserInfo loginUser,UserInfo userInfo) {
userInfoService.updateUserInfo(loginUser,userInfo);
return userInfo.getUserSeq();
}
@GetMapping("/policeHistory")
public ModelAndView policeHistory(@AuthenticationPrincipal UserInfo loginUser,UserInfoHistory userInfoHistory){
ModelAndView mav = new ModelAndView("/faisp/policeHistory");
mav.addObject("userStatus", userInfoService.selectuserStatus(userInfoHistory));
mav.addObject("policeList", userInfoService.selectPoliceHisList(userInfoHistory));
return mav;
}
@GetMapping("/policeHistoryView")
@ResponseBody
public UserInfoHistory policeHistoryView(UserInfoHistory userInfoHistory){
return userInfoService.selectpoliceHistoryView(userInfoHistory);
}
@PostMapping("/policeStatusUpdate")
@ResponseBody
public int userCompanion(@RequestBody List<UserInfo> userInfo){
return userInfoService.updateUserCompanion(userInfo);
}
@PostMapping("/syncUserInfoToKwms")
@ResponseBody
public String syncUserInfoToKwms(@AuthenticationPrincipal UserInfo loginUser,@RequestBody List<UserInfo> infoList){
for(UserInfo info: infoList){
UserInfo kwmsInfo = kwmsService.selectEmpInfo(info.getDicCode());
if(kwmsInfo!=null){
kwmsInfo.setUserSeq(info.getUserSeq());
userInfoService.updateUserInfo(loginUser,kwmsInfo);
}
}
if(infoList.size()==1){
return infoList.get(0).getUserSeq().toString();
}else{
return "";
}
}
@GetMapping("/personnelStatus")
public ModelAndView personnelStatus(@AuthenticationPrincipal UserInfo loginUser){
ModelAndView mav = new ModelAndView("faisp/personnelStatus");
List<CodeMgt> jtList = codeMgtService.selectCodeMgtList("JT");
jtList.sort((o1, o2) -> o2.getItemCd().compareTo(o1.getItemCd()));
mav.addObject("jtList", jtList);
return mav;
}
@GetMapping("/careerMgt")
public ModelAndView careerMgt(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response){
ModelAndView mav = new ModelAndView("faisp/careerMgt");
userInfo.setDownOrganCdList(loginUser.getDownOrganCdList());
if(userInfo.getUserStatus() == null) {
userInfo.setUserStatus("USC003");
}
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
userInfo.setQueryInfo();
mav.addObject("policeList", userInfoService.selectPoliceList(userInfo));
userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo));
userInfo.setPaginationInfo();
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("userStatus", userInfo.getUserStatus());
mav.addObject("searchParams", userInfo);
return mav;
}
@GetMapping("/educationMgt")
public ModelAndView educationMgt(@AuthenticationPrincipal UserInfo loginUser, UserInfo userInfo, HttpServletResponse response){
ModelAndView mav = new ModelAndView("faisp/educationMgt");
userInfo.setDownOrganCdList(loginUser.getDownOrganCdList());
if(userInfo.getUserStatus() == null) {
userInfo.setUserStatus("USC003");
}
//메뉴권한 확인
String accessAuth = authMgtService.selectAccessConfigList(loginUser.getUserSeq(), "/faisp/policeList").get(0).getAccessAuth();
mav.addObject("accessAuth", accessAuth);
userInfo.setQueryInfo();
mav.addObject("policeList", userInfoService.selectPoliceList(userInfo));
userInfo.setContentCnt(userInfoService.selectPoliceListCnt(userInfo));
userInfo.setPaginationInfo();
mav.addObject("mgtOrganList", loginUser.getDownOrganCdList());
mav.addObject("userStatus", userInfo.getUserStatus());
mav.addObject("searchParams", userInfo);
return mav;
}
}

View File

@ -0,0 +1,177 @@
<!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/faisp/police.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">
<div class="row justify-content-start">
<div class="col-12">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" id="presentTab" th:classappend="${userStatus eq 'USC003'?' active':''}" data-userstatus="USC003" data-bs-toggle="tab" type="button" role="tab">現외사경찰</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="previousTab" th:classappend="${userStatus eq 'USC006'?' active':''}" data-userstatus="USC006" data-bs-toggle="tab" type="button" role="tab">前외사경찰</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="notPoliceTab" th:classappend="${userStatus eq 'USC007'?' active':''}" data-userstatus="USC007" data-bs-toggle="tab" type="button" role="tab">非외사경찰</button>
</li>
</ul>
<div class="tab-content border border-top-0 p-3" id="userContent">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-12">
<form id="searchFm" method="get" th:action="@{/faisp/careerMgt}">
<input type="hidden" name="excel">
<input type="hidden" name="userStatus" th:value="${userStatus}">
<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">
<button type="button" class="btn btn-success" id="goExcel">엑셀다운</button>
</div>
</div>
<div class="row justify-content-end pe-3 py-1">
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<select class="form-select form-select-sm" name="ogCd">
<option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd eq commonCode.itemCd}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="sex">
<option value="">성별</option>
<th:block th:each="commonCode:${session.commonCode.get('SEX')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.sex eq commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="이름" name="userNm" th:value="${searchParams.userNm}">
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col-12">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>순번</th>
<th>계급</th>
<th>성명</th>
<th></th>
<th>현부서<br></th>
<th>생년월일</th>
<th>성별</th>
<th>외사경력</th>
<th>수사경력</th>
<th>정보경력</th>
<th>보안경력</th>
<th>국제경력</th>
<th>최종<br>수정일</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr class="policeTr" th:each="list:${policeList}">
<th:block>
<input type="hidden" class="userSeq" th:value="${list.userSeq}">
</th:block>
<td th:text="${list.rownum}"></td>
<td th:text="${list.titleCd}"></td>
<td th:text="${list.userNm}"></td>
<td th:text="${list.organNm}"></td>
<td th:text="${list.ofcCd}"></td>
<td th:text="${list.birthDate}"></td>
<td th:text="${list.sex}"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row justify-content-between">
<div class="col-auto">
</div>
<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">&laquo;</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">&raquo;</span>
</a>
</li>
</th:block>
</ul>
</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>
</div>
</div>
</div>
</div>
</div>
</div>
</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-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content" id="policeEditModalContent">
</div>
</div>
</div>
</div>
</html>

View File

@ -0,0 +1,179 @@
<!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/faisp/police.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">
<div class="row justify-content-start">
<div class="col-12">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" id="presentTab" th:classappend="${userStatus eq 'USC003'?' active':''}" data-userstatus="USC003" data-bs-toggle="tab" type="button" role="tab">現외사경찰</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="previousTab" th:classappend="${userStatus eq 'USC006'?' active':''}" data-userstatus="USC006" data-bs-toggle="tab" type="button" role="tab">前외사경찰</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="notPoliceTab" th:classappend="${userStatus eq 'USC007'?' active':''}" data-userstatus="USC007" data-bs-toggle="tab" type="button" role="tab">非외사경찰</button>
</li>
</ul>
<div class="tab-content border border-top-0 p-3" id="userContent">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-12">
<form id="searchFm" method="get" th:action="@{/faisp/educationMgt}">
<input type="hidden" name="excel">
<input type="hidden" name="userStatus" th:value="${userStatus}">
<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">
<button type="button" class="btn btn-success" id="goExcel">엑셀다운</button>
</div>
</div>
<div class="row justify-content-end pe-3 py-1">
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<select class="form-select form-select-sm" name="ogCd">
<option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd eq commonCode.itemCd}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="sex">
<option value="">성별</option>
<th:block th:each="commonCode:${session.commonCode.get('SEX')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.sex eq commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="이름" name="userNm" th:value="${searchParams.userNm}">
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col-12">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>순번</th>
<th>계급</th>
<th>성명</th>
<th></th>
<th>현부서<br></th>
<th>생년월일</th>
<th>성별</th>
<th>고등학교</th>
<th>전문대</th>
<th>대학교</th>
<th>석사</th>
<th>박사</th>
<th>전공</th>
<th>최종<br>수정일</th>
</tr>
</thead>
<tbody class="table-group-divider">
<tr class="policeTr" th:each="list:${policeList}">
<th:block>
<input type="hidden" class="userSeq" th:value="${list.userSeq}">
</th:block>
<td th:text="${list.rownum}"></td>
<td th:text="${list.titleCd}"></td>
<td th:text="${list.userNm}"></td>
<td th:text="${list.organNm}"></td>
<td th:text="${list.ofcCd}"></td>
<td th:text="${list.birthDate}"></td>
<td th:text="${list.sex}"></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row justify-content-between">
<div class="col-auto">
</div>
<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">&laquo;</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">&raquo;</span>
</a>
</li>
</th:block>
</ul>
</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>
</div>
</div>
</div>
</div>
</div>
</div>
</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-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content" id="policeEditModalContent">
</div>
</div>
</div>
</div>
</html>

View File

@ -0,0 +1,153 @@
<!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/faisp/police.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">
<form id="searchFm" method="get" th:action="@{/faisp/policeList}">
<div class="row justify-content-start pe-3 py-1">
<div class="col-auto">
<select class="form-select" name="rowCnt" id="rowCnt">
<option value="">연도</option>
<!--<th:block th:each="year : ${#numbers.sequence(2020, 2030)}">
<option th:value="${year}" th:text="${year}" th:selected="${searchParams.year eq year}"></option>
</th:block>-->
</select>
</div>
</div>
</form>
<div class="row justify-content-start">
<div class="col-12">
<div class="card">
<div class="card-body">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th rowspan="3">관서</th>
<th>정원</th>
<th>현원</th>
<th>과부족</th>
<th:block th:each="code:${jtList}">
<th colspan="2" th:text="${code.itemValue}"></th>
</th:block>
<th rowspan="3">수정일</th>
</tr>
<tr>
<th></th>
<th></th>
<th></th>
<th:block th:each="code:${jtList}">
<th>정원</th>
<th>현원</th>
</th:block>
</tr>
<tr>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th:block th:each="code:${jtList}">
<th>정원</th>
<th>현원</th>
</th:block>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
<th>cnt</th>
</tr>
</thead>
<tbody class="table-group-divider">
<!--<tr class="policeTr" th:each="list:${policeList}">
<th:block>
<input type="hidden" class="userSeq" th:value="${list.userSeq}">
</th:block>
<td th:text="${list.rownum}"></td>
<td th:text="${list.titleCd}"></td>
<td th:text="${list.userNm}"></td>
<td th:text="${list.organNm}"></td>
<td th:text="${list.ofcCd}"></td>
<td th:text="${list.birthDate}"></td>
<td th:text="${list.sex}"></td>
<td th:text="${list.policeInDate}"></td>
<td th:text="${list.titleInDate}"></td>
<td th:text="${list.ofcInDate}"></td>
<td th:text="${list.outturnCd}"></td>
<td></td>
<td th:text="${list.jobInCd}"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<th:block th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">
<td class="checkBoxTd"><input type="checkbox" name="policeChk" class="policeCheckBox"></td>
</th:block>
<th:block th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">
<td class="checkBoxTd"><input type="checkbox" name="policeChk" class="policeCheckBox"></td>
</th:block>
</tr>-->
</tbody>
</table>
<div class="row justify-content-between">
<div class="col-auto">
</div>
<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">&laquo;</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">&raquo;</span>
</a>
</li>
</th:block>
</ul>-->
</nav>
</div>
<div class="col-auto">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<div class="modal fade" id="personnelStatusEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="personnelStatusEditModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-scrollable">
<div class="modal-content" id="personnelStatusEditModalContent">
</div>
</div>
</div>
</div>
</html>

View File

@ -7,159 +7,167 @@
</th:block>
<div layout:fragment="content">
<main class="pt-3">
<h4 th:text="${userStatus eq 'USC003' ? '現 외사경찰 현황' : userStatus eq 'USC006' ? '前 외사경찰 현황' : userStatus eq 'USC007' ? '非 외사경찰 현황' : null}"></h4>
<h4 th:text="${userStatus eq 'USC003' ? '現 외사경찰 현황' : (userStatus eq 'USC006' ? '前 외사경찰 현황' : (userStatus eq 'USC007' ? '非 외사경찰 현황' : null))}"></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">
<form id="searchFm" method="get" th:action="@{/faisp/policeList}">
<input type="hidden" name="excel">
<input type="hidden" name="userStatus" th:value="${userStatus}">
<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">
<button type="button" class="btn btn-success" id="goExcel">엑셀다운</button>
</div>
</div>
<div class="row justify-content-end pe-3 py-1">
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<select class="form-select form-select-sm" name="ogCd">
<option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd eq commonCode.itemCd}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="sex">
<option value="">성별</option>
<th:block th:each="commonCode:${session.commonCode.get('SEX')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.sex eq commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="이름" name="userNm" th:value="${searchParams.userNm}">
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
<div class="card-body">
<div class="row justify-content-start">
<div class="col-12">
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" id="presentTab" th:classappend="${userStatus eq 'USC003'?' active':''}" data-userstatus="USC003" data-bs-toggle="tab" type="button" role="tab">現외사경찰</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="previousTab" th:classappend="${userStatus eq 'USC006'?' active':''}" data-userstatus="USC006" data-bs-toggle="tab" type="button" role="tab">前외사경찰</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="notPoliceTab" th:classappend="${userStatus eq 'USC007'?' active':''}" data-userstatus="USC007" data-bs-toggle="tab" type="button" role="tab">非외사경찰</button>
</li>
</ul>
<div class="card">
<div class="card-body">
<div class="row">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>순번</th>
<th>계급</th>
<th>성명</th>
<th></th>
<th>현부서<br></th>
<th>생년월일</th>
<th>성별</th>
<th>최초<br>임용</th>
<th>현 계급<br>임용</th>
<th>현 부서<br>임용</th>
<th>수사경과<br>보유여부</th>
<th>외사경력</th>
<th>입직<br>경로</th>
<th>최종<br>수정일</th>
<th:block th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">
<th>전출<input type="checkbox" id="chk-all"></th>
</th:block>
<th:block th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">
<th>전입<input type="checkbox" id="chk-all"></th>
</th:block>
</tr>
</thead>
<tbody class="table-group-divider">
<tr class="policeTr" th:each="list:${policeList}">
<th:block>
<input type="hidden" class="userSeq" th:value="${list.userSeq}">
</th:block>
<td th:text="${list.rownum}"></td>
<td th:text="${list.titleCd}"></td>
<td th:text="${list.userNm}"></td>
<td th:text="${list.organNm}"></td>
<td th:text="${list.ofcCd}"></td>
<td th:text="${list.birthDate}"></td>
<td th:text="${list.sex}"></td>
<td th:text="${list.policeInDate}"></td>
<td th:text="${list.titleInDate}"></td>
<td th:text="${list.ofcInDate}"></td>
<td th:text="${list.outturnCd}"></td>
<td></td>
<td th:text="${list.jobInCd}"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<th:block th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">
<td class="checkBoxTd"><input type="checkbox" name="policeChk" class="policeCheckBox"></td>
</th:block>
<th:block th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">
<td class="checkBoxTd"><input type="checkbox" name="policeChk" class="policeCheckBox"></td>
</th:block>
</tr>
</tbody>
</table>
</div>
<div class="row justify-content-between">
<div class="col-auto">
</div>
<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">&laquo;</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">&raquo;</span>
</a>
</li>
</th:block>
</ul>
</nav>
<ul class="nav nav-tabs" id="userTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" id="presentTab" th:classappend="${userStatus eq 'USC003'?' active':''}" data-userstatus="USC003" data-bs-toggle="tab" type="button" role="tab">現외사경찰</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="previousTab" th:classappend="${userStatus eq 'USC006'?' active':''}" data-userstatus="USC006" data-bs-toggle="tab" type="button" role="tab">前외사경찰</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="notPoliceTab" th:classappend="${userStatus eq 'USC007'?' active':''}" data-userstatus="USC007" data-bs-toggle="tab" type="button" role="tab">非외사경찰</button>
</li>
</ul>
<div class="tab-content border border-top-0 p-3" id="userContent">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-12">
<form id="searchFm" method="get" th:action="@{/faisp/policeList}">
<input type="hidden" name="excel">
<input type="hidden" name="userStatus" th:value="${userStatus}">
<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">
<button type="button" class="btn btn-success" id="goExcel">엑셀다운</button>
</div>
</div>
<div class="row justify-content-end pe-3 py-1">
<div class="col-auto">
<div class="row justify-content-end">
<div class="col-auto">
<select class="form-select form-select-sm" name="ogCd">
<option value="">관서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd eq commonCode.itemCd}"></option>
</th:block>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="sex">
<option value="">성별</option>
<th:block th:each="commonCode:${session.commonCode.get('SEX')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.sex eq commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" placeholder="이름" name="userNm" th:value="${searchParams.userNm}">
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col-12">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>순번</th>
<th>계급</th>
<th>성명</th>
<th></th>
<th>현부서<br></th>
<th>생년월일</th>
<th>성별</th>
<th>최초<br>임용</th>
<th>현 계급<br>임용</th>
<th>현 부서<br>임용</th>
<th>수사경과<br>보유여부</th>
<th>외사경력</th>
<th>입직<br>경로</th>
<th>최종<br>수정일</th>
<th:block th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">
<th>전출<input type="checkbox" id="chk-all"></th>
</th:block>
<th:block th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">
<th>전입<input type="checkbox" id="chk-all"></th>
</th:block>
</tr>
</thead>
<tbody class="table-group-divider">
<tr class="policeTr" th:each="list:${policeList}">
<th:block>
<input type="hidden" class="userSeq" th:value="${list.userSeq}">
</th:block>
<td th:text="${list.rownum}"></td>
<td th:text="${list.titleCd}"></td>
<td th:text="${list.userNm}"></td>
<td th:text="${list.organNm}"></td>
<td th:text="${list.ofcCd}"></td>
<td th:text="${list.birthDate}"></td>
<td th:text="${list.sex}"></td>
<td th:text="${list.policeInDate}"></td>
<td th:text="${list.titleInDate}"></td>
<td th:text="${list.ofcInDate}"></td>
<td th:text="${list.outturnCd}"></td>
<td></td>
<td th:text="${list.jobInCd}"></td>
<td th:text="${#temporals.format(list.wrtDt, 'yyyy-MM-dd HH:mm')}"></td>
<th:block th:if="${userStatus eq 'USC003'} and ${accessAuth eq 'ACC003'}">
<td class="checkBoxTd"><input type="checkbox" name="policeChk" class="policeCheckBox"></td>
</th:block>
<th:block th:if="${accessAuth eq 'ACC003'} and (${userStatus eq 'USC006'} or ${userStatus eq 'USC007'})">
<td class="checkBoxTd"><input type="checkbox" name="policeChk" class="policeCheckBox"></td>
</th:block>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row justify-content-between">
<div class="col-auto">
</div>
<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">&laquo;</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">&raquo;</span>
</a>
</li>
</th:block>
</ul>
</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 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>
</div>
@ -170,10 +178,10 @@
</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="policeEditModal" 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="policeEditModalContent">
</div>
</div>
</div>