@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) { | |||||
$('#AIUsePeople').lrselectRefresh({ url: top.$.rootUrl +'/LR_OrganizationModule/User/GetListByDepartmentId?departmentId='+val.value,text:'F_RealName',value:'F_UserId'}) | $('#AIUsePeople').lrselectRefresh({ url: top.$.rootUrl +'/LR_OrganizationModule/User/GetListByDepartmentId?departmentId='+val.value,text:'F_RealName',value:'F_UserId'}) | ||||
}}); | }}); | ||||
$('#AIUsePeople').lrselect({ text: 'F_RealName', value:'F_UserId'}); | |||||
$('#AIUsePeople').lrselect({ allowSearch:true, text: 'F_RealName', value:'F_UserId'}); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -153,6 +153,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
} | } | ||||
return Success("操作成功!"); | return Success("操作成功!"); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -185,6 +185,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
return Success("删除成功!"); | return Success("删除成功!"); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 设置批示状态为已处理 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult DisPose(string keyValue) | |||||
{ | |||||
sys_ReceiveFileIBLL.DisPose(keyValue); | |||||
return Success("操作成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | /// 保存实体数据(新增、修改) | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
/// <summary> | /// <summary> | ||||
@@ -230,6 +242,38 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | ||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 主任批示 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult ZhuRenP(string strEntity) | |||||
{ | |||||
Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>(); | |||||
//entity.SpecifyReceiver = sys_ReceiveFileIBLL.ZhuRenP(); | |||||
entity.SpecifyReceiver = "System"; | |||||
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | |||||
return Success("发送成功"); | |||||
} | |||||
/// <summary> | |||||
/// 校长批示 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult XiaoZhangP(string strEntity) | |||||
{ | |||||
Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>(); | |||||
//entity.SpecifyReceiver = sys_ReceiveFileIBLL.XiaoZhangP(); | |||||
entity.SpecifyReceiver = "System"; | |||||
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | |||||
return Success("发送成功"); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 查看实体数据 | /// 查看实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -357,9 +357,9 @@ var bootstrap = function ($, learun) { | |||||
learun.clientdata.getAsync('custmerData', { | learun.clientdata.getAsync('custmerData', { | ||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | ||||
key: value, | key: value, | ||||
keyId: 'f_departmentid', | |||||
keyId: 'id', | |||||
callback: function (_data) { | callback: function (_data) { | ||||
callback(_data['f_fullname']); | |||||
callback(_data['name']); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
@@ -31,15 +31,17 @@ | |||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
<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_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_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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||||
@*<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a>*@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" > | <div class=" btn-group btn-group-sm" > | ||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i> 查看</a> | <a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i> 查看</a> | ||||
<a id="lr_IssueSpecifyReceiver" class="btn btn-default"><i class="fa fa-envelope"></i> 下发</a> | |||||
<a id="lr_IssueSpecifyReceiver1" class="btn btn-default"><i class="fa fa-envelope"></i> 校办主任阅签</a> | |||||
<a id="lr_IssueSpecifyReceiver2" class="btn btn-default"><i class="fa fa-envelope"></i> 校长书记批办</a> | |||||
<a id="lr_IssueSpecifyReceiver" class="btn btn-default"><i class="fa fa-envelope"></i> 部门签字办理</a> | |||||
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i> 结束下发</a> | <a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i> 结束下发</a> | ||||
<a id="lr_read" class="btn btn-default"><i class="fa fa-calendar-minus-o"></i> 查阅情况</a> | <a id="lr_read" class="btn btn-default"><i class="fa fa-calendar-minus-o"></i> 查阅情况</a> | ||||
</div> | </div> | ||||
@@ -51,11 +51,6 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('RID'); | var keyValue = $('#gridtable').jfGridValue('RID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||||
if (SendFlag != 0) { | |||||
learun.alert.warning("当前项目已提交不能编辑!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | learun.layerForm({ | ||||
id: 'form', | id: 'form', | ||||
title: '编辑', | title: '编辑', | ||||
@@ -116,25 +111,68 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
// 提交 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||||
if (SendFlag != 0) { | |||||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||||
return; | |||||
//// 提交 | |||||
//$('#lr_submit').on('click', function () { | |||||
// var keyValue = $('#gridtable').jfGridValue('RID'); | |||||
// if (learun.checkrow(keyValue)) { | |||||
// var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||||
// if (SendFlag != 0) { | |||||
// learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||||
// return; | |||||
// } | |||||
// learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
// if (res) { | |||||
// processId = learun.newGuid(); | |||||
// learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | |||||
// refreshGirdData(res, {}); | |||||
// }); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}); | |||||
//校办主任阅签 | |||||
$('#lr_IssueSpecifyReceiver1').on('click', | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认请校办主任阅签!', function (res) { | |||||
if (res) { | |||||
var formData = {}; | |||||
formData.RFileId = ''; | |||||
formData.SFileId = keyValue; | |||||
var postData = { | |||||
strEntity: JSON.stringify(formData) | |||||
}; | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/ZhuRenP', postData, function (res) { | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | } | ||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}); | |||||
//校长书记批办 | |||||
$('#lr_IssueSpecifyReceiver2').on('click', | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认请校校长书记批办!', function (res) { | |||||
if (res) { | |||||
var formData = {}; | |||||
formData.RFileId = ''; | |||||
formData.SFileId = keyValue; | |||||
var postData = { | |||||
strEntity: JSON.stringify(formData) | |||||
}; | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/XiaoZhangP', postData, function (res) { | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 下发审批指定接收人 | // 下发审批指定接收人 | ||||
$('#lr_IssueSpecifyReceiver').on('click', function () { | $('#lr_IssueSpecifyReceiver').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('RID'); | var keyValue = $('#gridtable').jfGridValue('RID'); | ||||
@@ -164,12 +202,6 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_OverIssue').on('click', function () { | $('#lr_OverIssue').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('RID'); | var keyValue = $('#gridtable').jfGridValue('RID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||||
console.log(SendFlag); | |||||
if (SendFlag !== '2') { | |||||
learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否结束下发!', function (res) { | learun.layerConfirm('是否结束下发!', function (res) { | ||||
if (res) { | if (res) { | ||||
processId = learun.newGuid(); | processId = learun.newGuid(); | ||||
@@ -197,7 +229,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ | { | ||||
@@ -212,6 +244,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "接收时间", name: "RReceiveTime", width: 100, align: "left" }, | |||||
{ label: "来文单位", name: "RSourceUnit", width: 100, align: "left" }, | { label: "来文单位", name: "RSourceUnit", width: 100, align: "left" }, | ||||
{ | { | ||||
label: "收文单位", name: "RReceiveUnit", width: 100, align: "left", | label: "收文单位", name: "RReceiveUnit", width: 100, align: "left", | ||||
@@ -261,22 +294,28 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ label: "审批意见", name: "SpecifyReceiver", width: 300, align: "left" }, | |||||
{ | { | ||||
label: "状态", name: "RSendFlag", width: 100, align: "left", | label: "状态", name: "RSendFlag", width: 100, align: "left", | ||||
formatter: function (cellvalue, row) { | formatter: function (cellvalue, row) { | ||||
if (cellvalue === "1") { | if (cellvalue === "1") { | ||||
return '<span class=\"label label-warning\">审批中</span>'; | |||||
} else if (cellvalue === "2") { | |||||
return '<span class=\"label label-info\">审批通过</span>'; | |||||
} else if (cellvalue === "3") { | |||||
return '<span class=\"label label-danger\" >审批失败</span>'; | |||||
return '<span class=\"label label-warning\">已下发</span>'; | |||||
} else if (cellvalue === "4") { | } else if (cellvalue === "4") { | ||||
return '<span class=\"label label-success\" >下发完毕</span>'; | return '<span class=\"label label-success\" >下发完毕</span>'; | ||||
} else { | } else { | ||||
return '<span class=\"label label-default\" >草稿</span>'; | return '<span class=\"label label-default\" >草稿</span>'; | ||||
} | } | ||||
} | } | ||||
}, | |||||
{ | |||||
label: "是否需要处理", name: "HasDispose", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
console.log(cellvalue); | |||||
if (cellvalue == "1") { | |||||
return '<span class=\"label label-warning\">需要处理</span>'; | |||||
} else { | |||||
return '<span class=\"label label-success\" >无需处理</span>'; | |||||
} | |||||
} | |||||
} | } | ||||
], | ], | ||||
mainId: 'RID', | mainId: 'RID', | ||||
@@ -17,7 +17,7 @@ | |||||
<div class="lr-layout-tool-right"> | <div class="lr-layout-tool-right"> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
<a id="lr_Issue" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 下发</a> | |||||
<a id="lr_dispose" class="btn btn-default"><i class="fa fa-imdb"></i> 已处理</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -25,39 +25,21 @@ var bootstrap = function ($, learun) { | |||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
$('#lr_Issue').on('click', | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||||
var rFileId = $('#gridtable').jfGridValue('RFileId'); | |||||
var specifyReceiver = $('#gridtable').jfGridValue('SpecifyReceiver'); | |||||
if (learun.checkrow(rFileId)) { | |||||
var SendStatus = $('#gridtable').jfGridValue('SendStatus'); | |||||
if (SendStatus) { | |||||
learun.alert.warning("已下发!"); | |||||
return; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'formIssue', | |||||
title: '下发', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/IssueForm?keyValue=' + keyValue + '&rFileId=' + rFileId + '&specifyReceiver=' + specifyReceiver, | |||||
width: 500, | |||||
height: 500, | |||||
callBack: function (id) { | |||||
var res = false; | |||||
// 验证数据 | |||||
res = top[id].validForm(); | |||||
// 保存数据 | |||||
if (res) { | |||||
res = top[id].save('', function () { | |||||
page.search(); | |||||
}); | |||||
} | |||||
return res; | |||||
//已处理 | |||||
$('#lr_dispose').on('click', | |||||
function() { | |||||
var sendId = $('#gridtable').jfGridValue('RFileId'); | |||||
if (learun.checkrow(sendId)) { | |||||
learun.layerConfirm('是否确认此批示已处理!', function (res) { | |||||
if (res) { | |||||
learun.getForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/DisPose?keyValue='+sendId, function () { | |||||
page.search(); | |||||
}); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -67,33 +49,10 @@ var bootstrap = function ($, learun) { | |||||
{ | { | ||||
label: "接收人", name: "Receiver", width: 150, align: "left" | label: "接收人", name: "Receiver", width: 150, align: "left" | ||||
}, | }, | ||||
{ label: "签批意见", name: "SpecifyReceiver", width: 300, align: "left" }, | |||||
{ | { | ||||
label: "查阅时间", name: "ReadTime", width: 150, align: "left" | label: "查阅时间", name: "ReadTime", width: 150, align: "left" | ||||
}, | }, | ||||
{ | |||||
label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync: | |||||
function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('user', | |||||
{ | |||||
key: value, | |||||
callback: function (_data) { | |||||
if (_data.length > 0) { | |||||
var text = ''; | |||||
$.each(_data, | |||||
function (i, item) { | |||||
if (item) { | |||||
text += item.name + ','; | |||||
} | |||||
}); | |||||
text = text.substring(0, text.lastIndexOf(',')); | |||||
callback(text); | |||||
} else { | |||||
callback(_data.name); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: "状态", name: "ReadFlag", width: 100, align: "left", | label: "状态", name: "ReadFlag", width: 100, align: "left", | ||||
formatter: function (cellvalue, row) { | formatter: function (cellvalue, row) { | ||||
@@ -105,20 +64,25 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
label: "下发状态", name: "SendStatus", width: 100, align: "left", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue === true) { | |||||
return '<span class=\"label label-success\">已下发</span>'; | |||||
} else { | |||||
return '<span class=\"label label-warning\">未下发</span>'; | |||||
label: "处理状态", name: "RStatus", width: 100, align: "left", | |||||
formatter: function (callback, value, row, op, $cell) { | |||||
console.log(callback); | |||||
switch (callback) { | |||||
case 0: | |||||
return '<span class=\"label label-warning\">未处理</span>'; | |||||
case 1: | |||||
return '<span class=\"label label-success\">已处理</span>';; | |||||
default: | |||||
return '<span class=\"label label-success\">无需处理</span>'; | |||||
} | } | ||||
} | } | ||||
} | |||||
}, | |||||
], | ], | ||||
mainId: 'RFileId', | mainId: 'RFileId', | ||||
isPage: true, | isPage: true, | ||||
sidx: 'ReadFlag,ReadTime', | sidx: 'ReadFlag,ReadTime', | ||||
sord: 'ASC' | |||||
sord: 'DASC' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
@@ -23,5 +23,13 @@ | |||||
<div class="lr-form-item-title">内容</div> | <div class="lr-form-item-title">内容</div> | ||||
<div id="Contents" style="margin-top:6px;"></div> | <div id="Contents" style="margin-top:6px;"></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile"> | |||||
<div class="lr-form-item-title">批示</div> | |||||
<textarea id="SpecifyReceiver" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile"> | |||||
<div class="lr-form-item-title">通知管理员</div> | |||||
<div id="RStatus"></div> | |||||
</div> | |||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js") |
@@ -22,6 +22,11 @@ var bootstrap = function ($, learun) { | |||||
layerUrlH: 300, | layerUrlH: 300, | ||||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | ||||
}); | }); | ||||
$('#RStatus').lrRadioCheckbox({data:[{text:'通知',value:0},{text:'不通知',value:1}],text:'text',value:'value' | |||||
}); | |||||
$('#SendType').lrDataItemSelect({ code: 'FileSendType' }); | $('#SendType').lrDataItemSelect({ code: 'FileSendType' }); | ||||
if (selectedRow.ReadFlag == true) {//已读 | if (selectedRow.ReadFlag == true) {//已读 | ||||
$('#Url').lrUploader(); | $('#Url').lrUploader(); | ||||
@@ -27,7 +27,7 @@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_Read" class="btn btn-default"><i class="fa fa-plus"></i> 查阅</a> | <a id="lr_Read" class="btn btn-default"><i class="fa fa-plus"></i> 查阅</a> | ||||
<a id="lr_SpecifyReceiver" class="btn btn-default"><i class="fa fa-plus"></i> 指定接收人</a> | |||||
@*<a id="lr_SpecifyReceiver" class="btn btn-default"><i class="fa fa-plus"></i> 指定接收人</a>*@ | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -79,22 +79,22 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 指定接收人 | |||||
$('#lr_SpecifyReceiver').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('RFileId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'formSys_ReceiveFile', | |||||
title: '指定接收人', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//// 指定接收人 | |||||
//$('#lr_SpecifyReceiver').on('click', function () { | |||||
// var keyValue = $('#gridtable').jfGridValue('RFileId'); | |||||
// if (learun.checkrow(keyValue)) { | |||||
// learun.layerForm({ | |||||
// id: 'formSys_ReceiveFile', | |||||
// title: '指定接收人', | |||||
// url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue, | |||||
// width: 600, | |||||
// height: 400, | |||||
// callBack: function (id) { | |||||
// return top[id].acceptClick(refreshGirdData); | |||||
// } | |||||
// }); | |||||
// } | |||||
//}); | |||||
// 删除 | // 删除 | ||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('RFileId'); | var keyValue = $('#gridtable').jfGridValue('RFileId'); | ||||
@@ -118,32 +118,28 @@ var bootstrap = function ($, learun) { | |||||
var keyValue = $('#gridtable').jfGridValue('RFileId'); | var keyValue = $('#gridtable').jfGridValue('RFileId'); | ||||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | selectedRow = $('#gridtable').jfGridGet('rowdata'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
top.layer.open({ | |||||
//判断查阅状态 | |||||
if (selectedRow.ReadFlag == false) { | |||||
//判断附件 | |||||
//if (selectedRow.Url == null || selectedRow.Url == "") { | |||||
//自动已读 | |||||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
//} | |||||
} | |||||
learun.layerForm({ | |||||
id: 'formSys_ReceiveFile', | id: 'formSys_ReceiveFile', | ||||
type: 2, | |||||
title: '查看', | title: '查看', | ||||
area: ['1000px', '600px'], | |||||
btn: null, | |||||
content: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue, | |||||
skin: 'lr-layer-nobtn', | |||||
success: function (layero, index) { | |||||
top['formSys_ReceiveFile'] = learun.iframe($(layero).find('iframe').attr('id'), top.frames); | |||||
//判断查阅状态 | |||||
if (selectedRow.ReadFlag == false) { | |||||
//判断附件 | |||||
//if (selectedRow.Url == null || selectedRow.Url == "") { | |||||
//自动已读 | |||||
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
//} | |||||
} | |||||
}, | |||||
end: function () { | |||||
top['formSys_ReceiveFile'] = null; | |||||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 600, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
@@ -162,43 +158,12 @@ var bootstrap = function ($, learun) { | |||||
callback(_data.name); | callback(_data.name); | ||||
} | } | ||||
}); | }); | ||||
}}, | |||||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||||
{ label: "发送时间", name: "SendTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "接收对象", name: "SendType", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'FileSendType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | } | ||||
}, | }, | ||||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||||
{ label: "发送时间", name: "SendTime", width: 130, align: "left" }, | |||||
{ | { | ||||
label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync: | |||||
function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('user', | |||||
{ | |||||
key: value, | |||||
callback: function (_data) { | |||||
if (_data.length > 0) { | |||||
var text = ''; | |||||
$.each(_data, | |||||
function (i, item) { | |||||
if (item) { | |||||
text += item.name + ','; | |||||
} | |||||
}); | |||||
text = text.substring(0, text.lastIndexOf(',')); | |||||
callback(text); | |||||
} else { | |||||
callback(_data.name); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
label: "签批意见", name: "SpecifyReceiver", width: 300, align: "left" | |||||
}, | }, | ||||
{ | { | ||||
label: "状态", name: "ReadFlag", width: 100, align: "left", | label: "状态", name: "ReadFlag", width: 100, align: "left", | ||||
@@ -210,6 +175,19 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "是否通知管理员", name: "RStatus", width: 100, align: "left", | |||||
formatter: function (callback, value, row, op, $cell) { | |||||
switch (callback) { | |||||
case 1: | |||||
return '不通知'; | |||||
case 0: | |||||
return '通知'; | |||||
default: | |||||
} | |||||
} | |||||
}, | |||||
{ label: "查阅时间", name: "ReadTime", width: 130, align: "left" }, | { label: "查阅时间", name: "ReadTime", width: 130, align: "left" }, | ||||
], | ], | ||||
mainId: 'RFileId', | mainId: 'RFileId', | ||||
@@ -189,6 +189,12 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||||
dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("MMM", strSql.ToString()); | dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("MMM", strSql.ToString()); | ||||
} | } | ||||
if (dtListEntity.F_Name.Contains("公文接收")) | |||||
{ | |||||
dtListEntity.F_Sql = | |||||
"SELECT Title as f_title,SendTime as f_time FROM dbo.Sys_ReceiveFile WHERE DelFlag=0 AND ReadFlag<>1 AND ReceiverId='" + | |||||
loginUserInfo.userId + "'"; | |||||
} | |||||
var reqDataTable = databaseLinkIbll.FindTable(dtListEntity.F_DataSourceId.Trim(), dtListEntity.F_Sql); | var reqDataTable = databaseLinkIbll.FindTable(dtListEntity.F_DataSourceId.Trim(), dtListEntity.F_Sql); | ||||
if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587") | if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587") | ||||
@@ -18,8 +18,8 @@ | |||||
<input id="F_ReleaseTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" /> | <input id="F_ReleaseTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" /> | ||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | <div class="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">信息来源</div> | |||||
<input id="F_SourceName" type="text" class="form-control" /> | |||||
<div class="lr-form-item-title">信息来源<font face="宋体">*</font></div> | |||||
<input id="F_SourceName" type="text" isvalid="yes" checkexpession="NotNull" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-6 lr-form-item"> | <div class="col-xs-6 lr-form-item"> | ||||
<div class="lr-form-item-title">来源地址</div> | <div class="lr-form-item-title">来源地址</div> | ||||
@@ -75,7 +75,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 查看 | // 查看 | ||||
$('#lr_view').on('click', function () { | $('#lr_view').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||||
var keyValue = $('#gridtable').jfGridValue('F_NewsId'); | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
if (keyValue.indexOf(",") != -1) { | if (keyValue.indexOf(",") != -1) { | ||||
learun.alert.warning("只能选择一条记录查看!"); | learun.alert.warning("只能选择一条记录查看!"); | ||||
@@ -168,7 +168,8 @@ namespace Learun.Application.Web.Controllers | |||||
var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); | var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); | ||||
ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); | ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); | ||||
paginationobj.sidx = "SendTime"; | paginationobj.sidx = "SendTime"; | ||||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); | |||||
//ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Where(a => a.STypeId == 1).Count(); | |||||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId); | |||||
return View(); | return View(); | ||||
} | } | ||||
@@ -476,7 +477,7 @@ namespace Learun.Application.Web.Controllers | |||||
var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); | var readnewslist = newsIBLL.GetList("", userinfo.userId).Where(m => !string.IsNullOrEmpty(m.RNewsId)).Select(m => m.F_NewsId); | ||||
ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); | ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId)); | ||||
paginationobj.sidx = "SendTime"; | paginationobj.sidx = "SendTime"; | ||||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListByUserId(paginationobj, "{}", userinfo.userId).Count(); | |||||
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count(); | |||||
ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail; | ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail; | ||||
#endregion | #endregion | ||||
@@ -624,8 +624,8 @@ var bootstrap = function ($, learun) { | |||||
learun.frameTab.open({ | learun.frameTab.open({ | ||||
F_ModuleId: '104', | F_ModuleId: '104', | ||||
F_Icon: 'fa fa-user', | F_Icon: 'fa fa-user', | ||||
F_FullName: '公文查阅', | |||||
F_UrlAddress: '/EducationalAdministration/Sys_ReceiveFile/Index' | |||||
F_FullName: '公文接收', | |||||
F_UrlAddress: '/EducationalAdministration/Sys_ReceiveDocument/Index' | |||||
}); | }); | ||||
}); | }); | ||||
@@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("RRECEIVEUNIT")] | [Column("RRECEIVEUNIT")] | ||||
public string RReceiveUnit { get; set; } | public string RReceiveUnit { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 接收时间 | |||||
/// </summary> | |||||
[Column("RRECEIVETIME")] | |||||
public DateTime? RReceiveTime { get; set; } | |||||
/// <summary> | |||||
/// 缓急程度 | /// 缓急程度 | ||||
/// </summary> | /// </summary> | ||||
[Column("RURGENCYDEGREE")] | [Column("RURGENCYDEGREE")] | ||||
@@ -79,6 +84,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// </summary> | /// </summary> | ||||
[Column("SENDERID")] | [Column("SENDERID")] | ||||
public string SenderId { get; set; } | public string SenderId { get; set; } | ||||
/// <summary> | |||||
/// 需要处理 | |||||
/// </summary> | |||||
[NotMapped] | |||||
[Column("HasDispose")] | |||||
public int? HasDispose { get; set; } | |||||
#endregion | #endregion | ||||
#region 扩展操作 | #region 扩展操作 | ||||
@@ -90,6 +101,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var loginUser = LoginUserInfo.Get(); | var loginUser = LoginUserInfo.Get(); | ||||
this.RID = Guid.NewGuid().ToString(); | this.RID = Guid.NewGuid().ToString(); | ||||
this.SenderId = loginUser.userId; | this.SenderId = loginUser.userId; | ||||
this.RReceiveTime = DateTime.Now; | |||||
this.RSendFlag = "0"; | this.RSendFlag = "0"; | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -4,6 +4,7 @@ using Learun.Util; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Data; | using System.Data; | ||||
using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | namespace Learun.Application.TwoDevelopment.EducationalAdministration | ||||
@@ -42,6 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
t.SpecifyReceiver, | t.SpecifyReceiver, | ||||
t.RContent, | t.RContent, | ||||
t.RSendFlag, | t.RSendFlag, | ||||
t.RReceiveTime, | |||||
t.RProcessId | t.RProcessId | ||||
"); | "); | ||||
strSql.Append(" FROM Sys_ReceiveDocument t "); | strSql.Append(" FROM Sys_ReceiveDocument t "); | ||||
@@ -64,7 +66,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("RTitle", "%" + queryParam["RTitle"].ToString() + "%", DbType.String); | dp.Add("RTitle", "%" + queryParam["RTitle"].ToString() + "%", DbType.String); | ||||
strSql.Append(" AND t.RTitle Like @RTitle "); | strSql.Append(" AND t.RTitle Like @RTitle "); | ||||
} | } | ||||
return this.BaseRepository().FindList<Sys_ReceiveDocumentEntity>(strSql.ToString(), dp, pagination); | |||||
var list= this.BaseRepository().FindList<Sys_ReceiveDocumentEntity>(strSql.ToString(), dp, pagination); | |||||
foreach (var item in list) | |||||
{ | |||||
if(!item.RSendFlag.Equals("4")) | |||||
{ | |||||
var listentity=this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SFileId == item.RID).Count(); | |||||
if(listentity>0) | |||||
{ | |||||
item.HasDispose = 1; | |||||
} | |||||
else | |||||
{ | |||||
item.HasDispose = 0; | |||||
} | |||||
} | |||||
} | |||||
return list; | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -90,6 +90,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySenderId(string senderId) | |||||
{ | |||||
try | |||||
{ | |||||
return sys_ReceiveFileService.GetPageListBySenderId(senderId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取Sys_ReceiveFile表实体数据 | /// 获取Sys_ReceiveFile表实体数据 | ||||
@@ -214,6 +232,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void DisPose(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
sys_ReceiveFileService.DisPose(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 查看实体数据 | /// 查看实体数据 | ||||
@@ -276,6 +312,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public string ZhuRenP() | |||||
{ | |||||
try | |||||
{ | |||||
return sys_ReceiveFileService.ZhuRenP(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public string XiaoZhangP() | |||||
{ | |||||
try | |||||
{ | |||||
return sys_ReceiveFileService.XiaoZhangP(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -90,6 +90,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("DELFLAG")] | [Column("DELFLAG")] | ||||
public bool? DelFlag { get; set; } | public bool? DelFlag { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 管理员是否已经处理 | |||||
/// </summary> | |||||
[Column("RSTATUS")] | |||||
public int? RStatus { get; set; } | |||||
/// <summary> | |||||
/// 查阅时间 | /// 查阅时间 | ||||
/// </summary> | /// </summary> | ||||
[Column("READTIME")] | [Column("READTIME")] | ||||
@@ -40,6 +40,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <param name="userId">用户编号</param> | /// <param name="userId">用户编号</param> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
IEnumerable<Sys_ReceiveFileEntity> GetPageListByUserId(Pagination pagination, string queryJson, string userId); | IEnumerable<Sys_ReceiveFileEntity> GetPageListByUserId(Pagination pagination, string queryJson, string userId); | ||||
IEnumerable<Sys_ReceiveFileEntity> GetPageListBySenderId(string senderId); | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -68,6 +69,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void VirtualDeleteEntity(string keyValue); | void VirtualDeleteEntity(string keyValue); | ||||
void DisPose(string keyValue); | |||||
/// <summary> | /// <summary> | ||||
/// 查看实体数据 | /// 查看实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -79,5 +81,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
void Issue(Sys_IssueEntity entity); | void Issue(Sys_IssueEntity entity); | ||||
void ReceiveDocumentIssue(Sys_IssueEntity entity); | void ReceiveDocumentIssue(Sys_IssueEntity entity); | ||||
string ZhuRenP(); | |||||
string XiaoZhangP(); | |||||
} | } | ||||
} | } |
@@ -9,6 +9,7 @@ using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using System.Web; | using System.Web; | ||||
using Learun.Application.Base.AuthorizeModule; | |||||
using Learun.Application.Organization; | using Learun.Application.Organization; | ||||
using Learun.Application.TwoDevelopment.LR_Desktop; | using Learun.Application.TwoDevelopment.LR_Desktop; | ||||
using Microsoft.AspNet.SignalR.Client; | using Microsoft.AspNet.SignalR.Client; | ||||
@@ -139,6 +140,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySenderId(string userId) | |||||
{ | |||||
try | |||||
{ | |||||
var list = this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SenderId == userId && a.RStatus==0); | |||||
return list; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
@@ -245,6 +265,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
oldentity.ReplyFlag = true; | oldentity.ReplyFlag = true; | ||||
oldentity.ReplyTime = DateTime.Now; | oldentity.ReplyTime = DateTime.Now; | ||||
oldentity.SpecifyReceiver = entity.SpecifyReceiver; | oldentity.SpecifyReceiver = entity.SpecifyReceiver; | ||||
oldentity.RStatus = entity.RStatus; | |||||
this.BaseRepository().Update(oldentity); | this.BaseRepository().Update(oldentity); | ||||
} | } | ||||
else | else | ||||
@@ -322,6 +343,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public void DisPose(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
var entity = this.BaseRepository().FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == keyValue); | |||||
if (null != entity) | |||||
{ | |||||
entity.RStatus = 1; | |||||
this.BaseRepository().Update(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 查看实体数据 | /// 查看实体数据 | ||||
/// <param name="keyValue">主键</param> | /// <param name="keyValue">主键</param> | ||||
@@ -450,6 +495,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
public string ZhuRenP() | |||||
{ | |||||
var loginUser = LoginUserInfo.Get(); | |||||
var PeopleInTheSameDepartment = this.BaseRepository() | |||||
.FindList<UserEntity>(a => a.F_DepartmentId == loginUser.departmentId); | |||||
//从同一部门的人中找出主任 | |||||
var roleEntity = this.BaseRepository().FindEntity<RoleEntity>(a => a.F_FullName == "公文接收主任"); | |||||
var allZhuRen = new List<string>(); | |||||
if (null != roleEntity) | |||||
{ | |||||
allZhuRen = this.BaseRepository() | |||||
.FindList<UserRelationEntity>(a => a.F_ObjectId == roleEntity.F_RoleId).Select(a => a.F_UserId).ToList(); | |||||
} | |||||
var zhurenID = PeopleInTheSameDepartment.FirstOrDefault(a => allZhuRen.Contains(a.F_UserId))?.F_UserId; | |||||
return zhurenID; | |||||
} | |||||
public string XiaoZhangP() | |||||
{ | |||||
var xiaozhangID = this.BaseRepository().FindEntity<UserEntity>(a=>a.F_RealName.Contains("关亮"))?.F_UserId; | |||||
return xiaozhangID; | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 公文接收 下发指定接收人 | /// 公文接收 下发指定接收人 | ||||
/// </summary> | /// </summary> | ||||
@@ -460,12 +533,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
try | try | ||||
{ | { | ||||
//从‘查阅情况’ 列表中跳转 将发送情况改变 | //从‘查阅情况’ 列表中跳转 将发送情况改变 | ||||
if (!string.IsNullOrEmpty(entity.RFileId)) | |||||
{ | |||||
var rEntity = db.FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == entity.RFileId); | |||||
rEntity.SendStatus = true; | |||||
db.Update(rEntity); | |||||
} | |||||
//if (!string.IsNullOrEmpty(entity.RFileId)) | |||||
//{ | |||||
// var rEntity = db.FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == entity.RFileId); | |||||
// rEntity.SendStatus = true; | |||||
// db.Update(rEntity); | |||||
//} | |||||
var Sys_ReceiveDocument = db.FindEntity<Sys_ReceiveDocumentEntity>(a => a.RID == entity.SFileId); | var Sys_ReceiveDocument = db.FindEntity<Sys_ReceiveDocumentEntity>(a => a.RID == entity.SFileId); | ||||
var teacherlist = db.FindList<UserEntity>(a => entity.SpecifyReceiver.Contains(a.F_UserId)).ToList(); | var teacherlist = db.FindList<UserEntity>(a => entity.SpecifyReceiver.Contains(a.F_UserId)).ToList(); | ||||
@@ -511,6 +584,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(','); | Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(','); | ||||
Sys_ReceiveDocument.RSendFlag = "1"; | |||||
db.Update(Sys_ReceiveDocument); | db.Update(Sys_ReceiveDocument); | ||||
db.Commit(); | db.Commit(); | ||||
//读取信息推送管理-公文下发推送(02)的配置 | //读取信息推送管理-公文下发推送(02)的配置 | ||||
@@ -592,5 +666,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } |