web server port 9000 -> 7979

This commit is contained in:
backuppc
2025-07-14 10:58:26 +09:00
parent d97c17cfcb
commit 032f6e4c4e
20 changed files with 338 additions and 101 deletions

View File

@@ -66,7 +66,7 @@ namespace Project.Dialog
await this.webView21.EnsureCoreWebView2Async();
}
// OWIN 서버의 DashBoard 페이지로 연결
webView21.Source = new Uri("http://127.0.0.1:9000/DashBoard");
webView21.Source = new Uri($"{Pub.setting.WebServiceURL}/DashBoard");
label1.Visible = false;
}
catch (Exception ex)

View File

@@ -80,7 +80,7 @@ namespace Project.Dialog
webView21.CoreWebView2.WebMessageReceived += WebView2_WebMessageReceived;
// OWIN 서버의 Login 페이지로 연결
webView21.Source = new Uri("http://127.0.0.1:9000/Home/Login");
webView21.Source = new Uri($"{Pub.setting.WebServiceURL}/Home/Login");
label1.Visible = false;
}
catch (Exception ex)

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
// 지정되도록 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("25.07.02.2320")]
[assembly: AssemblyFileVersion("25.07.02.2320")]
[assembly: AssemblyVersion("25.07.14.1050")]
[assembly: AssemblyFileVersion("25.07.14.1050")]

View File

@@ -97,8 +97,6 @@ namespace Project
await webView21.EnsureCoreWebView2Async();
}
// OWIN 서버의 Login 페이지로 연결
//webView21.Source = new Uri("http://127.0.0.1:9000/Home/Login");
InitWebView = 1;
}
catch (Exception ex)

View File

@@ -8,7 +8,7 @@ namespace Project
{
public enum eFormList
{
=0,
= 0,
NR구매관리,
,
,
@@ -34,9 +34,9 @@ namespace Project
#endregion
[DisplayName("업무일지8시간초과입력불가"),Description("업무일지 근무시간 란에 8시간을 초과 입력 할 수 없게 합니다")]
[DisplayName("업무일지8시간초과입력불가"), Description("업무일지 근무시간 란에 8시간을 초과 입력 할 수 없게 합니다")]
public Boolean Disable8HourOver { get; set; }
//[DisplayName("원달러환율")]
//public double wondoller { get; set; }
[Description("시작 화면")]
@@ -61,7 +61,7 @@ namespace Project
public string SharedDataPath { get; set; }
[Category("구매"),DisplayName("오류항목표시")]
[Category("구매"), DisplayName("오류항목표시")]
public Boolean Showbuyerror { get; set; }
[DisplayName("업무일지 미리보기 창 숨김")]
@@ -70,6 +70,8 @@ namespace Project
[Category("Barcode"), DisplayName("Port Name")]
public string Barcode { get; set; }
public string WebServiceURL { get; set; }
[Browsable(false)]
public string lastid { get; set; }
[Browsable(false)]
@@ -81,9 +83,12 @@ namespace Project
[DisplayName("Tool Bar")]
public eToolPosition HideToolbar { get; set; }
public Setting() : this(Util.CurrentPath + "setting.xml") {}
public Setting() : this(Util.CurrentPath + "setting.xml") { }
public Setting(string file)
{
@@ -95,11 +100,14 @@ namespace Project
this.Load();
this.Save();
}
}
}
public override void AfterLoad()
{
//if (wondoller < 1) wondoller = 1200;
if (WebServiceURL.isEmpty())
WebServiceURL = "http://127.0.0.1:7979";
if (Language.isEmpty()) Language = "Kor";
if (Password_Setup.isEmpty()) Password_Setup = "0000";
if (Password_User.isEmpty()) Password_User = "9999";
@@ -112,9 +120,9 @@ namespace Project
var = Xml.get_Data("startForm");
var list = Enum.GetNames(typeof(eFormList));
int idx = -1;
for(int i = 0 ;i<list.Length;i++)
for (int i = 0; i < list.Length; i++)
{
if(list[i] == )
if (list[i] == )
{
idx = i;
}
@@ -143,7 +151,7 @@ namespace Project
this.Load();
this.Save();
}
}
}
public override void AfterLoad()
{
//throw new NotImplementedException();
@@ -153,5 +161,5 @@ namespace Project
//throw new NotImplementedException();
}
}
}

View File

@@ -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);

View File

@@ -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();
}
}

View File

@@ -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 = '';

View File

@@ -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) {

View File

@@ -116,6 +116,8 @@
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripSeparator();
this.webview2TestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.btDev = new System.Windows.Forms.ToolStripMenuItem();
this.purchaseImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -149,8 +151,7 @@
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
this.toolStripMenuItem17 = new System.Windows.Forms.ToolStripSeparator();
this.webview2TestToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.sbWeb = new System.Windows.Forms.ToolStripStatusLabel();
this.cmTab.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
@@ -188,7 +189,8 @@
this.sbBCD,
this.sbLogin,
this.toolStripStatusLabel1,
this.sbLoginUseTime});
this.sbLoginUseTime,
this.sbWeb});
this.statusStrip1.Location = new System.Drawing.Point(1, 622);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(1094, 22);
@@ -850,17 +852,29 @@
// 품목검색ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "품목검색ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 24);
this.ToolStripMenuItem.Size = new System.Drawing.Size(171, 24);
this.ToolStripMenuItem.Text = "품목 검색";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 대쉬보드ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "대쉬보드ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 24);
this.ToolStripMenuItem.Size = new System.Drawing.Size(171, 24);
this.ToolStripMenuItem.Text = "대쉬보드";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// toolStripMenuItem17
//
this.toolStripMenuItem17.Name = "toolStripMenuItem17";
this.toolStripMenuItem17.Size = new System.Drawing.Size(168, 6);
//
// webview2TestToolStripMenuItem
//
this.webview2TestToolStripMenuItem.Name = "webview2TestToolStripMenuItem";
this.webview2TestToolStripMenuItem.Size = new System.Drawing.Size(171, 24);
this.webview2TestToolStripMenuItem.Text = "Webview2 Test";
this.webview2TestToolStripMenuItem.Click += new System.EventHandler(this.webview2TestToolStripMenuItem_Click);
//
// 즐겨찾기ToolStripMenuItem
//
this.ToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("즐겨찾기ToolStripMenuItem.Image")));
@@ -1161,17 +1175,11 @@
this.toolStripButton3.ToolTipText = "휴가신청";
this.toolStripButton3.Click += new System.EventHandler(this.toolStripButton3_Click);
//
// toolStripMenuItem17
// sbWeb
//
this.toolStripMenuItem17.Name = "toolStripMenuItem17";
this.toolStripMenuItem17.Size = new System.Drawing.Size(177, 6);
//
// webview2TestToolStripMenuItem
//
this.webview2TestToolStripMenuItem.Name = "webview2TestToolStripMenuItem";
this.webview2TestToolStripMenuItem.Size = new System.Drawing.Size(180, 24);
this.webview2TestToolStripMenuItem.Text = "Webview2 Test";
this.webview2TestToolStripMenuItem.Click += new System.EventHandler(this.webview2TestToolStripMenuItem_Click);
this.sbWeb.Name = "sbWeb";
this.sbWeb.Size = new System.Drawing.Size(31, 17);
this.sbWeb.Text = "WEB";
//
// fMain
//
@@ -1324,6 +1332,7 @@
private System.Windows.Forms.ToolStripMenuItem NRCR기준금액입력ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem17;
private System.Windows.Forms.ToolStripMenuItem webview2TestToolStripMenuItem;
private System.Windows.Forms.ToolStripStatusLabel sbWeb;
}
}

View File

@@ -151,7 +151,7 @@ namespace Project
// Start OWIN host
try
{
var options = new StartOptions("http://127.0.0.1:9000");
var options = new StartOptions(Pub.setting.WebServiceURL);
webApp = WebApp.Start<OWIN.Startup>(options);
Console.WriteLine("start webapp");
Pub.log.AddI("웹지원 서버 준비 완료");
@@ -167,7 +167,7 @@ namespace Project
var wat = new System.Diagnostics.Stopwatch();
wat.Restart();
while(true)
while (true)
{
if (Pub.InitWebView != 0) break;
if (wat.ElapsedMilliseconds > 5000) break;
@@ -176,10 +176,10 @@ namespace Project
}
f.Dispose();
Func_Login();
///즐겨찾기 목록 갱신
Update_FavoriteSite();
@@ -217,7 +217,8 @@ namespace Project
void Func_Login()
{
//Pub.InitWebView = 2;
if (Pub.InitWebView == 1)
this.sbWeb.Text = $"Host:{(webok ? "O" : "X")},WebView:{Pub.InitWebView}";
if (webok && Pub.InitWebView == 1)
{
using (var f = new Dialog.fLogin_WB())
if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK)
@@ -1010,10 +1011,8 @@ namespace Project
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
var url = "http://localhost:9000/item/find";
var url = $"{Pub.setting.WebServiceURL}/item/find";
Util.RunExplorer(url);
//var f = new Dialog.fWebView("http://localhost:9000/item/find");
//f.Show();
}
@@ -1041,7 +1040,7 @@ namespace Project
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
Util.RunExplorer("http://127.0.0.1:9000/Manual");
Util.RunExplorer($"{Pub.setting.WebServiceURL}/Manual");
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)

View File

@@ -454,14 +454,14 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPY4CDmcasDEu1MxmW6ixgWKbTwrBYVx0svkqL
h2GZViHDMu15QPFWhmXqUmBxDLBUZzVQwX84Xqzzg2GJpifDMs3rKOJLtZ4ADZWA6oKCpVo2IEmBtZb/
/U7m/E+5XP8/92TF/3lzYj/U9OT/S73c8D/yXNl/1W1eUEO0+6A6oWCZzgT+NebHkq/Ufyu+1fO/5GbP
/U7m/E+5XP8/92TF/3lzYj/UdOf/S73c8D/yXNl/1W1eUEO0+6A6oWCZzgT+NebHkq/Ufyu+1fO/5GbP
/0Mzc/4/6kz7f3VS5k+QGAyb7A49wbBE5xpUJxQs1RUsvtVdB1PUcaj+//XSiP/7W+3/Xi/0+tyzrRBu
QPGtrgsg9VCdCFB8s3suTFHlpY5l5wtDDl5Odvt2MUjt/7YKp73FFzs+guQKbva8g2pBBTAXFN3sKQHx
X7RGiD8u8/x/JUPrz5NsG7XCm736QNs/F93qOQ/WgA6K7/QYF9/oOg7lMjwu9vR8VOrxH4xLvDxAYkBX
lgItagErwAaK73SLQZkMTyq8smAGPKn0zgSJ1d+v58i9NZEPrIAQeFTh2fek3Os/CD8u9+qFChMPgP7f
CPdCqccGqDBx4P/+eo4XXVGn3/TE/Qfhl52Rp0BiUGns4N+Bfs2/B3r7/h/oPXP/QO9vIP0fGUPFzoDV
7O/RgGoDatw2kR0oOP/CxPp/6JpwYZDavwd65oH0Mvzd39uLTRExGKQX6PQ+W6Bpy4ECq0jBID3/DvTZ
AgBXZap4/fGa+QAAAABJRU5ErkJggg==
7O/RgGoDatw2kR0oOP/8hPp/6JpwYZDavwd65oH0Mvzd39uLTRExGKQX6PQ+W6Bpy4ECq0jBID3/DvTZ
AgBRa6pzQEH+NwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">