@@ -192,21 +192,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
}
public string Scan(string scanParamUserid, string scanParamDutyid)
{
try
{
var result = "";
var DutyEntity = this.BaseRepository("CollegeMIS").FindEntity<ActivityScheduleEntity>(a => a.Id == scanParamDutyid);
if (DutyEntity = = null)
if (DutyEntity ! = null)
{
var signInEntity = this.BaseRepository("CollegeMIS").FindEntity<ActivityScheduleSienInEntity>(x => x.ASID == scanParamDutyid && x.SignInUserId == scanParamUserid);
var date = DateTime.Now;
DateTime BeginTime = DutyEntity.Date.ToDate();
if (signInEntity ! = null)
if (signInEntity = = null)
{
if (date.Subtract(BeginTime).Duration().Minutes <= 5 && BeginTime > date)
{
var signInInster = new ActivityScheduleSienInEntity
@@ -231,6 +230,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
result = "签到失败!!!签到已开始";
}
}
else
{
result = "签到成功";
}
}
else
{