Browse Source

心理咨询--分院心理辅导站负责人

新疆体育高职分支
zhangli 1 year ago
parent
commit
830ae8cae7
10 changed files with 362 additions and 26 deletions
  1. +15
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/PsychologyReplyInfoController.cs
  2. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Form.js
  3. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/FormView.js
  4. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index.js
  5. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index3.cshtml
  6. +243
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index3.js
  7. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoBLL.cs
  9. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoIBLL.cs
  10. +17
    -11
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoService.cs

+ 15
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/PsychologyReplyInfoController.cs View File

@@ -49,6 +49,15 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
return View();
}

/// <summary>
/// 分院心理辅导站负责人列表
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index3()
{
return View();
}
#endregion

#region 获取数据
@@ -61,10 +70,10 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
public ActionResult GetPageList(string pagination, string queryJson, int type = 2)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = psychologyReplyInfoIBLL.GetPageList(paginationobj, queryJson);
var data = psychologyReplyInfoIBLL.GetPageList(paginationobj, queryJson, type);
var jsonData = new
{
rows = data,
@@ -100,9 +109,9 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByPsychologyInfoId(string PsychologyInfoId)
public ActionResult GetFormDataByPsychologyInfoId(string PsychologyInfoId,int type=2)
{
var PsychologyReplyInfoData = psychologyReplyInfoIBLL.GetEntityByPsychologyInfoId(PsychologyInfoId);
var PsychologyReplyInfoData = psychologyReplyInfoIBLL.GetEntityByPsychologyInfoId(PsychologyInfoId,type);
var StuInfoBasicData = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(PsychologyReplyInfoData.StuNo);
var jsonData = new
{
@@ -111,7 +120,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
};
return Success(jsonData);
}

#endregion

@@ -147,7 +156,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
}
return Success("保存成功!");
}
#endregion

}


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Form.js View File

@@ -6,6 +6,7 @@
*/
var acceptClick;
var keyValue = request('keyValue');
var type = request('type');
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -51,7 +52,7 @@ var bootstrap = function ($, learun) {
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetFormData?keyValue=' + keyValue, function (data) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetFormData?keyValue=' + keyValue + '&type=' + type, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/FormView.js View File

@@ -6,6 +6,7 @@
*/
var acceptClick;
var PsychologyInfoId = request('PsychologyInfoId');
var type = request('type');
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -52,7 +53,7 @@ var bootstrap = function ($, learun) {
},
initData: function () {
if (!!PsychologyInfoId) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetFormDataByPsychologyInfoId?PsychologyInfoId=' + PsychologyInfoId, function (data) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/PsychologyReplyInfo/GetFormDataByPsychologyInfoId?PsychologyInfoId=' + PsychologyInfoId + '&type=' + type, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index.js View File

@@ -91,6 +91,10 @@ var bootstrap = function ($, learun) {
var PsychologyInfoId = $('#gridtable').jfGridValue('PsychologyInfoId');
var State = $('#gridtable').jfGridValue('State');

if (State == 7) {
learun.alert.warning('该记录已归档!');
return false;
}
if (State != 2) {
learun.alert.warning('当前由其他老师审核!');
return false;


+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index3.cshtml View File

@@ -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>&nbsp;新增</a>*@
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;回复</a>
@*<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>*@
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index3.js")

+ 243
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/PsychologyReplyInfo/Index3.js View File

@@ -0,0 +1,243 @@
/* * 版 本 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 == 7) {
learun.alert.warning('该记录已归档!');
return false;
}
if (State != 3) {
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 == 3) {
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,
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: 3 });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -1511,6 +1511,7 @@
<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\PsychologyReplyInfo\Index3.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" />
@@ -8079,6 +8080,7 @@
<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" />
<Content Include="Areas\LR_Desktop\Views\PsychologyReplyInfo\Index3.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoBLL.cs View File

@@ -24,11 +24,11 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson)
public IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson, int type)
{
try
{
return psychologyReplyInfoService.GetPageList(pagination, queryJson);
return psychologyReplyInfoService.GetPageList(pagination, queryJson, type);
}
catch (Exception ex)
{
@@ -67,11 +67,11 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

public PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId)
public PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId, int type)
{
try
{
return psychologyReplyInfoService.GetEntityByPsychologyInfoId(PsychologyInfoId);
return psychologyReplyInfoService.GetEntityByPsychologyInfoId(PsychologyInfoId, type);
}
catch (Exception ex)
{


+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoIBLL.cs View File

@@ -20,14 +20,14 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson, int type);
/// <summary>
/// 获取PsychologyReplyInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
PsychologyReplyInfoEntity GetPsychologyReplyInfoEntity(string keyValue);
PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId);
PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId, int type);
#endregion

#region 提交数据
@@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, PsychologyReplyInfoEntity entity);
#endregion

}


+ 17
- 11
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/PsychologyReplyInfo/PsychologyReplyInfoService.cs View File

@@ -25,7 +25,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson)
public IEnumerable<PsychologyReplyInfoEntity> GetPageList(Pagination pagination, string queryJson, int type)
{
try
{
@@ -35,9 +35,9 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
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
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");
left join (select * from PsychologyReplyInfo where [state]='{type}' )a on a.PsychologyInfoid=info.id");
strSql.Append(" WHERE 1=1 and info.[state]>=2");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -130,7 +130,7 @@ where a.Id='{keyValue}'";
}


public PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId)
public PsychologyReplyInfoEntity GetEntityByPsychologyInfoId(string PsychologyInfoId, int type)
{
try
{
@@ -143,7 +143,7 @@ where a.Id='{keyValue}'";
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(" left join (select * from PsychologyReplyInfo where [state]=2 ) a on a.PsychologyInfoid=info.id ");
strSql.Append($" left join (select * from PsychologyReplyInfo where [state]='{type}' ) a on a.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();
@@ -201,9 +201,16 @@ where a.Id='{keyValue}'";
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
var psychologyInfoId = this.BaseRepository("CollegeMIS").FindEntity<PsychologyReplyInfoEntity>(keyValue)?.PsychologyInfoId;
var model = this.BaseRepository("CollegeMIS").FindEntity<PsychologyReplyInfoEntity>(keyValue);
var psychologyInfoId = model.PsychologyInfoId;
if (entity.ReplyType == "1")
{//上报
{
int state = 0;
if (model.State >= 2 && model.State <= 4)
{
state = model.State.Value + 1;
}
//上报
var sql = $@"INSERT INTO [dbo].[PsychologyReplyInfo]
([Id]
,[PsychologyInfoId]
@@ -217,7 +224,7 @@ where a.Id='{keyValue}'";
VALUES
(newid()
,'{psychologyInfoId}'
,3
,'{state}'
,NULL
,NULL
,NULL
@@ -227,13 +234,12 @@ where a.Id='{keyValue}'";
db.ExecuteBySql(sql);

//修改主表state
var updSql = $" update PsychologyInfo set [state]='3' where Id='{psychologyInfoId}'";
var updSql = $" update PsychologyInfo set [state]='{state}' where Id='{psychologyInfoId}'";
db.ExecuteBySql(updSql);
}

if (entity.ReplyType == "2")
if (entity.ReplyType == "2")//回复
{
//回复
//修改状态
entity.State = 7;
//修改主表state


Loading…
Cancel
Save