커밋 APi 수정

This commit is contained in:
2026-02-10 15:26:26 +09:00
parent 2a838f3ce9
commit 4430040035
18 changed files with 1442 additions and 20 deletions

View File

@@ -801,6 +801,7 @@ SELECT T.*
<!-- user id, 이름, 부서코드, 직책코드, 사용자유형으로 사용자를 검색한다. -->
<select id="selectUserInfo" parameterType="map" resultType="map">
SELECT T.SABUN,
T.EMPSEQ,
T.USER_ID,
T.USER_PASSWORD,
T.USER_NAME,

View File

@@ -20,6 +20,7 @@
, UI.USER_TYPE
, UI.USER_TYPE_NAME
, UI.PARTNER_OBJID
, UI.EMPSEQ
, AI.AUTH_NAME
FROM
USER_INFO UI

View File

@@ -70,13 +70,69 @@ $(function(){
fn_delete();
});
//ERP 사용자 동기화
//ERP 사용자 동기화
$("#btnSyncErp").click(function(){
fn_syncErp();
});
});
//LoginId 업데이트 배치
$("#btnUpdateLoginId").click(function(){
fn_updateLoginId();
});
});
function fn_updateLoginId(){
if(confirm("기존 사용자의 LoginId(user_id)를 업데이트하시겠습니까?\n(ERP에서 로그인 ID를 가져와 DB를 업데이트합니다)")){
// 로딩 표시
Swal.fire({
title: '업데이트 중...',
text: 'LoginId를 업데이트하는 중입니다. 잠시만 기다려주세요.',
allowOutsideClick: false,
didOpen: () => {
Swal.showLoading();
}
});
$.ajax({
type : "POST",
url : "/admin/updateLoginIdManual.do",
dataType:"json",
success:function(data){
Swal.close();
if(data.success){
Swal.fire({
icon: 'success',
title: '업데이트 완료',
text: data.message,
confirmButtonText: '확인'
}).then((result) => {
if (result.isConfirmed) {
fn_search();
}
});
} else {
Swal.fire({
icon: 'error',
title: '업데이트 실패',
text: data.message,
confirmButtonText: '확인'
});
}
},
error:function(xhr, status, error){
Swal.close();
Swal.fire({
icon: 'error',
title: '오류 발생',
text: 'LoginId 업데이트 중 오류가 발생했습니다.',
confirmButtonText: '확인'
});
}
});
}
}
function fn_syncErp(){
if(confirm("ERP 시스템의 사원 정보를 동기화하시겠습니까?")){
// 로딩 표시
@@ -228,6 +284,7 @@ function fn_openUserHistory(userId){
<!-- <input type="button" value="사용자 등록" class="btns" id="btnRegist"> -->
<input type="button" value="삭제" class="btns" id="btnDelete">
<input type="button" value="ERP 사용자 동기화" class="btns" id="btnSyncErp" style="background-color:#4CAF50;color:white;">
<input type="button" value="LoginId 업데이트" class="btns" id="btnUpdateLoginId" style="background-color:#2196F3;color:white;">
</div>
<div id="adminTableWrap">
<div id="tableWrap">

View File

@@ -7,6 +7,7 @@
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
String userId = CommonUtils.checkNull(person.getUserId());
String authName = CommonUtils.checkNull(person.getAuthName());
String empseq = CommonUtils.checkNull(person.getEmpseq());
ArrayList userMenuList = new ArrayList();
userMenuList = (ArrayList)request.getAttribute("userMenuList");
%>
@@ -333,16 +334,21 @@ function openAdminMngPop(){
}
//결재건수조회
//결재건수조회 (Amaranth10만)
function fn_setApprovalCnt(){
// Amaranth10 결재 건수 조회
$.ajax({
url:"/approval/getApprovalCnt.do",
url:"/approval/getAmaranthApprovalCnt.do",
type:"POST",
data:{"userId":"${connectUserId}"},
data:{"userId":"${connectUserId}", "empseq":"<%=empseq%>"},
dataType:"json",
success:function(data){
var cnt = fnc_checkNullDefaultValue(data.CNT, "0");
var cnt = parseInt(fnc_checkNullDefaultValue(data.CNT, "0"));
console.log("Amaranth 결재 건수: " + cnt + "건");
$(".notice_no").text(cnt);
if(cnt > 0){
$("#blink").attr("class", "work_notice btnApprovalList blinkcss");
$(".blinkcss").children("span").children("img").attr({src:"/images/bell.gif"});
@@ -350,8 +356,12 @@ function fn_setApprovalCnt(){
$("#blink").attr("class", "work_notice btnApprovalList blink_none");
$(".blink_none").children("span").children("img").attr({src:"/images/bell.png"});
}
},
},
error: function(jqxhr, status, error){
console.log("Amaranth 결재 건수 조회 실패");
$(".notice_no").text("0");
$("#blink").attr("class", "work_notice btnApprovalList blink_none");
$(".blink_none").children("span").children("img").attr({src:"/images/bell.png"});
}
});
}

View File

@@ -14,6 +14,7 @@ String connectUserDeptCode = "";
String connectUserName = "";
String connectUserDeptName = "";
String partnerCd = "";
String empseq = "";
if(!isLoggedIn){
out.write("<script>Swal.fire('session was destroyed.');</script>");
out.write("<script>top.location.href='/index.do';</script>");
@@ -25,7 +26,7 @@ if(!isLoggedIn){
connectUserName = CommonUtils.checkNull(initPerson.getUserName());
connectUserDeptName = CommonUtils.checkNull(initPerson.getDeptName());
partnerCd = CommonUtils.checkNull(initPerson.getPartner_cd());
empseq = CommonUtils.checkNull(initPerson.getEmpseq());
if("plm_admin".equals(connectUserId)){
isAdmin = true;
}

View File

@@ -14,6 +14,7 @@ String connectUserDeptCode = "";
String connectUserName = "";
String connectUserDeptName = "";
String partnerCd = "";
String empseq = "";
if(!isLoggedIn){
out.write("<script>Swal.fire('session was destroyed.');</script>");
out.write("<script>top.location.href='/index.do';</script>");
@@ -25,7 +26,7 @@ if(!isLoggedIn){
connectUserName = CommonUtils.checkNull(initPerson.getUserName());
connectUserDeptName = CommonUtils.checkNull(initPerson.getDeptName());
partnerCd = CommonUtils.checkNull(initPerson.getPartner_cd());
empseq = CommonUtils.checkNull(initPerson.getEmpseq());
if("plm_admin".equals(connectUserId)){
isAdmin = true;
}

View File

@@ -10,6 +10,7 @@ String connectUserId = "";
String connectUserDeptCode = "";
String connectUserName = "";
String connectUserDeptName = "";
String empseq = "";
if(!isLoggedIn){
out.write("<script>Swal.fire('session was destroyed.');</script>");
out.write("<script>top.location.href='/index.do';</script>");
@@ -20,7 +21,7 @@ if(!isLoggedIn){
connectUserDeptCode = CommonUtils.checkNull(initPerson.getDeptCode());
connectUserName = CommonUtils.checkNull(initPerson.getUserName());
connectUserDeptName = CommonUtils.checkNull(initPerson.getDeptName());
empseq = CommonUtils.checkNull(initPerson.getEmpseq());
if("plm_admin".equals(connectUserId)){
isAdmin = true;
}