This commit is contained in:
2021-09-09 16:46:34 +08:00
parent 41dafe1113
commit 0543d5bfbc
4 changed files with 42 additions and 20 deletions
+30 -10
View File
@@ -936,7 +936,7 @@ namespace BLL
}
}
}
InsertRealNamePushLog(null, proCode, "推送项目部/施工队数据", sucess, code, mess, data, pushContent);
InsertRealNamePushLog(null, proCode, "推送项目部/施工队", sucess, code, mess, data, pushContent);
}
else
{
@@ -970,10 +970,10 @@ namespace BLL
join v in Funs.DB.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId
where (identityCard == null || x.IdentityCard == identityCard)
&& y.JTProjectCode == proCode && z.JTproCode != null && x.IsCardNoOK ==true
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue
&& x.RealNameAddTime.HasValue) || (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.HasValue))
&& y.JTProjectCode == proCode && z.JTproCode != null && x.IsCardNoOK ==true && v.TeamId.HasValue
&& ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue)
|| (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.IsUsed && !x.OutTime.HasValue
&& x.HeadImage != null && x.HeadImage.Length > 0))
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select new
{
@@ -1102,8 +1102,8 @@ namespace BLL
join w in Funs.DB.Base_WorkPost on x.WorkPostId equals w.WorkPostId
join p in Funs.DB.Project_ProjectUnit on new { x.UnitId,x.ProjectId } equals new { p.UnitId,p.ProjectId }
where x.IdentityCard == identityCard && y.JTProjectCode == proCode
&& v.TeamId.HasValue && x.HeadImage != null && x.HeadImage.Length > 0
&& z.JTproCode != null
&& v.TeamId.HasValue && z.JTproCode != null
&& ((type ==Const.BtnAdd && x.HeadImage != null && x.HeadImage.Length > 0) || (type == Const.BtnModify && x.RealNameAddTime.HasValue))
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select new
{
@@ -1190,8 +1190,28 @@ namespace BLL
}
}
}
InsertRealNamePushLog(null, proCode, "推送人员数据", sucess, code, mess, data, pushContent);
if (data.Contains("已存在") || mess.Contains("已存在"))
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
foreach (var item in getData)
{
if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber))
{
var getPerson = db.SitePerson_Person.FirstOrDefault(x => x.PersonId == item.PersonId);
if (getPerson != null)
{
if (!getPerson.RealNameAddTime.HasValue)
{
getPerson.RealNameAddTime = DateTime.Now;
}
db.SubmitChanges();
}
}
}
}
}
}
else
{
@@ -1295,11 +1315,11 @@ namespace BLL
}
}
InsertRealNamePushLog(null, proCode, "推送考勤数据", sucess, code, mess, data, pushContent);
if (data.Contains("无法入场"))
if (data.Contains("无法入场") || mess.Contains("班组"))
{
foreach (var item in getData)
{
if (data.Contains(item.idcardNumber))
if (data.Contains(item.idcardNumber) || mess.Contains(item.idcardNumber))
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{