@@ -30,6 +30,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 公文接收归档 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexFile() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
@@ -92,6 +103,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sYS_ReceiveDocumentIBLL.GetPageList(paginationobj, queryJson); | |||
foreach (var item in data) | |||
{ | |||
var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.RID}'"; | |||
var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.RID}'"; | |||
var readdt = sYS_ReceiveDocumentIBLL.Execute(sql); | |||
var senddt = sYS_ReceiveDocumentIBLL.Execute(sendSql); | |||
var readcount = readdt.Rows[0][0]; | |||
var sendcount = senddt.Rows[0][0]; | |||
item.NumberPeople = $"{readcount}/{sendcount}"; | |||
} | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
@@ -213,6 +213,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 重置 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult Reset(string keyValue) | |||
{ | |||
sys_ReceiveFileIBLL.Reset(keyValue); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
@@ -33,6 +33,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 行政公文归档 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexFile() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 党政公文归档 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexPartyFile() | |||
{ | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult IndexDocument() | |||
{ | |||
@@ -362,7 +381,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("下发成功!"); | |||
} | |||
/* public ActionResult ReceiveFile(string keyValue) | |||
{ | |||
@@ -370,6 +389,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}*/ | |||
#endregion | |||
} | |||
} |
@@ -223,14 +223,17 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue=' + keyValue, | |||
width: 850, | |||
height: 400, | |||
btn: null | |||
btn: null, | |||
end: function () { | |||
page.search(); | |||
} | |||
}); | |||
} | |||
}); | |||
//打印 | |||
$('#lr_print').on('click', | |||
function() { | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerFormForPercent({ | |||
@@ -329,13 +332,16 @@ var bootstrap = function ($, learun) { | |||
{ | |||
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>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left" | |||
} | |||
], | |||
mainId: 'RID', | |||
@@ -347,6 +353,7 @@ var bootstrap = function ($, learun) { | |||
param = param || {}; | |||
param.SenderId = loginInfo.userId; | |||
param.SqlParameter = ' AND RSendFlag<>4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -0,0 +1,44 @@ | |||
@{ | |||
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="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">文件标题</div> | |||
<input id="RTitle" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">来文单位</div> | |||
<input id="RSourceUnit" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">收文单位</div> | |||
<div id="RReceiveUnit"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" > | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i> 查看</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IndexFile.js") |
@@ -0,0 +1,195 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-10-22 16:58 | |||
* 描 述:文件接收 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#RReceiveUnit').lrDepartmentSelect(); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/FormView?keyValue=' + keyValue, | |||
width: 800, | |||
height: 600, | |||
btn: null, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
} | |||
}); | |||
//打印 | |||
$('#lr_print').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerFormForPercent({ | |||
id: 'form', | |||
title: '查阅情况', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintView?keyValue=' + keyValue, | |||
width: '100%', | |||
height: '100%', | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/GetPageList', | |||
headData: [ | |||
{ | |||
label: "录入人员", name: "SenderId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "收文时间", name: "RReceiveTime", width: 100, align: "left" }, | |||
{ label: "来文单位", name: "RSourceUnit", width: 100, align: "left" }, | |||
{ label: "字第(号)", name: "lwz", width: 100, align: "left" }, | |||
{ | |||
label: "收文单位", name: "RReceiveUnit", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('department', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "字第(号)", name: "swz", width: 100, align: "left" }, | |||
{ | |||
label: "缓急程度", name: "RUrgencyDegree", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'UrgencyDegree', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "文件标题", name: "RTitle", width: 100, align: "left" }, | |||
{ | |||
label: "已接收", name: "ReceiverId", width: 300, 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: "RSendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === "1") { | |||
return '<span class=\"label label-warning\">已下发</span>'; | |||
} else if (cellvalue === "4") { | |||
return '<span class=\"label label-success\" >下发完毕</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "是否需要处理", name: "HasDispose", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == "1") { | |||
return '<span class=\"label label-warning\">需要处理</span>'; | |||
} else { | |||
return '<span class=\"label label-success\" >无需处理</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left" | |||
} | |||
], | |||
mainId: 'RID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SenderId = loginInfo.userId; | |||
param.SqlParameter = ' AND RSendFlag=4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
//refreshGirdData = function (res, postData) { | |||
// if (res.code == 200) { | |||
// // 发起流程 | |||
// var postData = { | |||
// schemeCode: 'Sys_ReceiveDocument',// 填写流程对应模板编号 | |||
// processId: processId, | |||
// level: '1', | |||
// }; | |||
// learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
// learun.loading(false); | |||
// }); | |||
// page.search(); | |||
// } | |||
//}; | |||
page.init(); | |||
} |
@@ -17,6 +17,7 @@ | |||
<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> | |||
<a id="lr_reset" class="btn btn-default"><i class="fa fa-imdb"></i> 重新发起</a> | |||
<a id="lr_dispose" class="btn btn-default"><i class="fa fa-imdb"></i> 已处理</a> | |||
</div> | |||
@@ -40,6 +40,21 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
//重新发起 | |||
$('#lr_reset').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/Reset?keyValue=' + sendId, function () { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -6,6 +6,7 @@ | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var readFlag = request('readFlag'); | |||
var isDesktop = request('isDesktop');//首页"我的桌面"中的"公文接收"列表子项的点击事件 | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
@@ -41,12 +42,12 @@ var bootstrap = function ($, learun) { | |||
$('#SendType').lrDataItemSelect({ code: 'FileSendType' }); | |||
if (isDesktop != "1") { | |||
if (selectedRow.ReadFlag == true) {//已读 | |||
$('#Url').lrUploader({ isView:false}); | |||
$('#Url').lrUploader({ isView: false }); | |||
} else {//未读 | |||
$('#Url').lrUploader({ RFileId: selectedRow.RFileId, isView:false }); | |||
$('#Url').lrUploader({ RFileId: selectedRow.RFileId, isView: false }); | |||
} | |||
} else { | |||
$('#Url').lrUploader({ RFileId: keyValue, isView:false }); | |||
$('#Url').lrUploader({ RFileId: keyValue, isView: false }); | |||
} | |||
}, | |||
initData: function () { | |||
@@ -58,13 +59,17 @@ var bootstrap = function ($, learun) { | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
$('#Contents').html(data[id].Contents); | |||
} | |||
} | |||
$("#lrUploader_uploadBtn_Url").hide(); | |||
}); | |||
var data= learun.httpGet(top.$.rootUrl + | |||
//已读状态不可修改批示 | |||
if (readFlag == 'true') { | |||
$('#SpecifyReceiver').attr('readonly', 'readonly'); | |||
} | |||
var data = learun.httpGet(top.$.rootUrl + | |||
'/EducationalAdministration/Sys_ReceiveFile/GetInstructions?keyValue=' + | |||
keyValue, | |||
''); | |||
@@ -8,8 +8,8 @@ var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var startTime=''; | |||
var endTime=''; | |||
var startTime = ''; | |||
var endTime = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
@@ -130,7 +130,7 @@ var bootstrap = function ($, learun) { | |||
learun.layerForm({ | |||
id: 'formSys_ReceiveFile', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue, | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Form?keyValue=' + keyValue + '&readFlag=' + selectedRow.ReadFlag, | |||
width: 1000, | |||
height: 600, | |||
callBack: function (id) { | |||
@@ -31,6 +31,7 @@ | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_read" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查阅情况</a> | |||
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i> 结束下发</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -138,6 +138,20 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 结束下发 | |||
$('#lr_OverIssue').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否结束下发!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -191,6 +205,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = ' AND SendFlag<>4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -0,0 +1,34 @@ | |||
@{ | |||
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="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" 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_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IndexFile.js") |
@@ -0,0 +1,99 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-11 10:31 | |||
* 描 述:公文发送 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/FormView?keyValue=' + keyValue, | |||
width: 800, | |||
height: 700, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', | |||
headData: [ | |||
{ label: "主题", name: "Title", width: 300, 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: "Receiver", width: 300, align: "left" | |||
}, | |||
{ | |||
label: "下发人", name: "Sender", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === 2) { | |||
return '<span class=\"label label-success\">已下发</span>'; | |||
} else if (cellvalue === 4) { | |||
return '<span class=\"label label-success\">下发完毕</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读数/接受人数", name: "NumberPeople", width: 150, align: "left" | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = ' AND SendFlag=4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -31,6 +31,7 @@ | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_read" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查阅情况</a> | |||
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i> 结束下发</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -138,6 +138,21 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 结束下发 | |||
$('#lr_OverIssue').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否结束下发!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -191,6 +206,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = ' AND SendFlag<>4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -0,0 +1,34 @@ | |||
@{ | |||
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="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" 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_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/IndexPartyFile.js") |
@@ -0,0 +1,117 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-11 10:31 | |||
* 描 述:公文发送 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/FormPartyView?keyValue=' + keyValue, | |||
width: 800, | |||
height: 700, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
////打印 | |||
//$('#lr_print').on('click', function () { | |||
// $('#gridtable').jqprintTable(); | |||
//}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageListParty', | |||
headData: [ | |||
{ label: "主题", name: "Title", width: 300, 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: "Receiver", width: 300, align: "left" | |||
}, | |||
{ | |||
label: "下发人", name: "Sender", width: 100, align: "left" | |||
}, | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === 2) { | |||
return '<span class=\"label label-success\">已下发</span>'; | |||
} else if (cellvalue === 4) { | |||
return '<span class=\"label label-success\">下发完毕</span>'; | |||
}else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left", | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = ' AND SendFlag=4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
var postData = { | |||
schemeCode: 'Sys_SendFileParty',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,147 @@ | |||
@{ | |||
ViewBag.Title = "打印"; | |||
Layout = "~/Views/Shared/_SimpleForm.cshtml"; | |||
} | |||
<!DOCTYPE html> | |||
<html> | |||
<head> | |||
<meta charset="utf-8"> | |||
<title></title> | |||
<style> | |||
table, | |||
tr, | |||
td { | |||
padding: 0; | |||
margin: 0; | |||
border-collapse: collapse; | |||
} | |||
table { | |||
/* table-layout: fixed; */ | |||
font-size: 13px; | |||
} | |||
.tableBox { | |||
width: 90%; | |||
margin: 30px auto; | |||
} | |||
.table { | |||
width: 100%; | |||
border-top: 1px solid #000; | |||
border-right: 1px solid #000; | |||
} | |||
.table th{ | |||
font-size: 18px; | |||
border-left: 1px solid #000; | |||
padding: 5px 0; | |||
} | |||
.table tr { | |||
border-bottom: 1px solid #000; | |||
} | |||
.table td { | |||
border-left: 1px solid #000; | |||
line-height: 20px; | |||
padding: 5px 5px; | |||
} | |||
.tableT { | |||
text-align: center; | |||
font-size: 18px; | |||
margin-bottom: 5px; | |||
letter-spacing: 4px; | |||
} | |||
.tableTxt1,.tableTxt2{ | |||
border-left: 1px solid #000; | |||
border-right: 1px solid #000; | |||
border-bottom: 1px solid #000; | |||
padding: 5px 10px; | |||
} | |||
.tableTxt1:first-child{ | |||
border-top: 1px solid #000; | |||
} | |||
.tableTxt2{ | |||
text-align: right; | |||
} | |||
.btn { | |||
width: 100px; | |||
height: 34px; | |||
line-height: 34px; | |||
text-align: center; | |||
margin: 30px auto; | |||
border: 1px solid #ccc; | |||
cursor: pointer; | |||
border-radius: 4px; | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<div id="table"> | |||
<div class="tableBox"> | |||
<div class="tableT">北京金隅科技学校</div> | |||
<div class="tableT">收文处理专用纸(收文登记)</div> | |||
<table class="table"> | |||
<tr> | |||
<td style="width: 80px;">收文</td> | |||
<td id="RReceiveUnit"></td> | |||
<td style="width: 80px;">字第</td> | |||
<td id="swz"></td> | |||
<td style="width: 80px;">号</td> | |||
<td>收文日期</td> | |||
<td id="RReceiveTime"></td> | |||
</tr> | |||
<tr> | |||
<td>来文</td> | |||
<td id="RSourceUnit"></td> | |||
<td>字第</td> | |||
<td id="lwz"></td> | |||
<td>号</td> | |||
<td></td> | |||
<td></td> | |||
</tr> | |||
<tr> | |||
<td>收文标题</td> | |||
<td colspan="6" id="RTitle"></td> | |||
</tr> | |||
<tr> | |||
<td>处理意见</td> | |||
<td colspan="6" id="yj1"></td> | |||
</tr> | |||
<tr> | |||
<td>领导批示</td> | |||
<td colspan="6"> | |||
<div class="tableTxt1" id="yj2"></div> | |||
<div class="tableTxt2" id="xiaozhanginfo"></div> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td>部门处理情况</td> | |||
<td colspan="6" id="yj3"> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td>经办人</td> | |||
<td colspan="4" id="SenderId"></td> | |||
<td>办结日期</td> | |||
<td id="overDate"></td> | |||
</tr> | |||
</table> | |||
</div> | |||
</div> | |||
<div class="btn">打印</div> | |||
<script src="js/jquery-1.4.4.min.js"></script> | |||
<script src="js/jquery.jqprint-0.3.js"></script> | |||
<script> | |||
$('.btn').click(function(){ | |||
$('.tableBox').jqprint(); | |||
}) | |||
</script> | |||
</body> | |||
</html> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_SendFile/PrintView.js") |
@@ -0,0 +1,80 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-04-11 10:31 | |||
* 描 述:公文发送 | |||
*/ | |||
var refreshGirdData; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
console.log(keyValue); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$.get(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/PrintInfo?keyValue=' + keyValue, | |||
function(data) { | |||
var data = JSON.parse(data).data; | |||
var entityItem = data.entityItem; | |||
console.log(data); | |||
learun.clientdata.getAsync('department', { | |||
key: data.entity.RReceiveUnit, | |||
callback: function (_data) { | |||
console.log(_data); | |||
$('#RReceiveUnit').html(_data.name); | |||
} | |||
}); | |||
$('#swz').html(data.entity.swz); | |||
$('#RReceiveTime').html(data.entity.RReceiveTime.substr(0,10)); | |||
$('#RSourceUnit').html(data.entity.RSourceUnit); | |||
$('#lwz').html(data.entity.lwz); | |||
$('#RTitle').html(data.entity.RTitle); | |||
$('#yj1').html(entityItem[0].SpecifyReceiver); | |||
$('#yj2').html(entityItem[1].SpecifyReceiver); | |||
learun.clientdata.getAsync('user', { | |||
key: entityItem[1].ReceiverId, | |||
callback: function (_data) { | |||
console.log(_data); | |||
$('#xiaozhanginfo').html(_data.name + ' ' + (entityItem[1].ReadTime || '').substr(0, 10)); | |||
} | |||
}); | |||
learun.clientdata.getAsync('user', { | |||
key: data.entity.SenderId, | |||
callback: function (_data) { | |||
$('#SenderId').html(_data.name); | |||
} | |||
}); | |||
var text = ''; | |||
$.each(entityItem, | |||
function(i, item) { | |||
if (i < 2) {return true;} | |||
learun.clientdata.getAsync('user', { | |||
key: item.ReceiverId, | |||
callback: function (_data) { | |||
text += '<div class="tableTxt1">' + | |||
(item.SpecifyReceiver == '' ? '已阅' : item.SpecifyReceiver) + | |||
'</div> <div class="tableTxt2"> '+_data.name+' '+(item.ReadTime || '').substr(0,10)+'</div>'; | |||
} | |||
}); | |||
}); | |||
$('#yj3').html(text); | |||
$('#overDate').html(data.entityItem[data.entityItem.length - 1].ReadTime.substr(0,10)); | |||
}); | |||
}, | |||
}; | |||
page.init(); | |||
} |
@@ -36,6 +36,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers | |||
[HttpGet] | |||
public ActionResult UnreadIndex() | |||
{ | |||
ViewBag.Name = (LoginUserInfo.Get()).realName; | |||
return View(); | |||
} | |||
/// <summary> | |||
@@ -39,101 +39,103 @@ | |||
"~/Areas/LR_Desktop/Views/MessageRind/Index.js" | |||
) | |||
<script type='text/javascript'> | |||
$(document).ready(function () { | |||
getdata(); | |||
<script type='text/javascript'> | |||
var name = '@(ViewBag.Name)'; | |||
$(document).ready(function () { | |||
getdata(); | |||
function getdata() { | |||
$.ajax({ | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/GetListForUnread', | |||
type: "get", | |||
dataType: "json", | |||
async: false, | |||
success: function (data) { | |||
var content = ""; | |||
if (data.length > 0) { | |||
content += "<ul id='uldata'>"; | |||
for (var i = 0; i < data.length; i++) { | |||
content += "<li>" + " " + data[i]["SenderName"] + "的消息:" + "</li>"; | |||
var theContent = data[i]["TheContent"]; | |||
//可显示的最长长度 | |||
var maxlen = 50; | |||
if (theContent.length > maxlen) { | |||
theContent = theContent.substring(0, maxlen - 3) + "..."; | |||
} | |||
var param = data[i]["TheTitle"] + "、" + data[i]["InstanceId"] + "、" + data[i]["MessageId"] + "、" + data[i]["ConnectionUrl"]; | |||
content += "<li>"; | |||
content += " 【" + data[i]["TheTitle"] + "】" + theContent + " "; | |||
content += '<a id="' + param + '" href="javascript:void(0);" class="lr-item" style="color:blue;textDecoration:underline">点击查看>>'; | |||
content += "</a>"; | |||
content += "</li>"; | |||
function getdata() { | |||
$.ajax({ | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/GetListForUnread', | |||
type: "get", | |||
dataType: "json", | |||
async: false, | |||
success: function (data) { | |||
var content = ""; | |||
if (data.length > 0) { | |||
content += "<ul id='uldata'>"; | |||
for (var i = 0; i < data.length; i++) { | |||
//data[i]["SenderName"] | |||
content += "<li>" + " " + name + "的消息:" + "</li>"; | |||
var theContent = data[i]["TheContent"]; | |||
//可显示的最长长度 | |||
var maxlen = 50; | |||
if (theContent.length > maxlen) { | |||
theContent = theContent.substring(0, maxlen - 3) + "..."; | |||
} | |||
content += "</ul>"; | |||
} | |||
else { | |||
content = "暂无未读消息"; | |||
var param = data[i]["TheTitle"] + "、" + data[i]["InstanceId"] + "、" + data[i]["MessageId"] + "、" + data[i]["ConnectionUrl"]; | |||
content += "<li>"; | |||
content += " 【" + data[i]["TheTitle"] + "】" + theContent + " "; | |||
content += '<a id="' + param + '" href="javascript:void(0);" class="lr-item" style="color:blue;textDecoration:underline">点击查看>>'; | |||
content += "</a>"; | |||
content += "</li>"; | |||
} | |||
$("#content").html(content); | |||
content += "</ul>"; | |||
} | |||
}); | |||
} | |||
else { | |||
content = "暂无未读消息"; | |||
} | |||
$("#content").html(content); | |||
} | |||
}); | |||
} | |||
$('#uldata .lr-item').on('click', function () { | |||
var $obj = $(this); | |||
var params = ($obj.attr('id')).split('、'); | |||
$('#uldata .lr-item').on('click', function () { | |||
var $obj = $(this); | |||
var params = ($obj.attr('id')).split('、'); | |||
//更改状态为已读 | |||
var MessageId = params[2]; | |||
if (top.learun.checkrow(MessageId)) { | |||
$.ajax({ | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/SaveReadSigns', | |||
type: "post", | |||
data: { keyValue: MessageId }, | |||
dataType: "json", | |||
async: false, | |||
success: function (data) { | |||
//弹窗查看详情 | |||
var keyValue = params[1]; | |||
var ConnectionUrl = params[3]; | |||
var title = params[0]; | |||
if (top.learun.checkrow(keyValue)) { | |||
top.learun.layerForm({ | |||
id: 'formview', | |||
title: title, | |||
url: top.$.rootUrl + ConnectionUrl + keyValue, | |||
width: 1000, | |||
height: 650, | |||
maxmin: true, | |||
btn: null, | |||
}); | |||
//更改状态为已读 | |||
var MessageId = params[2]; | |||
if (top.learun.checkrow(MessageId)) { | |||
$.ajax({ | |||
url: top.$.rootUrl + '/LR_Desktop/MessageRind/SaveReadSigns', | |||
type: "post", | |||
data: { keyValue: MessageId }, | |||
dataType: "json", | |||
async: false, | |||
success: function (data) { | |||
//弹窗查看详情 | |||
var keyValue = params[1]; | |||
var ConnectionUrl = params[3]; | |||
var title = params[0]; | |||
if (top.learun.checkrow(keyValue)) { | |||
top.learun.layerForm({ | |||
id: 'formview', | |||
title: title, | |||
url: top.$.rootUrl + ConnectionUrl + keyValue, | |||
width: 1000, | |||
height: 650, | |||
maxmin: true, | |||
btn: null, | |||
}); | |||
} | |||
} | |||
}) | |||
} | |||
} | |||
}) | |||
} | |||
}); | |||
}); | |||
}); | |||
//function funLook(param) { | |||
//function funLook(param) { | |||
// var id = "433d5658-40b0-4e2d-b736-c4e8561d017e";//$obj.attr('id'); | |||
// var _module = top.learun.clientdata.get(['modulesMap', id]); | |||
// switch (_module.F_Target) { | |||
// case 'iframe':// 窗口 | |||
// if (top.learun.validator.isNotNull(_module.F_UrlAddress).code) { | |||
// top.learun.frameTab.open(_module); | |||
// } | |||
// break; | |||
// case 'open':// 窗口 | |||
// var newWin = window.open(_module.F_UrlAddress); | |||
// newWin.location.replace(_module.F_UrlAddress); | |||
// break; | |||
// } | |||
// var id = "433d5658-40b0-4e2d-b736-c4e8561d017e";//$obj.attr('id'); | |||
// var _module = top.learun.clientdata.get(['modulesMap', id]); | |||
// switch (_module.F_Target) { | |||
// case 'iframe':// 窗口 | |||
// if (top.learun.validator.isNotNull(_module.F_UrlAddress).code) { | |||
// top.learun.frameTab.open(_module); | |||
// } | |||
// break; | |||
// case 'open':// 窗口 | |||
// var newWin = window.open(_module.F_UrlAddress); | |||
// newWin.location.replace(_module.F_UrlAddress); | |||
// break; | |||
// } | |||
//} | |||
//} | |||
</script> | |||
</script> | |||
</body> | |||
</html> |
@@ -1028,6 +1028,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IndexFile.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IssueForm.js" /> | |||
@@ -1046,9 +1047,12 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\FormDocumentView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\FormDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\FormPartyView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexFile.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexPartyFile.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexParty.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IssueForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\PrintView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListParty.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | |||
@@ -7260,6 +7264,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\IsHelpForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\HelpChange.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\IndexHelpChange.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IndexFile.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexPartyFile.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\PrintView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexFile.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -42,6 +42,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return sYS_ReceiveDocumentService.Execute(sql); | |||
} | |||
/// <summary> | |||
/// 获取Sys_ReceiveDocument表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -130,6 +130,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
/// <summary> | |||
/// 编号 | |||
/// </summary> | |||
[NotMapped] | |||
public string NumberPeople { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Sys_ReceiveDocumentEntity> GetPageList(Pagination pagination, string queryJson); | |||
DataTable Execute(string sql); | |||
/// <summary> | |||
/// 获取Sys_ReceiveDocument表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -73,6 +73,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("RTitle", "%" + queryParam["RTitle"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.RTitle Like @RTitle "); | |||
} | |||
//sql条件 | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
var list = this.BaseRepository().FindList<Sys_ReceiveDocumentEntity>(strSql.ToString(), dp, pagination); | |||
foreach (var item in list) | |||
{ | |||
@@ -106,6 +111,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return this.BaseRepository().FindTable(sql); | |||
} | |||
/// <summary> | |||
/// 获取Sys_ReceiveDocument表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -269,6 +269,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public void Reset(string keyValue) | |||
{ | |||
try | |||
{ | |||
sys_ReceiveFileService.Reset(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 查看实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -71,6 +71,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <returns></returns> | |||
void VirtualDeleteEntity(string keyValue); | |||
void DisPose(string keyValue); | |||
void Reset(string keyValue); | |||
/// <summary> | |||
/// 查看实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -387,6 +387,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 重置批示状态 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Reset(string keyValue) | |||
{ | |||
try | |||
{ | |||
var entity = this.BaseRepository().FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == keyValue); | |||
if (null != entity) | |||
{ | |||
entity.ReadFlag = false; | |||
this.BaseRepository().Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 查看实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -396,7 +424,60 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository().ExecuteBySql("update Sys_ReceiveFile set ReadFlag=1,ReadTime='" + DateTime.Now + "' where RFileId='" + keyValue + "'", null); | |||
//状态改为已读 | |||
string sql = "update Sys_ReceiveFile set ReadFlag=1,ReadTime='" + DateTime.Now + "' where RFileId='" + | |||
keyValue + "'"; | |||
this.BaseRepository().ExecuteBySql(sql, null); | |||
//判断当前公文是否已全部已读,如果全部已读,需要通知提醒下发人,加入消息提醒 | |||
//获取未读人数 | |||
var updSql = | |||
$"select count(1) from Sys_ReceiveFile where SFileId=(select SFileId from Sys_ReceiveFile where RFileId='{keyValue}')and ReadFlag = 0"; | |||
var dt = this.BaseRepository().FindTable(updSql); | |||
if (dt.Rows[0][0] != null && Convert.ToInt32(dt.Rows[0][0]) == 0) | |||
{ | |||
var entity = this.BaseRepository().FindEntity<Sys_ReceiveFileEntity>(keyValue); | |||
var receiveDocumentEntity = | |||
this.BaseRepository().FindEntity<Sys_ReceiveDocumentEntity>(entity.SFileId); | |||
var userInfo = this.BaseRepository().FindEntity<UserEntity>(entity.SenderId); | |||
MessageRemindEntity msgEntity = new MessageRemindEntity(); | |||
msgEntity.Create(); | |||
msgEntity.ReceiptId = entity.SenderId; | |||
msgEntity.ReceiptName = userInfo != null ? userInfo.F_RealName : ""; | |||
msgEntity.SenderId = entity.ReceiverId; | |||
msgEntity.SenderName = entity.Receiver; | |||
if (entity.STypeId == 3) | |||
{ | |||
msgEntity.TheTitle = "党政公文下发"; | |||
var sendFileEntity = | |||
this.BaseRepository().FindEntity<Sys_SendFileEntity>(entity.SFileId); | |||
msgEntity.TheContent = "【全部已阅】" + sendFileEntity.Title; | |||
msgEntity.InstanceId = sendFileEntity.SFileId; | |||
msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_SendFile/ReadListParty?keyValue="; | |||
} | |||
else if (entity.STypeId == 4) | |||
{ | |||
msgEntity.TheTitle = "公文接收"; | |||
msgEntity.TheContent = "【全部已阅】" + receiveDocumentEntity.RTitle; | |||
msgEntity.InstanceId = receiveDocumentEntity.RID; | |||
msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue="; | |||
} | |||
else if (entity.STypeId == 1) | |||
{ | |||
msgEntity.TheTitle = "行政公文下发"; | |||
var sendFileEntity = | |||
this.BaseRepository().FindEntity<Sys_SendFileEntity>(entity.SFileId); | |||
msgEntity.TheContent = "【全部已阅】" + sendFileEntity.Title; | |||
msgEntity.InstanceId = sendFileEntity.SFileId; | |||
msgEntity.ConnectionUrl = "/EducationalAdministration/Sys_SendFile/ReadList?keyValue="; | |||
} | |||
msgEntity.SendTime = DateTime.Now; | |||
msgEntity.ReadSigns = false; | |||
this.BaseRepository().Insert(msgEntity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -54,6 +54,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("SenderId", "" + queryParam["SenderId"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.SenderId = @SenderId "); | |||
} | |||
//sql条件 | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository().FindList<Sys_SendFileEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -76,7 +76,8 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindList<MessageRemindEntity>(x => x.ReadSigns == false); | |||
var userInfo = LoginUserInfo.Get(); | |||
return this.BaseRepository().FindList<MessageRemindEntity>(x => x.ReadSigns == false && x.ReceiptId == userInfo.userId); | |||
} | |||
catch (Exception ex) | |||
{ | |||