Browse Source

心理咨询查看回复教师

新疆体育高职分支
ndbs 2 years ago
parent
commit
4cc3be50d6
4 changed files with 141 additions and 30 deletions
  1. +16
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/Form.js
  2. +73
    -25
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/Index.js
  3. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoEntity.cs
  4. +40
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoService.cs

+ 16
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/Form.js View File

@@ -6,6 +6,10 @@
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
var bootstrap = function ($, learun) {
"use strict";
var selectedRow = learun.frameTab.currentIframe().selectedRow;
@@ -18,11 +22,21 @@ var bootstrap = function ($, learun) {
$('#Url').lrUploader();
},
initData: function () {
if (!!selectedRow) {
$('#form').lrSetFormData(selectedRow);
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/PsychologyInfo/GetFormData?keyValue=' + keyValue, function (data) {
$('#form').lrSetFormData(data);
});
}
}
};
// 设置表单数据
setFormData = function (processId) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/PsychologyInfo/GetFormData?keyValue=' + keyValue, function (data) {
$('#form').lrSetFormData(data);
});
}
}
// 保存数据
acceptClick = function (callBack) {
if (!$('#form').lrValidform()) {


+ 73
- 25
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/PsychologyInfo/Index.js View File

@@ -125,50 +125,90 @@ var bootstrap = function ($, learun) {
headData: [
{ label: '学生学号', name: 'StuNo', width: 120, align: "left" },
{ label: '咨询内容', name: 'Concent', width: 300, align: "left" },
{ label: '附件', name: 'Url', width: 300, align: "left" },
{
label: '状态', name: 'State', width: 100, align: "left",
label: '附件', name: 'Url', width: 300, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
$.ajax({
url: '/LR_SystemModule/Annexes/GetAnnexesFileList',
data: { folderId: value },
type: 'GET',
dataType: "json",
async: false,
cache: false,
success: function (res) {
var bb = '';
//$.each(res.data, function (i, item) {
// bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ','
//})
//bb
$.each(res.data, function (i, item) {
bb += '<span onclick="downLoad(\'' +
item.F_Id +
'\')" style="color:blue">' +
item.F_FileName.substring(0, item.F_FileName.indexOf(".")) +
'</span>,&nbsp;&nbsp;&nbsp;';
})
callback(bb);
}
});
}
},
{
label: '状态', name: 'State', width: 80, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 1) {
return "<span class=\"label label-success\">已提交</span>";
} else if (cellvalue == 0) {
if (cellvalue == 0) {
return "<span class=\"label label-primary\">草稿</span>";
} else if (cellvalue == 7) {
return "<span class=\"label label-success\">已回复</span>";
} else {
return "<span class=\"label label-warning\">已回复</span>";
}
return "<span class=\"label label-warning\">回复</span>";
}
}
},
{
label: '提交日期', name: 'CreateTime', width: 160, align: "left",
label: '提交日期', name: 'CreateTime', width: 130, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd');
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
}
},
{
label: '回复教师', name: 'ReplyUserId', width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
label: '回复教师', name: 'F_RealName', width: 100, align: "left",
},
{ label: '回复内容', name: 'ReplyContent', width: 300, align: "left" },
{
label: '回复时间', name: 'ReplyTime', width: 160, align: "left",
label: '回复时间', name: 'ReplyTime', width: 130, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd ss:mm');
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
}
},
{
label: '回复附件', name: 'Urls', width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
$.ajax({
url: '/LR_SystemModule/Annexes/GetAnnexesFileList',
data: { folderId: value },
type: 'GET',
dataType: "json",
async: false,
cache: false,
success: function (res) {
var bb = '';
$.each(res.data, function (i, item) {
bb += '<span onclick="downLoad(\'' +
item.F_Id +
'\')" style="color:blue">' +
item.F_FileName.substring(0, item.F_FileName.indexOf(".")) +
'</span>,&nbsp;&nbsp;&nbsp;';
})
callback(bb);
}
});
}
},
{ label: '回复附件', name: 'Urls', width: 200, align: "left" },
],
mainId: 'Id',
isPage: true,
sidx: 'CreateTime desc ',
sidx: 'State asc,CreateTime desc',
});
page.search();
},
@@ -177,7 +217,6 @@ var bootstrap = function ($, learun) {
param.StartTime = logbegin;
param.EndTime = logend;
param.StuNo = learun.clientdata.get(['userinfo']).account;
//param.StuNo = '202201030207';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
@@ -186,3 +225,12 @@ var bootstrap = function ($, learun) {
};
page.init();
}
function downLoad(fileId, fileTwo) {
if (fileTwo) {

top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () {

});
}
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' });
}

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoEntity.cs View File

@@ -72,6 +72,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
this.CreateTime = DateTime.Now;
}
#endregion
[NotMapped]
public string F_RealName { get; set; }
[NotMapped]
public string ReplyContent { get; set; }
[NotMapped]
public string Urls { get; set; }
[NotMapped]
public DateTime? ReplyTime { get; set; }
[NotMapped]
public string ReplyUser { get; set; }


}
}


+ 40
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/PsychologyInfo/PsychologyInfoService.cs View File

@@ -66,11 +66,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
var db = this.BaseRepository().getDbConnection().Database;
var strSql = new StringBuilder();
strSql.Append(" SELECT t.*,p.ReplyContent,p.Url as Urls,p.ReplyUser,p.ReplyTime,s.StuName,s.deptNo,s.majorno,s.classno,s.GenderNo,s.IdentityCardNo,s.IsSingle FROM PsychologyInfo t ");
strSql.Append(" left join PsychologyReplyInfo p on p.PsychologyInfoid = t.id ");
strSql.Append(" SELECT t.*,l.F_RealName,p.ReplyContent,p.Url as Urls,p.ReplyUser,p.ReplyTime,s.StuName,s.deptNo,s.majorno,s.classno,s.GenderNo,s.IdentityCardNo,s.IsSingle FROM PsychologyInfo t ");
strSql.Append(" left join PsychologyReplyInfo p on p.PsychologyInfoid = t.id AND p.State = t.State ");
strSql.Append(" left join StuInfoBasic s on s.StuNo = t.StuNo ");
strSql.Append(" where 1=1");
strSql.Append($" left join {db}.dbo.LR_Base_User l on l.F_account =p.ReplyUser ");
strSql.Append(" where 1=1 ");
var queryParam = queryJson.ToJObject();
var dp = new DynamicParameters(new { });
if (!queryParam["StuNo"].IsEmpty())
@@ -78,6 +80,41 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String);
strSql.Append(" AND t.StuNo = @StuNo ");
}
if (!queryParam["StuName"].IsEmpty())
{
dp.Add("StuName", queryParam["StuName"].ToString(), DbType.String);
strSql.Append(" AND s.StuName = @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 t.IdentityCardNo like @IdentityCardNo ");
}
if (!queryParam["ReplyContent"].IsEmpty())
{
dp.Add("ReplyContent", "%" + queryParam["ReplyContent"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ReplyContent like @ReplyContent ");
}
if (!queryParam["RealName"].IsEmpty())
{
dp.Add("RealName", "%" + queryParam["RealName"].ToString() + "%", DbType.String);
strSql.Append(" AND l.F_RealName like @RealName ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);


Loading…
Cancel
Save