浏览代码

手机端扫码报道的照片改为学籍表中的照片

西昌缴费二期
zhangli 3 年前
父节点
当前提交
0f0d5d21c0
共有 4 个文件被更改,包括 64 次插入9 次删除
  1. +14
    -3
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs
  2. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs
  3. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs
  4. +30
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs

+ 14
- 3
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuInfoFreshApi.cs 查看文件

@@ -30,6 +30,7 @@ namespace Learun.Application.WebApi.Modules
}

private StuInfoFreshIBLL stuInfoFreshIBLL = new StuInfoFreshBLL();
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
private CdDeptIBLL cdDeptIBLL = new CdDeptBLL();
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
@@ -92,15 +93,25 @@ namespace Learun.Application.WebApi.Modules
}
}

//获取头像地址
if (StuInfoFreshEntity.IsPhoto == true && !string.IsNullOrEmpty(StuInfoFreshEntity.Photo))
//获取头像地址 20210913修改为获取学生学籍表中的照片
var basicPhoto = stuInfoBasicIBLL.GetPhotoByStuNo(GetReqData());
if (!string.IsNullOrEmpty(basicPhoto))
{
var annexesFileEntity = annexesFileIBLL.GetEntity(StuInfoFreshEntity.Photo);
var annexesFileEntity = annexesFileIBLL.GetEntity(basicPhoto);
if (annexesFileEntity != null)
{
url = annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource"));
}
}

//if (StuInfoFreshEntity.IsPhoto == true && !string.IsNullOrEmpty(StuInfoFreshEntity.Photo))
//{
// var annexesFileEntity = annexesFileIBLL.GetEntity(StuInfoFreshEntity.Photo);
// if (annexesFileEntity != null)
// {
// url = annexesFileEntity.F_FilePath.Substring(annexesFileEntity.F_FilePath.IndexOf("Resource"));
// }
//}
StuInfoFreshEntity.DormitoryName = accdormitoryIBLL.GetDormitoryInfoByPlanStuNo(StuInfoFreshEntity.ID);
if (StuInfoFreshEntity.IsPoor != "1")
{


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs 查看文件

@@ -172,6 +172,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public string GetPhotoByStuNo(string enCode)
{
try
{
return stuInfoBasicService.GetPhotoByStuNo(enCode);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
{
try


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicIBLL.cs 查看文件

@@ -33,6 +33,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

List<string> GetSaveClassStudents(string account);
StuInfoBasicEntity GetStuInfoBasicEntityByStuNo(string enCode);
string GetPhotoByStuNo(string enCode);

StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name);
/// <summary>


+ 30
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs 查看文件

@@ -172,6 +172,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public string GetPhotoByStuNo(string enCode)
{
try
{
var data = this.BaseRepository("CollegeMIS").FindEntity<StuInfoBasicEntity>(a => a.StuNo == enCode);
if (data != null)
{
return data.Photo;
}
return "";
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public StuInfoBasicEntity GetStuInfoBasicEntityByStuName(string name)
{
try
@@ -396,13 +421,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
public void SynPhoto()
{
var logpath = @"D:\新版数字化校园\Publish\log";
//var logpath = @"D:\新版数字化校园\Publish\log\0913.txt";
try
{
var stuList = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(x => x.Grade == "21")
.ToList();
var url = AppDomain.CurrentDomain.BaseDirectory;
System.IO.File.AppendAllText(logpath, "同步照片\r\n");
//System.IO.File.AppendAllText(logpath, "同步照片\r\n");
var num = 0;
foreach (var stuInfo in stuList)
{
@@ -451,19 +476,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
this.BaseRepository().Insert(annexEntity);
}

num++;
//num++;
}
else
{

System.IO.File.AppendAllText(logpath, F_FilePath + "学生:" + stuInfo.StuName + "文件不存在" + "\r\n");
//System.IO.File.AppendAllText(logpath, F_FilePath + "学生:" + stuInfo.StuName + "文件不存在" + "\r\n");
}
}
System.IO.File.AppendAllText(logpath, "同步照片:" + num + "个学生\r\n");
//System.IO.File.AppendAllText(logpath, "同步照片:" + num + "个学生\r\n");
}
catch (Exception ex)
{
System.IO.File.AppendAllText(logpath, "同步照片异常:" + ex.Message + "\r\n");
if (ex is ExceptionEx)
{
throw;


正在加载...
取消
保存