From 7bd4bb1e53c538ff9978fde2f785b4210f519d9c Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 25 Aug 2022 17:32:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=AD=A6=E7=B1=8D=E4=BF=A1=E6=81=AF=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E5=A4=9A=E6=9D=A1=E4=BB=B6=E6=9F=A5=E8=AF=A2=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/Index.cshtml | 35 ++++++++++++- .../Views/StuInfoBasic/Index.js | 9 +++- .../StuInfoBasic/StuInfoBasicService.cs | 51 +++++++++++++++++++ 3 files changed, 93 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml index a0018022b..a9455599d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml @@ -38,10 +38,43 @@
民族
-
+
身份证号
+
+
审核状态
+
+
+
+
学生编号
+ +
+
+
学籍号
+ +
+
+
政治面貌
+
+
+
+
学制
+
+
+
+
身体状态
+
+
+
+
学习形式
+
+
+
+
上传照片
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js index 2575064cb..957ab2b27 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.js +++ b/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(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index d71341038..e2b8631b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/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(strSql.ToString(), dp, pagination); } catch (Exception ex) From e4c6bc529a8d8b8ff535f762b47f2f01ec345ddb Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 25 Aug 2022 18:02:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91?= =?UTF-8?q?=E5=AD=A6=E7=B1=8D=EF=BC=9A=E5=90=8C=E6=AD=A5=E7=85=A7=E7=89=87?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuInfoBasic/Index.cshtml | 4 +- .../StuInfoBasic/StuInfoBasicService.cs | 61 ++++++++++--------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml index a9455599d..ee33a818c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/Index.cshtml @@ -71,7 +71,7 @@
-
上传照片
+
是否有照片
@@ -95,7 +95,7 @@  审核全部  生成帐号  更新帐号 - @* 同步照片*@ +  同步照片  查看异动  拍照  学生简历表 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs index e2b8631b6..8eb9af102 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs @@ -498,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(a => a.F_FolderId == stuInfo.Photo); - if (annex == null) + //学籍表中照片字段不为空 + if (!string.IsNullOrEmpty(stuInfo.Photo)) { + var annex = this.BaseRepository() + .FindEntity(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(), @@ -512,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)