Ver código fonte

移动端接口,PC功能修改

和田中职
dao 1 semana atrás
pai
commit
3b075e0ee3
19 arquivos alterados com 266 adições e 47 exclusões
  1. +12
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs
  2. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
  3. +4
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.cshtml
  4. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.js
  5. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Index.js
  6. +11
    -11
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Controllers/UserRelationController.cs
  7. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Views/UserRelation/SelectForm.js
  8. +53
    -11
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs
  9. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/UserRelation/UserRelationService.cs
  10. +18
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementBLL.cs
  11. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementIBLL.cs
  12. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementService.cs
  13. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingBLL.cs
  14. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingIBLL.cs
  15. +31
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingService.cs
  16. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementBLL.cs
  17. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementEntity.cs
  18. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementIBLL.cs
  19. +25
    -7
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementService.cs

+ 12
- 10
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserBLL.cs Ver arquivo

@@ -627,19 +627,21 @@ namespace Learun.Application.Organization
{ {
return null; return null;
} }
List<UserEntity> list = new List<UserEntity>();
//List<UserEntity> list = new List<UserEntity>();
string[] userList = userIds.Split(','); 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) catch (Exception ex)
{ {


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs Ver arquivo

@@ -160,6 +160,31 @@ namespace Learun.Application.Organization
} }
} }
} }

public IEnumerable<UserEntity> GetListById(string[] id)
{
try
{
var users= this.BaseRepository().FindList<UserEntity>(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<UserEntity>(strSql.ToString(), new { ids = id });
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
internal bool GetStuAny() internal bool GetStuAny()
{ {
try try


+ 4
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.cshtml Ver arquivo

@@ -3,13 +3,14 @@
Layout = "~/Views/Shared/_Form.cshtml"; Layout = "~/Views/Shared/_Form.cshtml";
} }
<div class="lr-form-wrap"> <div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="InternshipAchievement" >
<div class="col-xs-12 lr-form-item" data-table="InternshipAchievement">
<div class="lr-form-item-title">学生名字</div> <div class="lr-form-item-title">学生名字</div>
<input id="StudentID" type="text" class="form-control" />
<div id="StudentID" class="form-control"></div>
<input id="Student" type="hidden" />
</div> </div>
<div class="col-xs-12 lr-form-item" data-table="InternshipAchievement" > <div class="col-xs-12 lr-form-item" data-table="InternshipAchievement" >
<div class="lr-form-item-title">成绩</div> <div class="lr-form-item-title">成绩</div>
<input id="Achievement" type="text" class="form-control" />
<input id="Achievement" type="number" class="form-control" />
</div> </div>
<div class="col-xs-12 lr-form-item" data-table="InternshipAchievement" > <div class="col-xs-12 lr-form-item" data-table="InternshipAchievement" >
<div class="lr-form-item-title">添加时间</div> <div class="lr-form-item-title">添加时间</div>


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Form.js Ver arquivo

@@ -15,6 +15,12 @@ var bootstrap = function ($, learun) {
page.initData(); page.initData();
}, },
bind: function () { bind: function () {
$('#StudentID').lrselect({
text: 'stuname',
value: 'stucode',
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=StuInfoBasic',

});
}, },
initData: function () { initData: function () {
if (!!keyValue) { if (!!keyValue) {
@@ -36,6 +42,7 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) { if (!$('body').lrValidform()) {
return false; return false;
} }
$("#Student").val($("#StudentID").find(".lr-select-placeholder").text());
var postData = { var postData = {
strEntity: JSON.stringify($('body').lrGetFormData()) strEntity: JSON.stringify($('body').lrGetFormData())
}; };


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/InternshipAchievement/Index.js Ver arquivo

@@ -68,7 +68,7 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({ $('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/InternshipAchievement/GetPageList', url: top.$.rootUrl + '/EducationalAdministration/InternshipAchievement/GetPageList',
headData: [ headData: [
{ label: "学生名字", name: "StudentID", width: 100, align: "left"},
{ label: "学生名字", name: "Student", width: 100, align: "left"},
{ label: "成绩", name: "Achievement", width: 100, align: "left"}, { label: "成绩", name: "Achievement", width: 100, align: "left"},
{ label: "添加时间", name: "AddTime", width: 100, align: "left"}, { label: "添加时间", name: "AddTime", width: 100, align: "left"},
{ label: "备注", name: "Remark", width: 100, align: "left"}, { label: "备注", name: "Remark", width: 100, align: "left"},


+ 11
- 11
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Controllers/UserRelationController.cs Ver arquivo

@@ -50,19 +50,19 @@ namespace Learun.Application.Web.Areas.LR_AuthorizeModule.Controllers
public ActionResult GetUserIdList(string objectId) public ActionResult GetUserIdList(string objectId)
{ {
var data = userRelationIBLL.GetUserIdList(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 var datajson = new
{ {
userIds = userIds,
//userIds = userIds,
userInfoList = userList userInfoList = userList
}; };
return JsonResult(datajson); return JsonResult(datajson);


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_AuthorizeModule/Views/UserRelation/SelectForm.js Ver arquivo

@@ -200,9 +200,9 @@ var bootstrap = function ($, learun) {
userlistselectedobj[item.F_UserId] = item; 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++) { for (var i = 0, l = userList.length; i < l; i++) {
var userId = userList[i];
var userId = userList[i].F_UserId;
var item = userlistselectedobj[userId]; var item = userlistselectedobj[userId];
if (!!item) { if (!!item) {
if (userlistselected.indexOf(userId) == -1) { if (userlistselected.indexOf(userId) == -1) {


+ 53
- 11
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Hetian/HeTianApi.cs Ver arquivo

@@ -32,6 +32,9 @@ namespace Learun.Application.WebApi.Modules.Hetian
Post["/sx/bm"] = Baomin; //报名实习 Post["/sx/bm"] = Baomin; //报名实习
Get["/zj/my"] = GetZongjie;// 获取总结 Get["/zj/my"] = GetZongjie;// 获取总结
Post["/zj/sub"] = Zongjie; //提交总结 Post["/zj/sub"] = Zongjie; //提交总结
Get["/cj/show"] = GetRs; //实习成绩查看
Get["/rc/list"] = GetRc; //人才需求
Get["/gx/list"] = GetGx; //供需见面
} }
private InternShipSignUpIBLL internShipSignUpIBLL = new InternShipSignUpBLL(); private InternShipSignUpIBLL internShipSignUpIBLL = new InternShipSignUpBLL();
private InternShipSummaryIBLL internShipSummaryIBLL = new InternShipSummaryBLL(); private InternShipSummaryIBLL internShipSummaryIBLL = new InternShipSummaryBLL();
@@ -41,25 +44,27 @@ namespace Learun.Application.WebApi.Modules.Hetian
private RoleIBLL roleIBLL = new RoleBLL(); private RoleIBLL roleIBLL = new RoleBLL();
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
private CdMajorIBLL majorIbll = new CdMajorBLL(); 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 _) private Response CheckTicket(dynamic _)
{ {
LoginModel loginModel = this.GetReqData<LoginModel>(); LoginModel loginModel = this.GetReqData<LoginModel>();
var ticket = loginModel.ticket; var ticket = loginModel.ticket;
var uid = "180018";
//var uid = "180018";
if (string.IsNullOrEmpty(ticket)) 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()) if (!uid.IsNullOrWhiteSpace())
{ {
#region 内部账户验证 #region 内部账户验证
@@ -311,5 +316,42 @@ namespace Learun.Application.WebApi.Modules.Hetian
return Success(true); return Success(true);
} }


/// <summary>
/// 实习成绩
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
private Response GetRs(dynamic _)
{
var cj = internshipAchievementIBLL.GetMy(userInfo.account);

return Success<string>(cj);
}
/// <summary>
/// 人才需求
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
private Response GetRc(dynamic _)
{
var id = GetReqData();
if (id.IsNullOrWhiteSpace()) id = string.Empty;
var list = bC_PersonnelRequiementIBLL.GetList(id);
return Success(list);
}
/// <summary>
/// 供需见面
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
private Response GetGx(dynamic _)
{
var id = GetReqData();
if (id.IsNullOrWhiteSpace()) id = string.Empty;
var list = bC_SupplyAndDemandMettingIBLL.GetList(id);

return Success(list);
}
} }
} }

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/AuthorizeModule/UserRelation/UserRelationService.cs Ver arquivo

@@ -72,7 +72,7 @@ namespace Learun.Application.Base.AuthorizeModule
try try
{ {
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append(" SELECT ");
strSql.Append(" SELECT ");
strSql.Append(fieldSql); strSql.Append(fieldSql);
strSql.Append(" FROM LR_Base_UserRelation t WHERE t.F_ObjectId = @objectId"); strSql.Append(" FROM LR_Base_UserRelation t WHERE t.F_ObjectId = @objectId");
return this.BaseRepository().FindList<UserRelationEntity>(strSql.ToString(), new { objectId = objectId }); return this.BaseRepository().FindList<UserRelationEntity>(strSql.ToString(), new { objectId = objectId });


+ 18
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementBLL.cs Ver arquivo

@@ -41,7 +41,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
} }
} }
} }

public IEnumerable<BC_PersonnelRequiementEntity> GetList(string id)
{
try
{
return bC_PersonnelRequiementService.GetList(id);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary> /// <summary>
/// 获取BC_PersonnelRequiement表实体数据 /// 获取BC_PersonnelRequiement表实体数据
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementIBLL.cs Ver arquivo

@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="queryJson">查询参数</param> /// <param name="queryJson">查询参数</param>
/// <returns></returns> /// <returns></returns>
IEnumerable<BC_PersonnelRequiementEntity> GetPageList(Pagination pagination, string queryJson); IEnumerable<BC_PersonnelRequiementEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<BC_PersonnelRequiementEntity> GetList(string id);
/// <summary> /// <summary>
/// 获取BC_PersonnelRequiement表实体数据 /// 获取BC_PersonnelRequiement表实体数据
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>


+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_PersonnelRequiement/BC_PersonnelRequiementService.cs Ver arquivo

@@ -145,6 +145,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
} }


#endregion #endregion
public IEnumerable<BC_PersonnelRequiementEntity> 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<BC_PersonnelRequiementEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


} }
} }

+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingBLL.cs Ver arquivo

@@ -120,5 +120,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration


#endregion #endregion


public IEnumerable<BC_SupplyAndDemandMettingEntity> GetList(string id)
{
try
{
return bC_SupplyAndDemandMettingService.GetList(id);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


} }
} }

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingIBLL.cs Ver arquivo

@@ -45,5 +45,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
void SaveEntity(string keyValue, BC_SupplyAndDemandMettingEntity entity); void SaveEntity(string keyValue, BC_SupplyAndDemandMettingEntity entity);
#endregion #endregion


IEnumerable<BC_SupplyAndDemandMettingEntity> GetList(string id);
} }
} }

+ 31
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BC_SupplyAndDemandMetting/BC_SupplyAndDemandMettingService.cs Ver arquivo

@@ -145,5 +145,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration


#endregion #endregion


public IEnumerable<BC_SupplyAndDemandMettingEntity> 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<BC_SupplyAndDemandMettingEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
} }
} }

+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementBLL.cs Ver arquivo

@@ -2,6 +2,7 @@
using System; using System;
using System.Data; using System.Data;
using System.Collections.Generic; using System.Collections.Generic;
using static Dapper.SqlMapper;


namespace Learun.Application.TwoDevelopment.EducationalAdministration 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 #endregion


} }


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementEntity.cs Ver arquivo

@@ -24,6 +24,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary> /// </summary>
[Column("STUDENTID")] [Column("STUDENTID")]
public string StudentID { get; set; } public string StudentID { get; set; }

[Column("STUDENT")]
public string Student { get; set; }
/// <summary> /// <summary>
/// 成绩 /// 成绩
/// </summary> /// </summary>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementIBLL.cs Ver arquivo

@@ -45,5 +45,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
void SaveEntity(string keyValue, InternshipAchievementEntity entity); void SaveEntity(string keyValue, InternshipAchievementEntity entity);
#endregion #endregion


string GetMy(string acc);
} }
} }

+ 25
- 7
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/InternshipAchievement/InternshipAchievementService.cs Ver arquivo

@@ -4,6 +4,7 @@ using Learun.Util;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Linq;
using System.Text; using System.Text;


namespace Learun.Application.TwoDevelopment.EducationalAdministration namespace Learun.Application.TwoDevelopment.EducationalAdministration
@@ -31,11 +32,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append("SELECT "); strSql.Append("SELECT ");
strSql.Append(@" strSql.Append(@"
t.ID,
t.StudentID,
t.Achievement,
t.AddTime,
t.Remark
t.*
"); ");
strSql.Append(" FROM InternshipAchievement t "); strSql.Append(" FROM InternshipAchievement t ");
strSql.Append(" WHERE 1=1 "); strSql.Append(" WHERE 1=1 ");
@@ -126,10 +123,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (!string.IsNullOrEmpty(keyValue)) if (!string.IsNullOrEmpty(keyValue))
{ {
entity.Modify(keyValue); entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
this.BaseRepository("CollegeMIS").Update(entity);
} }
else else
{ {
var c = this.BaseRepository("CollegeMIS").FindList<InternshipAchievementEntity>(x => x.StudentID == entity.StudentID).Count();
if (c > 0) throw new Exception("实习成绩已提交");
entity.Create(); entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity); this.BaseRepository("CollegeMIS").Insert(entity);
} }
@@ -148,6 +147,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
} }


#endregion #endregion

public string GetMy(string acc)
{
try
{
var m = this.BaseRepository("CollegeMIS").FindEntity<InternshipAchievementEntity>(x => x.StudentID == acc);
return m.Achievement;
}
catch (Exception ex)
{
return "0";
//if (ex is ExceptionEx)
//{
// throw;
//}
//else
//{
// throw ExceptionEx.ThrowServiceException(ex);
//}
}
}
} }
} }

Carregando…
Cancelar
Salvar