Преглед на файлове

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

临城职教中职
ndbs преди 2 години
родител
ревизия
98682e126d
променени са 3 файла, в които са добавени 127 реда и са изтрити 31 реда
  1. +35
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml
  2. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js
  3. +84
    -28
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs

+ 35
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml Целия файл

@@ -38,10 +38,43 @@
<div class="lr-form-item-title">民族</div>
<div id="NationalityNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">身份证号</div>
<input id="IdentityCardNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">审核状态</div>
<div id="CheckMark"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学生编号</div>
<input id="StuNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学籍号</div>
<input id="StuCode" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">政治面貌</div>
<div id="PartyFaceNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学制</div>
<div id="EduSystem"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">身体状态</div>
<div id="HealthStatus"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学习形式</div>
<div id="StudyModality"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">是否有照片</div>
<div id="Photo"></div>
</div>

</div>
</div>
</div>
@@ -62,7 +95,7 @@
<a id="checkall" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;审核全部</a>
<a id="lr_generate" class="btn btn-default"><i class="fa fa-linode"></i>&nbsp;生成帐号</a>
<a id="lr_update" class="btn btn-default"><i class="fa fa-braille"></i>&nbsp;更新帐号</a>
@*<a id="lr_synPhoto" class="btn btn-default"><i class="fa fa-braille"></i>&nbsp;同步照片</a>*@
<a id="lr_synPhoto" class="btn btn-default"><i class="fa fa-braille"></i>&nbsp;同步照片</a>
<a id="lr_searchChange" class="btn btn-default"><i class="fa fa-search"></i>&nbsp;查看异动</a>
<a id="lr_photo" class="btn btn-default"><i class="fa fa-search"></i>&nbsp;拍照</a>
<a id="lr_printInfo" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;学生简历表</a>


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js Целия файл

@@ -10,7 +10,7 @@ var bootstrap = function ($, learun) {
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 300, 400);
}, 450, 400);
$('#DeptNo').lrselect({
allowSearch: true,
value: "deptno",
@@ -70,6 +70,13 @@ var bootstrap = function ($, learun) {
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' });
$('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' });
$('#FiveYear').lrDataItemSelect({ code: 'PieceCultivateWay' });
$('#CheckMark').lrselect({ data: [{ id: '1', text: '已审核' }, { id: '0', text: '未审核' }] });
$('#PartyFaceNo').lrDataItemSelect({ code: 'PolityStatus' });
$('#EduSystem').lrDataItemSelect({ code: 'EduSystem' });
$('#HealthStatus').lrDataItemSelect({ code: 'QRCodeHealthStatus' });
$('#StudyModality').lrDataItemSelect({ code: 'StudyModality' });
$('#Photo').lrselect({ data: [{ id: '1', text: '是' }, { id: '0', text: '否' }] });

// 刷新
$('#lr_refresh').on('click', function () {
location.reload();


+ 84
- 28
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs Целия файл

@@ -103,6 +103,57 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Remark", "%" + queryParam["Remark"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Remark Like @Remark ");
}

if (!queryParam["CheckMark"].IsEmpty())
{
dp.Add("CheckMark", "" + queryParam["CheckMark"].ToString() + "", DbType.String);
if (queryParam["CheckMark"].ToString() == "1")
{
strSql.Append(" AND t.CheckMark=@CheckMark ");
}
else
{
strSql.Append(" AND (t.CheckMark is null or t.CheckMark='0') ");
}
}
if (!queryParam["StuCode"].IsEmpty())
{
dp.Add("StuCode", "%" + queryParam["StuCode"].ToString() + "%", DbType.String);
strSql.Append(" AND t.StuCode Like @StuCode ");
}
if (!queryParam["PartyFaceNo"].IsEmpty())
{
dp.Add("PartyFaceNo", "" + queryParam["PartyFaceNo"].ToString() + "", DbType.String);
strSql.Append(" AND t.PartyFaceNo = @PartyFaceNo ");
}
if (!queryParam["EduSystem"].IsEmpty())
{
dp.Add("EduSystem", "" + queryParam["EduSystem"].ToString() + "", DbType.String);
strSql.Append(" AND t.EduSystem = @EduSystem ");
}
if (!queryParam["HealthStatus"].IsEmpty())
{
dp.Add("HealthStatus", "" + queryParam["HealthStatus"].ToString() + "", DbType.String);
strSql.Append(" AND t.HealthStatus = @HealthStatus ");
}
if (!queryParam["StudyModality"].IsEmpty())
{
dp.Add("StudyModality", "" + queryParam["StudyModality"].ToString() + "", DbType.String);
strSql.Append(" AND t.StudyModality = @StudyModality ");
}

if (!queryParam["Photo"].IsEmpty())
{
dp.Add("Photo", "" + queryParam["Photo"].ToString() + "", DbType.String);
if (queryParam["Photo"].ToString() == "1")
{
strSql.Append(" AND t.Photo is not null ");
}
else
{
strSql.Append(" AND t.Photo is null ");
}
}
return this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
@@ -447,13 +498,38 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var url = AppDomain.CurrentDomain.BaseDirectory;
foreach (var stuInfo in stuList)
{
//照片不为空
if (!string.IsNullOrEmpty(stuInfo.Photo))
//判断要上传的照片在本地服务器中是否存在
var photoPath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg";
if (System.IO.File.Exists(photoPath))
{
var annex = this.BaseRepository()
.FindEntity<AnnexesFileEntity>(a => a.F_FolderId == stuInfo.Photo);
if (annex == null)
//学籍表中照片字段不为空
if (!string.IsNullOrEmpty(stuInfo.Photo))
{
var annex = this.BaseRepository()
.FindEntity<AnnexesFileEntity>(a => a.F_FolderId == stuInfo.Photo);
if (annex == null)
{
var annexEntity = new AnnexesFileEntity()
{
F_Id = Guid.NewGuid().ToString(),
F_FileName = stuInfo.IdentityCardNo + ".jpg",
F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg",
F_FolderId = stuInfo.Photo
};
this.BaseRepository().Insert(annexEntity);

}
else
{
annex.F_FileName = stuInfo.IdentityCardNo + ".jpg";
annex.F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg";
this.BaseRepository().Update(annex);
}
}
else
{
stuInfo.Photo = Guid.NewGuid().ToString();

var annexEntity = new AnnexesFileEntity()
{
F_Id = Guid.NewGuid().ToString(),
@@ -461,32 +537,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg",
F_FolderId = stuInfo.Photo
};
annexEntity.Create();
this.BaseRepository("CollegeMIS").Update(stuInfo);
this.BaseRepository().Insert(annexEntity);

}
else
{
annex.F_FileName = stuInfo.IdentityCardNo + ".jpg";
annex.F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg";
this.BaseRepository().Update(annex);
}
}
else
{
stuInfo.Photo = Guid.NewGuid().ToString();

var annexEntity = new AnnexesFileEntity()
{
F_Id = Guid.NewGuid().ToString(),
F_FileName = stuInfo.IdentityCardNo + ".jpg",
F_FilePath = $"{url}/Resource/UserPhoto/{stuInfo.IdentityCardNo}.jpg",
F_FolderId = stuInfo.Photo
};
annexEntity.Create();
this.BaseRepository("CollegeMIS").Update(stuInfo);
this.BaseRepository().Insert(annexEntity);
}

}
}
catch (Exception ex)


Зареждане…
Отказ
Запис