@@ -7,10 +7,18 @@ | |||
<div class="lr-form-item-title">来文单位</div> | |||
<input id="RSourceUnit" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument" > | |||
<div class="lr-form-item-title">字第(号)</div> | |||
<input id="lwz" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument" > | |||
<div class="lr-form-item-title">收文单位</div> | |||
<div id="RReceiveUnit" ></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument" > | |||
<div class="lr-form-item-title">字第(号)</div> | |||
<input id="swz" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument" > | |||
<div class="lr-form-item-title">缓急程度</div> | |||
<div id="RUrgencyDegree" ></div> | |||
@@ -7,10 +7,18 @@ | |||
<div class="lr-form-item-title">来文单位</div> | |||
<input id="RSourceUnit" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument"> | |||
<div class="lr-form-item-title">字第(号)</div> | |||
<input id="lwz" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument"> | |||
<div class="lr-form-item-title">收文单位</div> | |||
<div id="RReceiveUnit" readonly="readonly"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument"> | |||
<div class="lr-form-item-title">字第(号)</div> | |||
<input id="swz" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="Sys_ReceiveDocument"> | |||
<div class="lr-form-item-title">缓急程度</div> | |||
<div id="RUrgencyDegree" readonly="readonly"></div> | |||
@@ -7,7 +7,9 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -31,17 +33,20 @@ | |||
<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"> | |||
<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> | |||
<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 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_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_read" class="btn btn-default"><i class="fa fa-calendar-minus-o"></i> 查阅情况</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -8,14 +8,43 @@ var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var auditors = {}; | |||
var startTime; | |||
var endTime; | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
@@ -52,11 +81,6 @@ var bootstrap = function ($, learun) { | |||
$('#lr_edit').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.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
@@ -107,83 +131,78 @@ var bootstrap = function ($, learun) { | |||
$('#lr_delete').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) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#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) { | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
learun.layerForm({ | |||
id: 'formselectuser', | |||
title: '下发审批指定接收人', | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/SelectUserForm?keyValue=' + keyValue, | |||
width: 800, | |||
height: 200, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
}); | |||
//校长书记批办 | |||
$('#lr_IssueSpecifyReceiver2').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认请校校长书记批办!', function (res) { | |||
if (res) { | |||
res = top[id].save('', function (formres, formdata) { | |||
processId = learun.newGuid(); | |||
var schemeObj; | |||
//初始化流程 | |||
learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetSchemeByCode', { code: "Sys_ReceiveDocument" }, function (data) { | |||
if (data) { | |||
schemeObj = JSON.parse(data.F_Content); | |||
// 获取开始节点 | |||
$.each(schemeObj.nodes, function (_index, _item) { | |||
if (_item.type == 'startround') { | |||
var param = { | |||
code: 'Sys_ReceiveDocument', | |||
processId: '', | |||
taskId: '', | |||
nodeId: _item.id, | |||
operationCode: 'agree' | |||
}; | |||
learun.httpAsync('GET', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetNextAuditors', param, function (data) { | |||
$.each(data, | |||
function (_id, _list) { | |||
if (_list.length > 0) { | |||
auditors[_id] = formdata.SpecifyReceiver; | |||
} | |||
}); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (datares) { | |||
refreshGirdData(datares, {}); | |||
return true; | |||
}); | |||
}); | |||
return true; | |||
} | |||
}); | |||
} | |||
}); | |||
var formData = {}; | |||
formData.RFileId = ''; | |||
formData.SFileId = keyValue; | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/XiaoZhangP', postData, function (res) { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
} | |||
}); | |||
}); | |||
} | |||
}); | |||
// 下发审批指定接收人 | |||
$('#lr_IssueSpecifyReceiver').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
@@ -213,17 +232,11 @@ var bootstrap = function ($, learun) { | |||
$('#lr_OverIssue').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('RID'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('RSendFlag'); | |||
console.log(SendFlag); | |||
if (SendFlag !== '2') { | |||
learun.alert.warning("当前公文未审批通过,请耐心等待审批!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否结束下发!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/OverIssue', { keyValue: keyValue, }, function (res) { | |||
refreshGirdData(res, {}); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
@@ -239,17 +252,51 @@ 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 () { | |||
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').lrAuthorizeJfGrid({ | |||
$('#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) { | |||
@@ -261,6 +308,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ label: "字第(号)", name: "swz", width: 100, align: "left" }, | |||
{ | |||
label: "缓急程度", name: "RUrgencyDegree", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -298,57 +346,62 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "提交时间", name: "F_CreateDate", width: 180, align: "left", formatter: function (cellvalue) { | |||
if (cellvalue != '0001-01-01 00:00:00') { | |||
return cellvalue; | |||
} | |||
} | |||
}, | |||
{ label: "审批意见", name: "SpecifyReceiver", width: 300, align: "left" }, | |||
{ | |||
label: "状态", name: "RSendFlag", 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-info\">审批通过</span>'; | |||
} else if (cellvalue === "3") { | |||
return '<span class=\"label label-danger\" >审批失败</span>'; | |||
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, | |||
sidx: 'F_CreateDate desc' | |||
isPage: true | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SenderId = loginInfo.userId; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
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', | |||
auditors: JSON.stringify(auditors) | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
//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.search(); | |||
// } | |||
//}; | |||
page.init(); | |||
} |
@@ -0,0 +1,46 @@ | |||
@{ | |||
ViewBag.Title = "公文接收归档"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-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,227 @@ | |||
/* * 版 本 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 startTime; | |||
var endTime; | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#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.StartTime = startTime; | |||
param.EndTime = endTime; | |||
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(); | |||
} |
@@ -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_ReceiveDocument/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(); | |||
} |
@@ -17,7 +17,8 @@ | |||
<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_Issue" class="btn btn-default"><i class="fa fa-pencil-square-o"></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> | |||
</div> | |||
@@ -25,39 +25,36 @@ var bootstrap = function ($, learun) { | |||
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(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//重新发起 | |||
$('#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 () { | |||
@@ -67,33 +64,10 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "接收人", name: "Receiver", width: 150, align: "left" | |||
}, | |||
{ label: "签批意见", name: "SpecifyReceiver", width: 300, 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", | |||
formatter: function (cellvalue, row) { | |||
@@ -105,20 +79,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', | |||
isPage: true, | |||
sidx: 'ReadFlag,ReadTime', | |||
sord: 'ASC' | |||
sord: 'DASC' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -23,5 +23,17 @@ | |||
<div class="lr-form-item-title">内容</div> | |||
<div id="Contents" style="margin-top:6px;"></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 class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">批示记录</div> | |||
<div id="gridtable"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js") |
@@ -6,8 +6,11 @@ | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var readFlag = request('readFlag'); | |||
var isDesktop = request('isDesktop');//首页"我的桌面"中的"公文接收"列表子项的点击事件 | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var loginInfo = top.learun.clientdata.get(['userinfo']); | |||
var selectedRow = learun.frameTab.currentIframe().selectedRow; | |||
var page = { | |||
init: function () { | |||
@@ -16,17 +19,35 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//如果是校长的话,审批需要做必填设置 | |||
if (loginInfo.realName == "关亮") { | |||
$('#SpecifyReceiver').prev().html('批示<font face="宋体">*</font>'); | |||
$('#SpecifyReceiver').attr('isvalid', 'yes').attr('checkexpession', 'NotNull'); | |||
} | |||
$('#SenderId').lrformselect({ | |||
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', | |||
layerUrlW: 400, | |||
layerUrlH: 300, | |||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | |||
}); | |||
}); | |||
$('#RStatus').lrRadioCheckbox({ | |||
data: [{ text: '通知', value: 0 }, { text: '不通知', value: 1 }], text: 'text', value: 'value' | |||
}); | |||
if ($('.lr-radio').find('input:radio:checked').length == 0) { | |||
$('.lr-radio').find('input')[0].checked = true; | |||
} | |||
$('#SendType').lrDataItemSelect({ code: 'FileSendType' }); | |||
if (selectedRow.ReadFlag == true) {//已读 | |||
$('#Url').lrUploader(); | |||
} else {//未读 | |||
$('#Url').lrUploader({ RFileId: selectedRow.RFileId }); | |||
if (isDesktop != "1") { | |||
if (selectedRow.ReadFlag == true) {//已读 | |||
$('#Url').lrUploader({ isView: false }); | |||
} else {//未读 | |||
$('#Url').lrUploader({ RFileId: selectedRow.RFileId, isView: false }); | |||
} | |||
} else { | |||
$('#Url').lrUploader({ RFileId: keyValue, isView: false }); | |||
} | |||
}, | |||
initData: function () { | |||
@@ -38,11 +59,33 @@ var bootstrap = function ($, learun) { | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
$('#Contents').html(data[id].Contents); | |||
} | |||
} | |||
$("#lrUploader_uploadBtn_Url").hide(); | |||
}); | |||
//已读状态不可修改批示 | |||
if (readFlag == 'true') { | |||
$('#SpecifyReceiver').attr('readonly', 'readonly'); | |||
} | |||
var data = learun.httpGet(top.$.rootUrl + | |||
'/EducationalAdministration/Sys_ReceiveFile/GetInstructions?keyValue=' + | |||
keyValue, | |||
''); | |||
$('#gridtable').jfGrid({ | |||
headData: [ | |||
{ label: "批阅人", name: "Receiver", width: 100, align: "left" }, | |||
{ label: "内容", name: "SpecifyReceiver", width: 500, align: "left" }, | |||
], | |||
mainId: 'RFileId', | |||
isPage: true, | |||
sidx: 'SendTime', | |||
sord: 'DESC' | |||
}); | |||
$('#gridtable').jfGridSet('refreshdata', data.data.rows); | |||
} | |||
} | |||
}; | |||
@@ -51,6 +94,7 @@ var bootstrap = function ($, learun) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
@@ -18,6 +18,10 @@ | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -27,7 +27,7 @@ | |||
</div> | |||
<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_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> | |||
</div> | |||
</div> | |||
@@ -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(); | |||
@@ -35,8 +35,6 @@ var bootstrap = function ($, learun) { | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
@@ -79,22 +77,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 () { | |||
var keyValue = $('#gridtable').jfGridValue('RFileId'); | |||
@@ -118,32 +116,28 @@ var bootstrap = function ($, learun) { | |||
var keyValue = $('#gridtable').jfGridValue('RFileId'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
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', | |||
type: 2, | |||
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 + '&readFlag=' + selectedRow.ReadFlag, | |||
width: 1000, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
@@ -162,43 +156,12 @@ var bootstrap = function ($, learun) { | |||
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", | |||
@@ -210,6 +173,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" }, | |||
], | |||
mainId: 'RFileId', | |||
@@ -217,6 +193,7 @@ var bootstrap = function ($, learun) { | |||
sidx: 'SendTime', | |||
sord: 'DESC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -18,6 +18,10 @@ | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -27,6 +27,10 @@ | |||
<div class="lr-form-item-title">接收校区<font face="宋体">*</font></div> | |||
<div id="CompanyId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">文号<font face="宋体">*</font></div> | |||
<input id="DocNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">文件</div> | |||
<div id="Url" ></div> | |||
@@ -7,6 +7,9 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -14,6 +17,10 @@ | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -31,6 +38,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> | |||
@@ -8,12 +8,42 @@ var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
@@ -138,6 +168,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 () { | |||
@@ -145,6 +189,7 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', | |||
headData: [ | |||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||
{ label: "文号", name: "DocNo", width: 300, align: "left" }, | |||
{ | |||
label: "接收对象", name: "SendType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -157,7 +202,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
{ | |||
label: "接收人", name: "Receiver", width: 300, align: "left" | |||
}, | |||
{ | |||
@@ -166,6 +211,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -178,14 +224,21 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读数/接受人数", name: "NumberPeople", width: 150, align: "left" | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.SqlParameter = ' AND SendFlag<>4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -0,0 +1,41 @@ | |||
@{ | |||
ViewBag.Title = "公文发送"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" 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,131 @@ | |||
/* * 版 本 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 startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#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.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.SqlParameter = ' AND SendFlag=4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -7,6 +7,9 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -15,6 +18,10 @@ | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -31,6 +38,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> | |||
@@ -8,12 +8,42 @@ var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
@@ -138,6 +168,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 () { | |||
@@ -166,6 +211,7 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -178,14 +224,21 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left", | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
isPage: true | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.SqlParameter = ' AND SendFlag<>4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -0,0 +1,41 @@ | |||
@{ | |||
ViewBag.Title = "公文发送"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<input id="Receiver" type="text" class="form-control" /> | |||
</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,149 @@ | |||
/* * 版 本 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 startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#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'; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
$('#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(); | |||
} |
@@ -0,0 +1,117 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.Permission; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.Permission.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-22 11:35 | |||
/// 描 述:公告发布权限设置 | |||
/// </summary> | |||
public class DepartmentReleasePermissionsController : MvcControllerBase | |||
{ | |||
private DepartmentReleasePermissionsIBLL departmentReleasePermissionsIBLL = new DepartmentReleasePermissionsBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = departmentReleasePermissionsIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var DepartmentReleasePermissionsData = departmentReleasePermissionsIBLL.GetDepartmentReleasePermissionsEntity( keyValue ); | |||
var jsonData = new { | |||
DepartmentReleasePermissions = DepartmentReleasePermissionsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
departmentReleasePermissionsIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
DepartmentReleasePermissionsEntity entity = strEntity.ToObject<DepartmentReleasePermissionsEntity>(); | |||
departmentReleasePermissionsIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
@{ | |||
ViewBag.Title = "公告发布权限设置"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="DepartmentReleasePermissions" > | |||
<div class="lr-form-item-title">发布人员</div> | |||
<div id="UserID" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DepartmentReleasePermissions" > | |||
<div class="lr-form-item-title">公告类型</div> | |||
<div id="Permission" ></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Form.js") |
@@ -0,0 +1,55 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-12-22 11:35 | |||
* 描 述:公告发布权限设置 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var departmentId = request('departmentId'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#UserID').lrUserSelect(0); | |||
$('#Permission').lrDataItemSelect({ code: 'NoticeCategory', type: 'multiple' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var formdata = $('body').lrGetFormData(); | |||
formdata.DepartmentID = departmentId; | |||
var postData = { | |||
strEntity: JSON.stringify(formdata) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,36 @@ | |||
@{ | |||
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> | |||
<div id="DepartmentID"></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" 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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Permission/Views/DepartmentReleasePermissions/Index.js") |
@@ -0,0 +1,112 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-12-22 11:35 | |||
* 描 述:公告发布权限设置 | |||
*/ | |||
var refreshGirdData; | |||
var departmentId = request('departmentId'); | |||
console.log(123 + departmentId); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
console.log(departmentId); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#DepartmentID').lrDataSourceSelect({ code: 'classdata',value: 'id',text: 'name' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form1', | |||
title: '新增', | |||
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?departmentId='+departmentId, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form1', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/Permission/DepartmentReleasePermissions/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/Permission/DepartmentReleasePermissions/GetPageList', | |||
headData: [ | |||
{ label: "发布人员", name: "UserID", 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: "Permission", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getsAsync('dataItem', { | |||
key: value, | |||
code: 'NoticeCategory', | |||
callback: function (_data) { | |||
callback(_data); | |||
} | |||
}); | |||
}}, | |||
], | |||
mainId:'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.DepartmentID = departmentId; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -469,6 +469,7 @@ | |||
<Compile Include="Areas\LR_WorkFlowModule\Controllers\WfSchemeController.cs" /> | |||
<Compile Include="Areas\LR_WorkFlowModule\Controllers\WfSystemDemoController.cs" /> | |||
<Compile Include="Areas\LR_WorkFlowModule\LR_WorkFlowModuleAreaRegistration.cs" /> | |||
<Compile Include="Areas\Permission\Controllers\DepartmentReleasePermissionsController.cs" /> | |||
<Compile Include="Areas\Permission\PermissionAreaRegistration.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\EpidemicReportController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\EpidemicSituationCopyController.cs" /> | |||
@@ -1005,6 +1006,8 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\Form.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\IndexFile.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\PrintView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\SelectUserForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IssueForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\ReadList.js" /> | |||
@@ -1021,9 +1024,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\IndexParty.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexPartyFile.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" /> | |||
@@ -1350,6 +1356,8 @@ | |||
<Content Include="Areas\LR_TaskScheduling\Views\TSScheme\Index.js" /> | |||
<Content Include="Areas\LR_TaskScheduling\Views\TSScheme\SelectExpressForm.css" /> | |||
<Content Include="Areas\LR_TaskScheduling\Views\TSScheme\SelectExpressForm.js" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.js" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRemove.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormTerminate.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRenew.js" /> | |||
@@ -6942,6 +6950,13 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelLeaveManagement\CheckForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuDisciplineManagement\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuCancelDisciplineManagement\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IndexFile.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\PrintView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexFile.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IndexPartyFile.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\PrintView.cshtml" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.cshtml" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Index.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -193,6 +193,7 @@ | |||
<Compile Include="LR_WorkFlow\WfSchemeMap.cs" /> | |||
<Compile Include="LR_WorkFlow\WfTaskHistoryMap.cs" /> | |||
<Compile Include="LR_WorkFlow\WfTaskMap.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissionsMap.cs" /> | |||
<Compile Include="PersonnelManagement\JbjiabanMap.cs" /> | |||
<Compile Include="PersonnelManagement\MP_ManageMentPlanMap.cs" /> | |||
<Compile Include="PersonnelManagement\PMCadreMap.cs" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.Permission; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-22 11:35 | |||
/// 描 述:公告发布权限设置 | |||
/// </summary> | |||
public class DepartmentReleasePermissionsMap : EntityTypeConfiguration<DepartmentReleasePermissionsEntity> | |||
{ | |||
public DepartmentReleasePermissionsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("DEPARTMENTRELEASEPERMISSIONS"); | |||
//主键 | |||
this.HasKey(t => t.ID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -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> | |||
@@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("RRECEIVEUNIT")] | |||
public string RReceiveUnit { get; set; } | |||
/// <summary> | |||
/// 接收时间 | |||
/// </summary> | |||
[Column("RRECEIVETIME")] | |||
public DateTime? RReceiveTime { get; set; } | |||
/// <summary> | |||
/// 缓急程度 | |||
/// </summary> | |||
[Column("RURGENCYDEGREE")] | |||
@@ -74,15 +79,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("RFile")] | |||
public string RFile { get; set; } | |||
[Column("F_CREATEDATE")] | |||
public DateTime? F_CreateDate { get; set; } | |||
/// <summary> | |||
/// 发送人 | |||
/// </summary> | |||
[Column("SENDERID")] | |||
public string SenderId { get; set; } | |||
/// <summary> | |||
/// 需要处理 | |||
/// </summary> | |||
[NotMapped] | |||
[Column("HasDispose")] | |||
public int? HasDispose { get; set; } | |||
/// <summary> | |||
/// 收文(字) | |||
/// </summary> | |||
[Column("SWZ")] | |||
public string swz { get; set; } | |||
/// <summary> | |||
/// 来文(字) | |||
/// </summary> | |||
[Column("LWZ")] | |||
public string lwz { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -94,8 +117,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var loginUser = LoginUserInfo.Get(); | |||
this.RID = Guid.NewGuid().ToString(); | |||
this.SenderId = loginUser.userId; | |||
this.RReceiveTime = DateTime.Now; | |||
this.RSendFlag = "0"; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
@@ -107,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> | |||
@@ -4,6 +4,7 @@ using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -42,13 +43,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
t.SpecifyReceiver, | |||
t.RContent, | |||
t.RSendFlag, | |||
t.RProcessId,t.F_CreateDate | |||
t.swz, | |||
t.lwz, | |||
t.RReceiveTime, | |||
t.RProcessId | |||
"); | |||
strSql.Append(" FROM Sys_ReceiveDocument t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["SenderId"].IsEmpty()) | |||
{ | |||
dp.Add("SenderId", queryParam["SenderId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.SenderId = @SenderId "); | |||
} | |||
if (!queryParam["RReceiveUnit"].IsEmpty()) | |||
{ | |||
dp.Add("RReceiveUnit", queryParam["RReceiveUnit"].ToString(), DbType.String); | |||
@@ -64,7 +73,36 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("RTitle", "%" + queryParam["RTitle"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.RTitle Like @RTitle "); | |||
} | |||
return this.BaseRepository().FindList<Sys_ReceiveDocumentEntity>(strSql.ToString(), dp, pagination); | |||
if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( t.RReceiveTime >= @startTime AND t.RReceiveTime <= @endTime ) "); | |||
} | |||
//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) | |||
{ | |||
if (!item.RSendFlag.Equals("4")) | |||
{ | |||
var listentity = this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SFileId == item.RID && a.RStatus == 0).Count(); | |||
if (listentity > 0) | |||
{ | |||
item.HasDispose = 1; | |||
} | |||
else | |||
{ | |||
item.HasDispose = 0; | |||
} | |||
} | |||
} | |||
return list; | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -79,6 +117,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return this.BaseRepository().FindTable(sql); | |||
} | |||
/// <summary> | |||
/// 获取Sys_ReceiveDocument表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -138,12 +182,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <returns></returns> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository().BeginTrans(); | |||
try | |||
{ | |||
this.BaseRepository().Delete<Sys_ReceiveDocumentEntity>(t => t.RID == keyValue); | |||
db.Delete<Sys_ReceiveDocumentEntity>(t => t.RID == keyValue); | |||
db.Delete<Sys_ReceiveFileEntity>(a => a.SFileId == keyValue); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
@@ -198,7 +246,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
BaseRepository().ExecuteBySql("update Sys_ReceiveDocument set RSendFlag=" + status + ",RProcessId='" + processId + "',F_CreateDate=getdate() where RID='" + keyValue + "'", null); | |||
BaseRepository().ExecuteBySql("update Sys_ReceiveDocument set RSendFlag=" + status + ",RProcessId='" + processId + "' where RID='" + keyValue + "'", null); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -90,6 +90,42 @@ 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); | |||
} | |||
} | |||
} | |||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySendId(string senderId) | |||
{ | |||
try | |||
{ | |||
return sys_ReceiveFileService.GetPageListBySendId(senderId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Sys_ReceiveFile表实体数据 | |||
@@ -214,6 +250,43 @@ 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); | |||
} | |||
} | |||
} | |||
public void Reset(string keyValue) | |||
{ | |||
try | |||
{ | |||
sys_ReceiveFileService.Reset(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 查看实体数据 | |||
@@ -276,6 +349,63 @@ 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); | |||
} | |||
} | |||
} | |||
public object GetInstructions(string keyValue) | |||
{ | |||
try | |||
{ | |||
return sys_ReceiveFileService.GetInstructions(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -90,6 +90,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("DELFLAG")] | |||
public bool? DelFlag { get; set; } | |||
/// <summary> | |||
/// 管理员是否已经处理 | |||
/// </summary> | |||
[Column("RSTATUS")] | |||
public int? RStatus { get; set; } | |||
/// <summary> | |||
/// 查阅时间 | |||
/// </summary> | |||
[Column("READTIME")] | |||
@@ -40,6 +40,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="userId">用户编号</param> | |||
/// <returns></returns> | |||
IEnumerable<Sys_ReceiveFileEntity> GetPageListByUserId(Pagination pagination, string queryJson, string userId); | |||
IEnumerable<Sys_ReceiveFileEntity> GetPageListBySenderId(string senderId); | |||
IEnumerable<Sys_ReceiveFileEntity> GetPageListBySendId(string senderId); | |||
#endregion | |||
#region 提交数据 | |||
@@ -68,6 +70,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
void VirtualDeleteEntity(string keyValue); | |||
void DisPose(string keyValue); | |||
void Reset(string keyValue); | |||
/// <summary> | |||
/// 查看实体数据 | |||
/// <param name="keyValue">主键</param> | |||
@@ -79,5 +83,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
void Issue(Sys_IssueEntity entity); | |||
void ReceiveDocumentIssue(Sys_IssueEntity entity); | |||
string ZhuRenP(); | |||
string XiaoZhangP(); | |||
object GetInstructions(string keyValue); | |||
} | |||
} |
@@ -9,6 +9,7 @@ using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Web; | |||
using Learun.Application.Base.AuthorizeModule; | |||
using Learun.Application.Organization; | |||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||
using Microsoft.AspNet.SignalR.Client; | |||
@@ -109,7 +110,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||
if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
@@ -139,6 +140,45 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySenderId(string userId) | |||
{ | |||
try | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
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); | |||
} | |||
} | |||
} | |||
public IEnumerable<Sys_ReceiveFileEntity> GetPageListBySendId(string SFileId) | |||
{ | |||
try | |||
{ | |||
var list = this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SFileId == SFileId); | |||
return list; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
@@ -245,6 +285,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
oldentity.ReplyFlag = true; | |||
oldentity.ReplyTime = DateTime.Now; | |||
oldentity.SpecifyReceiver = entity.SpecifyReceiver; | |||
oldentity.RStatus = entity.RStatus; | |||
this.BaseRepository().Update(oldentity); | |||
} | |||
else | |||
@@ -322,6 +363,58 @@ 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> | |||
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> | |||
@@ -331,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) | |||
{ | |||
@@ -450,6 +596,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> | |||
@@ -460,12 +634,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
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 teacherlist = db.FindList<UserEntity>(a => entity.SpecifyReceiver.Contains(a.F_UserId)).ToList(); | |||
@@ -511,6 +685,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(','); | |||
Sys_ReceiveDocument.RSendFlag = "1"; | |||
db.Update(Sys_ReceiveDocument); | |||
db.Commit(); | |||
//读取信息推送管理-公文下发推送(02)的配置 | |||
@@ -592,5 +767,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public object GetInstructions(string keyValue) | |||
{ | |||
try | |||
{ | |||
var sendId = this.BaseRepository().FindEntity<Sys_ReceiveFileEntity>(a => a.RFileId == keyValue) | |||
?.SFileId; | |||
var data = this.BaseRepository().FindList<Sys_ReceiveFileEntity>(a => a.SFileId == sendId && a.SpecifyReceiver != null) | |||
.OrderBy(a => a.ReplyTime); | |||
return data; | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -41,6 +41,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return sys_SendFileService.Execute(sql); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
@@ -1,5 +1,6 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Specialized; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -84,8 +85,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("SPROCESSID")] | |||
public string SProcessId { get; set; } | |||
/// <summary> | |||
/// SProcessId | |||
/// </summary> | |||
[Column("DOCNO")] | |||
public string DocNo { get; set; } | |||
#endregion | |||
[NotMapped] | |||
public string NumberPeople { get; set; } | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
@@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Sys_SendFileEntity> GetPageList(Pagination pagination, string queryJson); | |||
DataTable Execute(string sql); | |||
IEnumerable<Sys_SendFileEntity> GetList(); | |||
/// <summary> | |||
/// 获取Sys_SendFile表实体数据 | |||
@@ -44,6 +44,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( t.SendTime >= @startTime AND t.SendTime <= @endTime ) "); | |||
} | |||
if (!queryParam["Title"].IsEmpty()) | |||
{ | |||
dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); | |||
@@ -54,6 +60,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("SenderId", "" + queryParam["SenderId"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.SenderId = @SenderId "); | |||
} | |||
if (!queryParam["Receiver"].IsEmpty()) | |||
{ | |||
dp.Add("Receiver", "%" + queryParam["Receiver"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Receiver Like @Receiver "); | |||
} | |||
//sql条件 | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
return this.BaseRepository().FindList<Sys_SendFileEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -68,6 +84,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public DataTable Execute(string sql) | |||
{ | |||
return this.BaseRepository().FindTable(sql); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
@@ -392,6 +413,21 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + | |||
db.Rollback(); | |||
} | |||
} | |||
else if (status == 0) | |||
{ | |||
var db = BaseRepository().BeginTrans(); | |||
try | |||
{ | |||
var Sys_SendFile = db.FindEntity<Sys_SendFileEntity>(m => m.SProcessId == processId); | |||
Sys_SendFile.SendFlag = status; | |||
db.Update(Sys_SendFile); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
} | |||
} | |||
} | |||
public void PushWeixin(List<UserEntity> needpostuserlist, string title) | |||
@@ -419,7 +455,7 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + | |||
string access_token = weixintokenobj.access_token; | |||
string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + | |||
"\"template_id\":\"" + weixintasktempid + "\"," + | |||
"\"url\":\"" + weixintaskurl + "\"," + | |||
"\"url\":\"" + weixintaskurl + "/#/?page=file\"," + | |||
"\"data\":{" + | |||
"\"first\": {\"value\":\"您有新的公文需要查阅\",\"color\":\"#173177\"}," + | |||
"\"keyword1\":{\"value\":\"公文下发\",\"color\":\"#173177\"}," + | |||
@@ -273,6 +273,10 @@ | |||
<Compile Include="LR_LGManager\StampApply\StampApplyEntity.cs" /> | |||
<Compile Include="LR_LGManager\StampApply\StampApplyIBLL.cs" /> | |||
<Compile Include="LR_LGManager\StampApply\StampApplyService.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsBLL.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsEntity.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsIBLL.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsService.cs" /> | |||
<Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementBLL.cs" /> | |||
<Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementEntity.cs" /> | |||
<Compile Include="PersonnelManagement\BC_ElectronicMaterialMangement\BC_ElectronicMaterialMangementIBLL.cs" /> | |||
@@ -0,0 +1,144 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.Permission | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-22 11:35 | |||
/// 描 述:公告发布权限设置 | |||
/// </summary> | |||
public class DepartmentReleasePermissionsBLL : DepartmentReleasePermissionsIBLL | |||
{ | |||
private DepartmentReleasePermissionsService departmentReleasePermissionsService = new DepartmentReleasePermissionsService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<DepartmentReleasePermissionsEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return departmentReleasePermissionsService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取DepartmentReleasePermissions表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return departmentReleasePermissionsService.GetDepartmentReleasePermissionsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
departmentReleasePermissionsService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity) | |||
{ | |||
try | |||
{ | |||
departmentReleasePermissionsService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public DepartmentReleasePermissionsEntity GetTypesByUserId(string userId) | |||
{ | |||
try | |||
{ | |||
return departmentReleasePermissionsService.GetTypesByUserId(userId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,60 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.Permission | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-22 11:35 | |||
/// 描 述:公告发布权限设置 | |||
/// </summary> | |||
public class DepartmentReleasePermissionsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 编号 | |||
/// </summary> | |||
[Column("ID")] | |||
public string ID { get; set; } | |||
/// <summary> | |||
/// 部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentID { get; set; } | |||
/// <summary> | |||
/// 人员 | |||
/// </summary> | |||
[Column("USERID")] | |||
public string UserID { get; set; } | |||
/// <summary> | |||
/// 权限 | |||
/// </summary> | |||
[Column("PERMISSION")] | |||
public string Permission { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.ID = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.ID = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,49 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.Permission | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-22 11:35 | |||
/// 描 述:公告发布权限设置 | |||
/// </summary> | |||
public interface DepartmentReleasePermissionsIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<DepartmentReleasePermissionsEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取DepartmentReleasePermissions表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity); | |||
#endregion | |||
DepartmentReleasePermissionsEntity GetTypesByUserId(string userId); | |||
} | |||
} |
@@ -0,0 +1,169 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.Permission | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-22 11:35 | |||
/// 描 述:公告发布权限设置 | |||
/// </summary> | |||
public class DepartmentReleasePermissionsService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<DepartmentReleasePermissionsEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.ID, | |||
t.UserID, | |||
t.Permission | |||
"); | |||
strSql.Append(" FROM DepartmentReleasePermissions t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["DepartmentID"].IsEmpty()) | |||
{ | |||
dp.Add("DepartmentID",queryParam["DepartmentID"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DepartmentID = @DepartmentID "); | |||
} | |||
return this.BaseRepository().FindList<DepartmentReleasePermissionsEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取DepartmentReleasePermissions表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public DepartmentReleasePermissionsEntity GetDepartmentReleasePermissionsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<DepartmentReleasePermissionsEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository().Delete<DepartmentReleasePermissionsEntity>(t=>t.ID == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, DepartmentReleasePermissionsEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository().Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository().Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
public DepartmentReleasePermissionsEntity GetTypesByUserId(string userId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<DepartmentReleasePermissionsEntity>(a=>a.UserID==userId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |