20220304 考勤导入、接口修改

This commit is contained in:
2022-03-04 16:15:21 +08:00
parent 5dd16e8bf7
commit 65dfdb13a9
84 changed files with 76 additions and 29 deletions
@@ -185,20 +185,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
result += "第" + (i + 2).ToString() + "行," + "单位" + "," + "[" + col0 + "]不在单位表中!" + "|";
}
}
if (!string.IsNullOrEmpty(col1))
{
var person = sitePersons.FirstOrDefault(e => e.PersonName == col1);
if (person == null)
{
result += "第" + (i + 2).ToString() + "行," + "姓名" + "," + "[" + col1 + "]不在人员信息表中!" + "|";
}
var personOut = sitePersons.FirstOrDefault(e => e.PersonName == col1 && e.OutTime.HasValue && e.OutTime < DateTime.Now);
if (personOut != null)
{
result += "第" + (i + 2).ToString() + "行," + "姓名" + "," + "[" + col1 + "]已离岗!" + "|";
}
}
if (!string.IsNullOrEmpty(col2))
{
var person = sitePersons.FirstOrDefault(e => e.IdentityCard == col2);
@@ -209,8 +196,26 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
else
{
result += "第" + (i + 2).ToString() + "行," + "身份证号码" + "," + "此项为必填项!" + "|";
if (!string.IsNullOrEmpty(col1))
{
var person = sitePersons.FirstOrDefault(e => e.PersonName == col1);
if (person == null)
{
result += "第" + (i + 2).ToString() + "行," + "姓名" + "," + "[" + col1 + "]不在人员信息表中!" + "|";
}
var personOut = sitePersons.FirstOrDefault(e => e.PersonName == col1 && (!e.OutTime.HasValue || e.OutTime > DateTime.Now));
if (personOut == null)
{
result += "第" + (i + 2).ToString() + "行," + "姓名" + "," + "[" + col1 + "]不在岗!" + "|";
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "身份证号码/姓名" + "," + "不能都为空!" + "|";
}
}
if (!string.IsNullOrEmpty(col3))
{
if (col3 != "进" && col3 != "出")