From c31e2b9bb4d489fa1bfd264eca3d74987762380b Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Mon, 9 May 2022 14:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BF=83=E7=90=86=E5=92=A8?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sys_PsychologicalCounseController.cs | 137 ++++++++++++++ .../Views/Sys_PsychologicalCounse/Form.cshtml | 15 ++ .../Views/Sys_PsychologicalCounse/Form.js | 50 +++++ .../Sys_PsychologicalCounse/FormView.cshtml | 15 ++ .../Views/Sys_PsychologicalCounse/FormView.js | 50 +++++ .../Sys_PsychologicalCounse/Index.cshtml | 46 +++++ .../Views/Sys_PsychologicalCounse/Index.js | 167 +++++++++++++++++ .../Learun.Application.Web.csproj | 7 + .../Sys_PsychologicalCounseMap.cs | 29 +++ .../Learun.Application.Mapping.csproj | 1 + .../Sys_PsychologicalCounseBLL.cs | 143 ++++++++++++++ .../Sys_PsychologicalCounseEntity.cs | 99 ++++++++++ .../Sys_PsychologicalCounseIBLL.cs | 49 +++++ .../Sys_PsychologicalCounseService.cs | 177 ++++++++++++++++++ .../Learun.Application.TwoDevelopment.csproj | 4 + 15 files changed, 989 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_PsychologicalCounseController.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_PsychologicalCounseMap.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseEntity.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseIBLL.cs create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseService.cs diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_PsychologicalCounseController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_PsychologicalCounseController.cs new file mode 100644 index 000000000..3a00c1499 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_PsychologicalCounseController.cs @@ -0,0 +1,137 @@ +using Learun.Util; +using System.Data; +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Web.Mvc; +using System.Collections.Generic; + +namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-05-09 11:23 + /// 描 述:心理咨询 + /// + public class Sys_PsychologicalCounseController : MvcControllerBase + { + private Sys_PsychologicalCounseIBLL sys_PsychologicalCounseIBLL = new Sys_PsychologicalCounseBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult Form() + { + ViewBag.Code = "XLZX_" + CommonHelper.CreateNo(); + return View(); + } + + [HttpGet] + public ActionResult FormView() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = sys_PsychologicalCounseIBLL.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 Sys_PsychologicalCounseData = sys_PsychologicalCounseIBLL.GetSys_PsychologicalCounseEntity(keyValue); + var jsonData = new + { + Sys_PsychologicalCounse = Sys_PsychologicalCounseData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + sys_PsychologicalCounseIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 提交 + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult SubmitForm(string keyValue) + { + sys_PsychologicalCounseIBLL.SubmitForm(keyValue); + return Success("提交成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Sys_PsychologicalCounseEntity entity = strEntity.ToObject(); + sys_PsychologicalCounseIBLL.SaveEntity(keyValue, entity); + if (string.IsNullOrEmpty(keyValue)) + { + } + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.cshtml new file mode 100644 index 000000000..f47846c49 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "心理咨询"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
咨询编号
+ +
+
+
咨询内容*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.js new file mode 100644 index 000000000..4585ba5d7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.js @@ -0,0 +1,50 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-05-09 11:23 + * 描 述:心理咨询 + */ +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 () { + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.cshtml new file mode 100644 index 000000000..aacd8bafe --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "心理咨询"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
咨询编号
+ +
+
+
咨询内容*
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.js new file mode 100644 index 000000000..4585ba5d7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/FormView.js @@ -0,0 +1,50 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-05-09 11:23 + * 描 述:心理咨询 + */ +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 () { + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id ).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.cshtml new file mode 100644 index 000000000..8deb1c9d4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.cshtml @@ -0,0 +1,46 @@ +@{ + ViewBag.Title = "心理咨询"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
编号
+ +
+
+
咨询内容
+ +
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js new file mode 100644 index 000000000..d93ad0d59 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_PsychologicalCounse/Index.js @@ -0,0 +1,167 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2022-05-09 11:23 + * 描 述:心理咨询 + */ +var refreshGirdData; +var selectedRow; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/Form', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/Form?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //// 打印 + //$('#lr_print').on('click', function () { + // $('#gridtable').jqprintTable(); + //}); + // 提交 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + if (selectedRow.SendFlag !== 0) { + learun.alert.warning("选中记录已提交!"); + return false; + } + learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/SubmitForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + // 查看 + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'formview', + title: '查看', + url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/FormView?keyValue=' + keyValue, + width: 600, + height: 400, + btn: null + }); + } + }); + // 回复情况 + $('#lr_reply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('SComplaintId'); + selectedRow = $('#gridtable').jfGridGet('rowdata'); + if (learun.checkrow(keyValue)) { + if (selectedRow.SendFlag !== 1) { + learun.alert.warning("当前投诉意见未提交,请先提交!"); + return false; + } + if (selectedRow.ReplyFlag !== 1) { + learun.alert.warning("当前投诉意见未回复!"); + return false; + } + learun.layerForm({ + id: 'replylistSys_SendComplaint', + title: '回复情况', + url: top.$.rootUrl + '/EducationalAdministration/Sys_SendComplaint/ReplyList?keyValue=' + keyValue, + width: 600, + height: 400, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Sys_PsychologicalCounse/GetPageList', + headData: [ + { label: "咨询编号", name: "Code", width: 150, align: "left" }, + { label: "咨询内容", name: "Concent", width: 250, align: "left" }, + { label: "创建时间", name: "CreateTime", width: 150, align: "left" }, + { + label: "提交状态", name: "SendFlag", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '已提交'; + } else { + return '草稿'; + } + } + }, + { label: "提交时间", name: "SendTime", width: 150, align: "left" }, + { + label: "回复状态", name: "ReplyFlag", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 1) { + return '已回复'; + } else { + return '未回复'; + } + } + + }, + ], + mainId: 'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + page.init(); +} 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 fb919cb1d..61eed15c8 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 @@ -831,6 +831,7 @@ + @@ -1098,6 +1099,7 @@ + @@ -6526,6 +6528,10 @@ + + + + @@ -7814,6 +7820,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_PsychologicalCounseMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_PsychologicalCounseMap.cs new file mode 100644 index 000000000..5b78f50ec --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Sys_PsychologicalCounseMap.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-05-09 11:23 + /// 描 述:心理咨询 + /// + public class Sys_PsychologicalCounseMap : EntityTypeConfiguration + { + public Sys_PsychologicalCounseMap() + { + #region 表、主键 + //表 + this.ToTable("SYS_PSYCHOLOGICALCOUNSE"); + //主键 + 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 e5f29dc6c..87566726f 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 @@ -585,6 +585,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseBLL.cs new file mode 100644 index 000000000..37481f6ed --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseBLL.cs @@ -0,0 +1,143 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-05-09 11:23 + /// 描 述:心理咨询 + /// + public class Sys_PsychologicalCounseBLL : Sys_PsychologicalCounseIBLL + { + private Sys_PsychologicalCounseService sys_PsychologicalCounseService = new Sys_PsychologicalCounseService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return sys_PsychologicalCounseService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Sys_PsychologicalCounse表实体数据 + /// + /// 主键 + /// + public Sys_PsychologicalCounseEntity GetSys_PsychologicalCounseEntity(string keyValue) + { + try + { + return sys_PsychologicalCounseService.GetSys_PsychologicalCounseEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + sys_PsychologicalCounseService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public void SubmitForm(string keyValue) + { + try + { + sys_PsychologicalCounseService.SubmitForm(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + /// + public void SaveEntity(string keyValue, Sys_PsychologicalCounseEntity entity) + { + try + { + sys_PsychologicalCounseService.SaveEntity(keyValue, entity); + } + 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/Sys_PsychologicalCounse/Sys_PsychologicalCounseEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseEntity.cs new file mode 100644 index 000000000..a070d708f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseEntity.cs @@ -0,0 +1,99 @@ +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-05-09 11:23 + /// 描 述:心理咨询 + /// + public class Sys_PsychologicalCounseEntity + { + #region 实体成员 + /// + /// 主键 + /// + [Column("ID")] + public string Id { get; set; } + /// + /// 编号 + /// + [Column("CODE")] + public string Code { get; set; } + /// + /// 咨询内容 + /// + [Column("CONCENT")] + public string Concent { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// CreateUserId + /// + [Column("CREATEUSERID")] + public string CreateUserId { get; set; } + /// + /// 提交状态 + /// + [Column("SENDFLAG")] + public bool? SendFlag { get; set; } + /// + /// 提交时间 + /// + [Column("SENDTIME")] + public DateTime? SendTime { get; set; } + /// + /// 回复状态 + /// + [Column("REPLYFLAG")] + public bool? ReplyFlag { get; set; } + /// + /// 回复内容 + /// + [Column("REPLYCONTENT")] + public string ReplyContent { get; set; } + /// + /// ReplyTime + /// + [Column("REPLYTIME")] + public DateTime? ReplyTime { get; set; } + /// + /// ReplyUserId + /// + [Column("REPLYUSERID")] + public string ReplyUserId { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + this.CreateTime = DateTime.Now; + this.CreateUserId = LoginUserInfo.Get().userId; + this.SendFlag = false; + this.ReplyFlag = false; + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseIBLL.cs new file mode 100644 index 000000000..ddc3693bd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseIBLL.cs @@ -0,0 +1,49 @@ +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-05-09 11:23 + /// 描 述:心理咨询 + /// + public interface Sys_PsychologicalCounseIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Sys_PsychologicalCounse表实体数据 + /// + /// 主键 + /// + Sys_PsychologicalCounseEntity GetSys_PsychologicalCounseEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + void DeleteEntity(string keyValue); + void SubmitForm(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + void SaveEntity(string keyValue, Sys_PsychologicalCounseEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseService.cs new file mode 100644 index 000000000..e43dcdb76 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_PsychologicalCounse/Sys_PsychologicalCounseService.cs @@ -0,0 +1,177 @@ +using Dapper; +using Learun.DataBase.Repository; +using Learun.Util; +using System; +using System.Collections.Generic; +using System.Data; +using System.Text; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 + /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + /// 创 建:超级管理员 + /// 日 期:2022-05-09 11:23 + /// 描 述:心理咨询 + /// + public class Sys_PsychologicalCounseService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.* + "); + strSql.Append(" FROM Sys_PsychologicalCounse t "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["Code"].IsEmpty()) + { + dp.Add("Code", "%" + queryParam["Code"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Code Like @Code "); + } + if (!queryParam["Concent"].IsEmpty()) + { + dp.Add("Concent", "%" + queryParam["Concent"].ToString() + "%", DbType.String); + strSql.Append(" AND t.Concent Like @Concent "); + } + return this.BaseRepository().FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取Sys_PsychologicalCounse表实体数据 + /// + /// 主键 + /// + public Sys_PsychologicalCounseEntity GetSys_PsychologicalCounseEntity(string keyValue) + { + try + { + return this.BaseRepository().FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// + /// 主键 + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository().Delete(t => t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 提交 + /// + /// + public void SubmitForm(string keyValue) + { + try + { + string sql = $"update Sys_PsychologicalCounse set SendFlag=1 where Id='{keyValue}'"; + this.BaseRepository().ExecuteBySql(sql); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 保存实体数据(新增、修改) + /// + /// 主键 + /// 实体 + public void SaveEntity(string keyValue, Sys_PsychologicalCounseEntity entity) + { + try + { + if (!string.IsNullOrEmpty(keyValue)) + { + entity.Modify(keyValue); + this.BaseRepository().Update(entity); + } + else + { + entity.Create(); + this.BaseRepository().Insert(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 b32f9e48c..be0cae1da 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 @@ -1773,6 +1773,10 @@ + + + +