@@ -118,6 +118,16 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexGather() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -165,6 +175,27 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList2(string pagination, string queryJson, int type) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = psychologyReplyInfoIBLL.GetPageList2(paginationobj, queryJson, type); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
@@ -9,7 +9,7 @@ var keyValue = request('keyValue'); | |||
var type = request('type'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var objectId = '1b3b9b47-450e-45ab-8264-14ef89106f83'; | |||
var objectId = '29cf249b-8582-4016-975c-ca7668acc19f'; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
@@ -28,22 +28,21 @@ var bootstrap = function ($, learun) { | |||
text: 'F_RealName', | |||
}); | |||
$('#ReplyType').lrselect({ | |||
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetDetailList', | |||
param: { itemCode: 'ReplyType' }, | |||
value: 'F_ItemValue', | |||
text: 'F_ItemName', | |||
data: [{ 'text': '指派', 'value': '1' }, { 'text': '回复', 'value': '2' }], | |||
value: 'value', | |||
text: 'text', | |||
select: | |||
function (item) { | |||
if (item) { | |||
if (item.F_ItemValue == '1') { | |||
if (item.value == '1') { | |||
//上报 | |||
$('#ReplyContent').attr('readonly', 'readonly'); | |||
$('#ReplyContent').val(''); | |||
$('#ReplyContent').prev().html('回复内容'); | |||
$('#ReplyContent').removeAttr('isvalid'); | |||
$('#Appointor').removeAttr('readonly'); | |||
//$('#Appointor').prev().html('指派教师<font face="宋体">*</font>'); | |||
//$('#Appointor').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||
$('#Appointor').prev().html('指派教师<font face="宋体">*</font>'); | |||
$('#Appointor').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||
} else { | |||
//回复 | |||
$('#ReplyContent').removeAttr('readonly'); | |||
@@ -51,8 +50,8 @@ var bootstrap = function ($, learun) { | |||
$('#ReplyContent').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||
$('#Appointor').attr('readonly', 'readonly'); | |||
$('#Appointor').lrselectSet(''); | |||
//$('#Appointor').remove(); | |||
//$('#Appointor').removeAttr('isvalid'); | |||
$('#Appointor').prev().html('指派教师'); | |||
$('#Appointor').removeAttr('isvalid'); | |||
} | |||
} | |||
} | |||
@@ -22,16 +22,14 @@ var bootstrap = function ($, learun) { | |||
$('#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', | |||
data: [{ 'text': '上报', 'value': '1' }, { 'text': '回复', 'value': '2' }], | |||
value: 'value', | |||
text: 'text', | |||
select: | |||
function (item) { | |||
if (item) { | |||
if (item.F_ItemValue == '1') { | |||
if (item.value == '1') { | |||
//上报 | |||
$('#ReplyContent').attr('readonly', 'readonly'); | |||
$('#ReplyContent').val(''); | |||
@@ -63,6 +61,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
$('#ReplyType').lrselectSet('2'); | |||
}); | |||
} | |||
} | |||
@@ -233,6 +233,7 @@ var bootstrap = function ($, learun) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.SqlParameter = " and class.ClassTutorNo='" + learun.clientdata.get(['userinfo']).account + "'"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -135,7 +135,7 @@ var bootstrap = function ($, learun) { | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList2', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
@@ -135,7 +135,7 @@ var bootstrap = function ($, learun) { | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList2', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
@@ -105,7 +105,7 @@ var bootstrap = function ($, learun) { | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList2', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
@@ -0,0 +1,66 @@ | |||
@{ | |||
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_view" 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/LR_Desktop/Views/PsychologyReplyInfo/IndexGather.js") |
@@ -0,0 +1,210 @@ | |||
/* * 版 本 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_view').on('click', function () { | |||
var PsychologyInfoId = $('#gridtable').jfGridValue('PsychologyInfoId'); | |||
if (learun.checkrow(PsychologyInfoId)) { | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormFiveView?PsychologyInfoId=' + PsychologyInfoId + '&type=5', | |||
width: 800, | |||
height: 750, | |||
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 == 7) { | |||
learun.alert.warning('该记录已归档!'); | |||
return false; | |||
} | |||
if (State != 5) { | |||
learun.alert.warning('当前由其他老师审核!'); | |||
return false; | |||
} | |||
if (learun.checkrow(PsychologyInfoId)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '回复', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormFive?keyValue=' + keyValue, | |||
width: 800, | |||
height: 750, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
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 == 7) { | |||
return "<span class=\"label label-success\">已归档</span>"; | |||
} else { | |||
return "<span class=\"label label-warning\">待回复</span>"; | |||
} | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
sidx: 'SubmitTime', | |||
sord: 'ASC' | |||
}); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param), type: 5 }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -106,7 +106,7 @@ var bootstrap = function ($, learun) { | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList', | |||
url: top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetPageList2', | |||
headData: [ | |||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||
@@ -1520,6 +1520,7 @@ | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFive.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormView.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Index4.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexGather.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexSix.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexFive.js" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Index3.js" /> | |||
@@ -8114,6 +8115,7 @@ | |||
<Content Include="Areas\StudentWork\Views\FamilyEconomy\Form.cshtml" /> | |||
<Content Include="Areas\StudentWork\Views\FamilyEconomy\Index.cshtml" /> | |||
<Content Include="Areas\StudentWork\Views\FamilyEconomy\IndexOfTwo.cshtml" /> | |||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexGather.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<PsychologyReplyInfoEntity> GetPageList2(Pagination pagination, string queryJson, int type) | |||
{ | |||
try | |||
{ | |||
return psychologyReplyInfoService.GetPageList2(pagination, queryJson, type); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取PsychologyReplyInfo表实体数据 | |||
/// </summary> | |||
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson, int type); | |||
IEnumerable<PsychologyReplyInfoEntity> GetPageList2(Pagination pagination, string queryJson, int type); | |||
/// <summary> | |||
/// 获取PsychologyReplyInfo表实体数据 | |||
/// </summary> | |||
@@ -6,6 +6,8 @@ using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
using System.Linq; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
{ | |||
/// <summary> | |||
@@ -31,11 +33,12 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
strSql.Append(@" class.ClassTutorNo, | |||
s.StuNo,s.StuName,info.createtime as SubmitTime,s.DeptNo,s.MajorNo,s.ClassNo,s.IdentityCardNo,s.IsSingle,info.Concent,a.Id,a.Appointor | |||
,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 classinfo class on class.classno=s.classno | |||
left join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id | |||
left join (select * from PsychologyReplyInfo where [state]='{type}' )a on a.PsychologyInfoid=info.id"); | |||
strSql.Append(" WHERE 1=1 and info.[state]>=2"); | |||
@@ -86,6 +89,128 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
{ | |||
strSql.Append($" AND info.createtime>='{queryParam["StartTime"].ToString()}' and info.createtime<='{queryParam["EndTime"].ToString()}' "); | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].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> | |||
/// 获取页面显示列表数据--分院辅导员负责人 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<PsychologyReplyInfoEntity> GetPageList2(Pagination pagination, string queryJson, int type) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
//已归档 union 流程走到此步的数据 union 此步已上报但未归档的 | |||
strSql.Append($@" SELECT distinct | |||
StuNo,StuName, SubmitTime,DeptNo,MajorNo,ClassNo,IdentityCardNo,IsSingle,Concent,Id,Appointor | |||
,ReplyUser,ReplyContent,ReplyTime,[state], PsychologyInfoId | |||
from ( | |||
SELECT distinct | |||
s.StuNo,s.StuName,info.createtime as SubmitTime,s.DeptNo,s.MajorNo,s.ClassNo,s.IdentityCardNo,s.IsSingle,info.Concent,'' as Id, | |||
'' as Appointor | |||
,t.ReplyUser,t.ReplyContent,t.ReplyTime,info.[state],info.id as PsychologyInfoId FROM PsychologyInfo info | |||
join StuInfoBasic s on info.StuNo=s.StuNo | |||
join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id | |||
union | |||
SELECT distinct | |||
s.StuNo,s.StuName,info.createtime as SubmitTime,s.DeptNo,s.MajorNo,s.ClassNo,s.IdentityCardNo,s.IsSingle,info.Concent,a.Id,a.Appointor | |||
,'' as ReplyUser,'' as ReplyContent,'' as ReplyTime,info.[state],info.id as PsychologyInfoId FROM PsychologyInfo info | |||
join StuInfoBasic s on info.StuNo=s.StuNo | |||
join (select * from PsychologyReplyInfo where [state]={type} and PsychologyInfoId in (select PsychologyInfoId from PsychologyReplyInfo group by PsychologyInfoId having MAX([state])={type})) a on a.PsychologyInfoid=info.id | |||
WHERE 1=1 and info.[state]>=2 and info.[state]<7 | |||
"); | |||
if (type == 6) | |||
{ | |||
//当前登陆人 | |||
var account = LoginUserInfo.Get().account; | |||
//最后一步心理老师审核,只查看需要自己回复的 | |||
strSql.Append($" and a.Appointor='{account}'"); | |||
} | |||
strSql.Append($@"union | |||
SELECT distinct | |||
s.StuNo,s.StuName,info.createtime as SubmitTime,s.DeptNo,s.MajorNo,s.ClassNo,s.IdentityCardNo,s.IsSingle,info.Concent,'' as Id,case when len(a.Appointor)>0 then a.Appointor else null end as Appointor | |||
,'' as ReplyUser,'' as ReplyContent,'' as ReplyTime,info.[state],info.id as PsychologyInfoId FROM PsychologyInfo info | |||
join StuInfoBasic s on info.StuNo=s.StuNo | |||
join PsychologyReplyInfo a on a.PsychologyInfoid=info.id and a.[state]>{type} | |||
WHERE 1=1 and info.[state]>=2 and info.[state]<7 | |||
) t where 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StuNo"].IsEmpty()) | |||
{ | |||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuNo like @StuNo "); | |||
} | |||
if (!queryParam["StuName"].IsEmpty()) | |||
{ | |||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.StuName Like @StuName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
if (!queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||
} | |||
if (!queryParam["IdentityCardNo"].IsEmpty()) | |||
{ | |||
dp.Add("IdentityCardNo", "%" + queryParam["IdentityCardNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.IdentityCardNo Like @IdentityCardNo "); | |||
} | |||
if (!queryParam["ReplyUser"].IsEmpty()) | |||
{ | |||
dp.Add("ReplyUser", queryParam["ReplyUser"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ReplyUser = @ReplyUser "); | |||
} | |||
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 t.SubmitTime>='{queryParam["StartTime"].ToString()}' and t.SubmitTime<='{queryParam["EndTime"].ToString()}' "); | |||
} | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
if (type == 3) | |||
{ | |||
//分院辅导站负责人 | |||
var account = LoginUserInfo.Get().account; | |||
var deptno = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpNo == account)?.DeptNo; | |||
strSql.Append($" and t.deptno='{deptno}'"); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<PsychologyReplyInfoEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||