@@ -155,6 +155,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||
ht["isReply"] = item.IsReply; | |||
list.Add(ht); | |||
} | |||
//获取未处理的维修任务 | |||
foreach (var entity in data) | |||
{ | |||
Hashtable ht = new Hashtable(); | |||
@@ -237,6 +238,10 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||
{ | |||
psychologyReplyInfoIBLL.UpdateEntity(keyValue); | |||
} | |||
//else if (title.Contains("维修通知")) | |||
//{ | |||
//} | |||
else | |||
{ | |||
messageRindIBLL.SaveReadSigns(keyValue); | |||
@@ -3,6 +3,12 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.Base.AuthorizeModule; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.Organization; | |||
using System.Linq; | |||
using System; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
@@ -16,6 +22,11 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
public class RepairReportStudentController : MvcControllerBase | |||
{ | |||
private RepairReportStudentIBLL repairReportStudentIBLL = new RepairReportStudentBLL(); | |||
private UserRelationIBLL userRelationIBLL = new UserRelationBLL(); | |||
private MessageRindIBLL messageRindIBLL = new MessageRindBLL(); | |||
private DataItemIBLL dataItemIBLL = new DataItemBLL(); | |||
private UserIBLL userIbll = new UserBLL(); | |||
private RoleIBLL roleIBLL = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -154,6 +165,20 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
RepairReport_StudentEntity entity = strEntity.ToObject<RepairReport_StudentEntity>(); | |||
repairReportStudentIBLL.SaveEntity(keyValue,entity); | |||
if (entity.Status == 2) | |||
{ | |||
var model = repairReportStudentIBLL.GetRepairReport_StudentEntity(keyValue); | |||
//获取所有的维修员账号并添加 | |||
var userList = userIbll.GetListByUserIds(model.Creator); | |||
List<DataItemDetailEntity> datalist = dataItemIBLL.GetDetailList("repairtype", ""); | |||
string servicevalue = datalist.Where(c => c.F_ItemValue == model.ServiceType).FirstOrDefault().F_ItemName; | |||
string content = "您发起" + model.Address + "-" + servicevalue + "维修请求已处理,请评价。"; | |||
addmessagerind(userList, model, content, "评价通知"); | |||
} | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
@@ -174,8 +199,50 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
repairReportStudentIBLL.ModifyStatus(keyValue, status, processId); | |||
var model = repairReportStudentIBLL.GetRepairReport_StudentEntity(keyValue); | |||
//向所有维修员发消息 | |||
string roleid = roleIBLL.GetIdByRoleName("维修角色"); | |||
var data = userRelationIBLL.GetUserIdList(roleid); | |||
string userIds = ""; | |||
foreach (var item in data) | |||
{ | |||
if (userIds != "") | |||
{ | |||
userIds += ","; | |||
} | |||
userIds += item.F_UserId; | |||
} | |||
//获取所有的维修员账号并添加 | |||
var userList = userIbll.GetListByUserIds(userIds); | |||
List<DataItemDetailEntity> datalist = dataItemIBLL.GetDetailList("repairtype", ""); | |||
string servicevalue = datalist.Where(c => c.F_ItemValue == model.ServiceType).FirstOrDefault().F_ItemName; | |||
string content ="学生"+ model.DeptName + model.CreatorName + "发起" + model.Address + "-" + servicevalue + "维修请求。"; | |||
addmessagerind(userList, model, content); | |||
return Success("提交成功!"); | |||
} | |||
private void addmessagerind(List<UserEntity> userList, RepairReport_StudentEntity model, string content,string title = "维修通知") | |||
{ | |||
foreach (var userinfo in userList) | |||
{ | |||
//站内通知逻辑 | |||
MessageRemindEntity entity = new MessageRemindEntity(); | |||
entity.ReceiptId = userinfo.F_UserId; | |||
entity.ReceiptName = userinfo.F_RealName; | |||
entity.SenderId = model.Creator; | |||
entity.SenderName = model.CreatorName; | |||
entity.TheTitle = title; | |||
entity.TheContent = content; | |||
entity.InstanceId = model.ID; | |||
entity.ConnectionUrl = "/LogisticsManagement/RepairReportStudent/FormView?keyValue="; | |||
entity.SendTime = DateTime.Now; | |||
entity.ReadSigns = false; | |||
messageRindIBLL.SaveEntity("", entity); | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -3,6 +3,12 @@ using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using Learun.Application.Organization; | |||
using Learun.Application.Base.AuthorizeModule; | |||
using System; | |||
using Learun.Application.Base.SystemModule; | |||
using System.Linq; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
@@ -16,6 +22,11 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
public class RepairReportTeacherController : MvcControllerBase | |||
{ | |||
private RepairReportTeacherIBLL repairReportTeacherIBLL = new RepairReportTeacherBLL(); | |||
private UserRelationIBLL userRelationIBLL = new UserRelationBLL(); | |||
private MessageRindIBLL messageRindIBLL = new MessageRindBLL(); | |||
private DataItemIBLL dataItemIBLL = new DataItemBLL(); | |||
private UserIBLL userIbll = new UserBLL(); | |||
private RoleIBLL roleIBLL = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -26,7 +37,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,7 +46,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -44,7 +55,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -54,7 +65,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[HttpGet] | |||
public ActionResult EvaluateFormView() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -83,7 +94,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[HttpGet] | |||
public ActionResult dealFormView() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
#endregion | |||
@@ -119,7 +130,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var RepairReport_TeacherData = repairReportTeacherIBLL.GetRepairReport_TeacherEntity( keyValue ); | |||
var RepairReport_TeacherData = repairReportTeacherIBLL.GetRepairReport_TeacherEntity(keyValue); | |||
var jsonData = new { | |||
RepairReport_Teacher = RepairReport_TeacherData, | |||
}; | |||
@@ -153,8 +164,21 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
RepairReport_TeacherEntity entity = strEntity.ToObject<RepairReport_TeacherEntity>(); | |||
repairReportTeacherIBLL.SaveEntity(keyValue, entity); | |||
//entity.Status = 2; | |||
repairReportTeacherIBLL.SaveEntity(keyValue,entity); | |||
if (entity.Status == 2) | |||
{ | |||
var model = repairReportTeacherIBLL.GetRepairReport_TeacherEntity(keyValue); | |||
//获取所有的维修员账号并添加 | |||
var userList = userIbll.GetListByUserIds(model.Creator); | |||
List<DataItemDetailEntity> datalist = dataItemIBLL.GetDetailList("repairtype", ""); | |||
string servicevalue = datalist.Where(c => c.F_ItemValue == model.ServiceType).FirstOrDefault().F_ItemName; | |||
string content = "您发起" + model.Address + "-" + servicevalue + "维修请求已处理,请评价。"; | |||
addmessagerind(userList, model, content, "评价通知"); | |||
} | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
@@ -172,11 +196,56 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
//修改状态 | |||
repairReportTeacherIBLL.ModifyStatus(keyValue, status, processId); | |||
var model = repairReportTeacherIBLL.GetRepairReport_TeacherEntity(keyValue); | |||
//向所有维修员发消息 | |||
string roleid = roleIBLL.GetIdByRoleName("维修角色"); | |||
var data = userRelationIBLL.GetUserIdList(roleid); | |||
string userIds = ""; | |||
foreach (var item in data) | |||
{ | |||
if (userIds != "") | |||
{ | |||
userIds += ","; | |||
} | |||
userIds += item.F_UserId; | |||
} | |||
//获取所有的维修员账号并添加 | |||
var userList = userIbll.GetListByUserIds(userIds); | |||
List<DataItemDetailEntity> datalist = dataItemIBLL.GetDetailList("repairtype", ""); | |||
string servicevalue = datalist.Where(c => c.F_ItemValue == model.ServiceType).FirstOrDefault().F_ItemName; | |||
string content = model.DeptName + model.CreatorName + "发起" + model.Address + "-" + servicevalue + "维修请求。"; | |||
addmessagerind(userList, model, content); | |||
return Success("提交成功!"); | |||
} | |||
private void addmessagerind(List<UserEntity> userList,RepairReport_TeacherEntity model,string content,string title= "维修通知") | |||
{ | |||
foreach (var userinfo in userList) | |||
{ | |||
//站内通知逻辑 | |||
MessageRemindEntity entity = new MessageRemindEntity(); | |||
entity.ReceiptId = userinfo.F_UserId; | |||
entity.ReceiptName = userinfo.F_RealName; | |||
entity.SenderId = model.Creator; | |||
entity.SenderName = model.CreatorName; | |||
entity.TheTitle = title; | |||
entity.TheContent = content; | |||
entity.InstanceId = model.ID; | |||
entity.ConnectionUrl = "/LogisticsManagement/RepairReportTeacher/FormView?keyValue="; | |||
entity.SendTime = DateTime.Now; | |||
entity.ReadSigns = false; | |||
messageRindIBLL.SaveEntity("", entity); | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -5,45 +5,19 @@ | |||
* 描 述:教师报修 | |||
*/ | |||
var acceptClick; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
//加载用户TeachClassNo MajorNo DeptNo | |||
$('#CreatorName')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorName').val(userinfo.realName); | |||
$('#StuNo').val(userinfo.account); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#TeachClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + userinfo.account, '', function (data) { | |||
if (data) { | |||
$('#DeptNo').lrselectSet(data.DeptNo); | |||
$('#MajorNo').lrselectSet(data.MajorNo); | |||
$('#TeachClassNo').lrselectSet(data.ClassNo); | |||
//TeachClassNo MajorNo | |||
//$('#DeptNo')[0].lrvalue = data.DeptNo; | |||
$('#Contact').val(data.mobile); | |||
} else { | |||
learun.alert.warning("学生不存在!"); | |||
//return false; | |||
} | |||
}); | |||
$('#TeachClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#ServiceType').lrDataItemSelect({ code: 'repairtype' }); | |||
//var RemarkUE = UE.getEditor('Remark'); | |||
//$('#Remark')[0].ue = RemarkUE; | |||
@@ -5,43 +5,19 @@ | |||
* 描 述:教师报修 | |||
*/ | |||
var acceptClick; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
//加载用户TeachClassNo MajorNo DeptNo | |||
$('#CreatorName')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorName').val(userinfo.realName); | |||
$('#StuNo').val(userinfo.account); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#TeachClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + userinfo.account, '', function (data) { | |||
if (data) { | |||
$('#DeptNo').lrselectSet(data.DeptNo); | |||
$('#MajorNo').lrselectSet(data.MajorNo); | |||
$('#TeachClassNo').lrselectSet(data.ClassNo); | |||
//TeachClassNo MajorNo | |||
//$('#DeptNo')[0].lrvalue = data.DeptNo; | |||
$('#Contact').val(data.mobile); | |||
} else { | |||
learun.alert.warning("学生不存在!"); | |||
//return false; | |||
} | |||
}); | |||
$('#ServiceType').lrDataItemSelect({ code: 'repairtype' }); | |||
@@ -104,6 +104,10 @@ var bootstrap = function ($, learun) { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status > 0) { | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
//processId = learun.newGuid(); | |||
@@ -139,8 +143,8 @@ var bootstrap = function ($, learun) { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
if (selectedRow.Status != 2) { | |||
learun.alert.warning("当前记录未处理,请稍后在试!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
@@ -195,7 +199,7 @@ var bootstrap = function ($, learun) { | |||
label: "班级", name: "TeachClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdClassInfo', | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
@@ -203,6 +207,16 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
} | |||
//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: "Contact", width: 100, align: "left"}, | |||
{ label: "报修地址", name: "Address", width: 100, align: "left"}, | |||
@@ -228,9 +242,9 @@ var bootstrap = function ($, learun) { | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-success\" >待维修</span>'; | |||
return '<span class=\"label label-danger\" >待维修</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\" >已处理</span>'; | |||
return '<span class=\"label label-warning\" >已处理</span>'; | |||
} else if (cellvalue == 3) { | |||
return '<span class=\"label label-success\" >结束报修</span>'; | |||
}else{ | |||
@@ -61,26 +61,26 @@ | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RepairReport_Student"> | |||
<div class="lr-form-item-title">处理日期</div> | |||
<input disabled id="RepairTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#RepairTime').trigger('change'); } })" /> | |||
<input id="RepairTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#RepairTime').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RepairReport_Student"> | |||
<div class="lr-form-item-title">故障原因</div> | |||
<input id="Reason" type="text" class="form-control" readonly /> | |||
<input id="Reason" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RepairReport_Student"> | |||
<div class="lr-form-item-title">耗材信息</div> | |||
<input id="Material" type="text" class="form-control" readonly /> | |||
<input id="Material" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RepairReport_Student"> | |||
<div class="lr-form-item-title">维修图片</div> | |||
<div id="RepairImg"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;"> | |||
@*<div class="col-xs-12 lr-form-item" style="padding:0;line-height:38px;text-align:center;font-size:20px;font-weight:bold;color:#333;"> | |||
<span>评价</span> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="RepairReport_Student"> | |||
<div class="lr-form-item-title">评价</div> | |||
<input id="Evaluate" type="text" class="form-control" /> | |||
</div> | |||
</div>*@ | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/RepairReportStudent/dealFormView.js") |
@@ -5,50 +5,25 @@ | |||
* 描 述:教师报修 | |||
*/ | |||
var acceptClick; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
//加载用户TeachClassNo MajorNo DeptNo | |||
$('#CreatorName')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorName').val(userinfo.realName); | |||
$('#StuNo').val(userinfo.account); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#TeachClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + userinfo.account, '', function (data) { | |||
if (data) { | |||
$('#DeptNo').lrselectSet(data.DeptNo); | |||
$('#MajorNo').lrselectSet(data.MajorNo); | |||
$('#TeachClassNo').lrselectSet(data.ClassNo); | |||
//TeachClassNo MajorNo | |||
//$('#DeptNo')[0].lrvalue = data.DeptNo; | |||
$('#Contact').val(data.mobile); | |||
} else { | |||
learun.alert.warning("学生不存在!"); | |||
//return false; | |||
} | |||
}); | |||
$('#ServiceType').lrDataItemSelect({ code: 'repairtype' }); | |||
//var RemarkUE = UE.getEditor('Remark'); | |||
//$('#Remark')[0].ue = RemarkUE; | |||
$('#FilePath').lrUploader({ isUpload: false }); | |||
$('#RepairImg').lrUploader({ isUpload: false }); | |||
$('#RepairImg').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -67,18 +67,19 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
//维修处理 | |||
$('#lr-eval').on('click', function () { | |||
$('#lr-deal').on('click', function () { | |||
console.log(123) | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
if (selectedRow.Status != 1) { | |||
learun.alert.warning("当前记录已处理!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '维修处理', | |||
url: top.$.rootUrl + '/LogisticsManagement/RepairReportStudent/FormView?keyValue=' + keyValue, | |||
url: top.$.rootUrl + '/LogisticsManagement/RepairReportStudent/dealFormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
callBack: function (id) { | |||
@@ -127,7 +128,7 @@ var bootstrap = function ($, learun) { | |||
label: "班级", name: "TeachClassNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdClassInfo', | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', | |||
key: value, | |||
keyId: 'classno', | |||
callback: function (_data) { | |||
@@ -16,14 +16,7 @@ | |||
<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_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> | |||
</div> | |||
<div class=" btn-group btn-group-sm" > | |||
<a id="lr-sub" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr-look" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||
<a id="lr-eval" class="btn btn-default"><i class="fa fa-plus"></i> 评价</a> | |||
<a id="lr-export" class="btn btn-default"><i class="fa fa-plus"></i> 导出</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -47,74 +47,6 @@ var bootstrap = function ($, learun) { | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/RepairReportStudent/Form', | |||
width: 1000, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/RepairReportStudent/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/RepairReportStudent/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr-sub').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
//processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/RepairReportStudent/ModifyStatus', { keyValue: keyValue, status: 1 }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr-look').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
@@ -134,24 +66,20 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 评价 | |||
$('#lr-eval').on('click', function () { | |||
//导出 | |||
$('#lr-export').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/RepairReportStudent/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
//if (learun.checkrow(keyValue)) { | |||
// learun.layerForm({ | |||
// id: 'formview', | |||
// title: '查看', | |||
// url: top.$.rootUrl + '/LogisticsManagement/RepairReportStudent/FormView?keyValue=' + keyValue, | |||
// width: 1000, | |||
// height: 600, | |||
// btn: null | |||
// }); | |||
//} | |||
}); | |||
}, | |||
// 初始化列表 | |||
@@ -5,37 +5,16 @@ | |||
* 描 述:教师报修 | |||
*/ | |||
var acceptClick; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DeptNo')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DeptNo').val(_data.name); | |||
//$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorName')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorName').val(userinfo.realName); | |||
$('#Contact').val(userinfo.mobile); | |||
$('#TeachNo').val(userinfo.account); | |||
$('#ServiceType').lrDataItemSelect({ code: 'repairtype' }); | |||
//var RemarkUE = UE.getEditor('Remark'); | |||
//$('#Remark')[0].ue = RemarkUE; | |||
@@ -5,37 +5,16 @@ | |||
* 描 述:教师报修 | |||
*/ | |||
var acceptClick; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DeptNo')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DeptNo').val(_data.name); | |||
//$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorName')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorName').val(userinfo.realName); | |||
$('#Contact').val(userinfo.mobile); | |||
$('#TeachNo').val(userinfo.account); | |||
$('#ServiceType').lrDataItemSelect({ code: 'repairtype' }); | |||
//var RemarkUE = UE.getEditor('Remark'); | |||
//$('#Remark')[0].ue = RemarkUE; | |||
@@ -104,6 +104,11 @@ var bootstrap = function ($, learun) { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status > 0) { | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
//processId = learun.newGuid(); | |||
@@ -5,37 +5,16 @@ | |||
* 描 述:教师报修 | |||
*/ | |||
var acceptClick; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DeptNo')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DeptNo').val(_data.name); | |||
//$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorName')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorName').val(userinfo.realName); | |||
$('#Contact').val(userinfo.mobile); | |||
$('#TeachNo').val(userinfo.account); | |||
$('#ServiceType').lrDataItemSelect({ code: 'repairtype' }); | |||
//var RemarkUE = UE.getEditor('Remark'); | |||
//$('#Remark')[0].ue = RemarkUE; | |||
@@ -66,13 +66,13 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 评价 | |||
//维修处理 | |||
$('#lr-deal').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
if (selectedRow.Status != 1) { | |||
learun.alert.warning("当前记录已处理!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
@@ -16,14 +16,7 @@ | |||
<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_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> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr-sub" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr-look" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | |||
<a id="lr-eval" class="btn btn-default"><i class="fa fa-plus"></i> 评价</a> | |||
<a id="lr-export" class="btn btn-default"><i class="fa fa-plus"></i> 导出</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -47,74 +47,6 @@ var bootstrap = function ($, learun) { | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/RepairReportTeacher/Form', | |||
width: 1000, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/RepairReportTeacher/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 500, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/RepairReportTeacher/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr-sub').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
//processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/RepairReportTeacher/ModifyStatus', { keyValue: keyValue, status: 1 }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr-look').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
@@ -134,24 +66,20 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 评价 | |||
$('#lr-eval').on('click', function () { | |||
//导出 | |||
$('#lr-export').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/RepairReportTeacher/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
//if (learun.checkrow(keyValue)) { | |||
// learun.layerForm({ | |||
// id: 'formview', | |||
// title: '查看', | |||
// url: top.$.rootUrl + '/LogisticsManagement/RepairReportTeacher/FormView?keyValue=' + keyValue, | |||
// width: 1000, | |||
// height: 600, | |||
// btn: null | |||
// }); | |||
//} | |||
}); | |||
}, | |||
// 初始化列表 | |||
@@ -95,9 +95,15 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
try | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
string sql = "select count(1) from MessageRemind where ReadSigns=0 "; | |||
sql += $" and ReceiptId='{userInfo.userId}'"; | |||
//string dbname = this.BaseRepository("CollegeMIS").getDbConnection().Database; | |||
//select count(1) from MessageRemind a left join CollegeMIS_塔里木.dbo.repairreport_teacher b on b.id=a.instanceid where a.ReadSigns=0 and a.ReceiptId='e2cc4d6e-3efe-46fa-8e1a-9bb084fe71bf' or (b.Status=1) | |||
string sql = "select count(1) from MessageRemind "; | |||
sql += $" where ReadSigns=0 "; | |||
sql += $" and ReceiptId='{userInfo.userId}'"; | |||
var obj = this.BaseRepository().FindObject(sql); | |||
if (obj != null && Convert.ToInt32(obj) > 0) | |||
@@ -277,7 +283,48 @@ where t.IsRead = 0 and [Description] = '学生' and a.[state] = 7 and t.Account | |||
try | |||
{ | |||
string sql = $"update MessageRemind set ReadSigns=1 where MessageId='{keyValue}'"; | |||
this.BaseRepository().ExecuteBySql(sql); | |||
//如果没有处理那么一直是未读 | |||
//获取对应的维修数据,判断是否已处理 | |||
var model = this.BaseRepository().FindEntity<MessageRemindEntity>(keyValue); | |||
string status = ""; | |||
if (model.TheTitle=="维修通知") | |||
{ | |||
if (model.ConnectionUrl.Contains("RepairReportStudent")) | |||
{ | |||
var obj = this.BaseRepository("CollegeMIS").FindObject("select status from repairreport_student where id='" + model.InstanceId + "'"); | |||
status = obj.ToString(); | |||
} | |||
if (model.ConnectionUrl.Contains("RepairReportTeacher")) | |||
{ | |||
var obj = this.BaseRepository("CollegeMIS").FindObject("select status from repairreport_teacher where id='" + model.InstanceId + "'"); | |||
status = obj.ToString(); | |||
} | |||
if (status == "2") | |||
{ | |||
this.BaseRepository().ExecuteBySql(sql); | |||
} | |||
} | |||
else if (model.TheTitle == "评价通知") | |||
{ | |||
if (model.ConnectionUrl.Contains("RepairReportStudent")) | |||
{ | |||
var obj = this.BaseRepository("CollegeMIS").FindObject("select status from repairreport_student where id='" + model.InstanceId + "'"); | |||
status = obj.ToString(); | |||
} | |||
if (model.ConnectionUrl.Contains("RepairReportTeacher")) | |||
{ | |||
var obj = this.BaseRepository("CollegeMIS").FindObject("select status from repairreport_teacher where id='" + model.InstanceId + "'"); | |||
status = obj.ToString(); | |||
} | |||
if (status == "3") | |||
{ | |||
this.BaseRepository().ExecuteBySql(sql); | |||
} | |||
} | |||
else | |||
{ | |||
this.BaseRepository().ExecuteBySql(sql); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -300,8 +347,43 @@ where t.IsRead = 0 and [Description] = '学生' and a.[state] = 7 and t.Account | |||
{ | |||
try | |||
{ | |||
string sql = $"update MessageRemind set ReadSigns=1 where ReceiptId='{userId}' and ReadSigns<>1 "; | |||
#region 报修待处理 | |||
//查询维修通告中没有处理的id | |||
//教师报修 | |||
string t_repairsql = "select id from repairreport_teacher where status=1"; | |||
var obj_t = this.BaseRepository("CollegeMIS").FindList<string>(t_repairsql); | |||
//学生报修 | |||
string s_repairsql = "select id from repairreport_student where status=1"; | |||
var obj_s = this.BaseRepository("CollegeMIS").FindList<string>(s_repairsql); | |||
string ids = string.Join(",", obj_t.Union(obj_s)); | |||
#endregion | |||
#region 报修待评价 | |||
//查询维修通告中没有处理的id | |||
//教师报修 | |||
string t_repairsql_e = "select id from repairreport_teacher where status=2"; | |||
var obj_t_e = this.BaseRepository("CollegeMIS").FindList<string>(t_repairsql_e); | |||
//学生报修 | |||
string s_repairsql_e = "select id from repairreport_student where status=2"; | |||
var obj_s_e = this.BaseRepository("CollegeMIS").FindList<string>(s_repairsql_e); | |||
string ids_e = string.Join(",", obj_t_e.Union(obj_s_e)); | |||
#endregion | |||
//排除报修未处理的数据 | |||
string sql = $"update MessageRemind set ReadSigns=1 where ReceiptId='{userId}' and ReadSigns<>1"; | |||
this.BaseRepository().ExecuteBySql(sql); | |||
if (!ids.IsEmpty()) | |||
{ | |||
//把未处理的状态改回来 | |||
string sql_do = $"update MessageRemind set ReadSigns=0 where ReceiptId='{userId}' and ReadSigns<>0 and instanceid in ('" + ids.Replace(",", "','") + "') and TheTitle='维修通知'"; | |||
this.BaseRepository().ExecuteBySql(sql_do); | |||
} | |||
if (!ids_e.IsEmpty()) | |||
{ | |||
//把未评价的状态改回来 | |||
string sql_e = $"update MessageRemind set ReadSigns=0 where ReceiptId='{userId}' and ReadSigns<>0 and instanceid in ('" + ids_e.Replace(",", "','") + "') and TheTitle='评价通知'"; | |||
this.BaseRepository().ExecuteBySql(sql_e); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -144,6 +144,20 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
if (entity.Status == 2) | |||
{ | |||
//条件userid,instanceid, | |||
//指定的通知状态改为已读 | |||
string sql = $"update MessageRemind set ReadSigns=1 where instanceid='{keyValue}' and thetitle='维修通知'"; | |||
this.BaseRepository().ExecuteBySql(sql); | |||
} | |||
if (entity.Status == 3) | |||
{ | |||
//条件userid,instanceid, | |||
//指定的通知状态改为已读 | |||
string sql = $"update MessageRemind set ReadSigns=1 where instanceid='{keyValue}' and thetitle='评价通知'"; | |||
this.BaseRepository().ExecuteBySql(sql); | |||
} | |||
} | |||
else | |||
{ | |||
@@ -134,6 +134,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
try | |||
{ | |||
repairReportTeacherService.ModifyStatus(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -147,6 +147,20 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
if (entity.Status == 2) | |||
{ | |||
//条件userid,instanceid, | |||
//指定的通知状态改为已读 | |||
string sql = $"update MessageRemind set ReadSigns=1 where instanceid='{keyValue}' and thetitle='维修通知'"; | |||
this.BaseRepository().ExecuteBySql(sql); | |||
} | |||
if (entity.Status == 3) | |||
{ | |||
//条件userid,instanceid, | |||
//指定的通知状态改为已读 | |||
string sql = $"update MessageRemind set ReadSigns=1 where instanceid='{keyValue}' and thetitle='评价通知'"; | |||
this.BaseRepository().ExecuteBySql(sql); | |||
} | |||
} | |||
else | |||
{ | |||