The requested file was not found: " + filePath + "
"; + } + + + var resp = new HttpResponseMessage() + { + Content = new StringContent( + contents, + System.Text.Encoding.UTF8, + "text/html") + }; + + return resp; + } + + + } + + public class CommonModel + { + + + public int idx { get; set; } // 데이터고유번호 + public string gcode { get; set; } // 그룹코드(데이터 그룹간 식별) + public string grp { get; set; } // 코드그룹 + public string code { get; set; } // 코드 + public string svalue { get; set; } // 값(문자열) + public int ivalue { get; set; } // 값(숫자) + public float fvalue { get; set; } // 값(실수) + public string memo { get; set; } // 비고 + public string svalue2 { get; set; } // 값2(문자열) + public string wuid { get; set; } // 데이터기록자 사원번호 + public string wdate { get; set; } // 데이터를기록한일시 + } +} + + + diff --git a/Project/Web/Controller/DashBoardController.cs b/Project/Web/Controller/DashBoardController.cs index e243a12..db29bbf 100644 --- a/Project/Web/Controller/DashBoardController.cs +++ b/Project/Web/Controller/DashBoardController.cs @@ -31,7 +31,7 @@ namespace Project.Web.Controllers public string TodayCountH() { - var sql = "select count(*) from EETGW_HolydayRequest " + + var sql = "select count(*) from EETGW_HolydayRequest WITH (nolock) " + " where gcode = @gcode and isnull(conf,0) = 1 " + " and sdate <= convert(varchar(10),GETDATE(),120) and edate >= convert(varchar(10),GETDATE(),120)"; @@ -55,7 +55,7 @@ namespace Project.Web.Controllers { var cn = DBM.getCn(); - var sql = "select count(*) from EETGW_HolydayRequest" + + var sql = "select count(*) from EETGW_HolydayRequest WITH (nolock) " + " where gcode = @gcode" + " and isnull(conf,0) = 0"; @@ -90,7 +90,7 @@ namespace Project.Web.Controllers { var sql = string.Empty; sql = $" select uid,cate,sdate,edate,HolyReason,Users.name,holydays,holytimes,remark " + - $" from EETGW_HolydayRequest INNER JOIN " + + $" from EETGW_HolydayRequest WITH (nolock) INNER JOIN " + $" Users ON EETGW_HolydayRequest.uid = Users.id " + $" where EETGW_HolydayRequest.gcode = @gcode" + $" and isnull(conf,0) = 0 "; @@ -129,7 +129,7 @@ namespace Project.Web.Controllers public HttpResponseMessage GetJobData(string startDate = "", string endDate = "") { var sql = string.Empty; - + // 기본값 설정 (이번 달) if (string.IsNullOrEmpty(startDate) || string.IsNullOrEmpty(endDate)) { @@ -142,7 +142,7 @@ namespace Project.Web.Controllers sql = $" select idx,pdate,status,projectName, uid, requestpart, package,type,process,description," + " hrs,ot,otStart,otEnd" + - " from JobReport" + + " from JobReport WITH (nolock)" + " where gcode = @gcode and uid = @uid" + " and pdate between @startDate and @endDate" + " order by pdate desc, wdate desc"; @@ -188,10 +188,12 @@ namespace Project.Web.Controllers { var cn = DBM.getCn(); - var sql = "select count(*) " + - " from EETGW_GroupUser" + - " where gcode = @gcode" + - " and useUserState = 1 and useJobReport =1"; + + + var sql = "select count(*) from vGroupUser WITH (nolock) " + + " where gcode = @gcode and useUserState = 1 and useJobReport = 1" + + " and id not in (select uid from vEETGW_TodayNoneWorkUser where gcode = @gcode and kunmu = 0)"; + cn.Open(); @@ -276,12 +278,9 @@ namespace Project.Web.Controllers public HttpResponseMessage GetholyUser() { var sql = string.Empty; - sql = $" select uid,cate,sdate,edate,HolyReason,Users.name " + - $" from EETGW_HolydayRequest INNER JOIN " + - $" Users ON EETGW_HolydayRequest.uid = Users.id " + - $" where EETGW_HolydayRequest.gcode = @gcode" + - $" and conf = 1 " + - $" and sdate <= convert(varchar(10),GETDATE(),120) and edate >= convert(varchar(10),GETDATE(),120)"; + sql = $" select uid,type,cate,sdate,edate,title,dbo.getusername(uid) as name " + + $" from vEETGW_TodayNoneWorkUser WITH (nolock)" + + $" where gcode = @gcode and kunmu=0"; //sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode); @@ -317,7 +316,9 @@ namespace Project.Web.Controllers { try { - var sql = "select * from vGroupUser where gcode = @gcode and useUserState = 1 and useJobReport = 1"; + var sql = "select * from vGroupUser WITH (nolock) " + + " where gcode = @gcode and useUserState = 1 and useJobReport = 1" + + " and id not in (select uid from vEETGW_TodayNoneWorkUser where gcode = @gcode and kunmu = 0)"; var cs = Properties.Settings.Default.gwcs; var cn = new System.Data.SqlClient.SqlConnection(cs); @@ -360,7 +361,7 @@ namespace Project.Web.Controllers { try { - var sql = "select pdate, process, pumname, pumscale, pumunit, pumqtyreq, pumprice, pumamt from Purchase where gcode = @gcode and state = '---' order by pdate desc"; + var sql = "select pdate, process, pumname, pumscale, pumunit, pumqtyreq, pumprice, pumamt from Purchase WITH (nolock) where gcode = @gcode and state = '---' order by pdate desc"; var cs = Properties.Settings.Default.gwcs; var cn = new System.Data.SqlClient.SqlConnection(cs); @@ -385,7 +386,6 @@ namespace Project.Web.Controllers System.Text.Encoding.UTF8, "application/json") }; - return resp; } catch (Exception ex) @@ -403,7 +403,10 @@ namespace Project.Web.Controllers { try { - var sql = "select pdate, process, pumname, pumscale, pumunit, pumqtyreq, pumprice, pumamt from EETGW_PurchaseCR where gcode = @gcode and state = '---' order by pdate desc"; + var sql = "select pdate, process, pumname, pumscale, pumunit, pumqtyreq, pumprice, pumamt " + + " from EETGW_PurchaseCR WITH (nolock) " + + " where gcode = @gcode and state = '---'" + + " order by pdate desc"; var cs = Properties.Settings.Default.gwcs; var cn = new System.Data.SqlClient.SqlConnection(cs); diff --git a/Project/Web/wwwroot/Common.html b/Project/Web/wwwroot/Common.html new file mode 100644 index 0000000..78a467a --- /dev/null +++ b/Project/Web/wwwroot/Common.html @@ -0,0 +1,30 @@ + + + + + + + + +출근
+출근(대상)
0