Ver a proveniência

移动端接口,PC功能修改

和田中职
dao há 1 semana
ascendente
cometimento
3b075e0ee3
19 ficheiros alterados com 266 adições e 47 eliminaçõ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 ficheiro

@@ -627,19 +627,21 @@ namespace Learun.Application.Organization
{
return null;
}
List<UserEntity> list = new List<UserEntity>();
//List<UserEntity> list = new List<UserEntity>();
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)
{


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

@@ -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()
{
try


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

@@ -3,13 +3,14 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<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>
<input id="StudentID" type="text" class="form-control" />
<div id="StudentID" class="form-control"></div>
<input id="Student" type="hidden" />
</div>
<div class="col-xs-12 lr-form-item" data-table="InternshipAchievement" >
<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 class="col-xs-12 lr-form-item" data-table="InternshipAchievement" >
<div class="lr-form-item-title">添加时间</div>


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

@@ -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())
};


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

@@ -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"},


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

@@ -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);


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

@@ -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) {


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

@@ -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<LoginModel>();
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);
}

/// <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 ficheiro

@@ -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<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 ficheiro

@@ -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>
/// 获取BC_PersonnelRequiement表实体数据
/// <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 ficheiro

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

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

#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 ficheiro

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

#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 ficheiro

@@ -45,5 +45,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
void SaveEntity(string keyValue, BC_SupplyAndDemandMettingEntity entity);
#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 ficheiro

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

#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 ficheiro

@@ -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

}


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

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

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


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

@@ -45,5 +45,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
void SaveEntity(string keyValue, InternshipAchievementEntity entity);
#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 ficheiro

@@ -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<InternshipAchievementEntity>(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<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
Guardar