@@ -0,0 +1,154 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-06 12:21 | |||
/// 描 述:心理咨询回复 | |||
/// </summary> | |||
public class PsychologyReplyInfoController : MvcControllerBase | |||
{ | |||
private PsychologyReplyInfoIBLL psychologyReplyInfoIBLL = new PsychologyReplyInfoBLL(); | |||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[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 = psychologyReplyInfoIBLL.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 PsychologyReplyInfoData = psychologyReplyInfoIBLL.GetPsychologyReplyInfoEntity(keyValue); | |||
var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(PsychologyReplyInfoData.StuNo); | |||
var jsonData = new | |||
{ | |||
PsychologyReplyInfo = PsychologyReplyInfoData, | |||
StuInfoBasic = StuInfoBasicData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByPsychologyInfoId(string PsychologyInfoId) | |||
{ | |||
var PsychologyReplyInfoData = psychologyReplyInfoIBLL.GetEntityByPsychologyInfoId(PsychologyInfoId); | |||
var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(PsychologyReplyInfoData.StuNo); | |||
var jsonData = new | |||
{ | |||
PsychologyReplyInfo = PsychologyReplyInfoData, | |||
StuInfoBasic = StuInfoBasicData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
psychologyReplyInfoIBLL.DeleteEntity(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) | |||
{ | |||
PsychologyReplyInfoEntity entity = strEntity.ToObject<PsychologyReplyInfoEntity>(); | |||
psychologyReplyInfoIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,75 @@ | |||
@{ | |||
ViewBag.Title = "心理咨询回复"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="IdentityCardNo" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="GenderNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">是否单亲</div> | |||
<div id="IsSingle" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">联系电话</div> | |||
<input id="mobile" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">校内电话</div> | |||
<input id="InSchoolTelephone" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">现住址</div> | |||
<input id="InSchoolAddress" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">提交日期</div> | |||
<input id="CreateTime" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">咨询内容</div> | |||
<textarea id="Concent" class="form-control" style="height:100px;" readonly></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">咨询附件</div> | |||
<div id="StuUrl"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">教师操作<font face="宋体">*</font></div> | |||
<div id="ReplyType" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">回复内容</div> | |||
<textarea id="ReplyContent" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Url"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LR_Desktop/Views/PsychologyReplyInfo/Form.js") |
@@ -0,0 +1,87 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-03-06 12:21 | |||
* 描 述:心理咨询回复 | |||
*/ | |||
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 () { | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#ReplyUser').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); | |||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||
$('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
// $('#ReplyType').lrDataItemSelect({ code: 'ReplyType' }); | |||
$('#ReplyType').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList', | |||
param: { itemCode: 'ReplyType' }, | |||
value: 'F_ItemValue', | |||
text: 'F_ItemName', | |||
select: | |||
function (item) { | |||
if (item) { | |||
if (item.F_ItemValue == '1') { | |||
//上报 | |||
$('#ReplyContent').attr('readonly', 'readonly'); | |||
$('#ReplyContent').val(''); | |||
$('#ReplyContent').prev().html('回复内容'); | |||
$('#ReplyContent').removeAttr('isvalid'); | |||
} else { | |||
//回复 | |||
$('#ReplyContent').removeAttr('readonly'); | |||
$('#ReplyContent').prev().html('回复内容<font face="宋体">*</font>'); | |||
$('#ReplyContent').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||
} | |||
} | |||
} | |||
}); | |||
$('#Url').lrUploader(); | |||
$('#StuUrl').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/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 strEntity = $('body').lrGetFormData(); | |||
strEntity.ReplyUser = learun.clientdata.get(['userinfo']).account; | |||
strEntity.ReplyTime = learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'); | |||
var postData = { | |||
strEntity: JSON.stringify(strEntity) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,75 @@ | |||
@{ | |||
ViewBag.Title = "心理咨询回复"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="IdentityCardNo" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="GenderNo" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">是否单亲</div> | |||
<div id="IsSingle" readonly></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">联系电话</div> | |||
<input id="mobile" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">校内电话</div> | |||
<input id="InSchoolTelephone" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="StuInfoBasic"> | |||
<div class="lr-form-item-title">现住址</div> | |||
<input id="InSchoolAddress" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">提交日期</div> | |||
<input id="SubmitTime" type="text" class="form-control" readonly /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">咨询内容</div> | |||
<textarea id="Concent" class="form-control" style="height:100px;" readonly></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">咨询附件</div> | |||
<div id="StuUrl"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">教师操作<font face="宋体">*</font></div> | |||
<div id="ReplyType" isvalid="yes" checkexpession="NotNull" readonly ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">回复内容</div> | |||
<textarea id="ReplyContent" class="form-control" style="height:100px;" readonly ></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="PsychologyReplyInfo"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Url"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LR_Desktop/Views/PsychologyReplyInfo/FormView.js") |
@@ -0,0 +1,87 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-03-06 12:21 | |||
* 描 述:心理咨询回复 | |||
*/ | |||
var acceptClick; | |||
var PsychologyInfoId = request('PsychologyInfoId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#ReplyUser').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); | |||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||
$('#IsSingle').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
// $('#ReplyType').lrDataItemSelect({ code: 'ReplyType' }); | |||
$('#ReplyType').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList', | |||
param: { itemCode: 'ReplyType' }, | |||
value: 'F_ItemValue', | |||
text: 'F_ItemName', | |||
select: | |||
function (item) { | |||
if (item) { | |||
if (item.F_ItemValue == '1') { | |||
//上报 | |||
$('#ReplyContent').attr('readonly', 'readonly'); | |||
$('#ReplyContent').val(''); | |||
$('#ReplyContent').prev().html('回复内容'); | |||
$('#ReplyContent').removeAttr('isvalid'); | |||
} else { | |||
//回复 | |||
$('#ReplyContent').removeAttr('readonly'); | |||
$('#ReplyContent').prev().html('回复内容<font face="宋体">*</font>'); | |||
$('#ReplyContent').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||
} | |||
} | |||
} | |||
}); | |||
$('#Url').lrUploader(); | |||
$('#StuUrl').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!PsychologyInfoId) { | |||
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetFormDataByPsychologyInfoId?PsychologyInfoId=' + PsychologyInfoId, 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 strEntity = $('body').lrGetFormData(); | |||
strEntity.ReplyUser = learun.clientdata.get(['userinfo']).account; | |||
strEntity.ReplyTime = learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'); | |||
var postData = { | |||
strEntity: JSON.stringify(strEntity) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,70 @@ | |||
@{ | |||
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="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学号</div> | |||
<input id="StuNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">姓名</div> | |||
<input id="StuName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="IdentityCardNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">回复人</div> | |||
<div id="ReplyUser"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">回复内容</div> | |||
<input id="ReplyContent" 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_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index.js") |
@@ -0,0 +1,227 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-03-06 12:21 | |||
* 描 述:心理咨询回复(班级辅导员) | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); $('#ReplyUser').lrDataSourceSelect({ code: 'TeacherInfo', value: 'f_account', text: 'f_realname' }); // 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/Form', | |||
width: 800, | |||
height: 700, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var PsychologyInfoId = $('#gridtable').jfGridValue('PsychologyInfoId'); | |||
if (learun.checkrow(PsychologyInfoId)) { | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormView?PsychologyInfoId=' + PsychologyInfoId, | |||
width: 800, | |||
height: 700, | |||
btn: null, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
//主表Id | |||
var PsychologyInfoId = $('#gridtable').jfGridValue('PsychologyInfoId'); | |||
var State = $('#gridtable').jfGridValue('State'); | |||
if (State != 2) { | |||
learun.alert.warning('当前由其他老师审核!'); | |||
return false; | |||
} | |||
if (learun.checkrow(PsychologyInfoId)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '回复', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/Form?keyValue=' + keyValue, | |||
width: 800, | |||
height: 700, | |||
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 + '/LR_Desktop/PsychologyReplyInfo/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, { label: "学生姓名", name: "StuName", width: 100, align: "left" }, { label: "提交日期", name: "SubmitTime", width: 150, align: "left" }, { | |||
label: "系", name: "DeptNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', | |||
key: value, | |||
keyId: 'deptno', | |||
callback: function (_data) { | |||
callback(_data['deptname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "专业", name: "MajorNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', | |||
key: value, | |||
keyId: 'majorno', | |||
callback: function (_data) { | |||
callback(_data['majorname']); | |||
} | |||
}); | |||
} | |||
}, { | |||
label: "班级", name: "ClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
callback(_data['classname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" }, | |||
{ | |||
label: "是否单亲", name: "IsSingle", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
if (value == true) { | |||
return '是'; | |||
} | |||
else if (value == false) { | |||
return '否'; | |||
} | |||
} | |||
}, | |||
{ label: "咨询内容", name: "Concent", width: 100, align: "left" }, { | |||
label: "最终回复人", name: "ReplyUser", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'TeacherInfo', | |||
key: value, | |||
keyId: 'f_account', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "回复内容", name: "ReplyContent", width: 100, align: "left" }, | |||
{ label: "回复日期", name: "ReplyTime", width: 150, align: "left" }, | |||
{ | |||
label: "状态", name: "State", width: 100, align: "left", | |||
formatter: function (cellvalue) { | |||
if (cellvalue == 2) { | |||
return "<span class=\"label label-warning\">待回复</span>"; | |||
} else if (cellvalue == 7) { | |||
return "<span class=\"label label-success\">已归档</span>"; | |||
//return "<span class=\"label label-danger\">未发布</span>"; | |||
} else { | |||
return "<span class=\"label label-primary\">其他老师审核</span>"; | |||
} | |||
} }, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -877,6 +877,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuSubsidizeTypeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuEnrollOfficialController.cs" /> | |||
<Compile Include="Areas\ReceiveSendFeeManagement\Controllers\SalaryInfoController.cs" /> | |||
<Compile Include="Areas\LR_Desktop\Controllers\PsychologyReplyInfoController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1508,6 +1509,7 @@ | |||
<Content Include="Areas\LR_Desktop\Views\LoginStatistics\Index.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\MessageRind\Form.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\MessageRind\Index.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormView.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\QualityReport\Form.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\QualityReport\Index.js" /> | |||
@@ -6697,6 +6699,10 @@ | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\SalaryInfo\Index.js" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\SalaryInfo\Form.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\SalaryInfo\Form.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Index.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Index.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Form.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -8067,6 +8073,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\ImportForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\AnalysisByMonthForStudent.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\SoonGraduateIndex.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\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.LR_Desktop; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-06 12:21 | |||
/// 描 述:心理咨询回复 | |||
/// </summary> | |||
public class PsychologyReplyInfoMap : EntityTypeConfiguration<PsychologyReplyInfoEntity> | |||
{ | |||
public PsychologyReplyInfoMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PSYCHOLOGYREPLYINFO"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -607,6 +607,7 @@ | |||
<Compile Include="EducationalAdministration\StuSubsidizeTypeMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuEnrollOfficialMap.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\SalaryInfoMap.cs" /> | |||
<Compile Include="LR_Desktop\PsychologyReplyInfoMap.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.LR_Desktop | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-06 12:21 | |||
/// 描 述:心理咨询回复 | |||
/// </summary> | |||
public class PsychologyReplyInfoBLL : PsychologyReplyInfoIBLL | |||
{ | |||
private PsychologyReplyInfoService psychologyReplyInfoService = new PsychologyReplyInfoService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return psychologyReplyInfoService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取PsychologyReplyInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public PsychologyReplyInfoEntity GetPsychologyReplyInfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return psychologyReplyInfoService.GetPsychologyReplyInfoEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId) | |||
{ | |||
try | |||
{ | |||
return psychologyReplyInfoService.GetEntityByPsychologyInfoId(PsychologyInfoId); | |||
} | |||
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 | |||
{ | |||
psychologyReplyInfoService.DeleteEntity(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, PsychologyReplyInfoEntity entity) | |||
{ | |||
try | |||
{ | |||
psychologyReplyInfoService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,105 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-06 12:21 | |||
/// 描 述:心理咨询回复 | |||
/// </summary> | |||
public class PsychologyReplyInfoEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 心理咨询主表 | |||
/// </summary> | |||
[Column("PSYCHOLOGYINFOID")] | |||
public string PsychologyInfoId { get; set; } | |||
/// <summary> | |||
/// 状态 | |||
/// </summary> | |||
[Column("STATE")] | |||
public int? State { get; set; } | |||
/// <summary> | |||
/// 回复内容 | |||
/// </summary> | |||
[Column("REPLYCONTENT")] | |||
public string ReplyContent { get; set; } | |||
/// <summary> | |||
/// 上报/回复 | |||
/// </summary> | |||
[Column("REPLYTYPE")] | |||
public string ReplyType { get; set; } | |||
/// <summary> | |||
/// 回复人/上报人 | |||
/// </summary> | |||
[Column("REPLYUSER")] | |||
public string ReplyUser { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("URL")] | |||
public string Url { get; set; } | |||
/// <summary> | |||
/// 回复时间/上报时间 | |||
/// </summary> | |||
[Column("REPLYTIME")] | |||
public DateTime? ReplyTime { get; set; } | |||
/// <summary> | |||
/// 创建时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
[NotMapped] | |||
public string StuNo { get; set; } | |||
[NotMapped] | |||
public string StuName { get; set; } | |||
[NotMapped] | |||
public DateTime? SubmitTime { get; set; } | |||
[NotMapped] | |||
public string DeptNo { get; set; } | |||
[NotMapped] | |||
public string MajorNo { get; set; } | |||
[NotMapped] | |||
public string ClassNo { get; set; } | |||
[NotMapped] | |||
public string IdentityCardNo { get; set; } | |||
[NotMapped] | |||
public bool? IsSingle { get; set; } | |||
[NotMapped] | |||
public string Concent { get; set; } | |||
[NotMapped] | |||
public string StuUrl { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,50 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-06 12:21 | |||
/// 描 述:心理咨询回复 | |||
/// </summary> | |||
public interface PsychologyReplyInfoIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取PsychologyReplyInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
PsychologyReplyInfoEntity GetPsychologyReplyInfoEntity(string keyValue); | |||
PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, PsychologyReplyInfoEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,268 @@ | |||
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.LR_Desktop | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-03-06 12:21 | |||
/// 描 述:心理咨询回复 | |||
/// </summary> | |||
public class PsychologyReplyInfoService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
s.StuNo,s.StuName,info.createtime as SubmitTime,s.DeptNo,s.MajorNo,s.ClassNo,s.IdentityCardNo,s.IsSingle,info.Concent,a.Id | |||
,t.ReplyUser,t.ReplyContent,t.ReplyTime,info.[state],info.id as PsychologyInfoId "); | |||
strSql.Append(" FROM PsychologyInfo info "); | |||
strSql.Append(@" join StuInfoBasic s on info.StuNo=s.StuNo | |||
left join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id | |||
left join (select * from PsychologyReplyInfo where [state]=2 )a on a.PsychologyInfoid=info.id"); | |||
strSql.Append(" WHERE 1=1 and info.[state]>=2"); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND s.StuNo like @StuNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND s.StuName Like @StuName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND s.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND s.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND s.ClassNo = @ClassNo "); | |||
} | |||
if (!queryParam["IdentityCardNo"].IsEmpty()) | |||
{ | |||
dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND s.IdentityCardNo Like @IdentityCardNo "); | |||
} | |||
if (!queryParam["ReplyUserId"].IsEmpty()) | |||
{ | |||
dp.Add("ReplyUserId", queryParam["ReplyUserId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ReplyUserId = @ReplyUserId "); | |||
} | |||
if (!queryParam["ReplyContent"].IsEmpty()) | |||
{ | |||
dp.Add("ReplyContent", "%" + queryParam["ReplyContent"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ReplyContent Like @ReplyContent "); | |||
} | |||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||
{ | |||
strSql.Append($" AND info.createtime>='{queryParam["StartTime"].ToString()}' and info.createtime<='{queryParam["EndTime"].ToString()}' "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<PsychologyReplyInfoEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取PsychologyReplyInfo表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public PsychologyReplyInfoEntity GetPsychologyReplyInfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
var sql = $@"select a.*,b.Concent,b.CreateTime,b.stuno,b.url as StuUrl | |||
from [PsychologyReplyInfo] a | |||
join PsychologyInfo b on a.PsychologyInfoId=b.Id | |||
where a.Id='{keyValue}'"; | |||
return this.BaseRepository("CollegeMIS").FindList<PsychologyReplyInfoEntity>(sql).FirstOrDefault(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
info.StuNo,info.createtime as SubmitTime,info.Concent | |||
,t.ReplyUser,t.ReplyContent,t.ReplyTime,t.ReplyType,t.url,info.[state],info.id as PsychologyInfoId ,info.url as StuUrl | |||
FROM PsychologyInfo info "); | |||
strSql.Append(@" join StuInfoBasic s on info.StuNo=s.StuNo | |||
left join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id | |||
"); | |||
strSql.Append($" WHERE 1=1 and info.[state]>=2 and info.Id='{PsychologyInfoId}'"); | |||
return this.BaseRepository("CollegeMIS").FindList<PsychologyReplyInfoEntity>(strSql.ToString()).FirstOrDefault(); | |||
} | |||
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("CollegeMIS").Delete<PsychologyReplyInfoEntity>(t => t.Id == keyValue); | |||
} | |||
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, PsychologyReplyInfoEntity entity) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
db.BeginTrans(); | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
var psychologyInfoId = this.BaseRepository("CollegeMIS").FindEntity<PsychologyReplyInfoEntity>(keyValue)?.PsychologyInfoId; | |||
if (entity.ReplyType == "1") | |||
{//上报 | |||
var sql = $@"INSERT INTO [dbo].[PsychologyReplyInfo] | |||
([Id] | |||
,[PsychologyInfoId] | |||
,[State] | |||
,[ReplyContent] | |||
,[ReplyType] | |||
,[Url] | |||
,[ReplyUser] | |||
,[ReplyTime] | |||
,[CreateTime]) | |||
VALUES | |||
(newid() | |||
,'{psychologyInfoId}' | |||
,3 | |||
,NULL | |||
,NULL | |||
,NULL | |||
,NULL | |||
,NULL | |||
,getdate())"; | |||
db.ExecuteBySql(sql); | |||
//修改主表state | |||
var updSql = $" update PsychologyInfo set [state]='3' where Id='{psychologyInfoId}'"; | |||
db.ExecuteBySql(updSql); | |||
} | |||
if (entity.ReplyType == "2") | |||
{ | |||
//回复 | |||
//修改状态 | |||
entity.State = 7; | |||
//修改主表state | |||
var updSql = $" update PsychologyInfo set [state]='7' where Id='{psychologyInfoId}'"; | |||
db.ExecuteBySql(updSql); | |||
} | |||
db.Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
db.Insert(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -1855,6 +1855,10 @@ | |||
<Compile Include="ReceiveSendFeeManagement\SalaryInfo\SalaryInfoService.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\SalaryInfo\SalaryInfoBLL.cs" /> | |||
<Compile Include="ReceiveSendFeeManagement\SalaryInfo\SalaryInfoIBLL.cs" /> | |||
<Compile Include="LR_Desktop\PsychologyReplyInfo\PsychologyReplyInfoEntity.cs" /> | |||
<Compile Include="LR_Desktop\PsychologyReplyInfo\PsychologyReplyInfoService.cs" /> | |||
<Compile Include="LR_Desktop\PsychologyReplyInfo\PsychologyReplyInfoBLL.cs" /> | |||
<Compile Include="LR_Desktop\PsychologyReplyInfo\PsychologyReplyInfoIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||