@@ -423,4 +423,96 @@ LessonTime | |||
16:20-17:05,17:15-18:00 两节课的时间 | |||
新生信息接口(人脸平台) | |||
地址:http://部署地址/arrangelesson/getnewstudentlist | |||
所需参数:Grade =22 | |||
参数名称 | |||
值 | |||
备注 | |||
Grade | |||
22 | |||
代表级别,22年级新生传22,23年传23 | |||
主要业务数据 其余字段可忽略 | |||
属性 | |||
返回值 | |||
备注 | |||
可否为空 | |||
StuNo | |||
学号(string) | |||
IdentityCardNo | |||
身份证号(string) | |||
ksh | |||
考生号(string) | |||
StuName | |||
学生姓名(string) | |||
GenderNo | |||
性别代码(string) | |||
1男,0女 | |||
ProvinceNo | |||
地区代码(string) | |||
MajorName | |||
专业名称 | |||
ClassName | |||
班级名称 | |||
ExamPhoto | |||
高考照片Url | |||
新生核验结果接口(人脸平台) | |||
地址:http://部署地址/arrangelesson/newstudentcompare | |||
HTTP Post Content-Type=application/json | |||
所需参数:{"IdentityCardNo":"xxxx","ScenePhoto":"xx","IdentPhoto":"xx","PhotoCheckStatus":"0"} | |||
参数名称 | |||
值 | |||
备注 | |||
IdentityCardNo | |||
身份证号(string) | |||
ScenePhoto | |||
现场照片URL(string) | |||
IdentPhoto | |||
身份证照片URL(string) | |||
PhotoCheckStatus | |||
核验状态(int) | |||
主要业务数据 其余字段可忽略 | |||
属性 | |||
返回值 | |||
备注 | |||
可否为空 | |||
code | |||
返回结果(string) | |||
200表示成功,其他失败 | |||
info | |||
返回结果说明(string) | |||
data | |||
忽略 | |||
@@ -106,6 +106,7 @@ | |||
<SpecificVersion>False</SpecificVersion> | |||
<HintPath>..\packages\Oracle.ManagedDataAccess.EntityFramework.12.1.2400\lib\net45\Oracle.ManagedDataAccess.EntityFramework.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Activities" /> | |||
<Reference Include="System.Data.DataSetExtensions" /> | |||
<Reference Include="System.Net.Http" /> | |||
<Reference Include="System.Net.Http.Formatting, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | |||
@@ -1,7 +1,9 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Configuration; | |||
using System.Linq; | |||
using System.Web; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.Organization; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Nancy; | |||
@@ -54,6 +56,9 @@ namespace Learun.Application.WebApi.Modules | |||
Get["trantest"] = TranTest; | |||
//按条件重置基础数据同步状态 | |||
Get["/initbasicdata"] = InitBasicData; | |||
Get["/getnewstudentlist"] = GetNewStudentList; | |||
Post["/newstudentcompare"] = NewStudentCompare; | |||
} | |||
private readonly ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); | |||
@@ -70,6 +75,8 @@ namespace Learun.Application.WebApi.Modules | |||
private StuSelectLessonListOfElectiveIBLL stuSelectLessonListOfElectiveIbll = | |||
new StuSelectLessonListOfElectiveBLL(); | |||
private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL(); | |||
private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL(); | |||
private Response TranTest(dynamic _) | |||
{ | |||
@@ -341,5 +348,90 @@ namespace Learun.Application.WebApi.Modules | |||
var result = allList.Select(x => new { x.BuKaoFlag, x.AcademicYearNo, x.Semester, x.StuId, x.StuName, x.LessonId, x.LessonName, x.ClassId, x.ClassName, x.EmpId, x.EmpName }).OrderBy(x => x.BuKaoFlag).ThenByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.StuId); | |||
return Success(result); | |||
} | |||
/// <summary> | |||
/// 新生对接人脸平台接口 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response GetNewStudentList(dynamic _) | |||
{ | |||
string webrootpath = ConfigurationManager.AppSettings["webrootpath"]; | |||
string grade = Request.Query["Grade"]; | |||
if (string.IsNullOrEmpty(grade)) | |||
{ | |||
return Fail("缺少参数:Grade"); | |||
} | |||
string query = "{\"Grade\":\"" + grade + "\"}"; | |||
var list = stuInfoFreshIBLL.GetList2(query).Where(m => !string.IsNullOrEmpty(m.ExamPhoto)); | |||
foreach (var item in list) | |||
{ | |||
var annexesFileEntity = annexesFileIBLL.GetEntityByFolderId(item.ExamPhoto); | |||
if (annexesFileEntity != null && annexesFileEntity.F_FilePath.IndexOf("Resource") != -1) | |||
{ | |||
item.ExamPhoto = webrootpath + "/" + annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource")); | |||
} | |||
} | |||
return Success(list.Select(m => new | |||
{ | |||
m.StuNo, | |||
m.IdentityCardNo, | |||
m.ksh, | |||
m.StuName, | |||
m.GenderNo, | |||
m.ProvinceNo, | |||
m.MajorName, | |||
m.ClassName, | |||
m.ExamPhoto | |||
})); | |||
} | |||
public class StudentCompareEntity | |||
{ | |||
/// <summary> | |||
/// 身份号码 | |||
/// </summary> | |||
public string IdentityCardNo { get; set; } | |||
/// <summary> | |||
/// 核验结果 | |||
/// </summary> | |||
public int PhotoCheckStatus { get; set; } | |||
/// <summary> | |||
/// 身份证照片URL | |||
/// </summary> | |||
public string IdentPhoto { get; set; } | |||
/// <summary> | |||
/// 现场照片URL | |||
/// </summary> | |||
public string ScenePhoto { get; set; } | |||
} | |||
/// <summary> | |||
/// 身份核验结果 | |||
/// </summary> | |||
/// <param name="_"></param> | |||
/// <returns></returns> | |||
public Response NewStudentCompare(dynamic _) | |||
{ | |||
StudentCompareEntity studentCompareEntity = this.GetReq<StudentCompareEntity>(); | |||
if (studentCompareEntity==null) | |||
{ | |||
return Fail("传入参数有误"); | |||
} | |||
if (string.IsNullOrEmpty(studentCompareEntity.IdentityCardNo)) | |||
{ | |||
return Fail("传入参数:身份证号不能为空"); | |||
} | |||
if (string.IsNullOrEmpty(studentCompareEntity.ScenePhoto)) | |||
{ | |||
return Fail("传入参数:现场照片URL不能为空"); | |||
} | |||
if (string.IsNullOrEmpty(studentCompareEntity.IdentPhoto)) | |||
{ | |||
return Fail("传入参数:身份证照片URL不能为空"); | |||
} | |||
stuInfoFreshIBLL.SaveStudentCompare(studentCompareEntity.IdentityCardNo, studentCompareEntity.PhotoCheckStatus, studentCompareEntity.IdentPhoto, studentCompareEntity.ScenePhoto); | |||
return Success("ok"); | |||
} | |||
} | |||
} |
@@ -1,5 +1,8 @@ | |||
using System; | |||
using System.Activities.Statements; | |||
using System.Collections.Generic; | |||
using System.Configuration; | |||
using System.Data.Entity.Infrastructure.Design; | |||
using System.IO; | |||
using System.Linq; | |||
using System.Web; | |||
@@ -349,6 +352,8 @@ namespace Learun.Application.WebApi.Modules | |||
return Success("保存成功!"); | |||
} | |||
#region 私有类 | |||
/// <summary> | |||
@@ -393,7 +398,7 @@ namespace Learun.Application.WebApi.Modules | |||
/// <summary> | |||
/// 贷款回执码状态 | |||
/// </summary> | |||
public string StudentLoanStatus { get; set; } | |||
public string StudentLoanStatus { get; set; } | |||
/// <summary> | |||
/// 办理贷款状态 | |||
/// </summary> | |||
@@ -1032,6 +1032,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public void SaveStudentCompare(string identityCardNo, int photoCheckStatus, string identPhoto, string scenePhoto) | |||
{ | |||
try | |||
{ | |||
stuInfoFreshService.SaveStudentCompare(identityCardNo, photoCheckStatus, identPhoto, scenePhoto); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -256,5 +256,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
StuEnrollFeeOrderEntity GetStuEnrollFeeOrder(string keyValue, bool IsNewOrOld); | |||
void SaveStudentCompare(string identityCardNo, int photoCheckStatus, string identPhoto, string scenePhoto); | |||
} | |||
} |
@@ -2089,14 +2089,14 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo | |||
#endregion | |||
public StuEnrollFeeOrderEntity GetStuEnrollFeeOrder(string keyValue,bool IsNewOrOld) | |||
public StuEnrollFeeOrderEntity GetStuEnrollFeeOrder(string keyValue, bool IsNewOrOld) | |||
{ | |||
try | |||
{ | |||
if (IsNewOrOld) | |||
{ | |||
var stufreshinfo = BaseRepository("CollegeMIS").FindEntity<StuInfoFreshEntity>(m => m.ID == keyValue); | |||
int year =Convert.ToInt32("20" + stufreshinfo.Grade.ToString()); | |||
int year = Convert.ToInt32("20" + stufreshinfo.Grade.ToString()); | |||
var model = BaseRepository("CollegeMIS").FindEntity<StuEnrollFeeOrderEntity>(a => a.StuNo == stufreshinfo.StuNo && a.Status == 1 && a.billStatus == true && !string.IsNullOrEmpty(a.billUrl) && a.YearNo == year); | |||
if (model != null) | |||
{ | |||
@@ -2109,7 +2109,7 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo | |||
} | |||
else | |||
{ | |||
var StuInfoBasic_PayFee =BaseRepository("CollegeMIS").FindEntity<StuInfoBasic_PayFeeEntity>(m => m.Id == keyValue); | |||
var StuInfoBasic_PayFee = BaseRepository("CollegeMIS").FindEntity<StuInfoBasic_PayFeeEntity>(m => m.Id == keyValue); | |||
var model = BaseRepository("CollegeMIS").FindEntity<StuEnrollFeeOrderEntity>(a => a.StuNo == StuInfoBasic_PayFee.StuNo && a.Status == 1 && a.billStatus == true && !string.IsNullOrEmpty(a.billUrl) && a.YearNo == StuInfoBasic_PayFee.PayYear); | |||
if (model != null) | |||
{ | |||
@@ -2120,7 +2120,33 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo | |||
return null; | |||
} | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public void SaveStudentCompare(string identityCardNo, int photoCheckStatus, string identPhoto, string scenePhoto) | |||
{ | |||
try | |||
{ | |||
var stufresh = BaseRepository("CollegeMIS").FindEntity<StuInfoFreshEntity>("select * from StuInfoFresh where IdentityCardNo='" + identityCardNo + "'"); | |||
if (stufresh != null) | |||
{ | |||
stufresh.PhotoCheckStatus = photoCheckStatus; | |||
stufresh.IdentPhoto = identPhoto; | |||
stufresh.ScenePhoto = scenePhoto; | |||
BaseRepository().Update(stufresh); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||