From 3b075e0ee33e7caed8c87b900e170eff905e609f Mon Sep 17 00:00:00 2001 From: dao Date: Thu, 9 Jan 2025 17:21:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8CPC=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../User/UserBLL.cs | 22 ++++--- .../User/UserService.cs | 25 ++++++++ .../Views/InternshipAchievement/Form.cshtml | 7 +- .../Views/InternshipAchievement/Form.js | 7 ++ .../Views/InternshipAchievement/Index.js | 2 +- .../Controllers/UserRelationController.cs | 22 +++---- .../Views/UserRelation/SelectForm.js | 4 +- .../Modules/Hetian/HeTianApi.cs | 64 +++++++++++++++---- .../UserRelation/UserRelationService.cs | 2 +- .../BC_PersonnelRequiementBLL.cs | 19 +++++- .../BC_PersonnelRequiementIBLL.cs | 1 + .../BC_PersonnelRequiementService.cs | 30 +++++++++ .../BC_SupplyAndDemandMettingBLL.cs | 20 ++++++ .../BC_SupplyAndDemandMettingIBLL.cs | 1 + .../BC_SupplyAndDemandMettingService.cs | 31 +++++++++ .../InternshipAchievementBLL.cs | 20 ++++++ .../InternshipAchievementEntity.cs | 3 + .../InternshipAchievementIBLL.cs | 1 + .../InternshipAchievementService.cs | 32 ++++++++-- 19 files changed, 266 insertions(+), 47 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs index f9a628e3e..43c0398ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs @@ -627,19 +627,21 @@ namespace Learun.Application.Organization { return null; } - List list = new List(); + //List list = new List(); string[] userList = userIds.Split(','); - foreach (string userId in userList) - { - UserEntity userEntity = GetEntityByUserId(userId); - if (userEntity != null) - { - list.Add(userEntity); - } - } + var user = userService.GetListById(userList).ToList(); + return user; + //foreach (string userId in userList) + //{ + // UserEntity userEntity = GetEntityByUserId(userId); + // if (userEntity != null) + // { + // list.Add(userEntity); + // } + //} - return list; + //return list; } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs index bd1435bfb..f91151f41 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs @@ -160,6 +160,31 @@ namespace Learun.Application.Organization } } } + + public IEnumerable GetListById(string[] id) + { + try + { + var users= this.BaseRepository().FindList(x=>x.F_DeleteMark==0 && id.Contains(x.F_UserId)).OrderBy(x=>x.F_DepartmentId).ThenBy(x=>x.F_RealName).ToList(); + return users; + //var strSql = new StringBuilder(); + //strSql.Append("SELECT "); + //strSql.Append(fieldSql.Replace("t.F_Password,", "").Replace("t.F_Secretkey,", "")); + //strSql.Append(" FROM LR_Base_User t WHERE t.F_DeleteMark = 0 AND t.F_UserId in (@ids) ORDER BY t.F_DepartmentId,t.F_RealName "); + //return this.BaseRepository().FindList(strSql.ToString(), new { ids = id }); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } internal bool GetStuAny() { try diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.cshtml index 613164eaf..0f76ff4ef 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.cshtml @@ -3,13 +3,14 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
学生名字
- +
+
成绩
- +
添加时间
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.js index 7d37b485b..3a9c18211 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.js @@ -15,6 +15,12 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + $('#StudentID').lrselect({ + text: 'stuname', + value: 'stucode', + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic', + + }); }, initData: function () { if (!!keyValue) { @@ -36,6 +42,7 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + $("#Student").val($("#StudentID").find(".lr-select-placeholder").text()); var postData = { strEntity: JSON.stringify($('body').lrGetFormData()) }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Index.js index 46d67533c..e57d6bdb4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Index.js @@ -68,7 +68,7 @@ var bootstrap = function ($, learun) { $('#gridtable').lrAuthorizeJfGrid({ url: top.$.rootUrl + '/EducationalAdministration/InternshipAchievement/GetPageList', headData: [ - { label: "学生名字", name: "StudentID", width: 100, align: "left"}, + { label: "学生名字", name: "Student", width: 100, align: "left"}, { label: "成绩", name: "Achievement", width: 100, align: "left"}, { label: "添加时间", name: "AddTime", width: 100, align: "left"}, { label: "备注", name: "Remark", width: 100, align: "left"}, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Controllers/UserRelationController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Controllers/UserRelationController.cs index de8fe7544..e5fafa9f1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Controllers/UserRelationController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Controllers/UserRelationController.cs @@ -50,19 +50,19 @@ namespace Learun.Application.Web.Areas.LR_AuthorizeModule.Controllers public ActionResult GetUserIdList(string objectId) { var data = userRelationIBLL.GetUserIdList(objectId); - string userIds = ""; - foreach (var item in data) - { - if (userIds != "") - { - userIds += ","; - } - userIds += item.F_UserId; - } - var userList = userIBLL.GetListByUserIds(userIds); + string userIds = string.Join(",",data.Select(x=>x.F_UserId).ToArray()); + //foreach (var item in data) + //{ + // if (userIds != "") + // { + // userIds += ","; + // } + // userIds += item.F_UserId; + //} + var userList = userIBLL.GetListByUserIds(userIds).Select(x=>new {x.F_UserId ,x.F_CompanyId ,x.F_DepartmentId ,x.F_RealName ,x.F_Account }).ToList(); var datajson = new { - userIds = userIds, + //userIds = userIds, userInfoList = userList }; return JsonResult(datajson); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Views/UserRelation/SelectForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Views/UserRelation/SelectForm.js index f1dac10d8..44c5a753a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Views/UserRelation/SelectForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Views/UserRelation/SelectForm.js @@ -200,9 +200,9 @@ var bootstrap = function ($, learun) { userlistselectedobj[item.F_UserId] = item; } }); - var userList = data.userIds.split(','); + var userList = data.userInfoList;//data.userIds.split(','); for (var i = 0, l = userList.length; i < l; i++) { - var userId = userList[i]; + var userId = userList[i].F_UserId; var item = userlistselectedobj[userId]; if (!!item) { if (userlistselected.indexOf(userId) == -1) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs index 2fd4e1a9d..7f65a58ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs @@ -32,6 +32,9 @@ namespace Learun.Application.WebApi.Modules.Hetian Post["/sx/bm"] = Baomin; //报名实习 Get["/zj/my"] = GetZongjie;// 获取总结 Post["/zj/sub"] = Zongjie; //提交总结 + Get["/cj/show"] = GetRs; //实习成绩查看 + Get["/rc/list"] = GetRc; //人才需求 + Get["/gx/list"] = GetGx; //供需见面 } private InternShipSignUpIBLL internShipSignUpIBLL = new InternShipSignUpBLL(); private InternShipSummaryIBLL internShipSummaryIBLL = new InternShipSummaryBLL(); @@ -41,25 +44,27 @@ namespace Learun.Application.WebApi.Modules.Hetian private RoleIBLL roleIBLL = new RoleBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); private CdMajorIBLL majorIbll = new CdMajorBLL(); - + private InternshipAchievementIBLL internshipAchievementIBLL = new InternshipAchievementBLL(); + private BC_PersonnelRequiementIBLL bC_PersonnelRequiementIBLL = new BC_PersonnelRequiementBLL(); + private BC_SupplyAndDemandMettingIBLL bC_SupplyAndDemandMettingIBLL = new BC_SupplyAndDemandMettingBLL(); private Response CheckTicket(dynamic _) { LoginModel loginModel = this.GetReqData(); var ticket = loginModel.ticket; - var uid = "180018"; + //var uid = "180018"; if (string.IsNullOrEmpty(ticket)) { - //string validationUrl = UrlUtil.ConstructValidateUrl(ticket, CasAuthentication.Gateway, CasAuthentication.Renew, new NameValueCollection()); - //var a = PerformHttpGet(validationUrl, true); - //if (a.Contains("PerformHttpGet")) - //{ - // return Fail("PerformHttpGet err"); - //} - //var serviceResponse = ServiceResponse.ParseResponse(a); - //AuthenticationSuccess authSuccessResponse = (AuthenticationSuccess)serviceResponse.Item; - //var uid = authSuccessResponse.User; + string validationUrl = UrlUtil.ConstructValidateUrl(ticket, CasAuthentication.Gateway, CasAuthentication.Renew, new NameValueCollection()); + var a = PerformHttpGet(validationUrl, true); + if (a.Contains("PerformHttpGet")) + { + return Fail("PerformHttpGet err"); + } + var serviceResponse = ServiceResponse.ParseResponse(a); + AuthenticationSuccess authSuccessResponse = (AuthenticationSuccess)serviceResponse.Item; + var uid = authSuccessResponse.User; if (!uid.IsNullOrWhiteSpace()) { #region 内部账户验证 @@ -311,5 +316,42 @@ namespace Learun.Application.WebApi.Modules.Hetian return Success(true); } + /// + /// 实习成绩 + /// + /// + /// + private Response GetRs(dynamic _) + { + var cj = internshipAchievementIBLL.GetMy(userInfo.account); + + return Success(cj); + } + /// + /// 人才需求 + /// + /// + /// + private Response GetRc(dynamic _) + { + var id = GetReqData(); + if (id.IsNullOrWhiteSpace()) id = string.Empty; + var list = bC_PersonnelRequiementIBLL.GetList(id); + + return Success(list); + } + /// + /// 供需见面 + /// + /// + /// + private Response GetGx(dynamic _) + { + var id = GetReqData(); + if (id.IsNullOrWhiteSpace()) id = string.Empty; + var list = bC_SupplyAndDemandMettingIBLL.GetList(id); + + return Success(list); + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/UserRelation/UserRelationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/UserRelation/UserRelationService.cs index cb22bf055..406392d0d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/UserRelation/UserRelationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/UserRelation/UserRelationService.cs @@ -72,7 +72,7 @@ namespace Learun.Application.Base.AuthorizeModule try { var strSql = new StringBuilder(); - strSql.Append(" SELECT "); + strSql.Append(" SELECT "); strSql.Append(fieldSql); strSql.Append(" FROM LR_Base_UserRelation t WHERE t.F_ObjectId = @objectId"); return this.BaseRepository().FindList(strSql.ToString(), new { objectId = objectId }); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementBLL.cs index 583389b3c..aceae0d34 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementBLL.cs @@ -41,7 +41,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } - + public IEnumerable GetList(string id) + { + try + { + return bC_PersonnelRequiementService.GetList(id); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取BC_PersonnelRequiement表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementIBLL.cs index 345c02a4d..e71fc08e6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementIBLL.cs @@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetList(string id); /// /// 获取BC_PersonnelRequiement表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementService.cs index 6a721e3c4..beca68b9d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementService.cs @@ -145,6 +145,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion + public IEnumerable GetList(string id) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM BC_PersonnelRequiement t "); + if (!string.IsNullOrEmpty(id)) + { + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + strSql.Append(" WHERE ID='"+id+"' "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingBLL.cs index a24c77647..72203013f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingBLL.cs @@ -120,5 +120,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + public IEnumerable GetList(string id) + { + try + { + return bC_SupplyAndDemandMettingService.GetList(id); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingIBLL.cs index ad84a4967..99966c5e6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingIBLL.cs @@ -45,5 +45,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void SaveEntity(string keyValue, BC_SupplyAndDemandMettingEntity entity); #endregion + IEnumerable GetList(string id); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingService.cs index e2dbbc8e4..589343a09 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingService.cs @@ -145,5 +145,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #endregion + public IEnumerable GetList(string id) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM BC_SupplyAndDemandMetting t "); + if (!string.IsNullOrEmpty(id)) + { + strSql.Append(" WHERE ID='" + id + "' "); + } + //var queryParam = queryJson.ToJObject(); + // 虚拟参数 + //var dp = new DynamicParameters(new { }); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementBLL.cs index 3baf055cc..57502ecb6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementBLL.cs @@ -2,6 +2,7 @@ using System; using System.Data; using System.Collections.Generic; +using static Dapper.SqlMapper; namespace Learun.Application.TwoDevelopment.EducationalAdministration { @@ -118,6 +119,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public string GetMy(string acc) + { + try + { + return internshipAchievementService.GetMy(acc); + } + 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/InternshipAchievement/InternshipAchievementEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementEntity.cs index 9ecf5ec01..2f1af5b0e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementEntity.cs @@ -24,6 +24,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("STUDENTID")] public string StudentID { get; set; } + + [Column("STUDENT")] + public string Student { get; set; } /// /// 成绩 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementIBLL.cs index 6753500f5..8c21fef67 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementIBLL.cs @@ -45,5 +45,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration void SaveEntity(string keyValue, InternshipAchievementEntity entity); #endregion + string GetMy(string acc); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementService.cs index 5184ce9ef..88fb337cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementService.cs @@ -4,6 +4,7 @@ using Learun.Util; using System; using System.Collections.Generic; using System.Data; +using System.Linq; using System.Text; namespace Learun.Application.TwoDevelopment.EducationalAdministration @@ -31,11 +32,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var strSql = new StringBuilder(); strSql.Append("SELECT "); strSql.Append(@" - t.ID, - t.StudentID, - t.Achievement, - t.AddTime, - t.Remark + t.* "); strSql.Append(" FROM InternshipAchievement t "); strSql.Append(" WHERE 1=1 "); @@ -126,10 +123,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (!string.IsNullOrEmpty(keyValue)) { entity.Modify(keyValue); - this.BaseRepository("CollegeMIS").Update(entity); + this.BaseRepository("CollegeMIS").Update(entity); } else { + var c = this.BaseRepository("CollegeMIS").FindList(x => x.StudentID == entity.StudentID).Count(); + if (c > 0) throw new Exception("实习成绩已提交"); entity.Create(); this.BaseRepository("CollegeMIS").Insert(entity); } @@ -148,6 +147,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion - + public string GetMy(string acc) + { + try + { + var m = this.BaseRepository("CollegeMIS").FindEntity(x => x.StudentID == acc); + return m.Achievement; + } + catch (Exception ex) + { + return "0"; + //if (ex is ExceptionEx) + //{ + // throw; + //} + //else + //{ + // throw ExceptionEx.ThrowServiceException(ex); + //} + } + } } }