diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SunshineEducationController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SunshineEducationController.cs new file mode 100644 index 000000000..0fc734141 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SunshineEducationController.cs @@ -0,0 +1,225 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using Learun.Util; +using System.Data; +using System.Web.Mvc; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-23 10:48 + /// 描 述:阳光教育 + /// + public class SunshineEducationController : MvcControllerBase + { + private SunshineEducationIBLL sunshineEducationIBLL = new SunshineEducationBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexComplaint() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexHelp() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexPolicy() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexPraise() + { + return View(); + } + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult IndexSuggest() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult FormReply() + { + return View(); + } + #endregion + + #region 获取数据 + /// + /// 身份 + /// + /// + public ActionResult GetQuestionerIdentity(string ProblemType) + { + var data = sunshineEducationIBLL.GetQuestionerIdentity(ProblemType); + return Success(data); + } + /// + /// 部门班级 + /// + /// + public ActionResult GetMatterType(string ProblemType) + { + var data = sunshineEducationIBLL.GetMatterType(ProblemType); + return Success(data); + } + /// + /// 身份证类型 + /// + /// + public ActionResult GetMatterTypeContent(string ProblemType) + { + var data = sunshineEducationIBLL.GetMatterTypeContent(ProblemType); + return Success(data); + } + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetList(string queryJson) + { + var data = sunshineEducationIBLL.GetList(queryJson); + return Success(data); + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = sunshineEducationIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// 主键 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var data = sunshineEducationIBLL.GetEntity(keyValue); + data.Contents = WebHelper.HtmlDecode(data.Contents); + return Success(data); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + sunshineEducationIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + [ValidateInput(false)] + public ActionResult SaveForm(string keyValue, SunshineEducationEntity entity) + { + if (!string.IsNullOrEmpty(keyValue)) + { + var data = sunshineEducationIBLL.GetEntity(keyValue); + } + else + { + entity.Contents = WebHelper.HtmlEncode(entity.Contents); + } + sunshineEducationIBLL.SaveEntity(keyValue, entity); + return Success("保存成功!"); + } + /// + /// 受理中 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult ReplyForm(string keyValue) + { + sunshineEducationIBLL.ReplyEntity(keyValue); + return Success("操作成功!"); + } + + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Form.cshtml new file mode 100644 index 000000000..c420152c7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Form.cshtml @@ -0,0 +1,47 @@ +@{ + ViewBag.Title = "舆情反映"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+ @*
+
问题类型
+ +
*@ +
+
提问者身份
+ +
+
+
事项类型
+ +
+
+
事项类别内容
+ +
+
+
电话号码
+ +
+
标题
+ +
+
+
公告内容
+
+
+
+
E-Mail
+ +
+
+
地址
+ +
+
+
附件
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SunshineEducation/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Form.js new file mode 100644 index 000000000..89922803e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Form.js @@ -0,0 +1,49 @@ +/* + * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-23 10:48 + * 描 述:舆情反映 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var ue; + var page = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + $('#Path').lrUploader(); + //内容编辑器 + ue = UE.getEditor('editor'); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetFormData?keyValue=' + keyValue, function (data) { + $('#form').lrSetFormData(data); + setTimeout(function () { + ue.setContent(data.Contents); + }, 100); + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + postData["Contents"] = ue.getContent(null, null, true); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/FormReply.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/FormReply.cshtml new file mode 100644 index 000000000..9cd5596f7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/FormReply.cshtml @@ -0,0 +1,52 @@ +@{ + ViewBag.Title = "舆情反映"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
问题类型
+ +
+
+
提问者身份
+ +
+
+
事项类型
+ +
+
+
事项类别内容
+ +
+
+
标题
+ +
+
+
公告内容
+
+
+
+
电话号码
+ +
+
+
E-Mail
+ +
+
+
地址
+ +
+
+
附件
+
+
+
+
回复
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SunshineEducation/FormReply.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/FormReply.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/FormReply.js new file mode 100644 index 000000000..77aa7e770 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/FormReply.js @@ -0,0 +1,47 @@ +/* + * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-23 10:48 + * 描 述:舆情反映 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var ue; + var page = { + init: function () { + page.bind(); + page.initData(); + }, + bind: function () { + $('#Path').lrUploader({ isUpload: false }); + //内容编辑器 + ue = UE.getEditor('editor'); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetFormData?keyValue=' + keyValue, function (data) { + $('#form').lrSetFormData(data); + setTimeout(function () { + ue.setContent(data.Contents); + }, 100);}); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('#form').lrValidform()) { + return false; + } + var postData = $('#form').lrGetFormData(); + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Index.cshtml new file mode 100644 index 000000000..a4793819f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Index.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "舆情反映"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
标题
+ +
+
+
提问者身份
+
+
+ @*
+
事项类别
+
+
+
+
类别分类
+
+
*@ +
+
受理单位
+
+
+
+
受理状态
+
+
+
+
受理用户
+ +
+
+
受理单号
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SunshineEducation/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Index.js new file mode 100644 index 000000000..148772c59 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/Index.js @@ -0,0 +1,242 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-23 10:48 + * 描 述:舆情反映 + */ +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); + }, 280, 400); + $('#Status').lrselect({ + data: [{ text: "未受理", value: "0" }, { text: "受理中", value: "1" }, { text: "已受理", value: "2" }], + text: "text", + value: "value" + }) + $('#QuestionerIdentity').lrselect({ + width: '150px', + placeholder: "请选择提问者身份", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetQuestionerIdentity?ProblemType=' + "舆情反映", + value: 'ID', + text: 'QuestionerIdentity' + }); + + //$('#MatterType').lrselect({ + // width: '150px', + // placeholder: "请选择事项类别", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterType', + // value: 'ID', + // text: 'MatterType' + //}); + //$('#MatterTypeContent').lrselect({ + // width: '150px', + // placeholder: "请选择类别分类", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterTypeContent', + // value: 'ID', + // text: 'MatterTypeContent' + //}); + $('#AcceptanceUnit').lrDepartmentSelect(); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form?keyValue=' + keyValue, + width: 800, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + //受理标识 + $('#lr_reply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理完成!"); + return; + } + learun.layerConfirm('是否确认受理该项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/ReplyForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //回复 + $('#lr_acceptance').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == 0) { + learun.alert.warning("当前项不可回复!"); + return; + } + learun.layerForm({ + id: 'formReply', + title: '回复', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/FormReply?keyValue=' + keyValue, + width: 800, + height: 900, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetPageList', + headData: [ + { label: '问题类型', name: 'ProblemType', width: 100, align: "left" }, + { label: '提问者身份', name: 'QuestionerIdentity', width: 100, align: "left" }, + { label: '事项类型', name: 'MatterType', width: 100, align: "left" }, + { label: '事项类别内容', name: 'MatterTypeContent', width: 150, align: "left" }, + { label: '标题', name: 'Title', width: 200, align: "left" }, + { label: '信件内容', name: 'Contents', width: 300, align: "left" }, + { label: '姓名', name: 'Name', width: 100, align: "left" }, + { label: '电话号码', name: 'Phone', width: 100, align: "left" }, + { label: 'EMail', name: 'EMail', width: 120, align: "left" }, + { label: '地址', name: 'Address', width: 200, align: "left" }, + { + label: '提交时间', name: 'Createdate', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { + label: '受理状态', name: 'Status', width: 80, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '未受理'; + } else if (cellvalue == '1') { + return '受理中'; + } else if (cellvalue == '2') { + return '已受理'; + } + }, + }, + { + label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" }, + { + label: '回复用户', name: 'AcceptanceId', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" }, + { + label: '评论打分', name: 'RatingReview', width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '非常满意'; + } else if (cellvalue == '1') { + return '满意'; + } else if (cellvalue == '2') { + return '一般'; + } else { + return '不满意'; + } + }, + }, + { label: '回复内容', name: 'Responses', width: 200, align: "left" }, + { label: '点击次数', name: 'Clicks', width: 200, align: "left" }, + ], + mainId: 'ID', + sidx: 'Createdate desc', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParam = " and ProblemType ='舆情反应'"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexComplaint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexComplaint.cshtml new file mode 100644 index 000000000..3f510c8d1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexComplaint.cshtml @@ -0,0 +1,65 @@ +@{ + ViewBag.Title = "投诉受理"; + Layout = "~/Views/Shared/_Index.cshtml"; +}
+
+
+
+
+
+
+
+
+
标题
+ +
+
+
受理状态
+
+
+
+
提问者身份
+
+
+
+
事项类别
+
+
+
+
类别分类
+
+
+
+
受理单位
+
+
+
+
受理单号
+ +
+
+
受理用户
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SunshineEducation/IndexComplaint.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexComplaint.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexComplaint.js new file mode 100644 index 000000000..6cf051881 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexComplaint.js @@ -0,0 +1,242 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-23 10:48 + * 描 述:投诉受理 + */ +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); + }, 280, 400); + $('#Status').lrselect({ + data: [{ text: "未受理", value: "0" }, { text: "受理中", value: "1" }, { text: "已受理", value: "2" }], + text: "text", + value: "value" + }) + $('#QuestionerIdentity').lrselect({ + width: '150px', + placeholder: "请选择提问者身份", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetQuestionerIdentity?ProblemType=' + "投诉受理", + value: 'ID', + text: 'QuestionerIdentity' + }); + + $('#MatterType').lrselect({ + width: '150px', + placeholder: "请选择事项类别", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterType?ProblemType=' + "投诉受理", + value: 'ID', + text: 'MatterType' + }); + $('#MatterTypeContent').lrselect({ + width: '150px', + placeholder: "请选择类别分类", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterTypeContent?ProblemType=' + "投诉受理", + value: 'ID', + text: 'MatterTypeContent' + }); + $('#AcceptanceUnit').lrDepartmentSelect(); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form?keyValue=' + keyValue, + width: 800, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + //受理标识 + $('#lr_reply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理完成!"); + return; + } + learun.layerConfirm('是否确认受理该项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/ReplyForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //回复 + $('#lr_acceptance').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == 0) { + learun.alert.warning("当前项不可回复!"); + return; + } + learun.layerForm({ + id: 'formReply', + title: '回复', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/FormReply?keyValue=' + keyValue, + width: 800, + height: 900, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetPageList', + headData: [ + { label: '问题类型', name: 'ProblemType', width: 100, align: "left" }, + { label: '提问者身份', name: 'QuestionerIdentity', width: 100, align: "left" }, + { label: '事项类型', name: 'MatterType', width: 100, align: "left" }, + { label: '事项类别内容', name: 'MatterTypeContent', width: 150, align: "left" }, + { label: '标题', name: 'Title', width: 200, align: "left" }, + { label: '信件内容', name: 'Contents', width: 300, align: "left" }, + { label: '姓名', name: 'Name', width: 100, align: "left" }, + { label: '电话号码', name: 'Phone', width: 100, align: "left" }, + { label: 'EMail', name: 'EMail', width: 120, align: "left" }, + { label: '地址', name: 'Address', width: 200, align: "left" }, + { + label: '提交时间', name: 'Createdate', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { + label: '受理状态', name: 'Status', width: 80, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '未受理'; + } else if (cellvalue == '1') { + return '受理中'; + } else if (cellvalue == '2') { + return '已受理'; + } + }, + }, + { + label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" }, + { + label: '回复用户', name: 'AcceptanceId', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" }, + { + label: '评论打分', name: 'RatingReview', width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '非常满意'; + } else if (cellvalue == '1') { + return '满意'; + } else if (cellvalue == '2') { + return '一般'; + } else { + return '不满意'; + } + }, + }, + { label: '回复内容', name: 'Responses', width: 200, align: "left" }, + { label: '点击次数', name: 'Clicks', width: 200, align: "left" }, + ], + mainId: 'ID', + sidx: 'Createdate desc', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParam = " and ProblemType ='投诉受理'"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexHelp.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexHelp.cshtml new file mode 100644 index 000000000..7b4f45ce6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexHelp.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "求助帮扶"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
标题
+ +
+
+
提问者身份
+
+
+ @*
+
事项类别
+
+
+
+
类别分类
+
+
*@ +
+
受理单位
+
+
+
+
受理状态
+
+
+
+
受理用户
+ +
+
+
受理单号
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SunshineEducation/IndexHelp.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexHelp.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexHelp.js new file mode 100644 index 000000000..ca0fcc4c4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexHelp.js @@ -0,0 +1,242 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-23 10:48 + * 描 述:求助帮扶 + */ +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); + }, 280, 400); + $('#Status').lrselect({ + data: [{ text: "未受理", value: "0" }, { text: "受理中", value: "1" }, { text: "已受理", value: "2" }], + text: "text", + value: "value" + }) + $('#QuestionerIdentity').lrselect({ + width: '150px', + placeholder: "请选择提问者身份", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetQuestionerIdentity?ProblemType=' + "求助帮扶", + value: 'ID', + text: 'QuestionerIdentity' + }); + + //$('#MatterType').lrselect({ + // width: '150px', + // placeholder: "请选择事项类别", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterType', + // value: 'ID', + // text: 'MatterType' + //}); + //$('#MatterTypeContent').lrselect({ + // width: '150px', + // placeholder: "请选择类别分类", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterTypeContent', + // value: 'ID', + // text: 'MatterTypeContent' + //}); + $('#AcceptanceUnit').lrDepartmentSelect(); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form?keyValue=' + keyValue, + width: 800, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + //受理标识 + $('#lr_reply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理完成!"); + return; + } + learun.layerConfirm('是否确认受理该项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/ReplyForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //回复 + $('#lr_acceptance').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == 0) { + learun.alert.warning("当前项不可回复!"); + return; + } + learun.layerForm({ + id: 'formReply', + title: '回复', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/FormReply?keyValue=' + keyValue, + width: 800, + height: 900, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetPageList', + headData: [ + { label: '问题类型', name: 'ProblemType', width: 100, align: "left" }, + { label: '提问者身份', name: 'QuestionerIdentity', width: 100, align: "left" }, + { label: '事项类型', name: 'MatterType', width: 100, align: "left" }, + { label: '事项类别内容', name: 'MatterTypeContent', width: 150, align: "left" }, + { label: '标题', name: 'Title', width: 200, align: "left" }, + { label: '信件内容', name: 'Contents', width: 300, align: "left" }, + { label: '姓名', name: 'Name', width: 100, align: "left" }, + { label: '电话号码', name: 'Phone', width: 100, align: "left" }, + { label: 'EMail', name: 'EMail', width: 120, align: "left" }, + { label: '地址', name: 'Address', width: 200, align: "left" }, + { + label: '提交时间', name: 'Createdate', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { + label: '受理状态', name: 'Status', width: 80, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '未受理'; + } else if (cellvalue == '1') { + return '受理中'; + } else if (cellvalue == '2') { + return '已受理'; + } + }, + }, + { + label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" }, + { + label: '回复用户', name: 'AcceptanceId', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" }, + { + label: '评论打分', name: 'RatingReview', width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '非常满意'; + } else if (cellvalue == '1') { + return '满意'; + } else if (cellvalue == '2') { + return '一般'; + } else { + return '不满意'; + } + }, + }, + { label: '回复内容', name: 'Responses', width: 200, align: "left" }, + { label: '点击次数', name: 'Clicks', width: 200, align: "left" }, + ], + mainId: 'ID', + sidx: 'Createdate desc', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParam = " and ProblemType ='求助帮扶'"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPolicy.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPolicy.cshtml new file mode 100644 index 000000000..5a05e98c1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPolicy.cshtml @@ -0,0 +1,65 @@ +@{ + ViewBag.Title = "政策咨询"; + Layout = "~/Views/Shared/_Index.cshtml"; +}
+
+
+
+
+
+
+
+
+
标题
+ +
+
+
受理状态
+
+
+
+
提问者身份
+
+
+
+
事项类别
+
+
+
+
类别分类
+
+
+
+
受理单位
+
+
+
+
受理单号
+ +
+
+
受理用户
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SunshineEducation/IndexPolicy.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPolicy.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPolicy.js new file mode 100644 index 000000000..fc29f1302 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPolicy.js @@ -0,0 +1,242 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-23 10:48 + * 描 述:政策咨询 + */ +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); + }, 280, 400); + $('#Status').lrselect({ + data: [{ text: "未受理", value: "0" }, { text: "受理中", value: "1" }, { text: "已受理", value: "2" }], + text: "text", + value: "value" + }) + $('#QuestionerIdentity').lrselect({ + width: '150px', + placeholder: "请选择提问者身份", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetQuestionerIdentity?ProblemType=' + "政策咨询", + value: 'ID', + text: 'QuestionerIdentity' + }); + + $('#MatterType').lrselect({ + width: '150px', + placeholder: "请选择事项类别", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterType?ProblemType=' + "政策咨询", + value: 'ID', + text: 'MatterType' + }); + $('#MatterTypeContent').lrselect({ + width: '150px', + placeholder: "请选择类别分类", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterTypeContent?ProblemType=' + "政策咨询", + value: 'ID', + text: 'MatterTypeContent' + }); + $('#AcceptanceUnit').lrDepartmentSelect(); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form?keyValue=' + keyValue, + width: 800, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + //受理标识 + $('#lr_reply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理完成!"); + return; + } + learun.layerConfirm('是否确认受理该项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/ReplyForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //回复 + $('#lr_acceptance').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == 0) { + learun.alert.warning("当前项不可回复!"); + return; + } + learun.layerForm({ + id: 'formReply', + title: '回复', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/FormReply?keyValue=' + keyValue, + width: 800, + height: 900, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetPageList', + headData: [ + { label: '问题类型', name: 'ProblemType', width: 100, align: "left" }, + { label: '提问者身份', name: 'QuestionerIdentity', width: 100, align: "left" }, + { label: '事项类型', name: 'MatterType', width: 100, align: "left" }, + { label: '事项类别内容', name: 'MatterTypeContent', width: 150, align: "left" }, + { label: '标题', name: 'Title', width: 200, align: "left" }, + { label: '信件内容', name: 'Contents', width: 300, align: "left" }, + { label: '姓名', name: 'Name', width: 100, align: "left" }, + { label: '电话号码', name: 'Phone', width: 100, align: "left" }, + { label: 'EMail', name: 'EMail', width: 120, align: "left" }, + { label: '地址', name: 'Address', width: 200, align: "left" }, + { + label: '提交时间', name: 'Createdate', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { + label: '受理状态', name: 'Status', width: 80, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '未受理'; + } else if (cellvalue == '1') { + return '受理中'; + } else if (cellvalue == '2') { + return '已受理'; + } + }, + }, + { + label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" }, + { + label: '回复用户', name: 'AcceptanceId', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" }, + { + label: '评论打分', name: 'RatingReview', width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '非常满意'; + } else if (cellvalue == '1') { + return '满意'; + } else if (cellvalue == '2') { + return '一般'; + } else { + return '不满意'; + } + }, + }, + { label: '回复内容', name: 'Responses', width: 200, align: "left" }, + { label: '点击次数', name: 'Clicks', width: 200, align: "left" }, + ], + mainId: 'ID', + sidx: 'Createdate desc', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParam = " and ProblemType ='政策咨询'"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPraise.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPraise.cshtml new file mode 100644 index 000000000..395bb3474 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPraise.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "我要表扬"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
标题
+ +
+
+
提问者身份
+
+
+ @*
+
事项类别
+
+
+
+
类别分类
+
+
*@ +
+
受理单位
+
+
+
+
受理状态
+
+
+
+
受理用户
+ +
+
+
受理单号
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SunshineEducation/IndexPraise.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPraise.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPraise.js new file mode 100644 index 000000000..f9545af3e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexPraise.js @@ -0,0 +1,242 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-23 10:48 + * 描 述:我要表扬 + */ +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); + }, 280, 400); + $('#Status').lrselect({ + data: [{ text: "未受理", value: "0" }, { text: "受理中", value: "1" }, { text: "已受理", value: "2" }], + text: "text", + value: "value" + }) + $('#QuestionerIdentity').lrselect({ + width: '150px', + placeholder: "请选择提问者身份", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetQuestionerIdentity?ProblemType=' + "我要表扬", + value: 'ID', + text: 'QuestionerIdentity' + }); + + //$('#MatterType').lrselect({ + // width: '150px', + // placeholder: "请选择事项类别", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterType', + // value: 'ID', + // text: 'MatterType' + //}); + //$('#MatterTypeContent').lrselect({ + // width: '150px', + // placeholder: "请选择类别分类", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterTypeContent', + // value: 'ID', + // text: 'MatterTypeContent' + //}); + $('#AcceptanceUnit').lrDepartmentSelect(); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form?keyValue=' + keyValue, + width: 800, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + //受理标识 + $('#lr_reply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理完成!"); + return; + } + learun.layerConfirm('是否确认受理该项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/ReplyForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //回复 + $('#lr_acceptance').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == 0) { + learun.alert.warning("当前项不可回复!"); + return; + } + learun.layerForm({ + id: 'formReply', + title: '回复', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/FormReply?keyValue=' + keyValue, + width: 800, + height: 900, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetPageList', + headData: [ + { label: '问题类型', name: 'ProblemType', width: 100, align: "left" }, + { label: '提问者身份', name: 'QuestionerIdentity', width: 100, align: "left" }, + { label: '事项类型', name: 'MatterType', width: 100, align: "left" }, + { label: '事项类别内容', name: 'MatterTypeContent', width: 150, align: "left" }, + { label: '标题', name: 'Title', width: 200, align: "left" }, + { label: '信件内容', name: 'Contents', width: 300, align: "left" }, + { label: '姓名', name: 'Name', width: 100, align: "left" }, + { label: '电话号码', name: 'Phone', width: 100, align: "left" }, + { label: 'EMail', name: 'EMail', width: 120, align: "left" }, + { label: '地址', name: 'Address', width: 200, align: "left" }, + { + label: '提交时间', name: 'Createdate', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { + label: '受理状态', name: 'Status', width: 80, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '未受理'; + } else if (cellvalue == '1') { + return '受理中'; + } else if (cellvalue == '2') { + return '已受理'; + } + }, + }, + { + label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" }, + { + label: '回复用户', name: 'AcceptanceId', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" }, + { + label: '评论打分', name: 'RatingReview', width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '非常满意'; + } else if (cellvalue == '1') { + return '满意'; + } else if (cellvalue == '2') { + return '一般'; + } else { + return '不满意'; + } + }, + }, + { label: '回复内容', name: 'Responses', width: 200, align: "left" }, + { label: '点击次数', name: 'Clicks', width: 200, align: "left" }, + ], + mainId: 'ID', + sidx: 'Createdate desc', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParam = " and ProblemType ='我要表扬'"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexSuggest.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexSuggest.cshtml new file mode 100644 index 000000000..d4587791b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexSuggest.cshtml @@ -0,0 +1,66 @@ +@{ + ViewBag.Title = "我要建议"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
标题
+ +
+
+
提问者身份
+
+
+ @*
+
事项类别
+
+
+
+
类别分类
+
+
*@ +
+
受理单位
+
+
+
+
受理状态
+
+
+
+
受理用户
+ +
+
+
受理单号
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SunshineEducation/IndexSuggest.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexSuggest.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexSuggest.js new file mode 100644 index 000000000..4a39fe46e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SunshineEducation/IndexSuggest.js @@ -0,0 +1,243 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-23 10:48 + * 描 述:我要建议 + */ +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); + }, 280, 400); + $('#Status').lrselect({ + data: [{ text: "未受理", value: "0" }, { text: "受理中", value: "1" }, { text: "已受理", value: "2" }], + text: "text", + value: "value" + }) + $('#QuestionerIdentity').lrselect({ + width: '150px', + placeholder: "请选择提问者身份", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetQuestionerIdentity?ProblemType=' + "我要建议", + value: 'ID', + text: 'QuestionerIdentity' + }); + + //$('#MatterType').lrselect({ + // width: '150px', + // placeholder: "请选择事项类别", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterType', + // value: 'ID', + // text: 'MatterType' + //}); + //$('#MatterTypeContent').lrselect({ + // width: '150px', + // placeholder: "请选择类别分类", + // allowSearch: true, + // url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetMatterTypeContent', + // value: 'ID', + // text: 'MatterTypeContent' + //}); + $('#AcceptanceUnit').lrDepartmentSelect(); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form', + width: 800, + height: 600, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可编辑!"); + return; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/Form?keyValue=' + keyValue, + width: 800, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理或受理中不可删除!"); + return; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/DeleteForm', { keyValue: keyValue }, function () { + }); + } + }); + } + }); + //受理标识 + $('#lr_reply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != 0) { + learun.alert.warning("当前项已受理完成!"); + return; + } + learun.layerConfirm('是否确认受理该项?', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SunshineEducation/ReplyForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //回复 + $('#lr_acceptance').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + console.log(Status) + if (Status == 0) { + learun.alert.warning("当前项不可回复!"); + return; + } + learun.layerForm({ + id: 'formReply', + title: '回复', + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/FormReply?keyValue=' + keyValue, + width: 800, + height: 900, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SunshineEducation/GetPageList', + headData: [ + { label: '问题类型', name: 'ProblemType', width: 100, align: "left" }, + { label: '提问者身份', name: 'QuestionerIdentity', width: 100, align: "left" }, + { label: '事项类型', name: 'MatterType', width: 100, align: "left" }, + { label: '事项类别内容', name: 'MatterTypeContent', width: 150, align: "left" }, + { label: '标题', name: 'Title', width: 200, align: "left" }, + { label: '信件内容', name: 'Contents', width: 300, align: "left" }, + { label: '姓名', name: 'Name', width: 100, align: "left" }, + { label: '电话号码', name: 'Phone', width: 100, align: "left" }, + { label: 'EMail', name: 'EMail', width: 120, align: "left" }, + { label: '地址', name: 'Address', width: 200, align: "left" }, + { + label: '提交时间', name: 'Createdate', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { + label: '受理状态', name: 'Status', width: 80, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '未受理'; + } else if (cellvalue == '1') { + return '受理中'; + } else if (cellvalue == '2') { + return '已受理'; + } + }, + }, + { + label: '受理单位', name: 'AcceptanceUnit', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + }, + { + label: '受理时间', name: 'AcceptanceTime', width: 140, align: "left", + formatter: function (cellvalue) { + return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); + }, + }, + { label: '受理单号', name: 'AcceptanceCode', width: 140, align: "left" }, + { + label: '回复用户', name: 'AcceptanceId', width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('user', { + key: value, + callback: function (_data) { + callback(_data.name); + } + }); + } + }, + { label: '评论意见', name: 'CriticalReview', width: 200, align: "left" }, + { + label: '评论打分', name: 'RatingReview', width: 100, align: "left", + formatter: function (cellvalue) { + if (cellvalue == '0') { + return '非常满意'; + } else if (cellvalue == '1') { + return '满意'; + } else if (cellvalue == '2') { + return '一般'; + } else { + return '不满意'; + } + }, + }, + { label: '回复内容', name: 'Responses', width: 200, align: "left" }, + { label: '点击次数', name: 'Clicks', width: 200, align: "left" }, + ], + mainId: 'ID', + sidx: 'Createdate desc', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.SqlParam = " and ProblemType ='我要建议'"; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index d14a0bfee..20ad1290a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -846,6 +846,7 @@ + @@ -1127,6 +1128,12 @@ + + + + + + @@ -6399,6 +6406,10 @@ + + + + @@ -7688,6 +7699,12 @@ + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SunshineEducationMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SunshineEducationMap.cs new file mode 100644 index 000000000..4ce157bb1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SunshineEducationMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-23 10:48 + /// 描 述:阳光教育 + /// + public class SunshineEducationMap : EntityTypeConfiguration + { + public SunshineEducationMap() + { + #region 表、主键 + //表 + this.ToTable("SUNSHINEEDUCATION"); + //主键 + this.HasKey(t => t.ID); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index 4815dd8a0..0e9df956c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -602,6 +602,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationBLL.cs new file mode 100644 index 000000000..cce1919bf --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationBLL.cs @@ -0,0 +1,274 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; +using System.Linq; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-23 10:48 + /// 描 述:阳光教育 + /// + public class SunshineEducationBLL : SunshineEducationIBLL + { + private SunshineEducationService sunshineEducationService = new SunshineEducationService(); + + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + return sunshineEducationService.GetList(queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetAllList() + { + try + { + return sunshineEducationService.GetAllList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return sunshineEducationService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public SunshineEducationEntity GetEntity(string keyValue) + { + try + { + return sunshineEducationService.GetEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + public List GetQuestionerIdentity(string ProblemType) + { + try + { + return sunshineEducationService.GetQuestionerIdentity(ProblemType).Select(x => new SunshineEducationEntity { ID = x.QuestionerIdentity, QuestionerIdentity = x.QuestionerIdentity }).Distinct().ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public List GetMatterType(string ProblemType) + { + try + { + return sunshineEducationService.GetMatterType(ProblemType).Select(x => new SunshineEducationEntity { ID = x.MatterType, MatterType = x.MatterType }).Distinct().ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public List GetMatterTypeContent(string ProblemType) + { + try + { + return sunshineEducationService.GetMatterTypeContent(ProblemType).Select(x => new SunshineEducationEntity { ID = x.MatterTypeContent, MatterTypeContent = x.MatterTypeContent }).Distinct().ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + sunshineEducationService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, SunshineEducationEntity entity) + { + try + { + sunshineEducationService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 删除实体数据 + /// + /// 主键 + public void ReplyEntity(string keyValue) + { + try + { + sunshineEducationService.ReplyEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 删除实体数据 + /// + /// 主键 + public void ClicksEntity(string keyValue) + { + try + { + sunshineEducationService.ClicksEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationEntity.cs new file mode 100644 index 000000000..8468972ff --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationEntity.cs @@ -0,0 +1,179 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; +namespace Learun.Application.TwoDevelopment.EducationalAdministration + +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-23 10:48 + /// 描 述:阳光教育 + /// + public class SunshineEducationEntity + { + #region 实体成员 + /// + /// ID + /// + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 问题类型 + /// + /// + [Column("PROBLEMTYPE")] + public string ProblemType { get; set; } + /// + /// 提问者身份 + /// + /// + [Column("QUESTIONERIDENTITY")] + public string QuestionerIdentity { get; set; } + /// + /// 事项类型 + /// + /// + [Column("MATTERTYPE")] + public string MatterType { get; set; } + /// + /// 事项类别内容 + /// + /// + [Column("MATTERTYPECONTENT")] + public string MatterTypeContent { get; set; } + /// + /// 标题 + /// + /// + [Column("TITLE")] + public string Title { get; set; } + /// + /// Contents + /// + /// + [Column("CONTENTS")] + public string Contents { get; set; } + /// + /// 姓名 + /// + /// + [Column("NAME")] + public string Name { get; set; } + /// + /// 电话号码 + /// + /// + [Column("PHONE")] + public string Phone { get; set; } + /// + /// EMail + /// + /// + [Column("EMAIL")] + public string EMail { get; set; } + /// + /// QQ + /// + /// + [Column("QQ")] + public string QQ { get; set; } + /// + /// Address + /// + /// + [Column("ADDRESS")] + public string Address { get; set; } + /// + /// 提交时间 + /// + /// + [Column("CREATEDATE")] + public DateTime? Createdate { get; set; } + /// + /// 文件 + /// + /// + [Column("PATH")] + public string Path { get; set; } + /// + /// 受理状态 + /// + /// + [Column("STATUS")] + public int? Status { get; set; } + /// + /// 受理单位 + /// + /// + [Column("ACCEPTANCEUNIT")] + public string AcceptanceUnit { get; set; } + /// + /// 受理时间 + /// + /// + [Column("ACCEPTANCETIME")] + public DateTime? AcceptanceTime { get; set; } + /// + /// AcceptanceCode + /// + /// + [Column("ACCEPTANCECODE")] + public string AcceptanceCode { get; set; } + /// + /// AcceptanceId + /// + /// + [Column("ACCEPTANCEID")] + public string AcceptanceId { get; set; } + /// + /// 评论意见 + /// + /// + [Column("CRITICALREVIEW")] + public string CriticalReview { get; set; } + /// + /// 评论打分 + /// + /// + [Column("RATINGREVIEW")] + public string RatingReview { get; set; } + /// + /// 回复内容 + /// + /// + [Column("RESPONSES")] + public string Responses { get; set; } + /// + /// 点击次数 + /// + /// + [Column("CLICKS")] + public int? Clicks { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.ID = Guid.NewGuid().ToString(); + this.Clicks = 0; + this.Status = 0; + this.Createdate = DateTime.Now; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.ID = keyValue; + } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationIBLL.cs new file mode 100644 index 000000000..c11e0b912 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationIBLL.cs @@ -0,0 +1,72 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-23 10:48 + /// 描 述:阳光教育 + /// + public interface SunshineEducationIBLL + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 查询参数 + /// + IEnumerable GetList( string queryJson ); + + IEnumerable GetAllList(); + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取实体数据 + /// + /// 主键 + /// + SunshineEducationEntity GetEntity(string keyValue); + + List GetQuestionerIdentity(string ProblemType); + List GetMatterType(string ProblemType); + List GetMatterTypeContent(string ProblemType); + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, SunshineEducationEntity entity); + /// + /// 删除实体数据 + /// + /// 主键 + void ReplyEntity(string keyValue); + /// + /// 点击 + /// + /// 主键 + void ClicksEntity(string keyValue); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationService.cs new file mode 100644 index 000000000..353b17962 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SunshineEducation/SunshineEducationService.cs @@ -0,0 +1,388 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; +using System.Linq; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-11-23 10:48 + /// 描 述:阳光教育 + /// + public class SunshineEducationService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取列表数据 + /// + /// 条件参数 + /// + public IEnumerable GetList(string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*"); + strSql.Append(" FROM SunshineEducation t "); + + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["SqlParam"].IsEmpty()) + { + strSql.Append(queryParam["SqlParam"].ToString()); + } + if (!queryParam["Status"].IsEmpty()) + { + dp.Add("Status", queryParam["Status"].ToString(), DbType.String); + strSql.Append(" AND t.Status = @Status "); + } + if (!queryParam["QuestionerIdentity"].IsEmpty()) + { + dp.Add("QuestionerIdentity", queryParam["QuestionerIdentity"].ToString(), DbType.String); + strSql.Append(" AND t.QuestionerIdentity = @QuestionerIdentity "); + } + if (!queryParam["MatterType"].IsEmpty()) + { + dp.Add("MatterType", queryParam["MatterType"].ToString(), DbType.String); + strSql.Append(" AND t.MatterType = @MatterType "); + } + if (!queryParam["MatterTypeContent"].IsEmpty()) + { + dp.Add("MatterTypeContent", queryParam["MatterTypeContent"].ToString(), DbType.String); + strSql.Append(" AND t.MatterTypeContent = @MatterTypeContent "); + } + if (!queryParam["Title"].IsEmpty()) + { + dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Title Like @Title "); + } + if (!queryParam["AcceptanceUnit"].IsEmpty()) + { + dp.Add("AcceptanceUnit", queryParam["AcceptanceUnit"].ToString(), DbType.String); + strSql.Append(" AND t.AcceptanceUnit = @AcceptanceUnit "); + } + if (!queryParam["UserName"].IsEmpty()) + { + dp.Add("UserName", "%" + queryParam["UserName"].ToString() + "%", DbType.String); + strSql.Append(" AND u.F_RealName Like @UserName "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public IEnumerable GetAllList() + { + try + { + return this.BaseRepository("CollegeMIS").FindList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取列表分页数据 + /// + /// 分页参数 + /// 条件参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var basedbname = BaseRepository().getDbConnection().Database; + + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*"); + strSql.Append(" FROM SunshineEducation t "); + strSql.Append(" left join " + basedbname + ".dbo.LR_Base_User u on u.F_UserId=t.AcceptanceId "); + strSql.Append(" where 1=1 "); + var queryParam = queryJson.ToJObject(); + var dp = new DynamicParameters(new { }); + if (!queryParam["SqlParam"].IsEmpty()) + { + strSql.Append(queryParam["SqlParam"].ToString()); + } + if (!queryParam["Status"].IsEmpty()) + { + dp.Add("Status", queryParam["Status"].ToString(), DbType.String); + strSql.Append(" AND t.Status = @Status "); + } + if (!queryParam["QuestionerIdentity"].IsEmpty()) + { + dp.Add("QuestionerIdentity", queryParam["QuestionerIdentity"].ToString(), DbType.String); + strSql.Append(" AND t.QuestionerIdentity = @QuestionerIdentity "); + } + if (!queryParam["MatterType"].IsEmpty()) + { + dp.Add("MatterType", queryParam["MatterType"].ToString(), DbType.String); + strSql.Append(" AND t.MatterType = @MatterType "); + } + if (!queryParam["MatterTypeContent"].IsEmpty()) + { + dp.Add("MatterTypeContent", queryParam["MatterTypeContent"].ToString(), DbType.String); + strSql.Append(" AND t.MatterTypeContent = @MatterTypeContent "); + } + if (!queryParam["Title"].IsEmpty()) + { + dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Title Like @Title "); + } + if (!queryParam["AcceptanceUnit"].IsEmpty()) + { + dp.Add("AcceptanceUnit", queryParam["AcceptanceUnit"].ToString(), DbType.String); + strSql.Append(" AND t.AcceptanceUnit = @AcceptanceUnit "); + } + if (!queryParam["UserName"].IsEmpty()) + { + dp.Add("UserName", "%" + queryParam["UserName"].ToString() + "%", DbType.String); + strSql.Append(" AND u.F_RealName Like @UserName "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取实体数据 + /// + /// 主键 + /// + public SunshineEducationEntity GetEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public List GetQuestionerIdentity(string ProblemType) + { + try + { + string sql = " select distinct QuestionerIdentity from SunshineEducation where ProblemType='" + ProblemType + "' and QuestionerIdentity is not null order by QuestionerIdentity "; + return this.BaseRepository("CollegeMIS").FindList(sql).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public List GetMatterType(string ProblemType) + { + try + { + string sql = " select distinct MatterType from SunshineEducation where ProblemType='" + ProblemType + "' and MatterType is not null order by MatterType "; + return this.BaseRepository("CollegeMIS").FindList(sql).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public List GetMatterTypeContent(string ProblemType) + { + try + { + string sql = " select distinct MatterTypeContent from SunshineEducation where ProblemType='" + ProblemType + "' and MatterTypeContent is not null order by MatterTypeContent "; + return this.BaseRepository("CollegeMIS").FindList(sql).ToList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, SunshineEducationEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + if (!string.IsNullOrEmpty(entity.Responses)) + { + var userlogin = LoginUserInfo.Get(); + entity.AcceptanceUnit = userlogin.departmentId; + entity.AcceptanceId = userlogin.userId; + entity.Status = 2; + } + 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); + } + } + } + + /// + /// 受理中 + /// + /// 主键 + public void ReplyEntity(string keyValue) + { + try + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + entity.AcceptanceTime = DateTime.Now; + entity.AcceptanceCode = DateTime.Now.ToString("yyyyMMddHHmmsss"); + entity.Status = 1; + this.BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + /// + /// 点击实体数据 + /// + /// 主键 + public void ClicksEntity(string keyValue) + { + try + { + var entity = this.BaseRepository("CollegeMIS").FindEntity(keyValue); + entity.Clicks += entity.Clicks; + this.BaseRepository("CollegeMIS").Update(entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index 45c4cd545..1f2d2fbfa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -1843,6 +1843,10 @@ + + + +