@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-05-09 11:23 | |||
/// 描 述:心理咨询 | |||
/// </summary> | |||
public class Sys_PsychologicalCounseController : MvcControllerBase | |||
{ | |||
private Sys_PsychologicalCounseIBLL sys_PsychologicalCounseIBLL = new Sys_PsychologicalCounseBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
ViewBag.Code = "XLZX_" + CommonHelper.CreateNo(); | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sys_PsychologicalCounseIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Sys_PsychologicalCounseData = sys_PsychologicalCounseIBLL.GetSys_PsychologicalCounseEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
Sys_PsychologicalCounse = Sys_PsychologicalCounseData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
sys_PsychologicalCounseIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SubmitForm(string keyValue) | |||
{ | |||
sys_PsychologicalCounseIBLL.SubmitForm(keyValue); | |||
return Success("提交成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Sys_PsychologicalCounseEntity entity = strEntity.ToObject<Sys_PsychologicalCounseEntity>(); | |||
sys_PsychologicalCounseIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "心理咨询"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询编号</div> | |||
<input id="Code" type="text" class="form-control" value="@ViewBag.Code" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询内容<font face="宋体">*</font></div> | |||
<textarea id="Concent" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/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(); | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "心理咨询"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询编号</div> | |||
<input id="Code" type="text" class="form-control" value="@ViewBag.Code" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_PsychologicalCounse" > | |||
<div class="lr-form-item-title">咨询内容<font face="宋体">*</font></div> | |||
<textarea id="Concent" class="form-control" style="height:100px;" readonly="readonly" isvalid="yes" checkexpession="NotNull" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/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(); | |||
} |
@@ -0,0 +1,46 @@ | |||
@{ | |||
ViewBag.Title = "心理咨询"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">编号</div> | |||
<input id="Code" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">咨询内容</div> | |||
<input id="Concent" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_reply" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 回复情况</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/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 '<span class=\"label label-success\">已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ label: "提交时间", name: "SendTime", width: 150, align: "left" }, | |||
{ | |||
label: "回复状态", name: "ReplyFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 1) { | |||
return '<span class=\"label label-success\">已回复</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未回复</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
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(); | |||
} |
@@ -831,6 +831,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuCancelDisciplineManagementController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeExamTermNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_PsychologicalCounseController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1098,6 +1099,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElective\QueryStuSelectResultForTeacher.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.js" /> | |||
@@ -6526,6 +6528,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -7814,6 +7820,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\FormYearSemester.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\FormView.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-05-09 11:23 | |||
/// 描 述:心理咨询 | |||
/// </summary> | |||
public class Sys_PsychologicalCounseMap : EntityTypeConfiguration<Sys_PsychologicalCounseEntity> | |||
{ | |||
public Sys_PsychologicalCounseMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("SYS_PSYCHOLOGICALCOUNSE"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -585,6 +585,7 @@ | |||
<Compile Include="EducationalAdministration\StuDisciplineManagementMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuCancelDisciplineManagementMap.cs" /> | |||
<Compile Include="EducationalAdministration\ArrangeExamTermNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounseMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,143 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-05-09 11:23 | |||
/// 描 述:心理咨询 | |||
/// </summary> | |||
public class Sys_PsychologicalCounseBLL : Sys_PsychologicalCounseIBLL | |||
{ | |||
private Sys_PsychologicalCounseService sys_PsychologicalCounseService = new Sys_PsychologicalCounseService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Sys_PsychologicalCounseEntity> 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); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Sys_PsychologicalCounse表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
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 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
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); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
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 | |||
} | |||
} |
@@ -0,0 +1,99 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-05-09 11:23 | |||
/// 描 述:心理咨询 | |||
/// </summary> | |||
public class Sys_PsychologicalCounseEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 主键 | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 编号 | |||
/// </summary> | |||
[Column("CODE")] | |||
public string Code { get; set; } | |||
/// <summary> | |||
/// 咨询内容 | |||
/// </summary> | |||
[Column("CONCENT")] | |||
public string Concent { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// CreateUserId | |||
/// </summary> | |||
[Column("CREATEUSERID")] | |||
public string CreateUserId { get; set; } | |||
/// <summary> | |||
/// 提交状态 | |||
/// </summary> | |||
[Column("SENDFLAG")] | |||
public bool? SendFlag { get; set; } | |||
/// <summary> | |||
/// 提交时间 | |||
/// </summary> | |||
[Column("SENDTIME")] | |||
public DateTime? SendTime { get; set; } | |||
/// <summary> | |||
/// 回复状态 | |||
/// </summary> | |||
[Column("REPLYFLAG")] | |||
public bool? ReplyFlag { get; set; } | |||
/// <summary> | |||
/// 回复内容 | |||
/// </summary> | |||
[Column("REPLYCONTENT")] | |||
public string ReplyContent { get; set; } | |||
/// <summary> | |||
/// ReplyTime | |||
/// </summary> | |||
[Column("REPLYTIME")] | |||
public DateTime? ReplyTime { get; set; } | |||
/// <summary> | |||
/// ReplyUserId | |||
/// </summary> | |||
[Column("REPLYUSERID")] | |||
public string ReplyUserId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.CreateUserId = LoginUserInfo.Get().userId; | |||
this.SendFlag = false; | |||
this.ReplyFlag = false; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,49 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-05-09 11:23 | |||
/// 描 述:心理咨询 | |||
/// </summary> | |||
public interface Sys_PsychologicalCounseIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Sys_PsychologicalCounseEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Sys_PsychologicalCounse表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Sys_PsychologicalCounseEntity GetSys_PsychologicalCounseEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
void SubmitForm(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Sys_PsychologicalCounseEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -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 | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2022-05-09 11:23 | |||
/// 描 述:心理咨询 | |||
/// </summary> | |||
public class Sys_PsychologicalCounseService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Sys_PsychologicalCounseEntity> 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<Sys_PsychologicalCounseEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Sys_PsychologicalCounse表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Sys_PsychologicalCounseEntity GetSys_PsychologicalCounseEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<Sys_PsychologicalCounseEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository().Delete<Sys_PsychologicalCounseEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
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); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
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 | |||
} | |||
} |
@@ -1773,6 +1773,10 @@ | |||
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainService.cs" /> | |||
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainBLL.cs" /> | |||
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounse\Sys_PsychologicalCounseEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounse\Sys_PsychologicalCounseService.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounse\Sys_PsychologicalCounseBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounse\Sys_PsychologicalCounseIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||