@@ -5,6 +5,7 @@ using System.Web.Mvc; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Collections; | using System.Collections; | ||||
using System; | using System; | ||||
using System.Linq; | |||||
namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | ||||
{ | { | ||||
@@ -102,12 +103,12 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||||
{ | { | ||||
var data = messageRindIBLL.GetListForUnread(); | var data = messageRindIBLL.GetListForUnread(); | ||||
//心理咨询数据 | //心理咨询数据 | ||||
var PsychologyReplyData = psychologyReplyInfoIBLL.GetListForUnread(); | |||||
var PsychologyReplyData = psychologyReplyInfoIBLL.GetListForUnread().OrderBy(x => x.IsReply).OrderBy(x => x.CreateTime); | |||||
List<Hashtable> list = new List<Hashtable>(); | List<Hashtable> list = new List<Hashtable>(); | ||||
foreach (var item in PsychologyReplyData) | foreach (var item in PsychologyReplyData) | ||||
{ | { | ||||
var url = "/LR_Desktop/PsychologyReplyInfo/Index"; | var url = "/LR_Desktop/PsychologyReplyInfo/Index"; | ||||
var title = "心理咨询"; | |||||
//跳转地址 | //跳转地址 | ||||
if (item.Description == "学生") | if (item.Description == "学生") | ||||
{ | { | ||||
@@ -115,29 +116,41 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
if (item.State == 2) | |||||
{ | |||||
title = "心理回复-辅导员"; | |||||
} | |||||
if (item.State == 3) | if (item.State == 3) | ||||
{ | { | ||||
title = "心理回复-分院"; | |||||
url = "/LR_Desktop/PsychologyReplyInfo/Index3"; | url = "/LR_Desktop/PsychologyReplyInfo/Index3"; | ||||
} | } | ||||
else if (item.State == 4) | else if (item.State == 4) | ||||
{ | { | ||||
title = "心理回复-学工"; | |||||
url = "/LR_Desktop/PsychologyReplyInfo/Index4"; | url = "/LR_Desktop/PsychologyReplyInfo/Index4"; | ||||
} | } | ||||
else if (item.State == 5) | else if (item.State == 5) | ||||
{ | { | ||||
title = "心理回复-总站"; | |||||
url = "/LR_Desktop/PsychologyReplyInfo/IndexFive"; | url = "/LR_Desktop/PsychologyReplyInfo/IndexFive"; | ||||
} | } | ||||
else if (item.State == 6) | else if (item.State == 6) | ||||
{ | { | ||||
title = "心理回复-老师"; | |||||
url = "/LR_Desktop/PsychologyReplyInfo/IndexSix"; | url = "/LR_Desktop/PsychologyReplyInfo/IndexSix"; | ||||
} | } | ||||
if (item.IsReply == 0) | |||||
url = "/LR_Desktop/PsychologyReplyInfo/IndexReply"; | |||||
else | |||||
title = "心理咨询"; | |||||
} | } | ||||
Hashtable ht = new Hashtable(); | Hashtable ht = new Hashtable(); | ||||
ht["MessageId"] = item.Id; | ht["MessageId"] = item.Id; | ||||
ht["SenderName"] = ""; | ht["SenderName"] = ""; | ||||
ht["TheTitle"] = "心理咨询"; | |||||
ht["TheTitle"] = title; | |||||
ht["TheContent"] = item.Concent; | ht["TheContent"] = item.Concent; | ||||
ht["ConnectionUrl"] = url + "?keyvalue="; | |||||
ht["ConnectionUrl"] = url + "?type=" + item.State + "&keyvalue="; | |||||
ht["InstanceId"] = item.Id; | ht["InstanceId"] = item.Id; | ||||
ht["isReply"] = item.IsReply; | ht["isReply"] = item.IsReply; | ||||
list.Add(ht); | list.Add(ht); | ||||
@@ -136,6 +136,15 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 回复列表 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexReply() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
@@ -204,6 +213,28 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageListForReply(string pagination, string queryJson, int type) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = psychologyReplyInfoIBLL.GetPageListForReply(paginationobj, queryJson, type); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取表单数据 | /// 获取表单数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -77,7 +77,7 @@ | |||||
} | } | ||||
var param = data[i]["TheTitle"] + "、" + data[i]["InstanceId"] + "、" + data[i]["MessageId"] + "、" + data[i]["ConnectionUrl"]; | var param = data[i]["TheTitle"] + "、" + data[i]["InstanceId"] + "、" + data[i]["MessageId"] + "、" + data[i]["ConnectionUrl"]; | ||||
content += "<li>"; | content += "<li>"; | ||||
if (data[i]["TheTitle"].indexOf('心理咨询') != -1) { | |||||
if (data[i]["TheTitle"].indexOf('心理咨询') != -1 || data[i]["TheTitle"].indexOf('心理回复') != -1) { | |||||
if (data[i]["isReply"] == 1) { | if (data[i]["isReply"] == 1) { | ||||
//已回复绿色显示 | //已回复绿色显示 | ||||
content += "<span style='color:green;'>"; | content += "<span style='color:green;'>"; | ||||
@@ -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" > | |||||
@*<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/IndexReply.js") |
@@ -0,0 +1,264 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2023-03-06 12:21 | |||||
* 描 述:心理咨询回复(班级辅导员) | |||||
*/ | |||||
var refreshGirdData; | |||||
var type = request('type'); | |||||
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: 750, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 查看 | |||||
$('#lr_view').on('click', function () { | |||||
var PsychologyInfoId = $('#gridtable').jfGridValue('PsychologyInfoId'); | |||||
var url = top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormView?PsychologyInfoId=' + PsychologyInfoId + '&type=' + type; | |||||
if (type == 5) | |||||
url = top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormFiveView?PsychologyInfoId=' + PsychologyInfoId + '&type=' + type; | |||||
if (learun.checkrow(PsychologyInfoId)) { | |||||
learun.layerForm({ | |||||
id: 'formview_PsychologyInfo', | |||||
title: '查看', | |||||
url: url, | |||||
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 != type) { | |||||
learun.alert.warning('当前由其他老师审核!'); | |||||
return false; | |||||
} | |||||
var url = top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/Form?keyValue=' + keyValue + '&type=' + State; | |||||
if (type == 5) | |||||
url = top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormFive?keyValue=' + keyValue + '&type=' + State; | |||||
if (type == 6) | |||||
url = top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/FormSix?keyValue=' + keyValue + '&type=' + State; | |||||
if (learun.checkrow(PsychologyInfoId)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '回复', | |||||
url: url , | |||||
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/GetPageListForReply', | |||||
headData: [ | |||||
{ | |||||
label: "状态", name: "State", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
if (cellvalue == type) { | |||||
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>"; | |||||
} | |||||
} | |||||
}, | |||||
{ label: "咨询内容", name: "Concent", width: 100, align: "left" }, | |||||
{ 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: "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", | |||||
formatter: function (cellvalue) { | |||||
if (cellvalue != '1900-01-01 00:00:00') { | |||||
return cellvalue; | |||||
} | |||||
} | |||||
}, | |||||
], | |||||
mainId: 'Id', | |||||
isPage: true, | |||||
sidx: 'SubmitTime', | |||||
sord: 'ASC' | |||||
}); | |||||
//page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = startTime; | |||||
param.EndTime = endTime; | |||||
if (type == 2) { | |||||
param.SqlParameter = " and ClassTutorNo='" + learun.clientdata.get(['userinfo']).account + "'"; | |||||
} | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param), type: type }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -1520,6 +1520,7 @@ | |||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFive.js" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormFive.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormGatherView.js" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormGatherView.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormView.js" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormView.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexReply.js" /> | |||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Index4.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\IndexGather.js" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexSix.js" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexSix.js" /> | ||||
@@ -8122,6 +8123,7 @@ | |||||
<Content Include="Areas\StudentWork\Views\FamilyEconomy\IndexOfStudent.cshtml" /> | <Content Include="Areas\StudentWork\Views\FamilyEconomy\IndexOfStudent.cshtml" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexGather.cshtml" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexGather.cshtml" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormGatherView.cshtml" /> | <Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\FormGatherView.cshtml" /> | ||||
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\IndexReply.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -8253,7 +8255,11 @@ | |||||
<None Include="Properties\PublishProfiles\FolderProfile46.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile46.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile47.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile47.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile48.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile48.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile49.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile5.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile5.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile50.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile51.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile52.pubxml" /> | |||||
<None Include="Properties\PublishProfiles\FolderProfile6.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile6.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile7.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile7.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile8.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile8.pubxml" /> | ||||
@@ -68,6 +68,32 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<PsychologyReplyInfoEntity> GetPageListForReply(Pagination pagination, string queryJson, int type) | |||||
{ | |||||
try | |||||
{ | |||||
return psychologyReplyInfoService.GetPageListForReply(pagination, queryJson, type); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public List<PsychologyInfoEntity> GetListForUnread() | public List<PsychologyInfoEntity> GetListForUnread() | ||||
{ | { | ||||
try | try | ||||
@@ -23,6 +23,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson, int type); | IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson, int type); | ||||
IEnumerable<PsychologyReplyInfoEntity> GetPageList2(Pagination pagination, string queryJson, int type); | IEnumerable<PsychologyReplyInfoEntity> GetPageList2(Pagination pagination, string queryJson, int type); | ||||
IEnumerable<PsychologyReplyInfoEntity> GetPageListForReply(Pagination pagination, string queryJson, int type); | |||||
List<PsychologyInfoEntity> GetListForUnread(); | List<PsychologyInfoEntity> GetListForUnread(); | ||||
/// <summary> | /// <summary> | ||||
@@ -118,41 +118,120 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
//当前登陆人 | |||||
var account = LoginUserInfo.Get().account; | |||||
var strSql = new StringBuilder(); | 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 | |||||
strSql.Append("SELECT distinct StuNo,StuName, SubmitTime,DeptNo,MajorNo,ClassNo,IdentityCardNo,IsSingle,Concent,Id,Appointor,ReplyUser,ReplyContent,ReplyTime,[state], PsychologyInfoId from ("); | |||||
strSql.Append($@" SELECT distinct | |||||
s.StuNo,s.StuName,info.createtime as SubmitTime,s.DeptNo,s.MajorNo,s.ClassNo,s.IdentityCardNo,s.IsSingle,info.Concent,a.Id,case when len(a.Appointor)>0 then a.Appointor else t.Appointor end as Appointor | |||||
,t.ReplyUser,t.ReplyContent,t.ReplyTime,info.[state],info.id as PsychologyInfoId FROM PsychologyInfo info | ,t.ReplyUser,t.ReplyContent,t.ReplyTime,info.[state],info.id as PsychologyInfoId FROM PsychologyInfo info | ||||
join StuInfoBasic s on info.StuNo=s.StuNo | 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,NULL as ReplyTime,info.[state],info.id as PsychologyInfoId FROM PsychologyInfo info | |||||
left 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 | |||||
left join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id | |||||
WHERE 1=1 and info.[state]>=2 and info.id in (select distinct PsychologyInfoId from PsychologyReplyInfo a where a.[state]>={type} and a.[state]<7 ) | |||||
"); | |||||
strSql.Append(") t where 1=1"); | |||||
if (type == 6) | |||||
{ | |||||
//最后一步心理老师审核,只查看需要自己回复的 | |||||
strSql.Append($" and t.Appointor='{account}'"); | |||||
} | |||||
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 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) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<PsychologyReplyInfoEntity> GetPageListForReply(Pagination pagination, string queryJson, int type) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT distinct ClassTutorNo,StuNo,StuName, SubmitTime,DeptNo,MajorNo,ClassNo,IdentityCardNo,IsSingle,Concent,Id,Appointor,ReplyUser,ReplyContent,ReplyTime,[state], PsychologyInfoId from ("); | |||||
strSql.Append($@" SELECT distinct class.ClassTutorNo, | |||||
s.StuNo,s.StuName,info.createtime as SubmitTime,s.DeptNo,s.MajorNo,s.ClassNo,s.IdentityCardNo,s.IsSingle,info.Concent,a.Id,case when len(a.Appointor)>0 then a.Appointor else null end as Appointor | |||||
,'' as ReplyUser,'' as ReplyContent,a.ReplyTime,info.[state],info.id as PsychologyInfoId FROM PsychologyInfo info | |||||
join StuInfoBasic s on info.StuNo=s.StuNo | 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 | |||||
"); | |||||
left join classinfo class on class.classno=s.classno | |||||
left 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 | |||||
-- left join (select * from PsychologyReplyInfo where ReplyType=2 )t on t.PsychologyInfoid=info.id | |||||
WHERE 1=1 and info.[state]={type} and info.id in (select distinct PsychologyInfoId from PsychologyReplyInfo a where a.[state]>={type} and a.[state]<7 ) | |||||
"); | |||||
strSql.Append(") t where 1=1"); | |||||
if (type == 6) | if (type == 6) | ||||
{ | { | ||||
//当前登陆人 | //当前登陆人 | ||||
var account = LoginUserInfo.Get().account; | var account = LoginUserInfo.Get().account; | ||||
//最后一步心理老师审核,只查看需要自己回复的 | //最后一步心理老师审核,只查看需要自己回复的 | ||||
strSql.Append($" and a.Appointor='{account}'"); | |||||
strSql.Append($" and t.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 queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
@@ -713,7 +792,7 @@ join empinfo a on u.f_account=a.empno | |||||
,'{userInfo.account}')"); | ,'{userInfo.account}')"); | ||||
} | } | ||||
} | |||||
} | |||||
if (psychologyInfo.State >= 5) | if (psychologyInfo.State >= 5) | ||||
{ | { | ||||
//学工处心理老师 | //学工处心理老师 | ||||