@@ -0,0 +1,155 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:28 | |||||
/// 描 述:民体中心赛事分组管理 | |||||
/// </summary> | |||||
public class CompetitionGroupManagerController : MvcControllerBase | |||||
{ | |||||
private CompetitionGroupManagerIBLL competitionGroupManagerIBLL = new CompetitionGroupManagerBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
///计算积分 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormScore() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = competitionGroupManagerIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetRankList(string keyValue) | |||||
{ | |||||
var data = competitionGroupManagerIBLL.GetCompetitionGroupManagerListRankByCompId(keyValue); | |||||
return Success(data); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var CompetitionGroupManagerData = competitionGroupManagerIBLL.GetCompetitionGroupManagerEntity( keyValue ); | |||||
var jsonData = new { | |||||
CompetitionGroupManager = CompetitionGroupManagerData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
competitionGroupManagerIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
CompetitionGroupManagerEntity entity = strEntity.ToObject<CompetitionGroupManagerEntity>(); | |||||
competitionGroupManagerIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult ComputeForm(string keyValue, string strEntity) | |||||
{ | |||||
List<int> entity = strEntity.ToObject<List<int>>(); | |||||
competitionGroupManagerIBLL.ComputeForm(keyValue, entity); | |||||
//competitionGroupManagerIBLL.SaveEntity(keyValue, entity); | |||||
return Success("计算成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,117 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:49 | |||||
/// 描 述:民体中心比赛信息管理 | |||||
/// </summary> | |||||
public class CompetitionInfoManagerController : MvcControllerBase | |||||
{ | |||||
private CompetitionInfoManagerIBLL competitionInfoManagerIBLL = new CompetitionInfoManagerBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = competitionInfoManagerIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var CompetitionInfoData = competitionInfoManagerIBLL.GetCompetitionInfoEntity( keyValue ); | |||||
var jsonData = new { | |||||
CompetitionInfo = CompetitionInfoData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
competitionInfoManagerIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
CompetitionInfoEntity entity = strEntity.ToObject<CompetitionInfoEntity>(); | |||||
competitionInfoManagerIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,126 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:13 | |||||
/// 描 述:民体中心赛事管理 | |||||
/// </summary> | |||||
public class CompetitionManagerController : MvcControllerBase | |||||
{ | |||||
private CompetitionManagerIBLL competitionManagerIBLL = new CompetitionManagerBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 排行页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Ranking() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = competitionManagerIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var CompetitionManagerData = competitionManagerIBLL.GetCompetitionManagerEntity( keyValue ); | |||||
var jsonData = new { | |||||
CompetitionManager = CompetitionManagerData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
competitionManagerIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
CompetitionManagerEntity entity = strEntity.ToObject<CompetitionManagerEntity>(); | |||||
competitionManagerIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -118,7 +118,21 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
}}, | }}, | ||||
{ label: "班级评比荣誉", name: "EvaluationHonor", width: 100, align: "left"}, | { label: "班级评比荣誉", name: "EvaluationHonor", width: 100, align: "left"}, | ||||
{ label: "附件上传", name: "Path", width: 100, align: "left"}, | |||||
{ | |||||
label: "附件上传", name: "Path", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList?folderId=' + value, | |||||
sync: true, | |||||
callback: function (_data) { | |||||
if (_data.F_FileName) { | |||||
callback('<span onclick="downLoad(\'' + _data['F_Id'] + '\',\'' + value + '\',\'' + $.lrToken + '\')" style="color:blue">' + _data['F_FileName'] + '</span>'); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId:'ID', | mainId:'ID', | ||||
isPage: true | isPage: true | ||||
@@ -136,3 +150,6 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } | ||||
function downLoad(fileId) { | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} |
@@ -0,0 +1,30 @@ | |||||
@{ | |||||
ViewBag.Title = "民体中心赛事分组管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;" > | |||||
<span>民体中心赛事分组管理</span> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionGroupManager" > | |||||
<div class="lr-form-item-title">赛事<font face="宋体">*</font></div> | |||||
<div id="CompetitionId" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager" > | |||||
<div class="lr-form-item-title">分组名称<font face="宋体">*</font></div> | |||||
<input id="GroupName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager" > | |||||
<div class="lr-form-item-title">当前积分<font face="宋体">*</font></div> | |||||
<input id="Integral" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionGroupManager" > | |||||
<div class="lr-form-item-title">证书</div> | |||||
<div id="Path" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionGroupManager" > | |||||
<div class="lr-form-item-title">分组简介</div> | |||||
<textarea id="GroupDesc" class="form-control" style="height:200px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionGroupManager/Form.js") |
@@ -0,0 +1,53 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-09-26 10:28 | |||||
* 描 述:民体中心赛事分组管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#CompetitionId').lrDataSourceSelect({ code: 'CompetitionManager',value: 'id',text: 'name' }); | |||||
$('#Path').lrUploader(); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
$('#Integral').val('0'); | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,38 @@ | |||||
@{ | |||||
ViewBag.Title = "计算积分"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;"> | |||||
<span>民体中心赛事分组成绩积分计算</span> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionGroupManager"> | |||||
<div class="lr-form-item-title">赛事<font face="宋体">*</font></div> | |||||
<div id="CompetitionId" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"> | |||||
<div class="lr-form-item-title">第一名积分<font face="宋体">*</font></div> | |||||
<input id="D1" type="text" value="3" class="form-control jifen" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"> | |||||
<div class="lr-form-item-title">第二名积分<font face="宋体">*</font></div> | |||||
<input id="D2" type="text" value="2" class="form-control jifen" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"> | |||||
<div class="lr-form-item-title">第三名积分<font face="宋体">*</font></div> | |||||
<input id="D3" type="text" value="1" class="form-control jifen" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"> | |||||
<div class="lr-form-item-title">第四名积分<font face="宋体">*</font></div> | |||||
<input id="D4" type="text" value="0" class="form-control jifen" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"> | |||||
<div class="lr-form-item-title">第五名积分<font face="宋体">*</font></div> | |||||
<input id="D5" type="text" value="0" class="form-control jifen" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"> | |||||
<div class="lr-form-item-title">第六名积分<font face="宋体">*</font></div> | |||||
<input id="D5" type="text" value="0" class="form-control jifen" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionGroupManager/FormScore.js") |
@@ -0,0 +1,57 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-09-26 10:28 | |||||
* 描 述:民体中心赛事分组计算积分 | |||||
*/ | |||||
var acceptClick; | |||||
//var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#CompetitionId').lrDataSourceSelect({ code: 'CompetitionManager', value: 'id', text: 'name', select: SetInfo }); | |||||
}, | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
const inputs = document.querySelectorAll('.jifen'); | |||||
var postData = { | |||||
strEntity: JSON.stringify(Array.from(inputs).map(input => parseInt(input.value))) //JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
// 转换为数组并提取 value | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/ComputeForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} | |||||
function SetInfo(val) { | |||||
if (val) { | |||||
keyValue = val.id | |||||
} else { | |||||
keyValue="" | |||||
} | |||||
} | |||||
function selectype() { | |||||
const selectElement = document.getElementById("mySelect"); | |||||
const selectedOptions = Array.from(selectElement.selectedOptions).map(option => option.value); | |||||
if (selectedOptions[0] == "pm") { | |||||
$("#pm").show(); | |||||
$("#cj").hide(); | |||||
} else { | |||||
$("#pm").hide(); | |||||
$("#cj").show(); | |||||
} | |||||
console.log("选中的选项:", selectedOptions[0]); | |||||
} |
@@ -0,0 +1,46 @@ | |||||
@{ | |||||
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> | |||||
<div id="CompetitionId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">分组名称</div> | |||||
<input id="GroupName" 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_compute" class="btn btn-default"><i class="fa fa-building"></i> 计算积分</a> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_export" class="btn btn-default"><i class="fa fa-plus"></i> 导出</a> | |||||
<a id="lr_import" class="btn btn-default"><i class="fa fa-plus"></i> 导入</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionGroupManager/Index.js") |
@@ -0,0 +1,156 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-09-26 10:28 | |||||
* 描 述:民体中心赛事分组管理 | |||||
*/ | |||||
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); | |||||
$('#CompetitionId').lrDataSourceSelect({ code: 'CompetitionManager',value: 'id',text: 'name' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//计算积分 | |||||
$('#lr_compute').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'from_compute', | |||||
title: '计算积分', | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/FormScore', | |||||
width: 500, | |||||
height: 350, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
// 导出 | |||||
$('#lr_export').on('click', function () { | |||||
}); | |||||
// 导入 | |||||
$('#lr_import').on('click', function () { | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/GetPageList', | |||||
headData: [ | |||||
{ label: "赛事", name: "CompetitionId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CompetitionManager', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "分组名称", name: "GroupName", width: 100, align: "left"}, | |||||
{ label: "当前积分", name: "Integral", width: 100, align: "left"}, | |||||
{ | |||||
label: "证书", name: "Path", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList?folderId=' + value, | |||||
sync: true, | |||||
callback: function (_data) { | |||||
if (_data.F_FileName) { | |||||
callback('<span onclick="downLoad(\'' + _data['F_Id'] + '\',\'' + value + '\',\'' + $.lrToken + '\')" style="color:blue">' + _data['F_FileName'] + '</span>'); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
// learun.clientdata.getAsync('custmerData', | |||||
// { | |||||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'FileInfo', | |||||
// key: value, | |||||
// keyId: 'f_folderid', | |||||
// sync: true, | |||||
// callback: function (_data) { | |||||
// if (_data.f_filename) { | |||||
// callback('<span onclick="downLoad(\'' + _data['f_id'] + '\',\'' + value + '\',\'' + $.lrToken + '\')" style="color:blue">' + _data['f_filename'] + '</span>'); | |||||
// } | |||||
// } | |||||
// }); | |||||
//} | |||||
}, | |||||
{ label: "分组简介", name: "GroupDesc", 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(); | |||||
} | |||||
function downLoad(fileId) { | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} |
@@ -0,0 +1,22 @@ | |||||
@{ | |||||
ViewBag.Title = "民体中心比赛信息管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;" > | |||||
<span>民体中心比赛信息管理</span> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionInfo" > | |||||
<div class="lr-form-item-title">赛事<font face="宋体">*</font></div> | |||||
<div id="CompetitionId" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionInfo" > | |||||
<div class="lr-form-item-title">赛事分组<font face="宋体">*</font></div> | |||||
<div id="GroupId" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionInfo" > | |||||
<div class="lr-form-item-title">比赛成绩</div> | |||||
<input id="Sore" type="text" class="form-control" isvalid="yes" checkexpession="PositiveFloatintZero" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionInfoManager/Form.js") |
@@ -0,0 +1,52 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-09-26 10:49 | |||||
* 描 述:民体中心比赛信息管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#CompetitionId').lrDataSourceSelect({ code: 'CompetitionManager',value: 'id',text: 'name' }); | |||||
$('#GroupId').lrDataSourceSelect({ code: 'CompetitionGroupManager',value: 'id',text: 'groupname' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/CompetitionInfoManager/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/CompetitionInfoManager/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,45 @@ | |||||
@{ | |||||
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> | |||||
<div id="CompetitionId"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">赛事分组</div> | |||||
<div id="GroupId"></div> | |||||
</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_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_export" class="btn btn-default"><i class="fa fa-plus"></i> 导出</a> | |||||
<a id="lr_import" class="btn btn-default"><i class="fa fa-plus"></i> 导入</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionInfoManager/Index.js") |
@@ -0,0 +1,130 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-09-26 10:49 | |||||
* 描 述:民体中心比赛信息管理 | |||||
*/ | |||||
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); | |||||
$('#CompetitionId').lrDataSourceSelect({ code: 'CompetitionManager',value: 'id',text: 'name' }); | |||||
$('#GroupId').lrDataSourceSelect({ code: 'CompetitionGroupManager',value: 'id',text: 'groupname' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionInfoManager/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionInfoManager/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CompetitionInfoManager/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
// 导出 | |||||
$('#lr_export').on('click', function () { | |||||
}); | |||||
// 导入 | |||||
$('#lr_import').on('click', function () { | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionInfoManager/GetPageList', | |||||
headData: [ | |||||
{ label: "赛事", name: "CompetitionId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CompetitionManager', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "赛事分组", name: "GroupId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CompetitionGroupManager', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['groupname']); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "比赛成绩", name: "Sore", width: 100, align: "left" }, | |||||
{ | |||||
label: "是否计算过积分", name: "IsIntegral", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (!cellvalue) { | |||||
return '<span class=\"label label-warning\">否</span>'; | |||||
} else { | |||||
return '<span class=\"label label-success\">是</span>'; | |||||
} | |||||
} }, | |||||
], | |||||
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(); | |||||
} |
@@ -0,0 +1,30 @@ | |||||
@{ | |||||
ViewBag.Title = "民体中心赛事管理"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;" > | |||||
<span>民体中心赛事管理</span> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionManager" > | |||||
<div class="lr-form-item-title">赛事名称<font face="宋体">*</font></div> | |||||
<input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionManager" > | |||||
<div class="lr-form-item-title">赛事类型<font face="宋体">*</font></div> | |||||
<input id="CompetitionType" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionManager" > | |||||
<div class="lr-form-item-title">比赛时间<font face="宋体">*</font></div> | |||||
<input id="CompetitionTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#CompetitionTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionManager" > | |||||
<div class="lr-form-item-title">赛事级别<font face="宋体">*</font></div> | |||||
<div id="CompetitonLevel" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="CompetitionManager" > | |||||
<div class="lr-form-item-title">赛事备注<font face="宋体">*</font></div> | |||||
<textarea id="Remark" class="form-control" style="height:200px;" isvalid="yes" checkexpession="NotNull" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionManager/Form.js") |
@@ -0,0 +1,51 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-09-26 10:13 | |||||
* 描 述:民体中心赛事管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#CompetitonLevel').lrDataItemSelect({ code: 'CompetitonLevel' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/CompetitionManager/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/CompetitionManager/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,49 @@ | |||||
@{ | |||||
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="datesearch"></div> | |||||
</div> | |||||
<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 class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">赛事类型</div> | |||||
<input id="CompetitionType" 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_ranking" class="btn btn-default"><i class="fa fa-plus"></i> 查看排行</a> | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<a id="lr_export" class="btn btn-default"><i class="fa fa-plus"></i> 导出</a> | |||||
<a id="lr_import" class="btn btn-default"><i class="fa fa-plus"></i> 导入</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionManager/Index.js") |
@@ -0,0 +1,156 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-09-26 10:13 | |||||
* 描 述:民体中心赛事管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var startTime; | |||||
var endTime; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 时间搜索框 | |||||
$('#datesearch').lrdate({ | |||||
dfdata: [ | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '1', | |||||
selectfn: function (begin, end) { | |||||
startTime = begin; | |||||
endTime = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionManager/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionManager/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CompetitionManager/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//查看排行 | |||||
$('#lr_ranking').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
var name = encodeURIComponent($('#gridtable').jfGridValue('Name')); | |||||
console.log(name) | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'from_ranking', | |||||
title: '查看排行', | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionManager/Ranking?keyValue=' + keyValue + "&Competitionname=" + name, | |||||
width: 500, | |||||
height: 350, | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
// 导出 | |||||
$('#lr_export').on('click', function () { | |||||
}); | |||||
// 导入 | |||||
$('#lr_import').on('click', function () { | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionManager/GetPageList', | |||||
headData: [ | |||||
{ label: "赛事名称", name: "Name", width: 100, align: "left"}, | |||||
{ label: "赛事类型", name: "CompetitionType", width: 100, align: "left"}, | |||||
{ label: "比赛时间", name: "CompetitionTime", width: 100, align: "left"}, | |||||
{ label: "下拉框", name: "CompetitonLevel", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'CompetitonLevel', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "赛事备注", name: "Remark", width: 100, align: "left"}, | |||||
], | |||||
mainId:'ID', | |||||
isPage: true | |||||
}); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,13 @@ | |||||
@{ | |||||
ViewBag.Title = "计算积分"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form" style="font-size:15px"> | |||||
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;"> | |||||
<span id="title">民体中心赛事排行榜</span> | |||||
</div> | |||||
<div id="Content"> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CompetitionManager/Ranking.js") |
@@ -0,0 +1,78 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2024-09-26 10:28 | |||||
* 描 述:民体中心赛事分组计算积分 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$("#title").html("民体中心"+getQueryParam("Competitionname") +"排行榜") | |||||
$('.lr-form-wrap').lrscroll(); | |||||
}, | |||||
getData: function () { | |||||
$.ajax({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/GetRankList?keyValue=' + keyValue, | |||||
type: "GET", | |||||
dataType: "json", | |||||
async: true, | |||||
success: function (result) { | |||||
var html="" | |||||
for (var i = 0; i < result.data.length; i++) { | |||||
var res = result.data | |||||
if (i == 0) { | |||||
html += '<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"><div class="lr-form-item-title"> 冠军:</div><div style="line-height:28px" id="D1">' + res[i].GroupName + '(' + res[i].Integral + '分)' + '</div></div >'; | |||||
} else if (i == 1) { | |||||
html += '<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"><div class="lr-form-item-title"> 亚军:</div><div style="line-height:28px" id="D1">' + res[i].GroupName + '(' + res[i].Integral + '分)' + '</div></div > ' | |||||
} else if (i == 2) { | |||||
html += '<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"><div class="lr-form-item-title"> 季军:</div><div style="line-height:28px" id="D1">' + res[i].GroupName + '(' + res[i].Integral + '分)' + '</div></div > ' | |||||
} else if (i == 3) { | |||||
html += '<div class="col-xs-6 lr-form-item" data-table="CompetitionGroupManager"><div class="lr-form-item-title"> 优秀奖:</div><div style="line-height:28px" id="D1">' + res[i].GroupName + '(' + res[i].Integral + '分)' + '</div></div > ' | |||||
} | |||||
} | |||||
$("#Content").html(html); | |||||
} | |||||
}); | |||||
}, | |||||
}; | |||||
page.getData(); | |||||
page.init(); | |||||
} | |||||
function getData() { | |||||
$.ajax({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/CompetitionGroupManager/GetRankList?keyValue=' + keyValue, | |||||
type: "GET", | |||||
dataType: "json", | |||||
async: true, | |||||
success: function (res) { | |||||
console.log(res) | |||||
} | |||||
}); | |||||
} | |||||
function SetInfo(val) { | |||||
if (val) { | |||||
keyValue = val.id | |||||
} else { | |||||
keyValue="" | |||||
} | |||||
} | |||||
function selectype() { | |||||
const selectElement = document.getElementById("mySelect"); | |||||
const selectedOptions = Array.from(selectElement.selectedOptions).map(option => option.value); | |||||
if (selectedOptions[0] == "pm") { | |||||
$("#pm").show(); | |||||
$("#cj").hide(); | |||||
} else { | |||||
$("#pm").hide(); | |||||
$("#cj").show(); | |||||
} | |||||
console.log("选中的选项:", selectedOptions[0]); | |||||
} | |||||
function getQueryParam(param) { | |||||
const regex = new RegExp('[?&]' + encodeURIComponent(param) + '=([^&]*)'); | |||||
const results = regex.exec(window.location.search); | |||||
return results ? decodeURIComponent(results[1]) : null; | |||||
} |
@@ -106,7 +106,21 @@ var bootstrap = function ($, learun) { | |||||
headData: [ | headData: [ | ||||
{ label: "专业成果", name: "AchievementName", width: 100, align: "left"}, | { label: "专业成果", name: "AchievementName", width: 100, align: "left"}, | ||||
{ label: "成果取得时间", name: "AchievementTime", width: 100, align: "left"}, | { label: "成果取得时间", name: "AchievementTime", width: 100, align: "left"}, | ||||
{ label: "附件", name: "Path", width: 100, align: "left"}, | |||||
{ | |||||
label: "附件", name: "Path", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList?folderId=' + value, | |||||
sync: true, | |||||
callback: function (_data) { | |||||
if (_data.F_FileName) { | |||||
callback('<span onclick="downLoad(\'' + _data['F_Id'] + '\',\'' + value + '\',\'' + $.lrToken + '\')" style="color:blue">' + _data['F_FileName'] + '</span>'); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | { label: "备注", name: "Remark", width: 100, align: "left"}, | ||||
], | ], | ||||
mainId:'ID', | mainId:'ID', | ||||
@@ -125,3 +139,6 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } | ||||
function downLoad(fileId) { | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} |
@@ -81,7 +81,21 @@ var bootstrap = function ($, learun) { | |||||
{ label: "活动费用", name: "ActivityCost", width: 100, align: "left"}, | { label: "活动费用", name: "ActivityCost", width: 100, align: "left"}, | ||||
{ label: "参与学生数", name: "ParticipantsTeachNum", width: 100, align: "left"}, | { label: "参与学生数", name: "ParticipantsTeachNum", width: 100, align: "left"}, | ||||
{ label: "参与学生数", name: "ParticipantsStuNum", width: 100, align: "left"}, | { label: "参与学生数", name: "ParticipantsStuNum", width: 100, align: "left"}, | ||||
{ label: "活动文件", name: "Path", width: 100, align: "left"}, | |||||
{ | |||||
label: "活动文件", name: "Path", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList?folderId=' + value, | |||||
sync: true, | |||||
callback: function (_data) { | |||||
if (_data.F_FileName) { | |||||
callback('<span onclick="downLoad(\'' + _data['F_Id'] + '\',\'' + value + '\',\'' + $.lrToken + '\')" style="color:blue">' + _data['F_FileName'] + '</span>'); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "活动内容", name: "ActivityContent", width: 100, align: "left"}, | { label: "活动内容", name: "ActivityContent", width: 100, align: "left"}, | ||||
], | ], | ||||
mainId:'ID', | mainId:'ID', | ||||
@@ -99,3 +113,6 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } | ||||
function downLoad(fileId) { | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} |
@@ -78,7 +78,21 @@ var bootstrap = function ($, learun) { | |||||
{ label: "制度时间", name: "IsmTime", width: 100, align: "left"}, | { label: "制度时间", name: "IsmTime", width: 100, align: "left"}, | ||||
{ label: "制度名称", name: "IsmName", width: 100, align: "left"}, | { label: "制度名称", name: "IsmName", width: 100, align: "left"}, | ||||
{ label: "制定部门", name: "IsmDep", width: 100, align: "left"}, | { label: "制定部门", name: "IsmDep", width: 100, align: "left"}, | ||||
{ label: "制度附件", name: "Path", width: 100, align: "left"}, | |||||
{ | |||||
label: "制度附件", name: "Path", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList?folderId=' + value, | |||||
sync: true, | |||||
callback: function (_data) { | |||||
if (_data.F_FileName) { | |||||
callback('<span onclick="downLoad(\'' + _data['F_Id'] + '\',\'' + value + '\',\'' + $.lrToken + '\')" style="color:blue">' + _data['F_FileName'] + '</span>'); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | { label: "备注", name: "Remark", width: 100, align: "left"}, | ||||
], | ], | ||||
mainId:'ID', | mainId:'ID', | ||||
@@ -96,3 +110,6 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } | ||||
function downLoad(fileId) { | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} |
@@ -120,7 +120,21 @@ var bootstrap = function ($, learun) { | |||||
{ label: "专业人数", name: "MajorNum", width: 100, align: "left"}, | { label: "专业人数", name: "MajorNum", width: 100, align: "left"}, | ||||
{ label: "对口高职专业", name: "HigherVocational", width: 100, align: "left"}, | { label: "对口高职专业", name: "HigherVocational", width: 100, align: "left"}, | ||||
{ label: "高职专业代码", name: "HigherVocationalCode", width: 100, align: "left"}, | { label: "高职专业代码", name: "HigherVocationalCode", width: 100, align: "left"}, | ||||
{ label: "人才培养方案", name: "Path", width: 100, align: "left"}, | |||||
{ | |||||
label: "人才培养方案", name: "Path", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList?folderId=' + value, | |||||
sync: true, | |||||
callback: function (_data) { | |||||
if (_data.F_FileName) { | |||||
callback('<span onclick="downLoad(\'' + _data['F_Id'] + '\',\'' + value + '\',\'' + $.lrToken + '\')" style="color:blue">' + _data['F_FileName'] + '</span>'); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId:'ID', | mainId:'ID', | ||||
isPage: true | isPage: true | ||||
@@ -138,3 +152,6 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } | ||||
function downLoad(fileId) { | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} |
@@ -108,7 +108,21 @@ var bootstrap = function ($, learun) { | |||||
{ label: "承办单位", name: "Organizer", width: 100, align: "left"}, | { label: "承办单位", name: "Organizer", width: 100, align: "left"}, | ||||
{ label: "福利人数", name: "WelfareNum", width: 100, align: "left"}, | { label: "福利人数", name: "WelfareNum", width: 100, align: "left"}, | ||||
{ label: "金额", name: "Amount", width: 100, align: "left"}, | { label: "金额", name: "Amount", width: 100, align: "left"}, | ||||
{ label: "附件上传", name: "Path", width: 100, align: "left"}, | |||||
{ | |||||
label: "附件上传", name: "Path", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', | |||||
{ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList?folderId=' + value, | |||||
sync: true, | |||||
callback: function (_data) { | |||||
if (_data.F_FileName) { | |||||
callback('<span onclick="downLoad(\'' + _data['F_Id'] + '\',\'' + value + '\',\'' + $.lrToken + '\')" style="color:blue">' + _data['F_FileName'] + '</span>'); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "福利内容", name: "WelfareContent", width: 100, align: "left"}, | { label: "福利内容", name: "WelfareContent", width: 100, align: "left"}, | ||||
], | ], | ||||
mainId:'ID', | mainId:'ID', | ||||
@@ -127,3 +141,6 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } | ||||
function downLoad(fileId) { | |||||
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' }); | |||||
} |
@@ -916,6 +916,9 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\FixedAssetsController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\FixedAssetsController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\SafetyCheckController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\SafetyCheckController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\OfficeEquipmentController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\OfficeEquipmentController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\CompetitionManagerController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\CompetitionGroupManagerController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\CompetitionInfoManagerController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -1086,6 +1089,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\ClassPlan\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\ClassPlan\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.js" /> | <Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionGroupManager\FormScore.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionManager\Ranking.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\qrCode.js" /> | <Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\qrCode.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormCheck.js" /> | <Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormCheck.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormView.js" /> | <Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormView.js" /> | ||||
@@ -1123,6 +1128,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\BookPayDetail\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\Index.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\BookPayDetail\Index.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\BookPayDetail\FormClass.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\BookPayDetail\FormClass.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionGroupManager\FormScore.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionManager\Ranking.cshtml" /> | |||||
<None Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\SeatForm.cshtml" /> | <None Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\SeatForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.js" /> | ||||
@@ -7203,6 +7210,18 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionManager\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionManager\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionManager\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionManager\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionGroupManager\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionGroupManager\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionGroupManager\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionGroupManager\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionInfoManager\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionInfoManager\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionInfoManager\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\CompetitionInfoManager\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | <Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:28 | |||||
/// 描 述:民体中心赛事分组管理 | |||||
/// </summary> | |||||
public class CompetitionGroupManagerMap : EntityTypeConfiguration<CompetitionGroupManagerEntity> | |||||
{ | |||||
public CompetitionGroupManagerMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("COMPETITIONGROUPMANAGER"); | |||||
//主键 | |||||
this.HasKey(t => t.ID); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:49 | |||||
/// 描 述:民体中心比赛信息管理 | |||||
/// </summary> | |||||
public class CompetitionInfoMap : EntityTypeConfiguration<CompetitionInfoEntity> | |||||
{ | |||||
public CompetitionInfoMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("COMPETITIONINFO"); | |||||
//主键 | |||||
this.HasKey(t => t.ID); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:13 | |||||
/// 描 述:民体中心赛事管理 | |||||
/// </summary> | |||||
public class CompetitionManagerMap : EntityTypeConfiguration<CompetitionManagerEntity> | |||||
{ | |||||
public CompetitionManagerMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("COMPETITIONMANAGER"); | |||||
//主键 | |||||
this.HasKey(t => t.ID); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -678,6 +678,9 @@ | |||||
<Compile Include="EducationalAdministration\FixedAssetsMap.cs" /> | <Compile Include="EducationalAdministration\FixedAssetsMap.cs" /> | ||||
<Compile Include="EducationalAdministration\SafetyCheckMap.cs" /> | <Compile Include="EducationalAdministration\SafetyCheckMap.cs" /> | ||||
<Compile Include="EducationalAdministration\OfficeEquipmentMap.cs" /> | <Compile Include="EducationalAdministration\OfficeEquipmentMap.cs" /> | ||||
<Compile Include="EducationalAdministration\CompetitionManagerMap.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionGroupManagerMap.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionInfoMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,179 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using static Dapper.SqlMapper; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:28 | |||||
/// 描 述:民体中心赛事分组管理 | |||||
/// </summary> | |||||
public class CompetitionGroupManagerBLL : CompetitionGroupManagerIBLL | |||||
{ | |||||
private CompetitionGroupManagerService competitionGroupManagerService = new CompetitionGroupManagerService(); | |||||
private CompetitionInfoManagerService competitionInfoManagerService = new CompetitionInfoManagerService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<CompetitionGroupManagerEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return competitionGroupManagerService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取CompetitionGroupManager表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public CompetitionGroupManagerEntity GetCompetitionGroupManagerEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return competitionGroupManagerService.GetCompetitionGroupManagerEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<CompetitionGroupManagerEntity> GetCompetitionGroupManagerListRankByCompId(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return competitionGroupManagerService.GetRankList(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
competitionGroupManagerService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, CompetitionGroupManagerEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
competitionGroupManagerService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void ComputeForm(string keyValue, List<int> strEntity) | |||||
{ | |||||
try | |||||
{ | |||||
var forindex = strEntity.Count; | |||||
var infolist = competitionInfoManagerService.GetListByCompetId(keyValue).OrderByDescending(x=>x.Sore).ToList(); | |||||
if (infolist.Count<strEntity.Count) | |||||
{ | |||||
forindex = infolist.Count; | |||||
} | |||||
for (int i = 0; i < forindex; i++) | |||||
{ | |||||
var model = competitionGroupManagerService.GetCompetitionGroupManagerEntity(infolist[i].GroupId); | |||||
model.Integral += strEntity[i]; | |||||
competitionGroupManagerService.SaveEntity(model.ID,model); | |||||
infolist[i].IsIntegral=true; | |||||
competitionInfoManagerService.SaveEntity(infolist[i].ID, infolist[i]); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,70 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:28 | |||||
/// 描 述:民体中心赛事分组管理 | |||||
/// </summary> | |||||
public class CompetitionGroupManagerEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 主键ID | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string ID { get; set; } | |||||
/// <summary> | |||||
/// 赛事id | |||||
/// </summary> | |||||
[Column("COMPETITIONID")] | |||||
public string CompetitionId { get; set; } | |||||
/// <summary> | |||||
/// 分组名称 | |||||
/// </summary> | |||||
[Column("GROUPNAME")] | |||||
public string GroupName { get; set; } | |||||
/// <summary> | |||||
/// 积分 | |||||
/// </summary> | |||||
[Column("INTEGRAL")] | |||||
public int? Integral { get; set; } | |||||
/// <summary> | |||||
/// 分组简介 | |||||
/// </summary> | |||||
[Column("GROUPDESC")] | |||||
public string GroupDesc { get; set; } | |||||
/// <summary> | |||||
/// 证书多个 | |||||
/// </summary> | |||||
[Column("PATH")] | |||||
public string Path { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.ID = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.ID = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,60 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:28 | |||||
/// 描 述:民体中心赛事分组管理 | |||||
/// </summary> | |||||
public interface CompetitionGroupManagerIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<CompetitionGroupManagerEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取CompetitionGroupManager表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
CompetitionGroupManagerEntity GetCompetitionGroupManagerEntity(string keyValue); | |||||
/// <summary> | |||||
///根据比赛id获取排名 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
IEnumerable<CompetitionGroupManagerEntity> GetCompetitionGroupManagerListRankByCompId(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, CompetitionGroupManagerEntity entity); | |||||
/// <summary> | |||||
/// 计算积分 | |||||
/// </summary> | |||||
/// <param name="strEntity"></param> | |||||
void ComputeForm(string keyValue,List<int> strEntity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,208 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:28 | |||||
/// 描 述:民体中心赛事分组管理 | |||||
/// </summary> | |||||
public class CompetitionGroupManagerService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<CompetitionGroupManagerEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.ID, | |||||
t.CompetitionId, | |||||
t.GroupName, | |||||
t.Integral, | |||||
t.Path, | |||||
t.GroupDesc | |||||
"); | |||||
strSql.Append(" FROM CompetitionGroupManager t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["CompetitionId"].IsEmpty()) | |||||
{ | |||||
dp.Add("CompetitionId", queryParam["CompetitionId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.CompetitionId = @CompetitionId "); | |||||
} | |||||
if (!queryParam["GroupName"].IsEmpty()) | |||||
{ | |||||
dp.Add("GroupName", "%" + queryParam["GroupName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.GroupName Like @GroupName "); | |||||
} | |||||
//strSql.Append(" order by t.Integral desc"); | |||||
pagination.sidx = "Integral"; | |||||
pagination.sord = "desc"; | |||||
return this.BaseRepository("CollegeMIS").FindList<CompetitionGroupManagerEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<CompetitionGroupManagerEntity> GetRankList(string compId) | |||||
{ | |||||
try | |||||
{ | |||||
Pagination pagination = new Pagination(); | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.ID, | |||||
t.CompetitionId, | |||||
t.GroupName, | |||||
t.Integral, | |||||
t.Path, | |||||
t.GroupDesc | |||||
"); | |||||
strSql.Append(" FROM CompetitionGroupManager t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
dp.Add("CompetitionId", compId, DbType.String); | |||||
strSql.Append(" AND t.CompetitionId = @CompetitionId "); | |||||
//strSql.Append(" order by t.Integral desc"); | |||||
pagination.sidx = "Integral"; | |||||
pagination.sord = "desc"; | |||||
pagination.page = 1; | |||||
pagination.rows = 4; | |||||
return this.BaseRepository("CollegeMIS").FindList<CompetitionGroupManagerEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取CompetitionGroupManager表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public CompetitionGroupManagerEntity GetCompetitionGroupManagerEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<CompetitionGroupManagerEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<CompetitionGroupManagerEntity>(t => t.ID == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, CompetitionGroupManagerEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,65 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:49 | |||||
/// 描 述:民体中心比赛信息管理 | |||||
/// </summary> | |||||
public class CompetitionInfoEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 主键ID | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string ID { get; set; } | |||||
/// <summary> | |||||
/// 赛事id | |||||
/// </summary> | |||||
[Column("COMPETITIONID")] | |||||
public string CompetitionId { get; set; } | |||||
/// <summary> | |||||
/// 分组id | |||||
/// </summary> | |||||
[Column("GROUPID")] | |||||
public string GroupId { get; set; } | |||||
/// <summary> | |||||
/// 成绩 | |||||
/// </summary> | |||||
[Column("SORE")] | |||||
public decimal? Sore { get; set; } | |||||
/// <summary> | |||||
/// 是否计算过积分 | |||||
/// </summary> | |||||
[Column("ISINTEGRAL")] | |||||
public bool? IsIntegral { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.ID = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.ID = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,125 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:49 | |||||
/// 描 述:民体中心比赛信息管理 | |||||
/// </summary> | |||||
public class CompetitionInfoManagerBLL : CompetitionInfoManagerIBLL | |||||
{ | |||||
private CompetitionInfoManagerService competitionInfoManagerService = new CompetitionInfoManagerService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<CompetitionInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return competitionInfoManagerService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取CompetitionInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public CompetitionInfoEntity GetCompetitionInfoEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return competitionInfoManagerService.GetCompetitionInfoEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
competitionInfoManagerService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, CompetitionInfoEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
competitionInfoManagerService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,48 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:49 | |||||
/// 描 述:民体中心比赛信息管理 | |||||
/// </summary> | |||||
public interface CompetitionInfoManagerIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<CompetitionInfoEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取CompetitionInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
CompetitionInfoEntity GetCompetitionInfoEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, CompetitionInfoEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,181 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:49 | |||||
/// 描 述:民体中心比赛信息管理 | |||||
/// </summary> | |||||
public class CompetitionInfoManagerService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<CompetitionInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.ID, | |||||
t.CompetitionId, | |||||
t.GroupId, | |||||
t.Sore, | |||||
t.IsIntegral | |||||
"); | |||||
strSql.Append(" FROM CompetitionInfo t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["CompetitionId"].IsEmpty()) | |||||
{ | |||||
dp.Add("CompetitionId",queryParam["CompetitionId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.CompetitionId = @CompetitionId "); | |||||
} | |||||
if (!queryParam["GroupId"].IsEmpty()) | |||||
{ | |||||
dp.Add("GroupId",queryParam["GroupId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.GroupId = @GroupId "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<CompetitionInfoEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取CompetitionInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public CompetitionInfoEntity GetCompetitionInfoEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<CompetitionInfoEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<CompetitionInfoEntity> GetListByCompetId(string CompetId) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS") | |||||
.FindList<CompetitionInfoEntity>(x => x.CompetitionId == CompetId && !x.IsIntegral.Value); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<CompetitionInfoEntity>(t=>t.ID == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, CompetitionInfoEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.IsIntegral = false; | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,125 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:13 | |||||
/// 描 述:民体中心赛事管理 | |||||
/// </summary> | |||||
public class CompetitionManagerBLL : CompetitionManagerIBLL | |||||
{ | |||||
private CompetitionManagerService competitionManagerService = new CompetitionManagerService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<CompetitionManagerEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return competitionManagerService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取CompetitionManager表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public CompetitionManagerEntity GetCompetitionManagerEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return competitionManagerService.GetCompetitionManagerEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
competitionManagerService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, CompetitionManagerEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
competitionManagerService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,70 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:13 | |||||
/// 描 述:民体中心赛事管理 | |||||
/// </summary> | |||||
public class CompetitionManagerEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 主键ID | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string ID { get; set; } | |||||
/// <summary> | |||||
/// 赛事名称 | |||||
/// </summary> | |||||
[Column("NAME")] | |||||
public string Name { get; set; } | |||||
/// <summary> | |||||
/// 赛事类型 | |||||
/// </summary> | |||||
[Column("COMPETITIONTYPE")] | |||||
public string CompetitionType { get; set; } | |||||
/// <summary> | |||||
/// 比赛时间 | |||||
/// </summary> | |||||
[Column("COMPETITIONTIME")] | |||||
public DateTime? CompetitionTime { get; set; } | |||||
/// <summary> | |||||
/// 比赛级别 | |||||
/// </summary> | |||||
[Column("COMPETITONLEVEL")] | |||||
public string CompetitonLevel { get; set; } | |||||
/// <summary> | |||||
/// 赛事备注 | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.ID = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.ID = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,48 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:13 | |||||
/// 描 述:民体中心赛事管理 | |||||
/// </summary> | |||||
public interface CompetitionManagerIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<CompetitionManagerEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取CompetitionManager表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
CompetitionManagerEntity GetCompetitionManagerEntity(string keyValue); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, CompetitionManagerEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,165 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2024-09-26 10:13 | |||||
/// 描 述:民体中心赛事管理 | |||||
/// </summary> | |||||
public class CompetitionManagerService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<CompetitionManagerEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.ID, | |||||
t.Name, | |||||
t.CompetitionType, | |||||
t.CompetitionTime, | |||||
t.CompetitonLevel, | |||||
t.Remark | |||||
"); | |||||
strSql.Append(" FROM CompetitionManager t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND ( t.CompetitionTime >= @startTime AND t.CompetitionTime <= @endTime ) "); | |||||
} | |||||
if (!queryParam["Name"].IsEmpty()) | |||||
{ | |||||
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Name Like @Name "); | |||||
} | |||||
if (!queryParam["CompetitionType"].IsEmpty()) | |||||
{ | |||||
dp.Add("CompetitionType", "%" + queryParam["CompetitionType"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.CompetitionType Like @CompetitionType "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<CompetitionManagerEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取CompetitionManager表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public CompetitionManagerEntity GetCompetitionManagerEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<CompetitionManagerEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
this.BaseRepository("CollegeMIS").Delete<CompetitionManagerEntity>(t=>t.ID == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, CompetitionManagerEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -2132,6 +2132,18 @@ | |||||
<Compile Include="EducationalAdministration\OfficeEquipment\OfficeEquipmentService.cs" /> | <Compile Include="EducationalAdministration\OfficeEquipment\OfficeEquipmentService.cs" /> | ||||
<Compile Include="EducationalAdministration\OfficeEquipment\OfficeEquipmentBLL.cs" /> | <Compile Include="EducationalAdministration\OfficeEquipment\OfficeEquipmentBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\OfficeEquipment\OfficeEquipmentIBLL.cs" /> | <Compile Include="EducationalAdministration\OfficeEquipment\OfficeEquipmentIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\CompetitionManager\CompetitionManagerEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionManager\CompetitionManagerService.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionManager\CompetitionManagerBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionManager\CompetitionManagerIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionGroupManager\CompetitionGroupManagerEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionGroupManager\CompetitionGroupManagerService.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionGroupManager\CompetitionGroupManagerBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionGroupManager\CompetitionGroupManagerIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionInfoManager\CompetitionInfoEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionInfoManager\CompetitionInfoManagerService.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionInfoManager\CompetitionInfoManagerBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\CompetitionInfoManager\CompetitionInfoManagerIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||