@@ -14,7 +14,7 @@ | |||||
var account = learun.storage.get('logininfo').account; | var account = learun.storage.get('logininfo').account; | ||||
$.ajax({ | $.ajax({ | ||||
type: 'POST', | type: 'POST', | ||||
url: config.webapi + '/Statistics/getEmpInfo', | |||||
url: config.webapi + '/Statistics/getEmpInfo2', | |||||
data: { 'account': account }, | data: { 'account': account }, | ||||
async: false, | async: false, | ||||
success: function (msg) { | success: function (msg) { | ||||
@@ -82,6 +82,7 @@ namespace Learun.Application.WebApi | |||||
Get["/stuAttendance"] = StuAttendance;//全校考勤 | Get["/stuAttendance"] = StuAttendance;//全校考勤 | ||||
Post["/getStuInfo"] = GetStuNoByAccount; | Post["/getStuInfo"] = GetStuNoByAccount; | ||||
Post["/getEmpInfo"] = GetEmpNoByAccount; | Post["/getEmpInfo"] = GetEmpNoByAccount; | ||||
Post["/getEmpInfo2"] = GetEmpNoByAccount2; | |||||
@@ -122,6 +123,12 @@ namespace Learun.Application.WebApi | |||||
var stuEntity = empInfoIBLL.GetEmpInfoEntityByEmpNo(account); | var stuEntity = empInfoIBLL.GetEmpInfoEntityByEmpNo(account); | ||||
return Success(stuEntity); | return Success(stuEntity); | ||||
} | } | ||||
public Response GetEmpNoByAccount2(dynamic _) | |||||
{ | |||||
string account = this.Request.Form.account.ToString(); | |||||
var stuEntity = empInfoIBLL.GetEmpInfoEntityByIdCardNo(account); | |||||
return Success(stuEntity); | |||||
} | |||||
public Response GetStuNoByAccount(dynamic _) | public Response GetStuNoByAccount(dynamic _) | ||||
{ | { | ||||
string account = this.Request.Form.account.ToString(); | string account = this.Request.Form.account.ToString(); | ||||
@@ -360,6 +360,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public EmpInfoEntity GetEmpInfoEntityByIdCardNo(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return empInfoService.GetEmpInfoEntityByIdCardNo(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public EmpInfoEntity GetEmpInfoEntityByMobile(string mobile) | public EmpInfoEntity GetEmpInfoEntityByMobile(string mobile) | ||||
{ | { | ||||
try | try | ||||
@@ -84,5 +84,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void SaveEditEntity(string keyValue, EmpInfoEntity entity); | void SaveEditEntity(string keyValue, EmpInfoEntity entity); | ||||
EmpInfoEntity GetEmpInfoEntityByIdCardNo(string account); | |||||
} | } | ||||
} | } |
@@ -250,6 +250,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public EmpInfoEntity GetEmpInfoEntityByIdCardNo(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(m => m.IdentityCardNo == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public EmpInfoEntity GetEmpInfoEntityByNo(string keyValue) | public EmpInfoEntity GetEmpInfoEntityByNo(string keyValue) | ||||
{ | { | ||||
try | try | ||||