출근부 사용자 목록 수정

This commit is contained in:
chi
2022-02-15 09:32:39 +09:00
parent fdda87b48b
commit 6226bc2953
13 changed files with 131 additions and 47 deletions

View File

@@ -25,8 +25,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YARTE", "Sub\YARTE\YARTE.cs
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FTPClass", "Sub\arftp\FTPClass.csproj", "{150859D3-1C5D-4E20-B324-F9EBE188D893}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FTP_DB_Adapt", "FTP_DB_Adapt\FTP_DB_Adapt\FTP_DB_Adapt.csproj", "{BECE73DE-15C8-42B0-9F93-9484D745DF3A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FPM0000", "SubProject\FPM0000\FPM0000.csproj", "{D01A7891-AD0B-489B-8C45-F598C875FE26}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "arControl", "Sub\arCtl\arControl.csproj", "{F31C242C-1B15-4518-9733-48558499FE4B}"
@@ -109,14 +107,6 @@ Global
{150859D3-1C5D-4E20-B324-F9EBE188D893}.Release|Any CPU.ActiveCfg = Release|Any CPU
{150859D3-1C5D-4E20-B324-F9EBE188D893}.Release|Any CPU.Build.0 = Release|Any CPU
{150859D3-1C5D-4E20-B324-F9EBE188D893}.Release|x86.ActiveCfg = Release|Any CPU
{BECE73DE-15C8-42B0-9F93-9484D745DF3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BECE73DE-15C8-42B0-9F93-9484D745DF3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BECE73DE-15C8-42B0-9F93-9484D745DF3A}.Debug|x86.ActiveCfg = Debug|Any CPU
{BECE73DE-15C8-42B0-9F93-9484D745DF3A}.Debug|x86.Build.0 = Debug|Any CPU
{BECE73DE-15C8-42B0-9F93-9484D745DF3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BECE73DE-15C8-42B0-9F93-9484D745DF3A}.Release|Any CPU.Build.0 = Release|Any CPU
{BECE73DE-15C8-42B0-9F93-9484D745DF3A}.Release|x86.ActiveCfg = Release|Any CPU
{BECE73DE-15C8-42B0-9F93-9484D745DF3A}.Release|x86.Build.0 = Release|Any CPU
{D01A7891-AD0B-489B-8C45-F598C875FE26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D01A7891-AD0B-489B-8C45-F598C875FE26}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D01A7891-AD0B-489B-8C45-F598C875FE26}.Debug|x86.ActiveCfg = Debug|Any CPU

View File

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

View File

@@ -181,8 +181,8 @@ namespace JobReportMailService
List<ReportUserData> totWarnList = new List<ReportUserData>();
foreach (var uid in uids)
{
//if (uid.Key == "320854")
// Console.WriteLine("테스트");
if (uid.Key == "71188")
Console.WriteLine("테스트");
//이사용자의 날짜별 근무시간을 확인한다.
db = new EEEntities();
@@ -195,7 +195,7 @@ namespace JobReportMailService
var userdata = UserDatas.Where(t => t.pdate == dtstr); //해당날짜의 데이터를 확인한다.
var hrs = 0.0;
if (userdata.Any()) hrs = (double)userdata.Sum(t => t.hrs);
else continue; //동작하지 않게함.
//else continue; //동작하지 않게함.
//자료를 입력하지 않았거나, 입력시간이 8시간 미만이면 경고한다
if (hrs < 8.0)

View File

@@ -85,13 +85,14 @@ namespace Project
}
public MethodResult View()
public MethodResult View(bool nosubdir=false)
{
var config = RequestContext.Configuration;
if (config != null)
{
var routeData = config.Routes.GetRouteData(Request).Values.ToList();
var name_ctrl = routeData[0].Value.ToString();
if (nosubdir) name_ctrl = string.Empty;
var name_action = routeData[1].Value.ToString();
return View(name_ctrl, name_action);
}
@@ -101,6 +102,7 @@ namespace Project
}
}
public static void ApplyCommonValue(ref string contents)
{

View File

@@ -10,6 +10,36 @@ namespace Project
{
public class ResourceController : BaseController
{
//[HttpGet]
//public HttpResponseMessage Index()
//{
// //로그인이 되어있지않다면 로그인을 가져온다
// MethodResult result;
// result = View(true);
// var model = GetGlobalModel();
// var getParams = Request.GetQueryNameValuePairs();// GetParameters(data);
// //기본값을 찾아서 없애줘야한다
// var contents = result.Content;
// //공용값 적용
// ApplyCommonValue(ref contents);
// //최종문자 적용
// result.Content = contents;
// var resp = new HttpResponseMessage()
// {
// Content = new StringContent(
// result.Content,
// System.Text.Encoding.UTF8,
// "text/html")
// };
// return resp;
//}
[HttpGet]
public HttpResponseMessage file()
{
@@ -77,6 +107,17 @@ namespace Project
}
HttpContent resultContent = null;
if (v_resource.isEmpty() && v_ext.isEmpty())
{
v_resource = "index";
v_ext = "html";
isBinary = false;
content_type = "text/html";
}
var file = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "View", v_path, v_subdir, v_resource + "." + v_ext);
if (isBinary)

View File

@@ -832,4 +832,11 @@
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.AspNetCore.Components.WebAssembly.Server.6.0.2\build\Microsoft.AspNetCore.Components.WebAssembly.Server.targets" Condition="Exists('..\packages\Microsoft.AspNetCore.Components.WebAssembly.Server.6.0.2\build\Microsoft.AspNetCore.Components.WebAssembly.Server.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.AspNetCore.Components.WebAssembly.Server.6.0.2\build\Microsoft.AspNetCore.Components.WebAssembly.Server.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AspNetCore.Components.WebAssembly.Server.6.0.2\build\Microsoft.AspNetCore.Components.WebAssembly.Server.targets'))" />
</Target>
</Project>

View File

@@ -12,7 +12,7 @@ namespace Project.OWIN
{
public class Startup
{
public void Configuration(IAppBuilder appBuilder)
public void Configuration(IAppBuilder app)
{
// Configure Web API for Self-Host
HttpConfiguration config = new HttpConfiguration();
@@ -45,9 +45,9 @@ namespace Project.OWIN
config.Routes.Add("cssRoute", cssRoute);
config.Routes.Add("defaultRoute", defaultRoute);
appBuilder.UseStaticFiles();
appBuilder.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
appBuilder.UseWebApi(config);
app.UseStaticFiles();
app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
app.UseWebApi(config);
//appBuilder.UseFileServer(new FileServerOptions

View File

@@ -138,6 +138,7 @@ namespace Project
// Start OWIN host
try
{
WebApp.Start<OWIN.Startup>(url: "http://127.0.0.1:9000");
Console.WriteLine("start webapp");
Pub.log.AddI("웹지원 서버 준비 완료");

View File

@@ -10,6 +10,7 @@
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.7" targetFramework="net452" />
<package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.7" targetFramework="net452" />
<package id="Microsoft.AspNetCore.Components.WebAssembly.Server" version="6.0.2" targetFramework="net46" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net46" />
<package id="Microsoft.Owin" version="4.2.0" targetFramework="net46" />
<package id="Microsoft.Owin.Cors" version="4.2.0" targetFramework="net46" />

View File

@@ -90,19 +90,29 @@ namespace FBS0000
//해당 기간내의 사용
//var taUser = new dsMSSQLTableAdapters.EETGW_WorkTableUserTableAdapter();
var dtUser = JobReport.OrderBy(t => t.userProcess + t.name).GroupBy(t => t.id);// taUser.GetData(FCOMMON.info.Login.gcode, tbGrp.Text);
//var dtUser = JobReport.OrderBy(t => t.userProcess + t.name).GroupBy(t => t.id);// taUser.GetData(FCOMMON.info.Login.gcode, tbGrp.Text);
var dtUser = FCOMMON.DBM.getUserTable(); //업무일지 미사용자로인해서 사용자 목록은 이것을 사용한다 220215
var users = new List<userinfo>();
var seq = 0;
foreach (var item in dtUser)
foreach (System.Data.DataRow dr in dtUser.Rows)
{
var dr = item.First();
if (string.IsNullOrEmpty(dr.indate) == false)
{
//입사일자를 체크해서. 이 날짜가 입사일 이전이면 넘어간다
}
//var dr = item.First();
//if (string.IsNullOrEmpty(dr.indate) == false)
//{
// //입사일자를 체크해서. 이 날짜가 입사일 이전이면 넘어간다
//}
users.Add(new userinfo { grade = dr.grade, name = dr.name, empno = dr.id, seq = dr.userProcess, indate = dr.indate, outdate = dr.outdate });
users.Add(new userinfo
{
grade = dr["grade"].ToString(),
name = dr["name"].ToString(),
empno = dr["id"].ToString(),
seq = dr["process"].ToString(),
indate = dr["indate"].ToString(),
outdate = dr["outdate"].ToString()
});
seq += 1;
}
@@ -242,7 +252,7 @@ namespace FBS0000
var accday = 1;
while (accday <= timedays)
{
var remaintime = dr.CrTime - ((accday-1) * 8f);
var remaintime = dr.CrTime - ((accday - 1) * 8f);
var columnindex = c + curday;
var columnDate = (DateTime)this.fpSpread1_Sheet1.Columns[columnindex].Tag;
@@ -270,10 +280,21 @@ namespace FBS0000
}
else
{
var JRUser = JobReport.Where(t => t.id == item.empno && t.pdate == curDate.ToShortDateString());
var sum_hrs = JRUser.Sum(t => t.hrs);
var sum_ot = JRUser.Sum(t => t.ot);
var sum_ot2 = JRUser.Sum(t => t.ot2);
var pdate = curDate.ToShortDateString();
if (pdate == "2022-02-07" && item.empno == "66630")
{
}
var JRUser = JobReport.Where(t => t.id == item.empno && t.pdate == pdate);
var sum_hrs = 00.0;
var sum_ot = 00.0;//JRUser.Sum(t => t.ot);
var sum_ot2 = 00.0; //JRUser.Sum(t => t.ot2);
if (JRUser.Any())
{
sum_hrs = JRUser.Sum(t => t.hrs);
sum_ot = JRUser.Sum(t => t.ot);
sum_ot2 = JRUser.Sum(t => t.ot2);
}
if (bholy) //주말이다
{
@@ -291,7 +312,7 @@ namespace FBS0000
else
{
//평일인데 근무시간이 있다
if (sum_hrs > 0)
if (sum_hrs > 0 || sum_ot > 0)
{
if (sum_ot > 0 || sum_ot2 > 0)
{
@@ -310,7 +331,18 @@ namespace FBS0000
var celltag = fpSpread1_Sheet1.Cells[rowindex, c].Tag;
if (celltag == null) //다른곳에서 지정했다면 처리하지 않는다.
{
fpSpread1_Sheet1.Cells[rowindex, c].Value = string.Empty;
if (DateTime.Now.ToShortDateString().CompareTo(pdate) > 0)
{
fpSpread1_Sheet1.Cells[rowindex, c].Value = "--";
fpSpread1_Sheet1.Cells[rowindex, c].ForeColor = Color.Red;
}
else
{
fpSpread1_Sheet1.Cells[rowindex, c].Value = string.Empty;
fpSpread1_Sheet1.Cells[rowindex, c].ForeColor = Color.Black;
}
fpSpread1_Sheet1.Cells[rowindex, c].BackColor = Color.White;
//fpSpread1_Sheet1.Cells[rowindex, c].Note = string.Empty;
}

View File

@@ -427,6 +427,12 @@ namespace FCOMMON
return getTwoColumnList("vGroupUser", "id", "name", where, "name");
}
/// <summary>
/// id,name,dispname,dept,email,level,tel,process,grade
/// </summary>
/// <param name="baseLevel"></param>
/// <returns></returns>
public static System.Data.DataTable getUserTable(int baseLevel = 1)
{
var cn = getCn();
@@ -435,7 +441,7 @@ namespace FCOMMON
var retval = new sItemInfo();
retval.idx = -1;
string sql = "select [id],[name],([name] +'(' +[id] +')') as dispName,[dept],[email],[level],[tel],isnull(processs,'') as process " +
string sql = "select [id],[name],([name] +'(' +[id] +')') as dispName,isnull([dept],'') as dept,isnull(grade,'') as grade,[email],[level],[tel],isnull(processs,'') as process,isnull(indate,'') as indate, isnull(outdate,'') as outdate " +
" from vGroupUser " +
" where gcode='" + FCOMMON.info.Login.gcode + "' and [id] <> 'dev' and isnull(outdate,'') = '' and useUserState = 1 order by [name]";
var cmd = new SqlCommand(sql, cn);

View File

@@ -55,7 +55,7 @@ namespace FPJ0000
btSave.Visible = false;// curLevel >= 5;
btEdit.Text = curLevel >= 5 ? "승인(&E)" : "편집(&E)";
// binit = true;
// binit = true;
refreshData();
}
@@ -112,16 +112,16 @@ namespace FPJ0000
var ed = dtED.Text.Trim();
ta.Fill(this.dSKuntae.EETGW_HolydayRequest, FCOMMON.info.Login.gcode, sd, ed);
var sum_day = dSKuntae.EETGW_HolydayRequest.AsEnumerable().Where(t=>t.conf == 1).Sum(t => t.HolyDays);
var sum_day = dSKuntae.EETGW_HolydayRequest.AsEnumerable().Where(t => t.conf == 1).Sum(t => t.HolyDays);
var sum_time = dSKuntae.EETGW_HolydayRequest.AsEnumerable().Where(t => t.conf == 1).Sum(t => t.HolyTimes);
var sum_day2 = dSKuntae.EETGW_HolydayRequest.AsEnumerable().Where(t => t.conf == 0).Sum(t => t.HolyDays);
var sum_time2 = dSKuntae.EETGW_HolydayRequest.AsEnumerable().Where(t => t.conf == 0).Sum(t => t.HolyTimes);
sbday.Text = $"합계(일) = 승인:{sum_day}/미승인:{sum_day2}";
sbday.ForeColor = sum_day2 == 0 ? Color.Black : Color.Red;
sbday.ForeColor = sum_day2 == 0 ? Color.Black : Color.Red;
sbtime.Text = $"합계(시간) = 승인:{sum_time}/미승인:{sum_time2}";
sbtime.ForeColor = sum_time2 == 0 ? Color.Black : Color.Red;
sbtime.ForeColor = sum_time2 == 0 ? Color.Black : Color.Red;
////색상처리
//dv1.SuspendLayout();
//foreach(DataGridViewRow dr in this.dv1.Rows)
@@ -198,7 +198,7 @@ namespace FPJ0000
else
{
search = search.Replace("'", "''");
var collist = new string[] { "requestpart", "package", "projectname", "process", "[type]", "description", "tag" };
var collist = new string[] {"name", "Response", "HolyReason","remark" };
string filter = ""; // "itemna like ? or package like ? or projectname like ? or process like ? or [type] like ? or description like ?";
foreach (var col in collist)
{

View File

@@ -189,13 +189,17 @@ namespace FPJ0000.OtConfirm
}
//동일날짜에 등록된 자료가있다면 오류로 처리한다.
var db = new EEEntities();
string chkdt = tbSD.Value.ToShortDateString();
var existdb = db.EETGW_HolydayRequest.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.uid == uid.ToString() && t.sdate == chkdt).Any();
if(existdb)
if (dr.RowState == DataRowState.Detached)
{
FCOMMON.Util.MsgE("동일 날짜에 등록된 자료가 있습니다");
return ;
var db = new EEEntities();
string chkdt = tbSD.Value.ToShortDateString();
var existdb = db.EETGW_HolydayRequest.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.uid == uid.ToString() && t.sdate == chkdt).Any();
if (existdb)
{
FCOMMON.Util.MsgE("동일 날짜에 등록된 자료가 있습니다");
return;
}
}