@@ -0,0 +1,120 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.Ask; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.Ask.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-09-28 14:30 | |||||
/// 描 述:运动对集训安排 | |||||
/// </summary> | |||||
public class Notice_Train_TeamsController : MvcControllerBase | |||||
{ | |||||
private Notice_Train_TeamsIBLL notice_Train_TeamsIBLL = new Notice_Train_TeamsBLL(); | |||||
#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 = notice_Train_TeamsIBLL.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 Notice_Train_TeamsData = notice_Train_TeamsIBLL.GetNotice_Train_TeamsEntity( keyValue ); | |||||
var NoticeLog_Train_TeamsData = notice_Train_TeamsIBLL.GetNoticeLog_Train_TeamsEntity( Notice_Train_TeamsData.T_id ); | |||||
var jsonData = new { | |||||
Notice_Train_Teams = Notice_Train_TeamsData, | |||||
NoticeLog_Train_Teams = NoticeLog_Train_TeamsData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
notice_Train_TeamsIBLL.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, string strnoticeLog_Train_TeamsEntity) | |||||
{ | |||||
Notice_Train_TeamsEntity entity = strEntity.ToObject<Notice_Train_TeamsEntity>(); | |||||
NoticeLog_Train_TeamsEntity noticeLog_Train_TeamsEntity = strnoticeLog_Train_TeamsEntity.ToObject<NoticeLog_Train_TeamsEntity>(); | |||||
notice_Train_TeamsIBLL.SaveEntity(keyValue,entity,noticeLog_Train_TeamsEntity); | |||||
if (keyValue != null) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,39 @@ | |||||
@{ | |||||
ViewBag.Title = "运动对集训安排"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Teams" > | |||||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | |||||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Notice_Train_Teams" > | |||||
<div class="lr-form-item-title">类别</div> | |||||
<div id="T_type"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Notice_Train_Teams" > | |||||
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div> | |||||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#Createtime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Notice_Train_Teams" > | |||||
<div class="lr-form-item-title">信息来源</div> | |||||
<input id="Source" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Notice_Train_Teams" > | |||||
<div class="lr-form-item-title">来源地址</div> | |||||
<input id="SourceUrl" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Teams" > | |||||
<div class="lr-form-item-title">下发部门</div> | |||||
<div id="Noticedept"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Teams" > | |||||
<div class="lr-form-item-title">附件上传</div> | |||||
<div id="Files" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Teams" > | |||||
<div class="lr-form-item-title">内容<font face="宋体">*</font></div> | |||||
<textarea id="T_Content" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Teams/Form.js") |
@@ -0,0 +1,62 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-09-28 14:30 | |||||
* 描 述:运动对集训安排 | |||||
*/ | |||||
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 () { | |||||
$('#T_type').lrRadioCheckbox({ | |||||
type: 'radio', | |||||
code: '', | |||||
}); | |||||
$('#Noticedept').lrRadioCheckbox({ | |||||
type: 'checkbox', | |||||
dataType: 'dataSource', | |||||
code: 'classdata', | |||||
value: 'id', | |||||
text: 'name', | |||||
}); | |||||
$('#Files').lrUploader(); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Teams/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 = {}; | |||||
postData.strEntity = JSON.stringify($('[data-table="Notice_Train_Teams"]').lrGetFormData()); | |||||
postData.strnoticeLog_Train_TeamsEntity = JSON.stringify($('[data-table="NoticeLog_Train_Teams"]').lrGetFormData()); | |||||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Teams/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,26 @@ | |||||
@{ | |||||
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> | |||||
<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> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Teams/Index.js") |
@@ -0,0 +1,111 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-09-28 14:30 | |||||
* 描 述:运动对集训安排 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/Ask/Notice_Train_Teams/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('BelongId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/Ask/Notice_Train_Teams/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('BelongId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/Ask/Notice_Train_Teams/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/Ask/Notice_Train_Teams/GetPageList', | |||||
headData: [ | |||||
{ label: "标题", name: "T_title", width: 100, align: "left"}, | |||||
{ label: "类别", name: "T_type", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: '', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "发布时间", name: "Createtime", width: 100, align: "left"}, | |||||
{ label: "信息来源", name: "Source", width: 100, align: "left"}, | |||||
{ label: "来源地址", name: "SourceUrl", width: 100, align: "left"}, | |||||
{ label: "下发部门", name: "Noticedept", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getsAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: value, | |||||
keyId: 'id', | |||||
textId: 'name', | |||||
callback: function (text) { | |||||
callback(text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "附件上传", name: "Files", width: 100, align: "left"}, | |||||
{ label: "内容", name: "T_Content", width: 100, align: "left"}, | |||||
], | |||||
mainId:'BelongId', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -896,6 +896,7 @@ | |||||
<Compile Include="Areas\LogisticsManagement\Controllers\RepairReportTeacherController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\RepairReportTeacherController.cs" /> | ||||
<Compile Include="Areas\AdmissionsPlatform\Controllers\EnrollmentMajorPlanController.cs" /> | <Compile Include="Areas\AdmissionsPlatform\Controllers\EnrollmentMajorPlanController.cs" /> | ||||
<Compile Include="Areas\AdmissionsPlatform\Controllers\EnrollmentMajorPlanSourceController.cs" /> | <Compile Include="Areas\AdmissionsPlatform\Controllers\EnrollmentMajorPlanSourceController.cs" /> | ||||
<Compile Include="Areas\Ask\Controllers\Notice_Train_TeamsController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -6853,6 +6854,10 @@ | |||||
<Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlanSource\Index.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlanSource\Index.js" /> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlanSource\Form.cshtml" /> | <Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlanSource\Form.cshtml" /> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlanSource\Form.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\EnrollmentMajorPlanSource\Form.js" /> | ||||
<Content Include="Areas\Ask\Views\Notice_Train_Teams\Index.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Notice_Train_Teams\Index.js" /> | |||||
<Content Include="Areas\Ask\Views\Notice_Train_Teams\Form.cshtml" /> | |||||
<Content Include="Areas\Ask\Views\Notice_Train_Teams\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | <Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.Ask; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-09-28 14:30 | |||||
/// 描 述:运动对集训安排 | |||||
/// </summary> | |||||
public class NoticeLog_Train_TeamsMap : EntityTypeConfiguration<NoticeLog_Train_TeamsEntity> | |||||
{ | |||||
public NoticeLog_Train_TeamsMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("NOTICELOG_TRAIN_TEAMS"); | |||||
//主键 | |||||
this.HasKey(t => t.N_id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.Ask; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-09-28 14:30 | |||||
/// 描 述:运动对集训安排 | |||||
/// </summary> | |||||
public class Notice_Train_TeamsMap : EntityTypeConfiguration<Notice_Train_TeamsEntity> | |||||
{ | |||||
public Notice_Train_TeamsMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("NOTICE_TRAIN_TEAMS"); | |||||
//主键 | |||||
this.HasKey(t => t.T_id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -626,6 +626,8 @@ | |||||
<Compile Include="LogisticsManagement\RepairReport_TeacherMap.cs" /> | <Compile Include="LogisticsManagement\RepairReport_TeacherMap.cs" /> | ||||
<Compile Include="AdmissionsPlatform\EnrollmentMajorPlanMap.cs" /> | <Compile Include="AdmissionsPlatform\EnrollmentMajorPlanMap.cs" /> | ||||
<Compile Include="AdmissionsPlatform\EnrollmentMajorPlanSourceMap.cs" /> | <Compile Include="AdmissionsPlatform\EnrollmentMajorPlanSourceMap.cs" /> | ||||
<Compile Include="Ask\Notice_Train_TeamsMap.cs" /> | |||||
<Compile Include="Ask\NoticeLog_Train_TeamsMap.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,62 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-09-28 14:30 | |||||
/// 描 述:运动对集训安排 | |||||
/// </summary> | |||||
public class NoticeLog_Train_TeamsEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// L_id | |||||
/// </summary> | |||||
[Column("L_ID")] | |||||
public string L_id { get; set; } | |||||
/// <summary> | |||||
/// N_id | |||||
/// </summary> | |||||
[Column("N_ID")] | |||||
public string N_id { get; set; } | |||||
/// <summary> | |||||
/// Userid | |||||
/// </summary> | |||||
[Column("USERID")] | |||||
public string Userid { get; set; } | |||||
/// <summary> | |||||
/// Status | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public int? Status { get; set; } | |||||
/// <summary> | |||||
/// Createtime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? Createtime { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.L_id = keyValue; | |||||
} | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,149 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-09-28 14:30 | |||||
/// 描 述:运动对集训安排 | |||||
/// </summary> | |||||
public class Notice_Train_TeamsBLL : Notice_Train_TeamsIBLL | |||||
{ | |||||
private Notice_Train_TeamsService notice_Train_TeamsService = new Notice_Train_TeamsService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Notice_Train_TeamsEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return notice_Train_TeamsService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Notice_Train_Teams表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Notice_Train_TeamsEntity GetNotice_Train_TeamsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return notice_Train_TeamsService.GetNotice_Train_TeamsEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取NoticeLog_Train_Teams表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public NoticeLog_Train_TeamsEntity GetNoticeLog_Train_TeamsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return notice_Train_TeamsService.GetNoticeLog_Train_TeamsEntity(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 | |||||
{ | |||||
notice_Train_TeamsService.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, Notice_Train_TeamsEntity entity,NoticeLog_Train_TeamsEntity noticeLog_Train_TeamsEntity) | |||||
{ | |||||
try | |||||
{ | |||||
notice_Train_TeamsService.SaveEntity(keyValue, entity,noticeLog_Train_TeamsEntity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,104 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-09-28 14:30 | |||||
/// 描 述:运动对集训安排 | |||||
/// </summary> | |||||
public class Notice_Train_TeamsEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// T_id | |||||
/// </summary> | |||||
[Column("T_ID")] | |||||
public string T_id { get; set; } | |||||
/// <summary> | |||||
/// T_type | |||||
/// </summary> | |||||
[Column("T_TYPE")] | |||||
public string T_type { get; set; } | |||||
/// <summary> | |||||
/// T_title | |||||
/// </summary> | |||||
[Column("T_TITLE")] | |||||
public string T_title { get; set; } | |||||
/// <summary> | |||||
/// Source | |||||
/// </summary> | |||||
[Column("SOURCE")] | |||||
public string Source { get; set; } | |||||
/// <summary> | |||||
/// SourceUrl | |||||
/// </summary> | |||||
[Column("SOURCEURL")] | |||||
public string SourceUrl { get; set; } | |||||
/// <summary> | |||||
/// Files | |||||
/// </summary> | |||||
[Column("FILES")] | |||||
public string Files { get; set; } | |||||
/// <summary> | |||||
/// T_Content | |||||
/// </summary> | |||||
[Column("T_CONTENT")] | |||||
public string T_Content { get; set; } | |||||
/// <summary> | |||||
/// Noticedept | |||||
/// </summary> | |||||
[Column("NOTICEDEPT")] | |||||
public string Noticedept { get; set; } | |||||
/// <summary> | |||||
/// Noticepeople | |||||
/// </summary> | |||||
[Column("NOTICEPEOPLE")] | |||||
public string Noticepeople { get; set; } | |||||
/// <summary> | |||||
/// Createtime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? Createtime { get; set; } | |||||
/// <summary> | |||||
/// Updatetime | |||||
/// </summary> | |||||
[Column("UPDATETIME")] | |||||
public DateTime? Updatetime { get; set; } | |||||
/// <summary> | |||||
/// Creator | |||||
/// </summary> | |||||
[Column("CREATOR")] | |||||
public string Creator { get; set; } | |||||
/// <summary> | |||||
/// Status | |||||
/// </summary> | |||||
[Column("STATUS")] | |||||
public int? Status { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.T_id = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,54 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-09-28 14:30 | |||||
/// 描 述:运动对集训安排 | |||||
/// </summary> | |||||
public interface Notice_Train_TeamsIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Notice_Train_TeamsEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Notice_Train_Teams表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Notice_Train_TeamsEntity GetNotice_Train_TeamsEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取NoticeLog_Train_Teams表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
NoticeLog_Train_TeamsEntity GetNoticeLog_Train_TeamsEntity(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, Notice_Train_TeamsEntity entity,NoticeLog_Train_TeamsEntity noticeLog_Train_TeamsEntity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,192 @@ | |||||
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.Ask | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2023-09-28 14:30 | |||||
/// 描 述:运动对集训安排 | |||||
/// </summary> | |||||
public class Notice_Train_TeamsService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Notice_Train_TeamsEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.BelongId, | |||||
t.T_title, | |||||
t.T_type, | |||||
t.Createtime, | |||||
t.Source, | |||||
t.SourceUrl, | |||||
t.Noticedept, | |||||
t.Files, | |||||
t.T_Content | |||||
"); | |||||
strSql.Append(" FROM Notice_Train_Teams t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
return this.BaseRepository("CollegeMIS").FindList<Notice_Train_TeamsEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Notice_Train_Teams表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Notice_Train_TeamsEntity GetNotice_Train_TeamsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Notice_Train_TeamsEntity>(keyValue.ToInt()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取NoticeLog_Train_Teams表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public NoticeLog_Train_TeamsEntity GetNoticeLog_Train_TeamsEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<NoticeLog_Train_TeamsEntity>(t=>t.N_id == 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) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var notice_Train_TeamsEntity = GetNotice_Train_TeamsEntity(keyValue); | |||||
db.Delete<Notice_Train_TeamsEntity>(t=>t.T_id == keyValue); | |||||
db.Delete<NoticeLog_Train_TeamsEntity>(t=>t.N_id == notice_Train_TeamsEntity.T_id); | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
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, Notice_Train_TeamsEntity entity,NoticeLog_Train_TeamsEntity noticeLog_Train_TeamsEntity) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
if (keyValue != null) | |||||
{ | |||||
var notice_Train_TeamsEntityTmp = GetNotice_Train_TeamsEntity(keyValue); | |||||
entity.Modify(keyValue); | |||||
db.Update(entity); | |||||
db.Delete<NoticeLog_Train_TeamsEntity>(t=>t.N_id == notice_Train_TeamsEntityTmp.T_id); | |||||
noticeLog_Train_TeamsEntity.Create(); | |||||
noticeLog_Train_TeamsEntity.N_id = notice_Train_TeamsEntityTmp.T_id; | |||||
db.Insert(noticeLog_Train_TeamsEntity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
db.Insert(entity); | |||||
noticeLog_Train_TeamsEntity.Create(); | |||||
noticeLog_Train_TeamsEntity.N_id = entity.T_id; | |||||
db.Insert(noticeLog_Train_TeamsEntity); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -1929,6 +1929,11 @@ | |||||
<Compile Include="AdmissionsPlatform\EnrollmentMajorPlanSource\EnrollmentMajorPlanSourceService.cs" /> | <Compile Include="AdmissionsPlatform\EnrollmentMajorPlanSource\EnrollmentMajorPlanSourceService.cs" /> | ||||
<Compile Include="AdmissionsPlatform\EnrollmentMajorPlanSource\EnrollmentMajorPlanSourceIBLL.cs" /> | <Compile Include="AdmissionsPlatform\EnrollmentMajorPlanSource\EnrollmentMajorPlanSourceIBLL.cs" /> | ||||
<Compile Include="AdmissionsPlatform\EnrollmentMajorPlanSource\EnrollmentMajorPlanSourceBLL.cs" /> | <Compile Include="AdmissionsPlatform\EnrollmentMajorPlanSource\EnrollmentMajorPlanSourceBLL.cs" /> | ||||
<Compile Include="Ask\Notice_Train_Teams\Notice_Train_TeamsEntity.cs" /> | |||||
<Compile Include="Ask\Notice_Train_Teams\NoticeLog_Train_TeamsEntity.cs" /> | |||||
<Compile Include="Ask\Notice_Train_Teams\Notice_Train_TeamsService.cs" /> | |||||
<Compile Include="Ask\Notice_Train_Teams\Notice_Train_TeamsBLL.cs" /> | |||||
<Compile Include="Ask\Notice_Train_Teams\Notice_Train_TeamsIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||