@@ -47,7 +47,7 @@ namespace Learun.Application.WebApi.Modules | |||||
public Response GetTeacherRecord(dynamic _) | public Response GetTeacherRecord(dynamic _) | ||||
{ | { | ||||
ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | ReqPageParam parameter = this.GetReqData<ReqPageParam>(); | ||||
var res=adr_RecordBLL.GetList(parameter.queryJson); | |||||
var res = adr_RecordBLL.GetList(parameter.queryJson); | |||||
var jsondata = | var jsondata = | ||||
new | new | ||||
{ | { | ||||
@@ -113,19 +113,26 @@ namespace Learun.Application.WebApi.Modules | |||||
var userinfo = LoginUserInfo.Get(); | var userinfo = LoginUserInfo.Get(); | ||||
//员工账号 | //员工账号 | ||||
string EmpNo = userinfo.account; | string EmpNo = userinfo.account; | ||||
//根据用户编号获取用户头像 | |||||
var einfo = empInfoIBLL.GetEmpInfoEntityByEmpNo(EmpNo); | |||||
if (einfo == null) | |||||
string result = "0"; | |||||
if (parameter.AIsOut) | |||||
{ | { | ||||
return Fail("用户数据错误!"); | |||||
result = "1"; | |||||
} | } | ||||
string userimg = einfo.Photo; | |||||
string imgid = parameter.Img; | |||||
else | |||||
{ | |||||
//根据用户编号获取用户头像 | |||||
var einfo = empInfoIBLL.GetEmpInfoEntityByEmpNo(EmpNo); | |||||
if (einfo == null) | |||||
{ | |||||
return Fail("用户数据错误!"); | |||||
} | |||||
string userimg = einfo.Photo; | |||||
string imgid = parameter.Img; | |||||
var url = Config.GetValue("FaceCheckApi"); | |||||
string result = Util.HttpMethods.HttpGet($"{url}{userimg}/{imgid}"); | |||||
var url = Config.GetValue("FaceCheckApi"); | |||||
result = Util.HttpMethods.HttpGet($"{url}{userimg}/{imgid}"); | |||||
} | |||||
if (result == "1") | if (result == "1") | ||||
{ | { | ||||
adr_RestrictionBLL.ClockIn(parameter.ALon, parameter.ALat, parameter.AIsOut, parameter.ARemark, parameter.ADPhoto, parameter.ClockPlace, parameter.Img); | adr_RestrictionBLL.ClockIn(parameter.ALon, parameter.ALat, parameter.AIsOut, parameter.ARemark, parameter.ADPhoto, parameter.ClockPlace, parameter.Img); | ||||
@@ -137,7 +144,7 @@ namespace Learun.Application.WebApi.Modules | |||||
return Fail("打卡照片异常,请重新拍照!"); | return Fail("打卡照片异常,请重新拍照!"); | ||||
} | } | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 学生打卡 | /// 学生打卡 | ||||
@@ -148,7 +155,7 @@ namespace Learun.Application.WebApi.Modules | |||||
{ | { | ||||
Attendance parameter = this.GetReqData<Attendance>(); | Attendance parameter = this.GetReqData<Attendance>(); | ||||
adr_RestrictionBLL.ClockInStudent(parameter.ALon, parameter.ALat, parameter.AIsOut, parameter.ARemark, parameter.ADPhoto, parameter.ClockPlace,parameter.LessonSortNo,parameter.ALTId,parameter.ALTOEId); | |||||
adr_RestrictionBLL.ClockInStudent(parameter.ALon, parameter.ALat, parameter.AIsOut, parameter.ARemark, parameter.ADPhoto, parameter.ClockPlace, parameter.LessonSortNo, parameter.ALTId, parameter.ALTOEId); | |||||
return Success("打卡成功"); | return Success("打卡成功"); | ||||
} | } | ||||
@@ -222,7 +229,7 @@ namespace Learun.Application.WebApi.Modules | |||||
return Fail("打卡照片异常,请重新拍照!"); | return Fail("打卡照片异常,请重新拍照!"); | ||||
} | } | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -529,6 +529,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
entity.IsFit = true; | |||||
if (!string.IsNullOrEmpty(entity.ADPhoto) && string.IsNullOrEmpty(entity.Img)) | if (!string.IsNullOrEmpty(entity.ADPhoto) && string.IsNullOrEmpty(entity.Img)) | ||||
{ | { | ||||
entity.Img = entity.ADPhoto; | entity.Img = entity.ADPhoto; | ||||
@@ -543,10 +544,10 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
if (entity.ClockStatus == "4" || entity.ClockStatus == "5" || entity.AIsOut) | |||||
{ | |||||
entity.IsFit = true; | |||||
} | |||||
//if (entity.ClockStatus == "4" || entity.ClockStatus == "5" || entity.AIsOut) | |||||
//{ | |||||
// entity.IsFit = true; | |||||
//} | |||||
entity.Create(); | entity.Create(); | ||||
this.BaseRepository("CollegeMIS").Insert(entity); | this.BaseRepository("CollegeMIS").Insert(entity); | ||||
} | } | ||||
@@ -399,10 +399,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
adrRecordEntity.ADPhoto = ADPhoto; | adrRecordEntity.ADPhoto = ADPhoto; | ||||
adrRecordEntity.ClockPlace = ClockPlace; | adrRecordEntity.ClockPlace = ClockPlace; | ||||
adrRecordEntity.Img = img; | adrRecordEntity.Img = img; | ||||
if(AIsOut) | |||||
{ | |||||
adrRecordEntity.IsFit = true; | |||||
} | |||||
adrRecordEntity.IsFit = true; | |||||
////记录日志 | ////记录日志 | ||||
//ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity(); | //ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity(); | ||||
//adrDeviceLogEntity.Create(); | //adrDeviceLogEntity.Create(); | ||||
@@ -533,10 +530,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
adrRecordEntity.ADPhoto = ADPhoto; | adrRecordEntity.ADPhoto = ADPhoto; | ||||
adrRecordEntity.ClockPlace = ClockPlace; | adrRecordEntity.ClockPlace = ClockPlace; | ||||
adrRecordEntity.Img = img; | adrRecordEntity.Img = img; | ||||
if(AIsOut) | |||||
{ | |||||
adrRecordEntity.IsFit = true; | |||||
} | |||||
adrRecordEntity.IsFit = true; | |||||
////记录日志 | ////记录日志 | ||||
//ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity(); | //ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity(); | ||||
//adrDeviceLogEntity.Create(); | //adrDeviceLogEntity.Create(); | ||||
@@ -638,10 +632,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
adrRecordEntity.ADPhoto = ADPhoto; | adrRecordEntity.ADPhoto = ADPhoto; | ||||
adrRecordEntity.ClockPlace = ClockPlace; | adrRecordEntity.ClockPlace = ClockPlace; | ||||
adrRecordEntity.Img = img; | adrRecordEntity.Img = img; | ||||
if(AIsOut) | |||||
{ | |||||
adrRecordEntity.IsFit = true; | |||||
} | |||||
adrRecordEntity.IsFit = true; | |||||
////记录日志 | ////记录日志 | ||||
//ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity(); | //ADR_DeviceLogEntity adrDeviceLogEntity = new ADR_DeviceLogEntity(); | ||||
//adrDeviceLogEntity.Create(); | //adrDeviceLogEntity.Create(); | ||||
@@ -997,10 +988,8 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
adrRecordEntity.ADPhoto = ADPhoto; | adrRecordEntity.ADPhoto = ADPhoto; | ||||
adrRecordEntity.ClockPlace = ClockPlace; | adrRecordEntity.ClockPlace = ClockPlace; | ||||
adrRecordEntity.Img = img; | adrRecordEntity.Img = img; | ||||
if(AIsOut) | |||||
{ | |||||
adrRecordEntity.IsFit = true; | |||||
} | |||||
adrRecordEntity.IsFit = true; | |||||
//adrRecordEntity.ADPhoto = str; | //adrRecordEntity.ADPhoto = str; | ||||
////记录日志 | ////记录日志 | ||||
//ADR_DeviceLogEntity adrDeviceLogEntitylateorleave = new ADR_DeviceLogEntity(); | //ADR_DeviceLogEntity adrDeviceLogEntitylateorleave = new ADR_DeviceLogEntity(); | ||||
@@ -2131,6 +2120,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
teach_AttendanceEntity.AIsOut = entity.AIsOut; | teach_AttendanceEntity.AIsOut = entity.AIsOut; | ||||
teach_AttendanceEntity.ARemark = entity.ARemark; | teach_AttendanceEntity.ARemark = entity.ARemark; | ||||
teach_AttendanceEntity.Img = entity.Img; | teach_AttendanceEntity.Img = entity.Img; | ||||
teach_AttendanceEntity.IsFit = entity.IsFit; | |||||
db.Insert(teach_AttendanceEntity); | db.Insert(teach_AttendanceEntity); | ||||
} | } | ||||
//下课 | //下课 | ||||
@@ -2154,6 +2144,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
teach_AttendanceEntity.AIsOut = entity.AIsOut; | teach_AttendanceEntity.AIsOut = entity.AIsOut; | ||||
teach_AttendanceEntity.ARemark = entity.ARemark; | teach_AttendanceEntity.ARemark = entity.ARemark; | ||||
teach_AttendanceEntity.Img = entity.Img; | teach_AttendanceEntity.Img = entity.Img; | ||||
teach_AttendanceEntity.IsFit = entity.IsFit; | |||||
db.Insert(teach_AttendanceEntity); | db.Insert(teach_AttendanceEntity); | ||||
} | } | ||||
} | } | ||||