@@ -37,6 +37,16 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexYJ() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -62,6 +72,28 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListTJ(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sRProjectAchievementIBLL.GetPageListTJ(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
@@ -0,0 +1,34 @@ | |||
@{ | |||
ViewBag.Title = "项目成果管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@*<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">成果名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div>*@ | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/CustomFunction/Views/SRProjectAchievement/IndexYJ.js") |
@@ -0,0 +1,63 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-18 14:58 | |||
* 描 述:项目成果管理 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/CustomFunction/SRProjectAchievement/GetPageListTJ', | |||
headData: [ | |||
{ | |||
label: "姓名", name: "ManageName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "参与项目个数", name: "pcount", width: 100, align: "left" }, | |||
{ label: "项目成果个数", name: "acount", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -938,6 +938,7 @@ | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_UserChangeInfo\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Form.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Index.js" /> | |||
<Content Include="Areas\CustomFunction\Views\SRProjectAchievement\IndexYJ.js" /> | |||
<Content Include="Areas\CustomFunction\Views\SRProjectBasic\IndexTJ.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Index.js" /> | |||
@@ -7346,6 +7347,7 @@ | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\PrintPublic.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\PrintSpecial.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\SRProjectBasic\IndexTJ.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\SRProjectAchievement\IndexYJ.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | |||
@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<SRProjectAchievementEntity> GetPageListTJ(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return sRProjectAchievementService.GetPageListTJ(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取SRProjectAchievement表实体数据 | |||
/// </summary> | |||
@@ -76,7 +76,10 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
#region 扩展字段 | |||
[NotMapped] | |||
public string EnCode { get; set; } | |||
[NotMapped] | |||
public int? acount { get; set; } | |||
[NotMapped] | |||
public int? pcount { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<SRProjectAchievementEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<SRProjectAchievementEntity> GetPageListTJ(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取SRProjectAchievement表实体数据 | |||
/// </summary> | |||
@@ -64,6 +64,37 @@ s.EnCode | |||
} | |||
} | |||
public IEnumerable<SRProjectAchievementEntity> GetPageListTJ(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = @" select t.ManageName,isnull(a.acount,0) as acount,isnull(pcount,0) as pcount from ( | |||
select ManageName from SRProjectAchievement | |||
union | |||
select ManageName from SRProjectPeople | |||
) t | |||
left join (select ManageName,count(1) as acount from SRProjectAchievement group by ManageName) a on t.ManageName=a.ManageName | |||
left join (select ManageName,count(1) as pcount from SRProjectPeople group by ManageName) b on t.ManageName=b.ManageName | |||
"; | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMIS").FindList<SRProjectAchievementEntity>(strSql, dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取SRProjectAchievement表实体数据 | |||
/// </summary> | |||