From 8030a6f65f2391b49140ef1fc0b2480f002c19df Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Fri, 10 Mar 2023 12:17:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E5=AD=90=E5=9C=A8=E7=BA=BF--=E5=BF=83?=
=?UTF-8?q?=E7=90=86=E9=A2=84=E7=BA=A6--=E6=9F=A5=E7=9C=8B=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/PsychologyInfoController.cs | 22 +++++++
.../Views/PsychologyInfo/FormView.cshtml | 31 +++++++++
.../Views/PsychologyInfo/FormView.js | 64 +++++++++++++++++++
.../Views/PsychologyInfo/Index.cshtml | 1 +
.../Views/PsychologyInfo/Index.js | 41 ++++++++----
.../Learun.Application.Web.csproj | 2 +
.../PsychologyInfo/PsychologyInfoBLL.cs | 19 ++++++
.../PsychologyInfo/PsychologyInfoIBLL.cs | 2 +
.../PsychologyInfo/PsychologyInfoService.cs | 31 ++++++++-
9 files changed, 200 insertions(+), 13 deletions(-)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/FormView.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/FormView.js
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PsychologyInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PsychologyInfoController.cs
index 1431c3c35..9e7e5d771 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PsychologyInfoController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/PsychologyInfoController.cs
@@ -36,6 +36,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
+
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult FormView()
+ {
+ return View();
+ }
#endregion
#region 获取数据
@@ -85,6 +95,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
var data = psychologyInfoIBLL.GetEntity(keyValue);
return Success(data);
}
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormViewData(string keyValue)
+ {
+ var data = psychologyInfoIBLL.GetEntityForView(keyValue);
+ return Success(data);
+ }
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/FormView.cshtml
new file mode 100644
index 000000000..721d72202
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/FormView.cshtml
@@ -0,0 +1,31 @@
+@{
+ ViewBag.Title = "心理预约查看";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+
查看
新增
编辑
删除
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/Index.js
index 33542aa7c..b03365f36 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/Index.js
@@ -46,6 +46,23 @@ var bootstrap = function ($, learun) {
$('#lr_refresh').on('click', function () {
location.reload();
});
+ // 查看
+ $('#lr_view').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('Id');
+ if (learun.checkrow(keyValue)) {
+ learun.layerForm({
+ id: 'formview',
+ title: '查看',
+ url: top.$.rootUrl + '/EducationalAdministration/PsychologyInfo/FormView?keyValue=' + keyValue,
+ width: 670,
+ height: 550,
+ btn: null,
+ callBack: function (id) {
+ return top[id].acceptClick(refreshGirdData);
+ }
+ });
+ }
+ });
// 新增
$('#lr_add').on('click', function () {
selectedRow = null;
@@ -153,18 +170,6 @@ var bootstrap = function ($, learun) {
});
}
},
- {
- label: '状态', name: 'State', width: 80, align: "left",
- formatter: function (cellvalue, row) {
- if (cellvalue == 0) {
- return "
草稿";
- } else if (cellvalue == 7) {
- return "
已回复";
- } else {
- return "
待回复";
- }
- }
- },
{
label: '提交日期', name: 'CreateTime', width: 130, align: "left",
formatter: function (cellvalue) {
@@ -205,6 +210,18 @@ var bootstrap = function ($, learun) {
});
}
},
+ {
+ label: '状态', name: 'State', width: 80, align: "left",
+ formatter: function (cellvalue, row) {
+ if (cellvalue == 0) {
+ return "
草稿";
+ } else if (cellvalue == 7) {
+ return "
已回复";
+ } else {
+ return "
待回复";
+ }
+ }
+ },
],
mainId: 'Id',
isPage: true,
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 7eb464395..db0cc0918 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
@@ -992,6 +992,7 @@
+
@@ -8093,6 +8094,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoBLL.cs
index c9c99f423..3e85df2b3 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoBLL.cs
@@ -91,6 +91,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
+
+ public PsychologyInfoEntity GetEntityForView(string keyValue)
+ {
+ try
+ {
+ return psychologyInfoService.GetEntityForView(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoIBLL.cs
index 9fe1ba30a..fe6f9a5f9 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoIBLL.cs
@@ -34,6 +34,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
主键
///
PsychologyInfoEntity GetEntity(string keyValue);
+
+ PsychologyInfoEntity GetEntityForView(string keyValue);
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoService.cs
index b47cc8d1d..d10d44d84 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoService.cs
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
+using System.Linq;
namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
@@ -123,7 +124,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
-
+ ///
+ /// 学生查看
+ ///
+ ///
+ ///
+ public PsychologyInfoEntity GetEntityForView(string keyValue)
+ {
+ try
+ {
+ var db = this.BaseRepository().getDbConnection().Database;
+ var strSql = new StringBuilder();
+ strSql.Append(" SELECT t.*,p.ReplyContent,p.Url as Urls,p.ReplyUser,p.ReplyTime,l.F_RealName FROM PsychologyInfo t ");
+ strSql.Append(" left join PsychologyReplyInfo p on p.PsychologyInfoid=t.id and p.ReplyType = 2");
+ strSql.Append($" left join {db}.dbo.LR_Base_User l on l.F_account =p.ReplyUser ");
+ strSql.Append($" where t.Id='{keyValue}' ");
+ return this.BaseRepository("CollegeMIS").FindList
(strSql.ToString()).FirstOrDefault();
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
#endregion
#region 提交数据