diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_Train_TeamsController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_Train_TeamsController.cs index 3d449e7b4..d91aae81f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_Train_TeamsController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_Train_TeamsController.cs @@ -3,17 +3,6 @@ using System.Data; using Learun.Application.TwoDevelopment.Ask; using System.Web.Mvc; using System.Collections.Generic; -using Learun.Application.TwoDevelopment.EducationalAdministration; -using Learun.Application.TwoDevelopment.LR_Desktop; -using System.Threading.Tasks; -using Learun.Application.Organization; -using System.Linq; -using System.Web; -using Learun.Application.Base.AuthorizeModule; -using Learun.Util.Operat; -using System; -using Newtonsoft.Json; -using Learun.Application.OA; namespace Learun.Application.Web.Areas.Ask.Controllers { @@ -21,21 +10,12 @@ namespace Learun.Application.Web.Areas.Ask.Controllers /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 /// 创 建:超级管理员 - /// 日 期:2023-09-28 14:30 - /// 描 述:运动对集训安排 + /// 日 期:2023-10-18 00:50 + /// 描 述:队伍管理 /// public class Notice_Train_TeamsController : MvcControllerBase { - private Notice_Train_SportsIBLL notice_Train_TeamsIBLL = new Notice_Train_SportsBLL(); - - - private Sys_InformationPushIBLL sys_InformationPushIBLL = new Sys_InformationPushBLL(); - private MessageRindIBLL messageRindIBLL = new MessageRindBLL(); - private WeChatConfigIBLL weChatConfigIbll = new WeChatConfigBLL(); - private WeChatTempletIBLL weChatTempletIbll = new WeChatTempletBLL(); - private UserIBLL userIbll = new UserBLL(); - private UserRelationIBLL userRelationIBLL = new UserRelationBLL(); - + private Notice_Train_TeamsIBLL notice_Train_TeamsIBLL = new Notice_Train_TeamsBLL(); #region 视图功能 @@ -91,16 +71,11 @@ namespace Learun.Application.Web.Areas.Ask.Controllers [AjaxOnly] public ActionResult GetFormData(string keyValue) { - var data = notice_Train_TeamsIBLL.GetNotice_Train_SportsEntity(keyValue); - data.T_Content = WebHelper.HtmlDecode(data.T_Content); - return JsonResult(data); - //var Notice_Train_TeamsData = notice_Train_TeamsIBLL.GetNotice_Train_SportsEntity( 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); + var Notice_Train_TeamsData = notice_Train_TeamsIBLL.GetNotice_Train_TeamsEntity( keyValue ); + var jsonData = new { + Notice_Train_Teams = Notice_Train_TeamsData, + }; + return Success(jsonData); } #endregion @@ -127,154 +102,15 @@ namespace Learun.Application.Web.Areas.Ask.Controllers [HttpPost] [ValidateAntiForgeryToken] [AjaxOnly] - public ActionResult SaveForm(string keyValue, string strEntity, string strnoticeLog_Train_TeamsEntity) + public ActionResult SaveForm(string keyValue, string strEntity) { - Notice_Train_SportsEntity entity = strEntity.ToObject(); - //NoticeLog_Train_TeamsEntity noticeLog_Train_TeamsEntity = strnoticeLog_Train_TeamsEntity.ToObject(); - //notice_Train_TeamsIBLL.SaveEntity(keyValue,entity,noticeLog_Train_TeamsEntity); + Notice_Train_TeamsEntity entity = strEntity.ToObject(); + notice_Train_TeamsIBLL.SaveEntity(keyValue,entity); if (keyValue != null) { } return Success("保存成功!"); } - - - - - [HttpPost, ValidateAntiForgeryToken, AjaxOnly, ValidateInput(false)] - public ActionResult SaveFormAndSubmit(string keyValue, Notice_Train_SportsEntity entity) - { - entity.Type = "4"; - entity.T_Content = WebHelper.HtmlEncode(entity.T_Content); - notice_Train_TeamsIBLL.SaveEntity(keyValue, entity); - //推送通知 - //读取信息推送管理-通知公告推送(01)的配置 - var informationPushEntity = sys_InformationPushIBLL.GetEntityByPushItem("01"); - if (informationPushEntity != null && informationPushEntity.Status == true) - { - //推送微信 - Task.Run(async () => { await DoWeixinPush(entity); }); - } - return Success("保存成功!"); - } - Task DoWeixinPush(Notice_Train_SportsEntity entity) - { - //微信推送 - try - { - var allteacherlist = userIbll.GetAllList().Where(m => - m.F_DeleteMark != 1 && m.F_EnabledMark == 1 && m.F_Description == "教师"); - var userralationlist = userRelationIBLL.GetUserIdList("2"); - var needpostuserlist = new List(); - if (!string.IsNullOrEmpty(entity.Noticedept)) - { - if (!entity.Noticedept.Contains(",")) - { - var departteacherlist = allteacherlist.Where(m => entity.Noticedept == m.F_DepartmentId); - needpostuserlist.AddRange(departteacherlist.ToList()); - } - else - { - foreach (var senddeptid in entity.Noticedept.Split(',')) - { - var departteacherlist = allteacherlist.Where(m => senddeptid == m.F_DepartmentId); - needpostuserlist.AddRange(departteacherlist.ToList()); - } - } - } - PushWeixin(needpostuserlist, entity.T_title); - - //消息提醒表 - PushMessageRemind(needpostuserlist, entity); - return Task.CompletedTask; - } - catch (Exception e) - { - return Task.FromException(e); - } - } - - public void PushWeixin(List needpostuserlist, string title) - { - var WeChatConfigentity = weChatConfigIbll.GetEnableEntity(); - string appid = WeChatConfigentity.APPId; - string secret = WeChatConfigentity.secret; - var wechatemplete = weChatTempletIbll.GetWeChatTemplateEntityByCodeConfigId(WeChatConfigentity.ID, "task"); - string weixintaskurl = wechatemplete.TUrl; - string weixintasktempid = wechatemplete.TempId; - var responsejson = Util.HttpMethods.HttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret); - - OperateLogModel operateLogModel = new OperateLogModel(); - operateLogModel.title = title; - operateLogModel.type = OperationType.Other; - operateLogModel.url = "NoticeController"; - operateLogModel.sourceObjectId = "002"; - operateLogModel.sourceContentJson = responsejson; - OperatorHelper.Instance.WriteOperateLog(operateLogModel); - - foreach (UserEntity userinfo in needpostuserlist) - { - if (userinfo != null && !string.IsNullOrEmpty(userinfo.OpenIdForWeixin)) - { - //执行推送任务 - if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(weixintaskurl) && !string.IsNullOrEmpty(weixintasktempid)) - { - if (!string.IsNullOrEmpty(responsejson)) - { - var weixintokenobj = JsonConvert.DeserializeObject(responsejson); - if (string.IsNullOrEmpty(weixintokenobj.errcode)) - { - string access_token = weixintokenobj.access_token; - string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + - "\"template_id\":\"" + weixintasktempid + "\"," + - "\"url\":\"" + weixintaskurl + "\"," + - "\"data\":{" + - "\"first\": {\"value\":\"您有新的未读通知公告\",\"color\":\"#173177\"}," + - "\"keyword1\":{\"value\":\"未读通知公告\",\"color\":\"#173177\"}," + - "\"keyword2\": {\"value\":\"" + title + "\",\"color\":\"#173177\"}," + - "\"keyword3\": {\"value\":\"待查看\",\"color\":\"#173177\"}," + - "\"keyword4\": {\"value\":\"您有新的未读通知公告【" + title + "】\",\"color\":\"#173177\"}" + - "}" + - "}"; - string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata); - - operateLogModel.title = title; - operateLogModel.type = OperationType.Other; - operateLogModel.url = "NoticeController"; - operateLogModel.sourceObjectId = "002"; - operateLogModel.sourceContentJson = pushresult; - OperatorHelper.Instance.WriteOperateLog(operateLogModel); - } - } - } - } - } - } - - /// - /// 消息提醒 - /// - /// - /// - public void PushMessageRemind(List needpostuserlist, Notice_Train_SportsEntity model) - { - foreach (UserEntity userinfo in needpostuserlist) - { - MessageRemindEntity entity = new MessageRemindEntity(); - entity.ReceiptId = userinfo.F_UserId; - entity.ReceiptName = userinfo.F_RealName; - entity.SenderId = model.Creator; - entity.SenderName = model.Creator; - entity.TheTitle = "通知公告"; - entity.TheContent = model.T_title; - entity.InstanceId = model.T_id; - entity.ConnectionUrl = "/Utility/ListContentIndex?id="; - entity.SendTime = DateTime.Now; - entity.ReadSigns = false; - messageRindIBLL.SaveEntity("", entity); - } - - } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.cshtml index 13f319b73..f53873c56 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.cshtml @@ -3,6 +3,10 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
+
+
队伍
+
+
教练
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.js index e67273dea..11a458380 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.js @@ -21,6 +21,8 @@ var bootstrap = function ($, learun) { var ContentsUE = UE.getEditor('Contents'); $('#Coachs').lrUserSelect(1); $('#Peoples').lrUserSelect(1); + //$('#Teamid').lrUserSelect(1); + $('#Teamid').lrDataSourceSelect({ code: 'Trainteam', value: 'name', text: 'name' }); //$('#Peoples').lrDataItemSelect({ code: '' }); $('#Contents')[0].ue = ContentsUE; }, initData: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.cshtml index f4b6a228c..dd1309a49 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.cshtml @@ -56,6 +56,7 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.js index 004e8914a..7f6f86b13 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.js @@ -189,6 +189,21 @@ var bootstrap = function ($, learun) { } }); }); + /*分类管理*/ + $('#lr_team').on('click', function () { + learun.layerForm({ + id: 'ClassifyIndex', + title: '队伍管理', + url: top.$.rootUrl + '/Ask/Notice_Train_Teams/Index', + width: 800, + height: 500, + maxmin: true, + btn: null, + end: function () { + location.reload(); + } + }); + }); }, initTree: function () { $('#lr_left_tree').lrtree({ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.cshtml index cde6b22d6..e1678b4f2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.cshtml @@ -1,76 +1,15 @@ @{ - ViewBag.Title = "运动对集训安排"; + ViewBag.Title = "队伍管理"; Layout = "~/Views/Shared/_Form.cshtml"; } -@*
-
-
标题*
- -
-
-
类别
-
-
-
-
发布时间*
- -
-
-
信息来源
- -
-
-
来源地址
- -
-
-
下发部门
-
-
-
-
附件上传
-
-
-
-
内容*
- -
-
*@
-
-
公告标题*
- -
-
-
公告类别*
-
- -
-
-
发布时间*
- -
-
-
信息来源
- -
-
-
来源地址
- -
-
-
接收部门
-
-
-
-
附件上传
-
+
+
队伍名称*
+
-
-
公告内容
-
- @**@ +
+
下拉框*
+
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Teams/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.js index 44aadab4a..2ad6c5b00 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.js @@ -1,128 +1,52 @@ /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 - * 日 期:2023-09-28 14:30 - * 描 述:运动对集训安排 + * 日 期:2023-10-18 00:50 + * 描 述:队伍管理 */ -//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(); -//} - var acceptClick; var keyValue = request('keyValue'); var bootstrap = function ($, learun) { "use strict"; - var ue; var page = { init: function () { + $('.lr-form-wrap').lrscroll(); page.bind(); page.initData(); }, bind: function () { - //公告类别 - $('#T_typename').lrDataItemSelect({ - code: 'Notice_Train_Teams', - maxHeight: 230, - select: function (item) { - if (item != null && item != undefined) { - $("#T_type").val(item.text); - } - } - }); - $('#Files').lrUploader(); - $('#Noticedept').lrDepartmentSelect({ type: 'treemultiple' }); - //内容编辑器 - ue = UE.getEditor('editor'); + $('#Teamusers').lrUserSelect(1); + //$('#Teamusers').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_userid',text: 'f_userid' }); }, initData: function () { if (!!keyValue) { - //$('#form').lrSetFormData(selectedRow); - //$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); $.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Teams/GetFormData?keyValue=' + keyValue, function (data) { - $('#form').lrSetFormData(data); - setTimeout(function () { - ue.setContent(data.T_Content); - }, 100); + 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 (!$('#form').lrValidform()) { + if (!$('body').lrValidform()) { return false; } - learun.clientdata.getAsync('dataItem', { - key: $("#T_typename").lrselectGet(), - code: 'Notice_Train_Teams', - callback: function (_data) { - $("#T_type").val(_data.text); - - var postData = $('#form').lrGetFormData(keyValue); - postData["T_Content"] = ue.getContent(null, null, true); - //var postData = {}; - //postData.strEntity = $('#form').lrGetFormData(keyValue); - - $.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Teams/SaveFormAndSubmit?keyValue=' + keyValue, postData, function (res) { - // 保存成功后才回调 - if (!!callBack) { - callBack(); - } - }); + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Teams/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); } }); - } + }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.cshtml index 4d588564d..316e32edb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.cshtml @@ -1,5 +1,5 @@ @{ - ViewBag.Title = "运动对集训安排"; + ViewBag.Title = "队伍管理"; Layout = "~/Views/Shared/_Index.cshtml"; }
@@ -7,20 +7,14 @@
-
- -
-
-  查询 -
- diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.js index 2412d8819..b893826ad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.js @@ -1,8 +1,8 @@ /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 * 创建人:超级管理员 - * 日 期:2023-09-28 14:30 - * 描 述:运动对集训安排 + * 日 期:2023-10-18 00:50 + * 描 述:队伍管理 */ var refreshGirdData; var bootstrap = function ($, learun) { @@ -13,11 +13,6 @@ var bootstrap = function ($, learun) { page.bind(); }, bind: function () { - // 查询 - $('#btn_Search').on('click', function () { - var keyword = $('#txt_Keyword').val(); - page.search({ keyword: keyword }); - }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -28,8 +23,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '新增', url: top.$.rootUrl + '/Ask/Notice_Train_Teams/Form', - width: 1000, - height: 650, + width: 600, + height: 400, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -37,14 +32,14 @@ var bootstrap = function ($, learun) { }); // 编辑 $('#lr_edit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('T_id'); + 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: 1000, - height: 650, + width: 600, + height: 400, callBack: function (id) { return top[id].acceptClick(refreshGirdData); } @@ -53,7 +48,7 @@ var bootstrap = function ($, learun) { }); // 删除 $('#lr_delete').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('T_id'); + var keyValue = $('#gridtable').jfGridValue('BelongId'); if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { @@ -70,40 +65,26 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGrid({ 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"}, - { 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) { - if (value) { - learun.clientdata.getsAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', - key: value, - keyId: 'id', - textId: 'name', - callback: function (text) { - callback(text); - } - }); - } + { label: "队伍名称", name: "Name", width: 100, align: "left"}, + { label: "下拉框", name: "Teamusers", width: 100, align: "left", + formatterAsync: function (callback, value, row, op,$cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_userid']); + } + }); }}, - //{ label: "附件上传", name: "Files", width: 100, align: "left"}, - //{ label: "内容", name: "T_Content", width: 100, align: "left"}, ], - mainId: 'T_id', - reloadSelected: true, - isMultiselect: true, - isPage: true, - sidx: 'Createtime', - sord: 'desc' + mainId:'BelongId', + isPage: true }); page.search(); }, search: function (param) { param = param || {}; - param.Type = "4"; $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Ask/Notice_Train_TeamsMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Ask/Notice_Train_TeamsMap.cs index 9263f525d..e4a2ad694 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Ask/Notice_Train_TeamsMap.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Ask/Notice_Train_TeamsMap.cs @@ -7,8 +7,8 @@ namespace Learun.Application.Mapping /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 /// 创 建:超级管理员 - /// 日 期:2023-09-28 14:30 - /// 描 述:运动对集训安排 + /// 日 期:2023-10-18 00:50 + /// 描 述:队伍管理 /// public class Notice_Train_TeamsMap : EntityTypeConfiguration { @@ -18,7 +18,7 @@ namespace Learun.Application.Mapping //表 this.ToTable("NOTICE_TRAIN_TEAMS"); //主键 - this.HasKey(t => t.T_id); + this.HasKey(t => t.Id); #endregion #region 配置关系 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sum/Notice_Train_SumEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sum/Notice_Train_SumEntity.cs index 90d8fe73d..a99b9576b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sum/Notice_Train_SumEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sum/Notice_Train_SumEntity.cs @@ -59,6 +59,11 @@ namespace Learun.Application.TwoDevelopment.Ask /// [Column("TYPENAME")] public string Typename { get; set; } + /// + /// Typename + /// + [Column("TEAMID")] + public string Teamid { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsBLL.cs index ca256dd09..b4c48603a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsBLL.cs @@ -9,8 +9,8 @@ namespace Learun.Application.TwoDevelopment.Ask /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 /// 创 建:超级管理员 - /// 日 期:2023-09-28 14:30 - /// 描 述:运动对集训安排 + /// 日 期:2023-10-18 00:50 + /// 描 述:队伍管理 /// public class Notice_Train_TeamsBLL : Notice_Train_TeamsIBLL { @@ -67,30 +67,6 @@ namespace Learun.Application.TwoDevelopment.Ask } } - /// - /// 获取NoticeLog_Train_Teams表实体数据 - /// - /// 主键 - /// - 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 提交数据 @@ -124,11 +100,11 @@ namespace Learun.Application.TwoDevelopment.Ask /// 主键 /// 实体 /// - public void SaveEntity(string keyValue, Notice_Train_TeamsEntity entity,NoticeLog_Train_TeamsEntity noticeLog_Train_TeamsEntity) + public void SaveEntity(string keyValue, Notice_Train_TeamsEntity entity) { try { - notice_Train_TeamsService.SaveEntity(keyValue, entity,noticeLog_Train_TeamsEntity); + notice_Train_TeamsService.SaveEntity(keyValue, entity); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsEntity.cs index 1bc292860..28a9e657a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsEntity.cs @@ -8,82 +8,37 @@ namespace Learun.Application.TwoDevelopment.Ask /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 /// 创 建:超级管理员 - /// 日 期:2023-09-28 14:30 - /// 描 述:运动对集训安排 + /// 日 期:2023-10-18 00:50 + /// 描 述:队伍管理 /// public class Notice_Train_TeamsEntity { #region 实体成员 /// - /// T_id + /// Id /// - [Column("T_ID")] - public string T_id { get; set; } + [Column("ID")] + public string Id { get; set; } /// - /// T_type + /// Name /// - [Column("T_TYPE")] - public string T_type { get; set; } + [Column("NAME")] + public string Name { get; set; } /// - /// T_type + /// Teamusers /// - [Column("T_TYPENAME")] - public string T_typename { get; set; } - /// - /// T_title - /// - [Column("T_TITLE")] - public string T_title { get; set; } - /// - /// Source - /// - [Column("SOURCE")] - public string Source { get; set; } - /// - /// SourceUrl - /// - [Column("SOURCEURL")] - public string SourceUrl { get; set; } - /// - /// Files - /// - [Column("FILES")] - public string Files { get; set; } - /// - /// T_Content - /// - [Column("T_CONTENT")] - public string T_Content { get; set; } - /// - /// Noticedept - /// - [Column("NOTICEDEPT")] - public string Noticedept { get; set; } - /// - /// Noticepeople - /// - [Column("NOTICEPEOPLE")] - public string Noticepeople { get; set; } + [Column("TEAMUSERS")] + public string Teamusers { get; set; } /// /// Createtime /// [Column("CREATETIME")] public DateTime? Createtime { get; set; } /// - /// Updatetime - /// - [Column("UPDATETIME")] - public DateTime? Updatetime { get; set; } - /// /// Creator /// [Column("CREATOR")] public string Creator { get; set; } - /// - /// Status - /// - [Column("STATUS")] - public int? Status { get; set; } #endregion #region 扩展操作 @@ -92,16 +47,10 @@ namespace Learun.Application.TwoDevelopment.Ask /// public void Create() { - this.T_id = Guid.NewGuid().ToString(); - //this.F_CreateDate = DateTime.Now; - //this.F_ReleaseTime = DateTime.Now; - //this.F_DeleteMark = 0; - //this.F_EnabledMark = 0; - //this.F_PV = 0; - + this.Id = Guid.NewGuid().ToString(); UserInfo userInfo = LoginUserInfo.Get(); this.Creator = userInfo.userId; - //this.F_CreateUserName = userInfo.realName; + this.Createtime = DateTime.Now; } /// /// 编辑调用 @@ -109,7 +58,10 @@ namespace Learun.Application.TwoDevelopment.Ask /// public void Modify(string keyValue) { - this.T_id = keyValue; + this.Id = keyValue; + this.Createtime = DateTime.Now; + UserInfo userInfo = LoginUserInfo.Get(); + this.Creator = userInfo.userId; } #endregion #region 扩展字段 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsIBLL.cs index 01b4b37da..95344b0b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsIBLL.cs @@ -8,8 +8,8 @@ namespace Learun.Application.TwoDevelopment.Ask /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 /// 创 建:超级管理员 - /// 日 期:2023-09-28 14:30 - /// 描 述:运动对集训安排 + /// 日 期:2023-10-18 00:50 + /// 描 述:队伍管理 /// public interface Notice_Train_TeamsIBLL { @@ -27,12 +27,6 @@ namespace Learun.Application.TwoDevelopment.Ask /// 主键 /// Notice_Train_TeamsEntity GetNotice_Train_TeamsEntity(string keyValue); - /// - /// 获取NoticeLog_Train_Teams表实体数据 - /// - /// 主键 - /// - NoticeLog_Train_TeamsEntity GetNoticeLog_Train_TeamsEntity(string keyValue); #endregion #region 提交数据 @@ -47,7 +41,7 @@ namespace Learun.Application.TwoDevelopment.Ask /// /// 主键 /// 实体 - void SaveEntity(string keyValue, Notice_Train_TeamsEntity entity,NoticeLog_Train_TeamsEntity noticeLog_Train_TeamsEntity); + void SaveEntity(string keyValue, Notice_Train_TeamsEntity entity); #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsService.cs index 680f4073a..4417d11ac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsService.cs @@ -12,8 +12,8 @@ namespace Learun.Application.TwoDevelopment.Ask /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 /// 创 建:超级管理员 - /// 日 期:2023-09-28 14:30 - /// 描 述:运动对集训安排 + /// 日 期:2023-10-18 00:50 + /// 描 述:队伍管理 /// public class Notice_Train_TeamsService : RepositoryFactory { @@ -31,8 +31,7 @@ namespace Learun.Application.TwoDevelopment.Ask { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" - t.* + strSql.Append(@" * "); strSql.Append(" FROM Notice_Train_Teams t "); strSql.Append(" WHERE 1=1 "); @@ -63,31 +62,7 @@ namespace Learun.Application.TwoDevelopment.Ask { try { - return this.BaseRepository("CollegeMIS").FindEntity(keyValue); - } - catch (Exception ex) - { - if (ex is ExceptionEx) - { - throw; - } - else - { - throw ExceptionEx.ThrowServiceException(ex); - } - } - } - - /// - /// 获取NoticeLog_Train_Teams表实体数据 - /// - /// 主键 - /// - public NoticeLog_Train_TeamsEntity GetNoticeLog_Train_TeamsEntity(string keyValue) - { - try - { - return this.BaseRepository("CollegeMIS").FindEntity(t=>t.N_id == keyValue); + return this.BaseRepository("CollegeMIS").FindEntity(keyValue.ToInt()); } catch (Exception ex) { @@ -112,17 +87,12 @@ namespace Learun.Application.TwoDevelopment.Ask /// 主键 public void DeleteEntity(string keyValue) { - var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { - var notice_Train_TeamsEntity = GetNotice_Train_TeamsEntity(keyValue); - db.Delete(t=>t.T_id == keyValue); - //db.Delete(t=>t.N_id == notice_Train_TeamsEntity.T_id); - db.Commit(); + this.BaseRepository("CollegeMIS").Delete(t=>t.Id == keyValue); } catch (Exception ex) { - db.Rollback(); if (ex is ExceptionEx) { throw; @@ -139,34 +109,23 @@ namespace Learun.Application.TwoDevelopment.Ask /// /// 主键 /// 实体 - public void SaveEntity(string keyValue, Notice_Train_TeamsEntity entity,NoticeLog_Train_TeamsEntity noticeLog_Train_TeamsEntity) + public void SaveEntity(string keyValue, Notice_Train_TeamsEntity entity) { - var db = this.BaseRepository("CollegeMIS").BeginTrans(); try { if (!string.IsNullOrEmpty(keyValue)) { - var notice_Train_TeamsEntityTmp = GetNotice_Train_TeamsEntity(keyValue); entity.Modify(keyValue); - db.Update(entity); - //db.Delete(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); + this.BaseRepository("CollegeMIS").Update(entity); } else { entity.Create(); - db.Insert(entity); - //noticeLog_Train_TeamsEntity.Create(); - //noticeLog_Train_TeamsEntity.N_id = entity.T_id; - //db.Insert(noticeLog_Train_TeamsEntity); + this.BaseRepository("CollegeMIS").Insert(entity); } - db.Commit(); } catch (Exception ex) { - db.Rollback(); if (ex is ExceptionEx) { throw;