This commit is contained in:
parent
421678291c
commit
ec0c2febb2
|
|
@ -136,7 +136,12 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getInPersonListData(string projectId, string unitId, string personName, string identityCard, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.SitePerson_Person> getInPersonList = getInPersonLists.Where(x => x.ProjectId == projectId);
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
IQueryable<Model.SitePerson_Person> getInPersonList = from x in db.SitePerson_Person
|
||||
where x.States == Const.ProjectPersonStates_1
|
||||
select x;
|
||||
getInPersonList = getInPersonLists.Where(x => x.ProjectId == projectId);
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null)
|
||||
{
|
||||
if (unitId == "0")
|
||||
|
|
@ -171,7 +176,7 @@ namespace BLL
|
|||
x.CardNo,
|
||||
x.PersonName,
|
||||
x.UnitId,
|
||||
Funs.DB.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName,
|
||||
x.IdentityCard,
|
||||
IsInName = "",
|
||||
InOuDate = DateTime.Now.ToShortDateString(),
|
||||
|
|
@ -194,7 +199,7 @@ namespace BLL
|
|||
/// 定义变量
|
||||
/// </summary>
|
||||
private static IQueryable<Model.SitePerson_PersonInOutNow> getNowPersonLists = from x in Funs.DB.SitePerson_PersonInOutNow
|
||||
select x;
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
/// 获取分页列表
|
||||
|
|
@ -204,7 +209,7 @@ namespace BLL
|
|||
/// <returns></returns>
|
||||
public static IEnumerable getNowPersonListData(string projectId, string unitId, string workPostId, string personName, string identityCard, DateTime dateValue, Grid Grid1)
|
||||
{
|
||||
IQueryable<Model.SitePerson_PersonInOutNow> getDayAll = getNowPersonLists.Where(x=>x.ProjectId == projectId
|
||||
IQueryable<Model.SitePerson_PersonInOutNow> getDayAll = getNowPersonLists.Where(x => x.ProjectId == projectId
|
||||
&& x.ChangeTime.Value.Year == dateValue.Year && x.ChangeTime.Value.Month == dateValue.Month
|
||||
&& x.ChangeTime.Value.Day == dateValue.Day);
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null)
|
||||
|
|
@ -230,7 +235,7 @@ namespace BLL
|
|||
group x by x.PersonId into g
|
||||
select new
|
||||
{
|
||||
ProjectId = g.First().ProjectId,
|
||||
ProjectId = g.First().ProjectId,
|
||||
PersonId = g.First().PersonId,
|
||||
personName = g.First().PersonName,
|
||||
identityCard = g.First().IdentityCard,
|
||||
|
|
@ -260,18 +265,18 @@ namespace BLL
|
|||
x.PersonId,
|
||||
x.personName,
|
||||
x.identityCard,
|
||||
CardNo =Funs.DB.SitePerson_Person.First(p=>p.PersonId == x.PersonId && p.ProjectId ==x.ProjectId).CardNo,
|
||||
CardNo = Funs.DB.SitePerson_Person.First(p => p.PersonId == x.PersonId && p.ProjectId == x.ProjectId).CardNo,
|
||||
x.UnitName,
|
||||
x.UnitId,
|
||||
x.WorkPostId,
|
||||
x.WorkPostName,
|
||||
TeamGroupName=TeamGroupService.GetTeamGroupNameByPersonId(x.ProjectId,x.PersonId),
|
||||
TeamGroupName = TeamGroupService.GetTeamGroupNameByPersonId(x.ProjectId, x.PersonId),
|
||||
x.ChangeTime,
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
inCount =0;
|
||||
inCount = 0;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -739,7 +744,7 @@ namespace BLL
|
|||
var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId);
|
||||
if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo))
|
||||
{
|
||||
cardNo= SendCarNobySiteperson(getSitePerson.SitePersonId);
|
||||
cardNo = SendCarNobySiteperson(getSitePerson.SitePersonId);
|
||||
}
|
||||
|
||||
return cardNo;
|
||||
|
|
@ -754,13 +759,13 @@ namespace BLL
|
|||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
string carNo = string.Empty;
|
||||
string carNo = string.Empty;
|
||||
var item = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == sitePersonId);
|
||||
if (item != null)
|
||||
{
|
||||
bool isok = false;
|
||||
int getPassScores = SysConstSetService.getPassScore();
|
||||
var getTestT = db.Training_TestRecord.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.TestScores >= getPassScores && x.TestManId==item.PersonId);
|
||||
var getTestT = db.Training_TestRecord.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.TestScores >= getPassScores && x.TestManId == item.PersonId);
|
||||
if (getTestT != null)
|
||||
{
|
||||
isok = true;
|
||||
|
|
@ -776,7 +781,7 @@ namespace BLL
|
|||
isok = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isok) ////参加过培训的人员
|
||||
{
|
||||
string prefix = UnitService.GetUnitCodeByUnitId(item.UnitId) + "-";
|
||||
|
|
@ -931,7 +936,7 @@ namespace BLL
|
|||
}
|
||||
else
|
||||
{
|
||||
var getDatePItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.ProjectId == person.ProjectId && x.IdentityCard == person.IdentityCard && x.OutTime .HasValue && x.OutTime < person.InTime);
|
||||
var getDatePItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.ProjectId == person.ProjectId && x.IdentityCard == person.IdentityCard && x.OutTime.HasValue && x.OutTime < person.InTime);
|
||||
if (getDatePItem != null)
|
||||
{
|
||||
setPersonItemInOut = true;
|
||||
|
|
@ -949,13 +954,13 @@ namespace BLL
|
|||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (setPersonItemInOut)
|
||||
{
|
||||
{
|
||||
////现场人员项目出入场记录
|
||||
SitePerson_PersonItemService.SetPersonItemInOut(newPerson,newlog);
|
||||
SitePerson_PersonItemService.SetPersonItemInOut(newPerson, newlog);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1096,7 +1101,7 @@ namespace BLL
|
|||
info += "卡号应为单位代码+'-'+五位流水号!";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return info;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue