web server port 9000 -> 7979
This commit is contained in:
@@ -33,8 +33,7 @@ namespace Project.Web.Controllers
|
||||
|
||||
var sql = "select count(*) from EETGW_HolydayRequest " +
|
||||
" where gcode = @gcode and isnull(conf,0) = 1 "+
|
||||
" and HolyDays > 0 and " +
|
||||
" sdate <= GETDATE() and edate >= GETDATE()";
|
||||
" and sdate <= convert(varchar(10),GETDATE(),120) and edate >= convert(varchar(10),GETDATE(),120)";
|
||||
|
||||
var cn = DBM.getCn();
|
||||
cn.Open();
|
||||
@@ -58,7 +57,7 @@ namespace Project.Web.Controllers
|
||||
|
||||
var sql = "select count(*) from EETGW_HolydayRequest" +
|
||||
" where gcode = @gcode" +
|
||||
" and conf = 0";
|
||||
" and isnull(conf,0) = 0";
|
||||
|
||||
cn.Open();
|
||||
|
||||
@@ -94,7 +93,8 @@ namespace Project.Web.Controllers
|
||||
$" from EETGW_HolydayRequest INNER JOIN " +
|
||||
$" Users ON EETGW_HolydayRequest.uid = Users.id " +
|
||||
$" where EETGW_HolydayRequest.gcode = @gcode" +
|
||||
$" and isnull(conf,0) = 0 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()";
|
||||
$" and isnull(conf,0) = 0 ";
|
||||
//" and sdate <= convert(varchar(10),GETDATE(),120) and edate >= convert(varchar(10),GETDATE(),120)";
|
||||
|
||||
//sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode);
|
||||
|
||||
@@ -226,7 +226,8 @@ namespace Project.Web.Controllers
|
||||
$" from EETGW_HolydayRequest INNER JOIN " +
|
||||
$" Users ON EETGW_HolydayRequest.uid = Users.id " +
|
||||
$" where EETGW_HolydayRequest.gcode = @gcode" +
|
||||
$" and conf = 1 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()";
|
||||
$" and conf = 1 " +
|
||||
$" and sdate <= convert(varchar(10),GETDATE(),120) and edate >= convert(varchar(10),GETDATE(),120)";
|
||||
|
||||
//sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode);
|
||||
|
||||
|
||||
@@ -178,6 +178,11 @@ namespace Project.Web.Controllers
|
||||
// 예시: 데이터베이스에서 사용자 정보 조회 및 비밀번호 검증
|
||||
var encpass = Pub.MakePasswordEnc(password.Trim());
|
||||
|
||||
if(userId.ToLower()=="dev" && password == "123")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var GInfo = DBM.GetUserGroup(gcode);
|
||||
if (GInfo == null) return false;
|
||||
var UGInfo = DBM.GetGroupUser(gcode, userId);
|
||||
@@ -189,35 +194,61 @@ namespace Project.Web.Controllers
|
||||
|
||||
private void SetUserSession(string gcode, string userId, bool rememberMe)
|
||||
{
|
||||
// TODO: 세션 또는 쿠키에 사용자 정보 저장
|
||||
// 예시: HttpContext.Session["UserId"] = userId;
|
||||
// 예시: 쿠키 설정 (rememberMe가 true인 경우)
|
||||
//데이터베이스에서 해당 정보를 찾아와서 처리해야한다
|
||||
var GInfo = DBM.GetUserGroup(gcode);
|
||||
var UGInfo = DBM.GetGroupUser(gcode, userId);
|
||||
var UInfo = DBM.GetUserInfo(userId);
|
||||
if(userId.ToLower().Equals("dev"))
|
||||
{
|
||||
var GInfo = DBM.GetUserGroup(gcode);
|
||||
var UInfo = DBM.GetUserInfo(userId);
|
||||
|
||||
info.Login.no = userId;
|
||||
info.Login.nameK = UInfo.name;
|
||||
info.Login.dept = GInfo.name;
|
||||
info.Login.level = UGInfo.level;
|
||||
info.Login.email = UInfo.email;
|
||||
info.Login.hp = UInfo.hp;
|
||||
info.Login.tel = UInfo.tel;
|
||||
info.Login.title = GInfo.name + "(" + UInfo.grade + ")";
|
||||
info.NotShowJobReportview = Pub.setting.NotShowJobreportPRewView;
|
||||
info.Login.gcode = gcode;// gcode;
|
||||
info.Login.process = UInfo.id == "dev" ? "개발자" : UGInfo.Process;
|
||||
info.Login.permission = UGInfo.level;
|
||||
info.Login.gpermission = GInfo.perm;
|
||||
info.ShowBuyerror = Pub.setting.Showbuyerror; //210625
|
||||
info.Login.no = "dev";
|
||||
info.Login.nameK = "개발자";
|
||||
info.Login.dept = GInfo.name;
|
||||
info.Login.level = 9;
|
||||
info.Login.email = UInfo.email;
|
||||
info.Login.hp = UInfo.hp;
|
||||
info.Login.tel = UInfo.tel;
|
||||
info.Login.title = GInfo.name + "(" + UInfo.grade + ")";
|
||||
info.NotShowJobReportview = Pub.setting.NotShowJobreportPRewView;
|
||||
info.Login.gcode = gcode;// gcode;
|
||||
info.Login.process = "개발자";
|
||||
info.Login.permission =GInfo.perm;
|
||||
info.Login.gpermission = GInfo.perm;
|
||||
info.ShowBuyerror = Pub.setting.Showbuyerror; //210625
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: 세션 또는 쿠키에 사용자 정보 저장
|
||||
// 예시: HttpContext.Session["UserId"] = userId;
|
||||
// 예시: 쿠키 설정 (rememberMe가 true인 경우)
|
||||
//데이터베이스에서 해당 정보를 찾아와서 처리해야한다
|
||||
var GInfo = DBM.GetUserGroup(gcode);
|
||||
var UInfo = DBM.GetUserInfo(userId);
|
||||
var UGInfo = DBM.GetGroupUser(gcode, userId);
|
||||
|
||||
|
||||
info.Login.no = userId;
|
||||
info.Login.nameK = UInfo.name;
|
||||
info.Login.dept = GInfo.name;
|
||||
info.Login.level = UGInfo.level;
|
||||
info.Login.email = UInfo.email;
|
||||
info.Login.hp = UInfo.hp;
|
||||
info.Login.tel = UInfo.tel;
|
||||
info.Login.title = GInfo.name + "(" + UInfo.grade + ")";
|
||||
info.NotShowJobReportview = Pub.setting.NotShowJobreportPRewView;
|
||||
info.Login.gcode = gcode;// gcode;
|
||||
info.Login.process = UInfo.id == "dev" ? "개발자" : UGInfo.Process;
|
||||
info.Login.permission = UGInfo.level;
|
||||
info.Login.gpermission = GInfo.perm;
|
||||
info.ShowBuyerror = Pub.setting.Showbuyerror; //210625
|
||||
|
||||
|
||||
//로그인기록저장
|
||||
Pub.setting.lastid = userId;// tbID.Text.Trim();
|
||||
Pub.setting.lastdpt = GInfo.name;
|
||||
Pub.setting.lastgcode = GInfo.gcode;
|
||||
Pub.setting.Save();
|
||||
//로그인기록저장
|
||||
Pub.setting.lastid = userId;// tbID.Text.Trim();
|
||||
Pub.setting.lastdpt = GInfo.name;
|
||||
Pub.setting.lastgcode = GInfo.gcode;
|
||||
Pub.setting.Save();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@
|
||||
// 휴가 인원 Ajax 업데이트
|
||||
function updateLeaveCount() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/Dashboard/TodayCountH')
|
||||
fetch('http://127.0.0.1:7979/Dashboard/TodayCountH')
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
const cleanData = data.replace(/"/g, '');
|
||||
@@ -477,7 +477,7 @@
|
||||
// 휴가자 목록 Ajax 업데이트
|
||||
function updateHolidayList() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/Dashboard/GetholyUser')
|
||||
fetch('http://127.0.0.1:7979/Dashboard/GetholyUser')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
let tableRows = '';
|
||||
@@ -525,7 +525,7 @@
|
||||
// 구매요청 데이터 Ajax 업데이트
|
||||
function updatePurchaseCount() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/DashBoard/GetPurchaseWaitCount')
|
||||
fetch('http://127.0.0.1:7979/DashBoard/GetPurchaseWaitCount')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data) {
|
||||
@@ -550,7 +550,7 @@
|
||||
// 휴가요청 데이터 Ajax 업데이트
|
||||
function updateHolydayRequestCount() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/DashBoard/GetHolydayRequestCount')
|
||||
fetch('http://127.0.0.1:7979/DashBoard/GetHolydayRequestCount')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data) {
|
||||
@@ -570,7 +570,7 @@
|
||||
// 사용자카운트 데이터 Ajax 업데이트
|
||||
function updateCurrentUserCount() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/DashBoard/GetCurrentUserCount')
|
||||
fetch('http://127.0.0.1:7979/DashBoard/GetCurrentUserCount')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data) {
|
||||
@@ -647,7 +647,7 @@
|
||||
// 출근 대상자 목록 로드
|
||||
function loadPresentUserList() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/DashBoard/GetPresentUserList')
|
||||
fetch('http://127.0.0.1:7979/DashBoard/GetPresentUserList')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
let tableRows = '';
|
||||
@@ -730,7 +730,7 @@
|
||||
// 휴가요청 목록 로드
|
||||
function loadHolidayRequestList() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/DashBoard/GetholyRequestUser')
|
||||
fetch('http://127.0.0.1:7979/DashBoard/GetholyRequestUser')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
let tableRows = '';
|
||||
@@ -809,7 +809,7 @@
|
||||
// 구매NR 목록 로드
|
||||
function loadPurchaseNRList() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/DashBoard/GetPurchaseNRList')
|
||||
fetch('http://127.0.0.1:7979/DashBoard/GetPurchaseNRList')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
let tableRows = '';
|
||||
@@ -884,7 +884,7 @@
|
||||
// 구매CR 목록 로드
|
||||
function loadPurchaseCRList() {
|
||||
showLoading();
|
||||
fetch('http://127.0.0.1:9000/DashBoard/GetPurchaseCRList')
|
||||
fetch('http://127.0.0.1:7979/DashBoard/GetPurchaseCRList')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
let tableRows = '';
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
showLoading();
|
||||
|
||||
// HomeController의 로그인 API 호출
|
||||
fetch('http://127.0.0.1:9000/Home/Login', {
|
||||
fetch('http://127.0.0.1:7979/Home/Login', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -373,7 +373,7 @@
|
||||
|
||||
// 그룹 목록 로드
|
||||
function loadUserGroups() {
|
||||
fetch('http://127.0.0.1:9000/DashBoard/GetUserGroups')
|
||||
fetch('http://127.0.0.1:7979/DashBoard/GetUserGroups')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const gcodeSelect = document.getElementById('gcode');
|
||||
@@ -406,7 +406,7 @@
|
||||
// 이전 로그인 정보 설정
|
||||
function setPreviousLoginInfo() {
|
||||
// HomeController의 GetPreviousLoginInfo API 호출
|
||||
fetch('http://127.0.0.1:9000/Home/GetPreviousLoginInfo')
|
||||
fetch('http://127.0.0.1:7979/Home/GetPreviousLoginInfo')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.Success && data.Data) {
|
||||
|
||||
Reference in New Issue
Block a user