Compare commits

..

No commits in common. "6706d51e527034306320aabc58e0b23643ee4f3b" and "79f18b1d24da1a11e1d4c654bf4cfaee4bce2d30" have entirely different histories.

20 changed files with 377 additions and 507 deletions

View File

@ -19,35 +19,8 @@ public class KwmsController {
private final UserInfoService userInfoService;
private final CodeMgtService codeMgtService;
@GetMapping("/getEmpInfoToJoinForm")
public ModelAndView getEmpInfo(VEmployee empInfo){
ModelAndView mav = new ModelAndView("login/joinForm");
if(userInfoService.selectUserInfoToDicCode(empInfo.getDicCode()) == null){
UserInfo userInfo = kwmsService.selectEmpInfo(empInfo.getDicCode());
if(userInfo==null){
mav.addObject("joinFlag", "F");
mav.addObject("userInfo", empInfo);
mav.addObject("msg", "검색 결과가 없습니다.");
}else{
mav.addObject("joinFlag", "T");
mav.addObject("userInfo", userInfo);
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"));
}
}else{
mav.addObject("joinFlag", "F");
mav.addObject("userInfo", empInfo);
mav.addObject("msg", "이미 가입된 식별번호입니다.");
}
return mav;
}
@GetMapping("/updateUserInfoToKwms")
public ModelAndView updateUserInfoToKwms(VEmployee empInfo){
@GetMapping("/getEmpInfo")
public ModelAndView getEmpInfo(VEmployee empInfo) throws Exception {
ModelAndView mav = new ModelAndView("login/joinForm");
if(userInfoService.selectUserInfoToDicCode(empInfo.getDicCode()) == null){
UserInfo userInfo = kwmsService.selectEmpInfo(empInfo.getDicCode());

View File

@ -30,7 +30,7 @@ public class KwmsService {
UserInfo userInfo = new UserInfo();
userInfo.setDicCode(empInfo.getDicCode());
userInfo.setUserNm(empInfo.getEmpNm());
userInfo.setSex(empInfo.getSex().strip());
userInfo.setSex(empInfo.getSex());
String[] positionAry = empInfo.getCallBuseoNm().split(" ");
userInfo.setOgCd(codeMgtService.searchCode("OG", positionAry[0]));
if (positionAry.length>1){

View File

@ -3,7 +3,6 @@ package com.dbnt.faisp.main.fpiMgt.affairResult.model;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.format.annotation.NumberFormat;
import javax.persistence.*;
import java.io.Serializable;

View File

@ -74,7 +74,7 @@ public class UserInfoService implements UserDetailsService {
}
public UserInfo selectUserInfo(Integer userSeq) {
return userInfoRepository.findByUserSeq(userSeq).orElse(null);
return userInfoRepository.findByUserSeq(userSeq).orElse(null);
}
public UserInfo selectUserInfoToDicCode(String dicCode){
@ -83,41 +83,42 @@ public class UserInfoService implements UserDetailsService {
@Transactional
public int updateUserApproval(List<UserInfo> userInfo) {
int cnt = 0;
for(UserInfo user: userInfo) {
UserInfo dbUserInfo = userInfoRepository.findById(user.getUserSeq()).orElse(null);
if(dbUserInfo != null) {
dbUserInfo.setUserStatus(user.getUserStatus());
userInfoRepository.save(dbUserInfo);
cnt++;
}
}
return cnt;
int cnt = 0;
for(UserInfo user: userInfo) {
UserInfo dbUserInfo = userInfoRepository.findById(user.getUserSeq()).orElse(null);
if(dbUserInfo != null) {
dbUserInfo.setUserStatus(user.getUserStatus());
userInfoRepository.save(dbUserInfo);
cnt++;
}
}
return cnt;
}
@Transactional
public int updateUserCompanion(List<UserInfo> userInfo) {
int cnt = 0;
for(UserInfo user: userInfo) {
UserInfo dbUserInfo = userInfoRepository.findById(user.getUserSeq()).orElse(null);
if(dbUserInfo != null) {
dbUserInfo.setUserStatus(user.getUserStatus());
userInfoRepository.save(dbUserInfo);
cnt++;
}
}
return cnt;
int cnt = 0;
for(UserInfo user: userInfo) {
UserInfo dbUserInfo = userInfoRepository.findById(user.getUserSeq()).orElse(null);
if(dbUserInfo != null) {
dbUserInfo.setUserStatus(user.getUserStatus());
userInfoRepository.save(dbUserInfo);
cnt++;
}
}
return cnt;
}
@Transactional
public void updateUser(UserInfo userInfo) {
UserInfo dbUserInfo = userInfoRepository.findById(userInfo.getUserSeq()).orElse(null);
dbUserInfo.setUserRole(userInfo.getUserRole());
userInfoRepository.save(dbUserInfo);
UserInfo dbUserInfo = userInfoRepository.findById(userInfo.getUserSeq()).orElse(null);
dbUserInfo.setUserRole(userInfo.getUserRole());
userInfoRepository.save(dbUserInfo);
}
public void userDelete(List<UserInfo> userInfo) {
userInfoRepository.deleteAll(userInfo);
userInfoRepository.deleteAll(userInfo);
}
public List<ParamMap> selectManagerList(ParamMap param) {
return userInfoMapper.selectManagerList(param);
return userInfoMapper.selectManagerList(param);
}
public List<DashboardConfig> getDashboardConfigList(Integer userSeq) {

View File

@ -36,14 +36,8 @@ public class userMgtController {
@GetMapping("/userEditModal")
public ModelAndView menuEditModal(UserInfo userInfo){
ModelAndView mav = new ModelAndView("adminPage/userMgt/userEditModal");
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"));
mav.addObject("OgList", codeMgtService.selectCodeMgtList("OG"));
mav.addObject("OfcList", codeMgtService.selectCodeMgtList("OFC"));
mav.addObject("userInfo", userInfoService.selectUserInfo(userInfo.getUserSeq()));
return mav;
}
@ -51,13 +45,15 @@ public class userMgtController {
@PostMapping("/userApproval")
@ResponseBody
public int userApproval(@RequestBody List<UserInfo> userInfo){
return userInfoService.updateUserApproval(userInfo);
int result = userInfoService.updateUserApproval(userInfo);
return result;
}
@PostMapping("/userCompanion")
@ResponseBody
public int userCompanion(@RequestBody List<UserInfo> userInfo){
return userInfoService.updateUserCompanion(userInfo);
int result = userInfoService.updateUserCompanion(userInfo);
return result;
}
@PostMapping("/updateUserInfo")

View File

@ -26,9 +26,6 @@
<if test="ofcCd != null and ofcCd != ''">
and ofc_cd = #{ofcCd}
</if>
<if test="titleCd != null and titleCd != ''">
and title_cd = #{titleCd}
</if>
</where>
</sql>
<select id="selectUserInfoList" resultType="UserInfo" parameterType="UserInfo">

View File

@ -2,8 +2,7 @@ let selectedList = [];
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
})
@ -110,8 +109,7 @@ function getFaRptEditModal(faRpt){
$("#faRptEditModal").modal('show');
$("#faRptDt").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
$("#content").summernote({
lang:'ko-KR',

View File

@ -2,8 +2,7 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
})
$(document).on('click', '#affairTab', function (){
@ -159,10 +158,13 @@ function getAffairEditModal(affairKey){
success: function(html){
$("#affairEditModalContent").empty().append(html)
$("#affairEditModal").modal('show');
$("#reportDt, #autoDelete").datepicker({
$("#reportDt").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
$("#autoDelete").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
$("#content").summernote({
lang:'ko-KR',

View File

@ -1,8 +1,7 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
})

View File

@ -2,8 +2,7 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
})
@ -119,8 +118,7 @@ function getPlanEditModal(planKey){
$("#planEditModal").modal('show');
$("#planDt").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
$("[name='detailPlanInfos']").summernote({
lang:'ko-KR',

View File

@ -2,8 +2,7 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
})
@ -209,10 +208,13 @@ function getResultEditModal(resultKey){
success: function(html){
$("#resultEditModalContent").empty().append(html)
$("#resultEditModal").modal('show');
$("#useDateSelectorDiv, #workDateSelectorDiv").datepicker({
$("#useDateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
$("#workDateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko"
});
$(".contactInfo").summernote({
lang:'ko-KR',

View File

@ -2,17 +2,12 @@ $(document).on('click', '#dicCodeSearchBtn', function (){
const dicCode = $("#dicCode").val();
if(dicCode!==''){
$.ajax({
url: '/kwms/getEmpInfoToJoinForm',
url: '/kwms/getEmpInfo',
data: {dicCode: dicCode},
type: 'GET',
dataType:"html",
success: function(html){
$("#userInsertModalContent").empty().append(html)
$(".dateSelector").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
},
error:function(e){
debugger

View File

@ -2,8 +2,7 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
})

View File

@ -38,8 +38,7 @@ $(document).on('click', '#commentSaveBtn', function (){
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
})

View File

@ -2,8 +2,7 @@
$(function(){
$("#dateSelectorDiv").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
language: "ko"
});
})

View File

@ -1,25 +1,13 @@
$(document).on('click', '#apprvTab', function (){
location.href='/userMgt/userMgtPage?userStatus=USC003';
})
$(document).on('click', '#stayTab', function (){
location.href='/userMgt/userMgtPage?userStatus=USC002';
})
$(document).on('click', '.userInfoTr', function (event){
if(!event.target.className.includes("heckBox")){
$(document).on('click', '.userInfoTr', function (){
if($('#userStatus').val() === 'USC003'){
$.ajax({
url: '/userMgt/userEditModal',
data: {userSeq: Number($(this).find(".userSeq").val())},
type: 'GET',
dataType:"html",
success: function(html){
$("#userEditModalContent").empty().append(html)
$(".dateSelector").datepicker({
format: "yyyy-mm-dd",
language: "ko",
autoclose: true
});
$("#configInfo").empty().append(html)
$("#userEditModal").modal('show');
},
error:function(){
@ -29,6 +17,20 @@ $(document).on('click', '.userInfoTr', function (event){
}
})
$(document).on('click', '#logTab', function (){
location.href='/userMgt/userMgtPage?userStatus=USC002'; 
})
$(document).on('click', '#contentTab', function (){
location.href='/userMgt/userMgtPage?userStatus=USC003';
})
$(document).ready( function() {
$('#chk-all').click( function() {
$('.userInfoCheckBox').prop('checked',this.checked);
});
});
$(document).on('click', '#approvalBtn', function (){
if(confirm("선택한 대상을 승인처리 하시겠습니까?")){
const checkArr = [];
@ -42,58 +44,6 @@ $(document).on('click', '#approvalBtn', function (){
}
})
$(document).on('click', '.statusBtn', function (){
const userInfoList = [];
userInfoList.push({
userSeq: $("#userSeq").val(),
userStatus: $(this).attr("data-status")
})
userApproval(userInfoList);
})
$(document).on('click', '#updateBtn', function (){
saveUserInfo();
})
$(document).on('click', '#deleteBtn', function (){
if(confirm("삭제 하시겠습니까?")){
console.log($("#userSeq").val());
deleteUser([{userSeq: Number($("#userSeq").val())}])
}
})
$(document).on('click', '#syncToKwmsBtn', function (){
syncUserInfoToKwms({userSeq: $("#userSeq").val()});
})
$(document).on('click', '#companionBtn', function (){
if(confirm("선택한 대상을 반려처리 하시겠습니까?")){
const checkArr = [];
$('input:checkbox[name=userChk]:checked').each(function (idx, el){
checkArr.push({});
const target = $(el);
checkArr[idx].userSeq = Number(target.parents('tr').find('.userSeq').val());
checkArr[idx].userStatus = "USC005"
})
userCompanion(checkArr);
}
})
function syncUserInfoToKwms(userInfo){
$.ajax({
type : 'POST',
url : "/userMgt/syncUserInfoToKwms",
data : JSON.stringify(userInfo),
contentType: 'application/json',
beforeSend: function (xhr){
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
},
success : function(data) {
alert("갱신 되었습니다.");
},
error : function(xhr, status) {
alert("갱신에 실패하였습니다");
}
})
}
function userApproval(checkArr){
$.ajax({
type : 'POST',
@ -113,6 +63,19 @@ function userApproval(checkArr){
})
}
$(document).on('click', '#companionBtn', function (){
if(confirm("선택한 대상을 반려처리 하시겠습니까?")){
const checkArr = [];
$('input:checkbox[name=userChk]:checked').each(function (idx, el){
checkArr.push({});
const target = $(el);
checkArr[idx].userSeq = Number(target.parents('tr').find('.userSeq').val());
checkArr[idx].userStatus = "USC005"
})
userCompanion(checkArr);
}
})
function userCompanion(checkArr){
$.ajax({
type : 'POST',
@ -132,29 +95,35 @@ function userCompanion(checkArr){
})
}
function saveUserInfo(){
if(confirm("저장하시겠습니까?")){
contentFade("in");
const formData = new FormData($("#userInfoUpdate")[0]);
$.ajax({
type : 'POST',
data : formData,
url : "/userMgt/updateUserInfo",
processData: false,
contentType: false,
success : function() {
alert("저장되었습니다.");
contentFade("out");
location.reload();
},
error : function(xhr, status) {
alert("저장에 실패하였습니다.");
contentFade("out");
}
})
$(document).on('click', '#updateBtn', function (){
if(confirm("저장하시겠습니까?")){
contentFade("in");
const formData = new FormData($("#userInfoUpdate")[0]);
$.ajax({
type : 'POST',
data : formData,
url : "/userMgt/updateUserInfo",
processData: false,
contentType: false,
success : function() {
alert("저장되었습니다.");
contentFade("out");
},
error : function(xhr, status) {
alert("저장에 실패하였습니다.");
contentFade("out");
}
})
}
}
})
$(document).on('click', '#deleteBtn', function (){
if(confirm("삭제 하시겠습니까?")){
console.log($("#userSeq").val());
deleteUser([{userSeq: Number($("#userSeq").val())}])
}
})
function deleteUser(userList){
$.ajax({
type : 'POST',

View File

@ -1,179 +1,107 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
<h5 class="modal-title" id="menuEditModalLabel">외사경찰 수정</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="userInfoUpdate" action="#" th:action="@{/admin/insertUserInfo}" method="post">
<input type="hidden" name="userSeq" id="userSeq" class="userSeq" th:value="${userInfo.userSeq}">
<input type="hidden" id="userStatus" name="userStatus" th:value="${userInfo.userStatus}">
<div class="mb-3 mt-3 row">
<label for="userRole" class="col-sm-2 col-form-label col-form-label-sm text-center ">시스템권한</label>
<div class="col-sm-4" id="userRole">
<label style="font-size: 12px">
<input type="radio" name="userRole" value="ROLE_ADMIN,ROLE_SUB_ADMIN,ROLE_USER"
th:checked="${userInfo.userRole eq 'ROLE_ADMIN,ROLE_SUB_ADMIN,ROLE_USER'}">관리자</label>
<label style="font-size: 12px">
<input type="radio" name="userRole" value="ROLE_SUB_ADMIN,ROLE_USER"
th:checked="${userInfo.userRole eq 'ROLE_SUB_ADMIN,ROLE_USER'}">서브관리자</label>
<label style="font-size: 12px">
<input type="radio" name="userRole" value="ROLE_USER"
th:checked="${userInfo.userRole eq 'ROLE_USER'}">일반사용자</label>
</div>
</div>
<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" th:value="${userInfo.dicCode}">
</div>
</div>
<div class="mb-3 row">
<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" th:value="${userInfo.userId}">
<label for="userId" style="font-size: 12px">6~20자 사이의 알파벳, 숫자를 입력하세요</label>
</div>
<label for="userNm" 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="userNm" name="userNm" autocomplete="off" th:value="${userInfo.userNm}">
</div>
</div>
<div class="mb-3 row">
<label for="modalPassword" class="col-sm-2 col-form-label col-form-label-sm text-center">비밀번호</label>
<div class="col-sm-4">
<input type="password" class="form-control form-control-sm" id="modalPassword" name="password" >
<label for="userId" style="font-size: 12px">8~16자 사이의 알파벳, 숫자, 특수문자 조합</label>
</div>
<label for="passwordConfirm" class="col-sm-2 col-form-label col-form-label-sm text-center">비밀번호 확인</label>
<div class="col-sm-4">
<input type="password" class="form-control form-control-sm" id="passwordConfirm">
</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" th:value="${userInfo.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" th:value="${userInfo.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-4">
<select class="form-select form-select-sm" id="sex" name="sex">
<option value="M" th:selected="${userInfo.sex eq 'M'}"></option>
<option value="F" th:selected="${userInfo.sex eq 'F'}"></option>
</select>
</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" th:value="${userInfo.birthDate}" readonly>
</div>
<label for="policeInDate" 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="policeInDate" name="policeInDate" th:value="${userInfo.policeInDate}" readonly>
</div>
</div>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">관서</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="ogCd" name="ogCd">
<option value="">--선택--</option>
<th:block th:each="code:${ogList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.ogCd}"></option>
</th:block>
</select>
</div>
<label for="organInDate" 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="organInDate" name="organInDate" th:value="${userInfo.organInDate}" readonly>
</div>
</div>
<div class="mb-3 row">
<label for="ofcCd" class="col-sm-2 col-form-label col-form-label-sm text-center">부서</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="ofcCd" name="ofcCd">
<option value="">--선택--</option>
<th:block th:each="code:${ofcList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.ofcCd}"></option>
</th:block>
</select>
</div>
<label for="ofcInDate" 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="ofcInDate" name="ofcInDate" th:value="${userInfo.ofcInDate}" readonly>
</div>
</div>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label col-form-label-sm text-center">계급</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="titleCd" name="titleCd">
<option value="">--선택--</option>
<th:block th:each="code:${titleList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.titleCd}"></option>
</th:block>
</select>
</div>
<label for="titleInDate" 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="titleInDate" name="titleInDate" th:value="${userInfo.titleInDate}" readonly>
</div>
</div>
<div class="mb-3 row">
<label for="outturnCd" class="col-sm-2 col-form-label col-form-label-sm text-center">경과</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="outturnCd" name="outturnCd">
<option value="">--선택--</option>
<th:block th:each="code:${outturnList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.groupCd}"></option>
</th:block>
</select>
</div>
<label for="seriesCd" class="col-sm-2 col-form-label col-form-label-sm text-center">직별</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="seriesCd" name="seriesCd">
<option value="">--선택--</option>
<th:block th:each="code:${seriesList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.seriesCd}"></option>
</th:block>
</select>
</div>
</div>
<div class="mb-3 row">
<label for="languageCd" class="col-sm-2 col-form-label col-form-label-sm text-center">외국어특채</label>
<div class="col-sm-4">
<select class="form-select form-select-sm" id="languageCd" name="languageCd">
<option value="">--선택--</option>
<th:block th:each="code:${languageList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.groupCd}"></option>
</th:block>
</select>
</div>
</div>
</form>
</div>
<div class="modal-footer row justify-content-between">
<div class="col-auto">
<th:block th:if="${userInfo.userStatus eq 'USC002'}">
<button type="button" class="btn btn-success statusBtn" data-status="USC003">승인</button>
<button type="button" class="btn btn-warning statusBtn" data-status="USC004">반려</button>
</th:block>
<th:block th:if="${userInfo.userStatus eq 'USC003'}">
<button type="button" class="btn btn-info" id="syncToKwmsBtn" th:disabled="${#strings.isEmpty(userInfo.dicCode)}">인사시스템 정보 불러오기</button>
<th:block th:if="${#strings.isEmpty(userInfo.dicCode)}">
<label for="syncToKwmsBtn" style="font-size: 12px">공무원식별번호가 필요합니다.</label>
</th:block>
</th:block>
<div class="tab-pane fade show active" id="accessTabPanel" role="tabpanel" aria-labelledby="accessTab" tabindex="0">
<form id="userInfoUpdate" action="#" th:action="@{/admin/insertUserInfo}" method="post">
<label style="font-size: 12px">
<input type="radio" name="userRole" value="ROLE_ADMIN,ROLE_USER" th:checked="${userInfo.userRole eq 'ROLE_ADMIN,ROLE_USER'}">
관리자</label>
<label style="font-size: 12px">
<input type="radio" name="userRole" value="ROLE_USER" th:checked="${userInfo.userRole eq 'ROLE_USER'}">
일반사용자</label>
<div class="mb-3 row">
<input type="hidden" name="userSeq" id="userSeq" class="userSeq" th:value="${userInfo.userSeq}">
<div class="mb-3 mt-3 row">
<label for="userId" class="col-sm-2 col-form-label text-center ">아이디</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="userId" name="userId" th:value="${userInfo.userId}" autocomplete="off" readonly>
<label for="userId" style="font-size: 12px">6~20자 사이의 알파벳, 숫자를 입력하세요</label>
</div>
<label for="userNm" class="col-sm-2 col-form-label text-center">이름</label>
<div class="col-sm-4">
<input type="text" class=" form-control" id="userNm" name="userNm" th:value="${userInfo.userNm}" autocomplete="off">
</div>
</div>
<div class="mb-3 row">
<label for="modalPassword" class="col-sm-2 col-form-label text-center">비밀번호 변경</label>
<div class="col-sm-4">
<input type="password" class="form-control" id="modalPassword" name="password" >
<label for="userId" style="font-size: 12px">8~16자 사이의 알파벳, 숫자, 특수문자 조합</label>
</div>
<label for="passwordConfirm" class="col-sm-2 col-form-label text-center">비밀번호 확인</label>
<div class="col-sm-4">
<input type="password" class="form-control" id="passwordConfirm">
</div>
</div>
<div class="mb-3 row">
<label for="tel" class="col-sm-2 col-form-label text-center">전화번호</label>
<div class="col-sm-4">
<input type="tel" class="form-control" id="tel">
</div>
<label for="email" class="col-sm-2 col-form-label text-center">이메일</label>
<div class="col-sm-4">
<input type="email" class="form-control" id="email">
</div>
</div>
<div class="mb-3 row">
<label for="telP" class="col-sm-2 col-form-label text-center">휴대전화</label>
<div class="col-sm-4">
<input type="tel" class="form-control" id="telP">
</div>
</div>
<div class="mb-3 row">
<label for="ogCd" class="col-sm-2 col-form-label text-center">관서</label>
<div class="col-sm-4">
<select class="form-control" id="ogCd" name="ogCd">
<option value="">--선택--</option>
<option th:each="val : ${OgList}" th:value="${val?.itemCd}" th:utext="${val?.itemValue}" th:selected="${val?.itemCd} == ${userInfo.ogCd}">
</option>
</select>
</div>
<label for="ofcCd" class="col-sm-2 col-form-label text-center">부서</label>
<div class="col-sm-4">
<select class="form-control" id="ofcCd" name="ofcCd">
<option value="">--선택--</option>
<option th:each="val : ${OfcList}" th:value="${val?.itemCd}" th:utext="${val?.itemValue}" th:selected="${val?.itemCd} == ${userInfo.ofcCd}">
</option>
</select>
</div>
</div>
<div class="mb-3 row" >
<label for="address" class="col-sm-2 col-form-label text-center">주소</label>
<div class="col-sm-8">
<input type="adress" class="form-control" id="address">
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-secondary" id="search">주소검색</button>
</div>
</div>
<div class="mb-3 row">
<label for="addresses" class="col-sm-2 col-form-label text-center">상세주소</label>
<div class="col-sm-10">
<input type="address" class="form-control" id="addresses">
</div>
</div>
<div class="mb-3 row">
<label for="photo" class="col-sm-2 col-form-label text-center">사진</label>
<div class="col-sm-4">
<input type="file" style="font-size: 12px" class="form-control" id="photo">
</div>
<label for="sign" class="col-sm-2 col-form-label text-center">서명</label>
<div class="col-sm-4">
<input type="file" style="font-size: 12px" class="form-control" id="sign">
</div>
</div>
<div class="mb-3 row">
<label for="tel" class="col-sm-2 col-form-label text-center">요청사항</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="need">
</div>
<label for="precautions" class="col-sm-2 col-form-label text-center">주의사항</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="precautions">
</div>
</div>
</div>
</form>
</div>
<div class="col-auto">
<button type="button" class="btn btn-danger" id="deleteBtn">삭제</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<button type="button" class="btn btn-primary" id="updateBtn">저장</button>
</div>
</div>
</html>

View File

@ -8,162 +8,164 @@
<div layout:fragment="content">
<main class="pt-3">
<h4>외사경찰 관리</h4>
<th:block th:if="${searchParams.userStatus == 'USC003'}">
<ul class="nav nav-tabs" id="boardTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" th:classappend="${searchParams.userStatus eq 'USC003'?'active':''}" id="apprvTab" data-bs-toggle="tab" type="button" role="tab">승인목록</button>
<button class="nav-link active" id="contentTab" data-bs-toggle="tab" data-bs-target="#contentDiv" type="button" role="tab">승인목록</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" th:classappend="${searchParams.userStatus ne 'USC003'?'active':''}" id="stayTab" data-bs-toggle="tab" type="button" role="tab">승인대기</button>
<button class="nav-link" id="logTab" data-bs-toggle="tab" data-bs-target="#logDiv" type="button" role="tab">승인대기</button>
</li>
</ul>
</th:block>
<th:block th:unless="${searchParams.userStatus == 'USC003'}">
<ul class="nav nav-tabs" id="boardTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link" id="contentTab" data-bs-toggle="tab" data-bs-target="#contentDiv" type="button" role="tab">승인목록</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link active" id="logTab" data-bs-toggle="tab" data-bs-target="#logDiv" type="button" role="tab">승인대기</button>
</li>
</ul>
</th:block>
<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 tab-content border border-top-0 p-2">
<form method="get" th:action="@{/userMgt/userMgtPage}">
<div class="col-12 card text-center">
<div class="card-body">
<form method="get" th:action="@{/userMgt/userMgtPage}">
<input type="hidden" name="userStatus" id="userStatus" th:value="${searchParams.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">
<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')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd==commonCode.itemCd}"></option>
</th:block>
</select>
<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">
<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')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ogCd==commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="ofcCd">
<option value="">부서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ofcCd==commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" name="userNm" placeholder="사용자명" th:value="${searchParams.userNm}">
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" name="userId" placeholder="사용자 아이디" th:value="${searchParams.userId}">
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="ofcCd">
<option value="">부서 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.ofcCd==commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<select class="form-select form-select-sm" name="titleCd">
<option value="">계급 선택</option>
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${searchParams.titleCd==commonCode.itemCd}"></option>
</th:block>
</select>
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" name="userNm" placeholder="사용자명" th:value="${searchParams.userNm}">
</div>
<div class="col-auto">
<input type="text" class="form-control form-control-sm" name="userId" placeholder="사용자 아이디" th:value="${searchParams.userId}">
</div>
<input type="submit" class="btn btn-sm btn-primary col-auto" id="searchBtn" value="검색">
</div>
</div>
</div>
</form>
<div class="row justify-content-start">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<table class="table table-striped">
<thead>
<tr>
<th> <input type="checkbox" class="allChk"></th>
<th>소속</th>
<th>부서</th>
<th>계급</th>
<th>성명</th>
<th>아이디</th>
<th>등록일</th>
</tr>
</thead>
<tbody>
<tr class="userInfoTr" th:each="userInfo:${userInfoList}">
<input type="hidden" name="userSeq" class="userSeq" th:value="${userInfo.userSeq}">
<td class="checkBoxTd">
<input type="checkbox" id="userChk" name="userChk" class="userInfoCheckBox" th:value="${userInfo.userSeq}">
</td>
<th:block th:if="${userInfo.ogCd eq null or userInfo.ogCd eq ''}">
<td></td>
</th:block>
<th:block th:unless="${userInfo.ogCd eq null or userInfo.ogCd eq ''}">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd == userInfo.ogCd}">
<td th:text="${commonCode.itemValue}"></td>
</form>
<div class="row justify-content-start">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row">
<table class="table table-striped">
<thead>
<tr>
<th> <input type="checkbox" id="chk-all" class="userInfoCheckBox"></th>
<th>소속</th>
<th>부서</th>
<th>계급</th>
<th>성명</th>
<th>아이디</th>
<th>등록일</th>
</tr>
</thead>
<tbody>
<tr class="userInfoTr" th:each="userInfo:${userInfoList}">
<input type="hidden" name="userSeq" class="userSeq" th:value="${userInfo.userSeq}">
<td>
<input type="checkbox" id="userChk" name="userChk" class="userInfoCheckBox" th:value="${userInfo.userSeq}">
</td>
<th:block th:if="${userInfo.ogCd eq null or userInfo.ogCd eq ''}">
<td></td>
</th:block>
<th:block th:unless="${userInfo.ogCd eq null or userInfo.ogCd eq ''}">
<th:block th:each="commonCode:${session.commonCode.get('OG')}">
<th:block th:if="${commonCode.itemCd == userInfo.ogCd}">
<td th:text="${commonCode.itemValue}"></td>
</th:block>
</th:block>
</th:block>
</th:block>
<th:block th:if="${userInfo.ofcCd eq null or userInfo.ofcCd eq ''}">
<td></td>
</th:block>
<th:block th:unless="${userInfo.ofcCd eq null or userInfo.ofcCd eq ''}">
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<th:block th:if="${commonCode.itemCd == userInfo.ofcCd}">
<td th:text="${commonCode.itemValue}"></td>
<th:block th:if="${userInfo.ofcCd eq null or userInfo.ofcCd eq ''}">
<td></td>
</th:block>
<th:block th:unless="${userInfo.ofcCd eq null or userInfo.ofcCd eq ''}">
<th:block th:each="commonCode:${session.commonCode.get('OFC')}">
<th:block th:if="${commonCode.itemCd == userInfo.ofcCd}">
<td th:text="${commonCode.itemValue}"></td>
</th:block>
</th:block>
</th:block>
</th:block>
<th:block th:if="${userInfo.titleCd eq null or userInfo.titleCd eq ''}">
<td></td>
</th:block>
<th:block th:unless="${userInfo.titleCd eq null or userInfo.titleCd eq ''}">
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd == userInfo.titleCd}">
<td th:text="${commonCode.itemValue}"></td>
<th:block th:if="${userInfo.titleCd eq null or userInfo.titleCd eq ''}">
<td></td>
</th:block>
<th:block th:unless="${userInfo.titleCd eq null or userInfo.titleCd eq ''}">
<th:block th:each="commonCode:${session.commonCode.get('JT')}">
<th:block th:if="${commonCode.itemCd == userInfo.titleCd}">
<td th:text="${commonCode.itemValue}"></td>
</th:block>
</th:block>
</th:block>
</th:block>
<td th:text="${userInfo.userNm}"></td>
<td th:text="${userInfo.userId}"></td>
<td th:text="${#temporals.format(userInfo.wrtDt, 'yyyy-MM-dd HH:mm:ss')}"></td>
</tr>
</tbody>
</table>
</div>
<div class="row justify-content-between">
<td th:text="${userInfo.userNm}"></td>
<td th:text="${userInfo.userId}"></td>
<td th:text="${#temporals.format(userInfo.wrtDt, 'yyyy-MM-dd HH:mm:ss')}"></td>
</tr>
</tbody>
</table>
</div>
<th:block th:if="${searchParams.userStatus == 'USC002'}">
<div class="col-auto">
<th:block th:if="${searchParams.userStatus eq 'USC002'}">
<input type="button" class="btn btn-success" value="승인" id="approvalBtn">
<input type="button" class="btn btn-warning" value="반려" id="companionBtn">
</th:block>
<th:block th:if="${searchParams.userStatus eq 'USC003'}">
<button type="button" class="btn btn-info" id="syncToKwmsAllBtn">인사시스템 정보 불러오기</button>
</th:block>
<input type="button" class="btn btn-success" value="반려" id="companionBtn">
</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>
</th:block>
<div class="row justify-content-center">
<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>
<div class="col-auto"></div>
</div>
</div>
</div>
@ -176,7 +178,20 @@
<div class="modal fade" id="userEditModal" 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="userEditModalContent">
<div class="modal-header">
<h5 class="modal-title" id="menuEditModalLabel">외사경찰 수정</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="tab-content border border-top-0" id="configInfo">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn" id="deleteBtn" style='background-color : red;float:left;'>삭제</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
<button type="button" class="btn btn-primary" id="updateBtn">저장</button>
</div>
</div>
</div>
</div>

View File

@ -207,6 +207,7 @@
</div>
</div>
<th:block th:unless="${#lists.isEmpty(result.apprvList)}">
<hr>
<th:block th:each="apprv,cnt:${result.apprvList}">
<div class="row justify-content-between py-1">
<div class="col-auto">

View File

@ -68,11 +68,11 @@
<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" th:value="${userInfo.birthDate}" readonly>
<input type="text" class="form-control form-control-sm" id="birthDate" name="birthDate" th:value="${userInfo.birthDate}">
</div>
<label for="policeInDate" 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="policeInDate" name="policeInDate" th:value="${userInfo.policeInDate}" readonly>
<input type="text" class="form-control form-control-sm" id="policeInDate" name="policeInDate" th:value="${userInfo.policeInDate}">
</div>
</div>
<div class="mb-3 row">
@ -87,7 +87,7 @@
</div>
<label for="organInDate" 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="organInDate" name="organInDate" th:value="${userInfo.organInDate}" readonly>
<input type="text" class="form-control form-control-sm" id="organInDate" name="organInDate" th:value="${userInfo.organInDate}">
</div>
</div>
<div class="mb-3 row">
@ -102,7 +102,7 @@
</div>
<label for="ofcInDate" 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="ofcInDate" name="ofcInDate" th:value="${userInfo.ofcInDate}" readonly>
<input type="text" class="form-control form-control-sm" id="ofcInDate" name="ofcInDate" th:value="${userInfo.ofcInDate}">
</div>
</div>
<div class="mb-3 row">
@ -117,7 +117,7 @@
</div>
<label for="titleInDate" 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="titleInDate" name="titleInDate" th:value="${userInfo.titleInDate}" readonly>
<input type="text" class="form-control form-control-sm" id="titleInDate" name="titleInDate" th:value="${userInfo.titleInDate}">
</div>
</div>
<div class="mb-3 row">
@ -126,7 +126,7 @@
<select class="form-select form-select-sm" id="outturnCd" name="outturnCd">
<option value="">--선택--</option>
<th:block th:each="code:${outturnList}">
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.outturnCd}"></option>
<option th:value="${code.itemCd}" th:text="${code.itemValue}" th:selected="${code.itemCd eq userInfo.groupCd}"></option>
</th:block>
</select>
</div>