diff --git a/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园基础信息接口V1.0.docx b/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园基础信息接口V1.0.docx index 6b7261848..0dfb584e1 100644 --- a/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园基础信息接口V1.0.docx +++ b/Learun.Framework.Ultimate V7/Doc文档/数字化智慧校园基础信息接口V1.0.docx @@ -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 +忽略 + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj index 35d60c2f6..b15e9bd60 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj @@ -106,6 +106,7 @@ False ..\packages\Oracle.ManagedDataAccess.EntityFramework.12.1.2400\lib\net45\Oracle.ManagedDataAccess.EntityFramework.dll + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs index 02a7431ae..6f91ae6e3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs @@ -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); } + + /// + /// 新生对接人脸平台接口 + /// + /// + /// + 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 + { + /// + /// 身份号码 + /// + public string IdentityCardNo { get; set; } + /// + /// 核验结果 + /// + public int PhotoCheckStatus { get; set; } + /// + /// 身份证照片URL + /// + public string IdentPhoto { get; set; } + /// + /// 现场照片URL + /// + public string ScenePhoto { get; set; } + + } + /// + /// 身份核验结果 + /// + /// + /// + public Response NewStudentCompare(dynamic _) + { + StudentCompareEntity studentCompareEntity = this.GetReq(); + 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"); + } } } \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs index 0733c7fe2..f13febd48 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs @@ -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 私有类 /// @@ -393,7 +398,7 @@ namespace Learun.Application.WebApi.Modules /// /// 贷款回执码状态 /// - public string StudentLoanStatus { get; set; } + public string StudentLoanStatus { get; set; } /// /// 办理贷款状态 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs index 8e32e5404..323bbb315 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshBLL.cs @@ -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 } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs index a7a0bce7a..95bb8df9b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshIBLL.cs @@ -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); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs index 180f1a50d..aea94072e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs @@ -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(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(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(m => m.Id == keyValue); + var StuInfoBasic_PayFee = BaseRepository("CollegeMIS").FindEntity(m => m.Id == keyValue); var model = BaseRepository("CollegeMIS").FindEntity(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("select * from StuInfoFresh where IdentityCardNo='" + identityCardNo + "'"); + if (stufresh != null) + { + stufresh.PhotoCheckStatus = photoCheckStatus; + stufresh.IdentPhoto = identPhoto; + stufresh.ScenePhoto = scenePhoto; + BaseRepository().Update(stufresh); + } } catch (Exception ex) {