20211207 新增与博晟培训考试对接写入数据接口以及页面数据呈现

This commit is contained in:
2021-12-07 16:34:32 +08:00
parent 3d3e34606e
commit 899a39776a
39 changed files with 8672 additions and 24 deletions
+18 -8
View File
@@ -20,18 +20,28 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
int maxId = 0;
string name = string.Empty;
var getPersonByIdCard = db.SitePerson_Person.Where(x => x.IdentityCard == idCard).OrderByDescending(x=>x.InTime).FirstOrDefault();
if (getPersonByIdCard != null)
{
name = getPersonByIdCard.PersonName;
projectId = getPersonByIdCard.ProjectId;
}
else
{
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == idCard && x.ProjectId == projectId);
if (getPerson != null)
{
name = getPerson.PersonName;
}
}
var getmax = db.T_d_facerecord.Where(x => x.ProjectId == projectId && x.RoleID == Intype).Select(x => x.ID);
if (getmax.Count() > 0)
{
maxId = getmax.Max() + 1;
}
string name = string.Empty;
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == idCard && x.ProjectId ==projectId);
if (getPerson != null)
{
name = getPerson.PersonName;
}
Model.T_d_facerecord newFacerecord = new Model.T_d_facerecord()
{
NewID = SQLHelper.GetNewID(),
@@ -44,9 +54,9 @@ namespace BLL
RecordDes = Intype,
InOrOut = (isIn == 1 ? "进门" : "出门"),
};
db.T_d_facerecord.InsertOnSubmit(newFacerecord);
db.SubmitChanges();
///// 根据出入记录 写入考勤记录
Model.t_d_facerecordItem facerecord = new Model.t_d_facerecordItem
{