20220304 考勤导入、接口修改
This commit is contained in:
@@ -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 != "出")
|
||||
|
||||
Reference in New Issue
Block a user