@@ -233,5 +233,47 @@ namespace Learun.Application.Organization | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 获取树形数据 | |||||
/// </summary> | |||||
/// <param name="parentId">父级id</param> | |||||
/// <returns></returns> | |||||
public List<TreeModel> GetTree(string parentId) | |||||
{ | |||||
try | |||||
{ | |||||
List<RoleEntity> list = GetList(); | |||||
List<TreeModel> treeList = new List<TreeModel>(); | |||||
foreach (var item in list) | |||||
{ | |||||
TreeModel node = new TreeModel | |||||
{ | |||||
id = item.F_RoleId, | |||||
text = item.F_FullName, | |||||
value = item.F_RoleId, | |||||
showcheck = false, | |||||
checkstate = 0, | |||||
isexpand = true, | |||||
parentId = item.F_RoleId | |||||
}; | |||||
treeList.Add(node); | |||||
} | |||||
return treeList; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -59,5 +59,16 @@ namespace Learun.Application.Organization | |||||
void SaveEntity(string keyValue, RoleEntity roleEntity); | void SaveEntity(string keyValue, RoleEntity roleEntity); | ||||
string GetIdByRoleName(string v); | string GetIdByRoleName(string v); | ||||
#endregion | #endregion | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// userRelationIBLL.GetUserIdList(objectId); | |||||
/// </summary> | |||||
/// <param name="parentId">父级id</param> | |||||
/// <returns></returns> | |||||
List<TreeModel> GetTree(string parentId); | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -134,7 +134,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult GetPageList(string pagination, string queryJson) | public ActionResult GetPageList(string pagination, string queryJson) | ||||
{ | { | ||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | Pagination paginationobj = pagination.ToObject<Pagination>(); | ||||
var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1); | |||||
var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1).OrderBy(m=>m.SendFlag).ThenByDescending(m => m.SendTime); | |||||
var jsonData = new | var jsonData = new | ||||
{ | { | ||||
rows = data, | rows = data, | ||||
@@ -316,6 +316,34 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
sys_SendFileIBLL.OverIssue(keyValue); | sys_SendFileIBLL.OverIssue(keyValue); | ||||
return Success("下发成功!"); | return Success("下发成功!"); | ||||
} | } | ||||
/// <summary> | |||||
/// 提交 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult IssueList(string keyValue, string CreateUser) | |||||
{ | |||||
sys_SendFileIBLL.IssueList(keyValue, CreateUser); | |||||
return Success("操作成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 作废 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult CancelList(string keyValue) | |||||
{ | |||||
sys_SendFileIBLL.CancelList(keyValue); | |||||
return Success("操作成功!"); | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -174,52 +174,54 @@ var bootstrap = function ($, learun) { | |||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | ||||
headData: | |||||
[ | |||||
{ label: "来文单位", name: "DisFrom", width: 400, align: "center" }, | |||||
{ label: "字", name: "DisWork", width: 150, align: "center" }, | |||||
{ label: "号", name: "DisMark", width: 150, align: "center" }, | |||||
{ label: "年", name: "DisYear", width: 100, align: "center" }, | |||||
{ label: "月", name: "DisMonth", width: 100, align: "center" }, | |||||
{ label: "日", name: "DisDay", width: 100, align: "center" }, | |||||
{ label: "事由", name: "Reasons", width: 500, align: "center" , | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
$.ajax({ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
data: { folderId: value }, | |||||
type: 'GET', | |||||
dataType: "json", | |||||
async: false, | |||||
cache: false, | |||||
success: function (res) { | |||||
var bb = ''; | |||||
$.each(res.data, function (i, item) { | |||||
bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) | |||||
}) | |||||
//$.each(res.data, function(i, item) { | |||||
// bb += '<span onclick="downLoad(\'' + | |||||
// item.F_Id + | |||||
// '\')" style="color:blue">' + | |||||
// item.F_FileName.substring(0,item.F_FileName.indexOf(".")) + | |||||
// '</span>, '; | |||||
//}) | |||||
callback(bb); | |||||
headData: | |||||
[ | |||||
{ label: "来文单位", name: "DisFrom", width: 400, align: "center" }, | |||||
{ label: "字", name: "DisWork", width: 150, align: "center" }, | |||||
{ label: "号", name: "DisMark", width: 150, align: "center" }, | |||||
{ label: "年", name: "DisYear", width: 100, align: "center" }, | |||||
{ label: "月", name: "DisMonth", width: 100, align: "center" }, | |||||
{ label: "日", name: "DisDay", width: 100, align: "center" }, | |||||
{ | |||||
label: "事由", name: "Reasons", width: 500, align: "center", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
$.ajax({ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
data: { folderId: value }, | |||||
type: 'GET', | |||||
dataType: "json", | |||||
async: false, | |||||
cache: false, | |||||
success: function (res) { | |||||
var bb = ''; | |||||
$.each(res.data, function (i, item) { | |||||
bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' | |||||
}) | |||||
//$.each(res.data, function(i, item) { | |||||
// bb += '<span onclick="downLoad(\'' + | |||||
// item.F_Id + | |||||
// '\')" style="color:blue">' + | |||||
// item.F_FileName.substring(0,item.F_FileName.indexOf(".")) + | |||||
// '</span>, '; | |||||
//}) | |||||
callback(bb); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "审批状态", name: "FlowNo", width: 100, align: "center", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 0) { | |||||
return '<span class=\"label label-warning\">草稿</span>'; | |||||
} if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\">审批中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\">审批通过</span>'; | |||||
} | } | ||||
}); | |||||
}}, | |||||
{ | |||||
label: "审批状态", name: "FlowNo", width: 100, align: "center", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 0) { | |||||
return '<span class=\"label label-warning\">草稿</span>'; | |||||
} if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\">审批中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\">审批通过</span>'; | |||||
} | } | ||||
} | } | ||||
} | |||||
], | |||||
], | |||||
mainId: 'Id', | mainId: 'Id', | ||||
sidx: 'RenderDate', | sidx: 'RenderDate', | ||||
sord: 'desc', | sord: 'desc', | ||||
@@ -235,10 +237,29 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
refreshGirdData = function (res, postData) { | refreshGirdData = function (res, postData) { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
var DisFrom = $('#gridtable').jfGridValue('DisFrom'); | |||||
var Reasons = $('#gridtable').jfGridValue('Reasons'); | |||||
$.ajax({ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
data: { folderId: Reasons }, | |||||
type: 'GET', | |||||
dataType: "json", | |||||
async: false, | |||||
cache: false, | |||||
success: function (res) { | |||||
var bb = ''; | |||||
$.each(res.data, | |||||
function (i, item) { | |||||
bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' | |||||
}) | |||||
Reasons = bb; | |||||
} | |||||
}); | |||||
// 发起流程 | // 发起流程 | ||||
var postData = { | var postData = { | ||||
//schemeCode: 'Dispatch',// 本地 | //schemeCode: 'Dispatch',// 本地 | ||||
schemeCode: 'DBSW',//线上 | |||||
//schemeCode: 'DBSW',//线上 | |||||
title: "(" + DisFrom + ") " + Reasons, | |||||
processId: processId, | processId: processId, | ||||
level: '1', | level: '1', | ||||
}; | }; | ||||
@@ -175,47 +175,49 @@ var bootstrap = function ($, learun) { | |||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | url: top.$.rootUrl + '/EducationalAdministration/Dispatch/GetPageList', | ||||
headData: | |||||
[ | |||||
{ label: "来文单位", name: "DisFrom", width: 400, align: "center" }, | |||||
{ label: "字", name: "DisWork", width: 150, align: "center" }, | |||||
{ label: "号", name: "DisMark", width: 150, align: "center" }, | |||||
//{ label: "份数", name: "Copies", width: 100, align: "center" }, | |||||
{ label: "年", name: "DisYear", width: 100, align: "center" }, | |||||
{ label: "月", name: "DisMonth", width: 100, align: "center" }, | |||||
{ label: "日", name: "DisDay", width: 100, align: "center" }, | |||||
{ label: "事由", name: "Reasons", width: 500, align: "center" , | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
$.ajax({ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
data: { folderId: value }, | |||||
type: 'GET', | |||||
dataType: "json", | |||||
async: false, | |||||
cache: false, | |||||
success: function (res) { | |||||
var bb = ''; | |||||
$.each(res.data, function (i, item) { | |||||
bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) | |||||
}) | |||||
callback(bb); | |||||
headData: | |||||
[ | |||||
{ label: "来文单位", name: "DisFrom", width: 400, align: "center" }, | |||||
{ label: "字", name: "DisWork", width: 150, align: "center" }, | |||||
{ label: "号", name: "DisMark", width: 150, align: "center" }, | |||||
//{ label: "份数", name: "Copies", width: 100, align: "center" }, | |||||
{ label: "年", name: "DisYear", width: 100, align: "center" }, | |||||
{ label: "月", name: "DisMonth", width: 100, align: "center" }, | |||||
{ label: "日", name: "DisDay", width: 100, align: "center" }, | |||||
{ | |||||
label: "事由", name: "Reasons", width: 500, align: "center", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
$.ajax({ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
data: { folderId: value }, | |||||
type: 'GET', | |||||
dataType: "json", | |||||
async: false, | |||||
cache: false, | |||||
success: function (res) { | |||||
var bb = ''; | |||||
$.each(res.data, function (i, item) { | |||||
bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' | |||||
}) | |||||
bb | |||||
callback(bb); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "审批状态", name: "FlowNo", width: 100, align: "center", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 0) { | |||||
return '<span class=\"label label-warning\">草稿</span>'; | |||||
} if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\">审批中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\">审批通过</span>'; | |||||
} | } | ||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "审批状态", name: "FlowNo", width: 100, align: "center", | |||||
formatter: function (cellvalue, row) { | |||||
if (cellvalue == 0) { | |||||
return '<span class=\"label label-warning\">草稿</span>'; | |||||
} if (cellvalue == 1) { | |||||
return '<span class=\"label label-warning\">审批中</span>'; | |||||
} else if (cellvalue == 2) { | |||||
return '<span class=\"label label-success\">审批通过</span>'; | |||||
} | } | ||||
} | } | ||||
} | |||||
], | |||||
], | |||||
mainId: 'Id', | mainId: 'Id', | ||||
sidx: 'RenderDate', | sidx: 'RenderDate', | ||||
sord: 'desc', | sord: 'desc', | ||||
@@ -234,10 +236,29 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
refreshGirdData = function (res, postData) { | refreshGirdData = function (res, postData) { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
var DisFrom = $('#gridtable').jfGridValue('DisFrom'); | |||||
var Reasons = $('#gridtable').jfGridValue('Reasons'); | |||||
$.ajax({ | |||||
url: '/LR_SystemModule/Annexes/GetAnnexesFileList', | |||||
data: { folderId: Reasons }, | |||||
type: 'GET', | |||||
dataType: "json", | |||||
async: false, | |||||
cache: false, | |||||
success: function (res) { | |||||
var bb = ''; | |||||
$.each(res.data, | |||||
function (i, item) { | |||||
bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ',' | |||||
}) | |||||
Reasons = bb; | |||||
} | |||||
}); | |||||
// 发起流程 | // 发起流程 | ||||
var postData = { | var postData = { | ||||
//schemeCode: 'Dispatch',// 本地 | //schemeCode: 'Dispatch',// 本地 | ||||
schemeCode: 'XBSW',// 线上 | schemeCode: 'XBSW',// 线上 | ||||
title: "(" + DisFrom + ") " + Reasons, | |||||
processId: processId, | processId: processId, | ||||
level: '1', | level: '1', | ||||
}; | }; | ||||
@@ -27,6 +27,10 @@ | |||||
<div class="lr-form-item-title">接收校区<font face="宋体">*</font></div> | <div class="lr-form-item-title">接收校区<font face="宋体">*</font></div> | ||||
<div id="CompanyId" ></div> | <div id="CompanyId" ></div> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="RoleIddiv"> | |||||
<div class="lr-form-item-title">接收角色<font face="宋体">*</font></div> | |||||
<div id="RoleId" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | <div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | ||||
<div class="lr-form-item-title">文件</div> | <div class="lr-form-item-title">文件</div> | ||||
<div id="Url" ></div> | <div id="Url" ></div> | ||||
@@ -29,6 +29,7 @@ var bootstrap = function ($, learun) { | |||||
$('#CompanyId').lrCompanySelect({ type: 'multiple' }); | $('#CompanyId').lrCompanySelect({ type: 'multiple' }); | ||||
$('#DeptId').lrDepartmentSelect({ type: 'treemultiple' }); | $('#DeptId').lrDepartmentSelect({ type: 'treemultiple' }); | ||||
$('#PostId').lrPostSelect({ type: 'treemultiple' }); | $('#PostId').lrPostSelect({ type: 'treemultiple' }); | ||||
$('#RoleId').lrRoleSelect({ code: 'treemultiple' }); | |||||
$('#ReceiverUserId').lrUserSelect({ type: '1' }); | $('#ReceiverUserId').lrUserSelect({ type: '1' }); | ||||
$('#SendType').lrDataItemSelect({ | $('#SendType').lrDataItemSelect({ | ||||
code: 'FileSendType', select: function (item) { | code: 'FileSendType', select: function (item) { | ||||
@@ -46,6 +47,9 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
} else if (item.id === 2 || item.id === "2") { | } else if (item.id === 2 || item.id === "2") { | ||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
$("#CompanyId").removeAttr("isvalid"); | $("#CompanyId").removeAttr("isvalid"); | ||||
@@ -59,6 +63,9 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
} else if (item.id === 3 || item.id === "3") { | } else if (item.id === 3 || item.id === "3") { | ||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
$("#CompanyId").removeAttr("isvalid"); | $("#CompanyId").removeAttr("isvalid"); | ||||
@@ -72,7 +79,10 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").show(); | $("#PostIddiv").show(); | ||||
$("#PostId").attr("isvalid", "yes"); | $("#PostId").attr("isvalid", "yes"); | ||||
$("#PostId").attr("checkexpession", "NotNull"); | $("#PostId").attr("checkexpession", "NotNull"); | ||||
} else { | |||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
} else if (item.id === 4 || item.id === "4") { | |||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
$("#CompanyId").removeAttr("isvalid"); | $("#CompanyId").removeAttr("isvalid"); | ||||
$("#CompanyId").removeAttr("NotNull"); | $("#CompanyId").removeAttr("NotNull"); | ||||
@@ -85,6 +95,25 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
} else { | |||||
$("#CompanyIddiv").hide(); | |||||
$("#CompanyId").removeAttr("isvalid"); | |||||
$("#CompanyId").removeAttr("NotNull"); | |||||
$("#DeptIddiv").hide(); | |||||
$("#DeptId").removeAttr("isvalid"); | |||||
$("#DeptId").removeAttr("NotNull"); | |||||
$("#ReceiverIddiv").hide(); | |||||
$("#ReceiverUserId").removeAttr("isvalid"); | |||||
$("#ReceiverUserId").removeAttr("NotNull"); | |||||
$("#PostIddiv").hide(); | |||||
$("#PostId").removeAttr("isvalid"); | |||||
$("#PostId").removeAttr("NotNull"); | |||||
$("#RoleIddiv").show(); | |||||
$("#RoleId").attr("isvalid", "yes"); | |||||
$("#RoleId").attr("checkexpession", "NotNull"); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -116,6 +145,9 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
$("#CompanyId").lrselectSet(data[id].ReceiverId); | $("#CompanyId").lrselectSet(data[id].ReceiverId); | ||||
} else if (data[id].SendType === 2 || data[id].SendType == "2") { | } else if (data[id].SendType === 2 || data[id].SendType == "2") { | ||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
@@ -130,8 +162,12 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
$("#DeptId").lrselectSet(data[id].ReceiverId); | $("#DeptId").lrselectSet(data[id].ReceiverId); | ||||
} else if (data[id].SendType === 3 || data[id].SendType === "3") { | |||||
} | |||||
else if (data[id].SendType === 3 || data[id].SendType === "3") { | |||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
$("#CompanyId").removeAttr("isvalid"); | $("#CompanyId").removeAttr("isvalid"); | ||||
$("#CompanyId").removeAttr("NotNull"); | $("#CompanyId").removeAttr("NotNull"); | ||||
@@ -144,8 +180,12 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").show(); | $("#PostIddiv").show(); | ||||
$("#PostId").attr("isvalid", "yes"); | $("#PostId").attr("isvalid", "yes"); | ||||
$("#PostId").attr("checkexpession", "NotNull"); | $("#PostId").attr("checkexpession", "NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
$("#PostId").lrselectSet(data[id].ReceiverId); | $("#PostId").lrselectSet(data[id].ReceiverId); | ||||
} else { | |||||
} | |||||
else if (data[id].SendType === 4 || data[id].SendType === "4") { | |||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
$("#CompanyId").removeAttr("isvalid"); | $("#CompanyId").removeAttr("isvalid"); | ||||
$("#CompanyId").removeAttr("NotNull"); | $("#CompanyId").removeAttr("NotNull"); | ||||
@@ -158,7 +198,27 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
$("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); | $("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); | ||||
} else { | |||||
$("#CompanyIddiv").hide(); | |||||
$("#CompanyId").removeAttr("isvalid"); | |||||
$("#CompanyId").removeAttr("NotNull"); | |||||
$("#DeptIddiv").hide(); | |||||
$("#DeptId").removeAttr("isvalid"); | |||||
$("#DeptId").removeAttr("NotNull"); | |||||
$("#ReceiverIddiv").hide(); | |||||
$("#ReceiverUserId").removeAttr("isvalid"); | |||||
$("#ReceiverUserId").removeAttr("NotNull"); | |||||
$("#PostIddiv").hide(); | |||||
$("#PostId").removeAttr("isvalid"); | |||||
$("#PostId").removeAttr("NotNull"); | |||||
$("#RoleIddiv").show(); | |||||
$("#RoleId").attr("isvalid", "yes"); | |||||
$("#RoleId").attr("checkexpession", "NotNull"); | |||||
$("#RoleId").lrformselectSet(data[id].ReceiverId); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -193,6 +253,9 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
$("#CompanyId").lrselectSet(data[id].ReceiverId); | $("#CompanyId").lrselectSet(data[id].ReceiverId); | ||||
} else if (data[id].SendType === 2 || data[id].SendType == "2") { | } else if (data[id].SendType === 2 || data[id].SendType == "2") { | ||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
@@ -207,6 +270,9 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
$("#DeptId").lrselectSet(data[id].ReceiverId); | $("#DeptId").lrselectSet(data[id].ReceiverId); | ||||
} else if (data[id].SendType === 3 || data[id].SendType === "3") { | } else if (data[id].SendType === 3 || data[id].SendType === "3") { | ||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
@@ -221,8 +287,11 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").show(); | $("#PostIddiv").show(); | ||||
$("#PostId").attr("isvalid", "yes"); | $("#PostId").attr("isvalid", "yes"); | ||||
$("#PostId").attr("checkexpession", "NotNull"); | $("#PostId").attr("checkexpession", "NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
$("#PostId").lrselectSet(data[id].ReceiverId); | $("#PostId").lrselectSet(data[id].ReceiverId); | ||||
} else { | |||||
} else if (data[id].SendType === 4 || data[id].SendType === "4") { | |||||
$("#CompanyIddiv").hide(); | $("#CompanyIddiv").hide(); | ||||
$("#CompanyId").removeAttr("isvalid"); | $("#CompanyId").removeAttr("isvalid"); | ||||
$("#CompanyId").removeAttr("NotNull"); | $("#CompanyId").removeAttr("NotNull"); | ||||
@@ -235,7 +304,27 @@ var bootstrap = function ($, learun) { | |||||
$("#PostIddiv").hide(); | $("#PostIddiv").hide(); | ||||
$("#PostId").removeAttr("isvalid"); | $("#PostId").removeAttr("isvalid"); | ||||
$("#PostId").removeAttr("NotNull"); | $("#PostId").removeAttr("NotNull"); | ||||
$("#RoleIddiv").hide(); | |||||
$("#RoleId").removeAttr("isvalid"); | |||||
$("#RoleId").removeAttr("NotNull"); | |||||
$("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); | $("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); | ||||
} else { | |||||
$("#CompanyIddiv").hide(); | |||||
$("#CompanyId").removeAttr("isvalid"); | |||||
$("#CompanyId").removeAttr("NotNull"); | |||||
$("#DeptIddiv").hide(); | |||||
$("#DeptId").removeAttr("isvalid"); | |||||
$("#DeptId").removeAttr("NotNull"); | |||||
$("#ReceiverIddiv").hide(); | |||||
$("#ReceiverUserId").removeAttr("isvalid") | |||||
$("#ReceiverUserId").removeAttr("isvalid") | |||||
$("#PostIddiv").hide(); | |||||
$("#PostId").removeAttr("isvalid"); | |||||
$("#PostId").removeAttr("NotNull"); | |||||
$("#RoleIddiv").show(); | |||||
$("#RoleId").attr("isvalid", "yes"); | |||||
$("#RoleId").attr("checkexpession", "NotNull"); | |||||
$("#RoleId").lrformselectSet(data[id].ReceiverId); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -262,9 +351,12 @@ var bootstrap = function ($, learun) { | |||||
} else if (sendtype == "3") { | } else if (sendtype == "3") { | ||||
formData.ReceiverId = $("#PostId").lrselectGet(); | formData.ReceiverId = $("#PostId").lrselectGet(); | ||||
formData.Receiver = $("#PostId").find(".lr-select-placeholder").text(); | formData.Receiver = $("#PostId").find(".lr-select-placeholder").text(); | ||||
} else { | |||||
} else if (sendtype == "4") { | |||||
formData.ReceiverId = $("#ReceiverUserId").lrformselectGet(); | formData.ReceiverId = $("#ReceiverUserId").lrformselectGet(); | ||||
formData.Receiver = $("#ReceiverUserId").find("span").text(); | formData.Receiver = $("#ReceiverUserId").find("span").text(); | ||||
} else { | |||||
formData.ReceiverId = $("#RoleId").lrselectGet(); | |||||
formData.Receiver = $("#RoleId").find(".lr-select-placeholder").text(); | |||||
} | } | ||||
if (!!processId) { | if (!!processId) { | ||||
formData.SProcessId = processId; | formData.SProcessId = processId; | ||||
@@ -29,8 +29,10 @@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<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> | ||||
<a id="lr_nosubmit" 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_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_read" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查阅情况</a> | ||||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-trash-o"></i> <span class="lrlg">作废</span></a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -138,6 +138,47 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 下发 | |||||
$('#lr_nosubmit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||||
var CreateUser = learun.clientdata.get(['userinfo']).realName; | |||||
if (learun.checkrow(keyValue)) { | |||||
var SendFlag = $('#gridtable').jfGridValue('SendFlag'); | |||||
if (SendFlag !== 0) { | |||||
learun.alert.warning("当前项目已下发,请勿重复下发!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/IssueList', | |||||
{ | |||||
keyValue: keyValue, CreateUser: CreateUser | |||||
}), | |||||
function (res) { | |||||
refreshGirdData(res, {}); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 作废 | |||||
$('#lr_cancel').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认作废此公文?', function (res, _index) { | |||||
if (res) { | |||||
learun.loading(true, '作废流程中...'); | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/CancelList', | |||||
{ | |||||
keyValue: keyValue | |||||
}), | |||||
function (res) { | |||||
refreshGirdData(res, {}); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -282,7 +282,8 @@ var bootstrap = function ($, learun) { | |||||
{ | { | ||||
label: "标题", name: "F_Title", width: 300, align: "left", formatter: function (cellvalue, row) { | label: "标题", name: "F_Title", width: 300, align: "left", formatter: function (cellvalue, row) { | ||||
if (row.F_SchemeName != row.F_Title && row.F_Title) { | if (row.F_SchemeName != row.F_Title && row.F_Title) { | ||||
return row.F_SchemeName + "(" + row.F_Title + ")"; | |||||
//return row.F_SchemeName + "(" + row.F_Title + ")"; | |||||
return row.F_SchemeName + row.F_Title; | |||||
} | } | ||||
else { | else { | ||||
return row.F_SchemeName; | return row.F_SchemeName; | ||||
@@ -39,7 +39,6 @@ var bootstrap = function ($, learun) { | |||||
if (btn.next == '2') { | if (btn.next == '2') { | ||||
isNext = '1'; | isNext = '1'; | ||||
} | } | ||||
console.log(isNext,111111); | |||||
if (isNext == '1') {// 获取下一节点数据 | if (isNext == '1') {// 获取下一节点数据 | ||||
var param = { | var param = { | ||||
code: shcemeCode, | code: shcemeCode, | ||||
@@ -680,7 +679,7 @@ var bootstrap = function ($, learun) { | |||||
_nodeMap[_item.id] = _item; | _nodeMap[_item.id] = _item; | ||||
}); | }); | ||||
$.each(data, function (_id, _list) { | $.each(data, function (_id, _list) { | ||||
if (_list.length > 1) { | |||||
if (_list.length > 1) { | |||||
_flag = true; | _flag = true; | ||||
return false; | return false; | ||||
} | } | ||||
@@ -699,7 +698,7 @@ var bootstrap = function ($, learun) { | |||||
return top[id].acceptClick(function (auditers) { | return top[id].acceptClick(function (auditers) { | ||||
// 保存表单数据 | // 保存表单数据 | ||||
custmerForm.save(nwflow.processId, nwflow.currentNode.wfForms, function () { | custmerForm.save(nwflow.processId, nwflow.currentNode.wfForms, function () { | ||||
// 审批流程 | // 审批流程 | ||||
learun.loading(true, '审批流程...'); | learun.loading(true, '审批流程...'); | ||||
var postData = { | var postData = { | ||||
@@ -712,13 +711,13 @@ var bootstrap = function ($, learun) { | |||||
signUrl: signUrl, | signUrl: signUrl, | ||||
stamp: stamp | stamp: stamp | ||||
}; | }; | ||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { | |||||
learun.loading(false); | |||||
if (_data) { | |||||
learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); | |||||
learun.frameTab.close(tabIframeId); | |||||
} | |||||
}); | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { | |||||
learun.loading(false); | |||||
if (_data) { | |||||
learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); | |||||
learun.frameTab.close(tabIframeId); | |||||
} | |||||
}); | |||||
}); | }); | ||||
}); | }); | ||||
} | } | ||||
@@ -27,7 +27,7 @@ var bootstrap = function ($, learun) { | |||||
data: _list, | data: _list, | ||||
value: 'Id', | value: 'Id', | ||||
text: 'Name', | text: 'Name', | ||||
allowSearch:true | |||||
allowSearch: true | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
@@ -45,9 +45,13 @@ var bootstrap = function ($, learun) { | |||||
auditers[id] = formData[id]; | auditers[id] = formData[id]; | ||||
} | } | ||||
}); | }); | ||||
callBack(auditers); | |||||
return true; | |||||
}; | |||||
if (Object.keys(auditers).length > 0) { | |||||
callBack(auditers); | |||||
return true; | |||||
} else { | |||||
learun.alert.warning("请选择相关人员!"); | |||||
return false; | |||||
} | |||||
} | |||||
page.init(); | page.init(); | ||||
} | } |
@@ -130,5 +130,21 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers | |||||
return Success("删除成功!"); | return Success("删除成功!"); | ||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展数据 | |||||
/// <summary> | |||||
/// 获取树形数据 | |||||
/// </summary> | |||||
/// <param name="companyId">公司主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetTree(string companyId) | |||||
{ | |||||
var data = roleIBLL.GetTree(companyId); | |||||
return JsonResult(data); | |||||
} | |||||
#endregion | |||||
} | } | ||||
} | } |
@@ -71,6 +71,21 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 数字化考核 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexDAM() | |||||
{ | |||||
return View(); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult FormDAM() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -119,6 +134,30 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers | |||||
}; | }; | ||||
return JsonResult(jsonData); | return JsonResult(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// 分页查询 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询条件函数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetDAMList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = LogBLL.GetDAMList(paginationobj, queryJson, ""); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records, | |||||
}; | |||||
return JsonResult(jsonData); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -0,0 +1,18 @@ | |||||
@{ | |||||
ViewBag.Title = "清空日志"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">日志保留时间</div> | |||||
<div id="keepTime"> | |||||
<ul> | |||||
<li data-value="7">保留近一周</li> | |||||
<li data-value="1">保留近一个月</li> | |||||
<li data-value="3">保留近三个月</li> | |||||
<li data-value="0">不保留,全部删除</li> | |||||
</ul> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LR_SystemModule/Views/Log/FormDAM.js") |
@@ -0,0 +1,33 @@ | |||||
/* | |||||
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:陈彬彬 | |||||
* 日 期:2017.04.11 | |||||
* 描 述:清空日志管理 | |||||
*/ | |||||
var categoryId = request('categoryId'); | |||||
var acceptClick; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('#keepTime').lrselect({maxHeight:75,placeholder:false}).lrselectSet(7); | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('#form').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = $('#form').lrGetFormData(); | |||||
postData['categoryId'] = categoryId; | |||||
$.lrSaveForm(top.$.rootUrl + '/LR_SystemModule/Log/SaveRemoveLog', postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,36 @@ | |||||
@{ | |||||
ViewBag.Title = "日志管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div id="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" class="datetime"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" /> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> <span class="lrlt">查询</span></a> | |||||
</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_removelog" class="btn btn-default"><i class="fa fa-eraser"></i> <span class="lrlt">清空</span></a> | |||||
<a id="lr_export" class="btn btn-default"><i class="fa fa-sign-out"></i> <span class="lrlt">导出</span></a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/LR_SystemModule/Views/Log/IndexDAM.js") | |||||
@@ -0,0 +1,137 @@ | |||||
/* | |||||
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||||
* 创建人:陈彬彬 | |||||
* 日 期:2017.03.22 | |||||
* 描 述:日志管理 | |||||
*/ | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var categoryId = '1'; | |||||
var logbegin = ''; | |||||
var logend = ''; | |||||
var refreshGirdData = function () { | |||||
page.search(); | |||||
} | |||||
var page = { | |||||
init: function () { | |||||
page.initGrid(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('.datetime').each(function () { | |||||
$(this).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) { | |||||
logbegin = begin; | |||||
logend = end; | |||||
page.search(); | |||||
} | |||||
}); | |||||
}); | |||||
// 查询 | |||||
$('#btn_Search').on('click', function () { | |||||
var keyword = $('#txt_Keyword').val(); | |||||
page.search({ keyword: keyword }); | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 清空 | |||||
$('#lr_removelog').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '清空', | |||||
url: top.$.rootUrl + '/LR_SystemModule/Log/Form?categoryId=' + categoryId, | |||||
height: 200, | |||||
width: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 导出 | |||||
$('#lr_export').on('click', function () { | |||||
learun.layerForm({ | |||||
id: "ExcelExportForm", | |||||
title: '导出Excel数据', | |||||
url: top.$.rootUrl + '/Utility/ExcelExportForm?gridId=gridtable&filename=log', | |||||
width: 500, | |||||
height: 380, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(); | |||||
}, | |||||
btn: ['导出Excel', '关闭'] | |||||
}); | |||||
}); | |||||
}, | |||||
initGrid: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/Log/GetDAMList', | |||||
headData: [ | |||||
{ | |||||
label: "操作时间", name: "F_OperateTime",width: 200, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss'); | |||||
} | |||||
}, | |||||
{ label: "操作用户", name: "F_OperateAccount",width: 300, align: "left" }, | |||||
{ label: "IP地址", name: "F_IPAddress", width: 200, align: "left" }, | |||||
{ label: "系统功能", name: "F_Module", width: 200, align: "left" }, | |||||
{ label: "操作类型", name: "F_OperateType", width: 150, align: "center" }, | |||||
{ | |||||
label: "执行结果", name: "F_ExecuteResult", width: 150, align: "center", | |||||
formatter: function (cellvalue) { | |||||
if (cellvalue == '1') { | |||||
return "<span class=\"label label-success\">成功</span>"; | |||||
} else { | |||||
return "<span class=\"label label-danger\">失败</span>"; | |||||
} | |||||
} | |||||
}, | |||||
{ label: "执行结果描述", name: "F_ExecuteResultJson", width: 300, align: "left" } | |||||
], | |||||
mainId: 'F_ItemDetailId', | |||||
isPage: true, | |||||
sidx: 'F_OperateTime' | |||||
}); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.CategoryId = 1; | |||||
param.StartTime = logbegin; | |||||
param.EndTime = logend; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} | |||||
@@ -665,6 +665,26 @@ | |||||
_obj.push($obj); | _obj.push($obj); | ||||
}); | }); | ||||
}; | }; | ||||
$.fn.lrRoleSelect = function (op) { | |||||
// op:parentId 父级id,maxHeight 200, | |||||
var dfop = { | |||||
type: 'tree', | |||||
// 是否允许搜索 | |||||
allowSearch: true, | |||||
// 访问数据接口地址 | |||||
url: top.$.rootUrl + '/LR_OrganizationModule/Role/GetTree', | |||||
// 访问数据接口参数 | |||||
param: { parentId: '0' } | |||||
}; | |||||
op = op || {}; | |||||
dfop.param.companyId = op.companyId; | |||||
dfop.param.parentId = op.parentId; | |||||
if (!!op.type) { | |||||
dfop.type = op.type; | |||||
} | |||||
return $(this).lrselect(dfop); | |||||
}; | |||||
// 数据库选择 | // 数据库选择 | ||||
$.fn.lrDbSelect = function (op) { | $.fn.lrDbSelect = function (op) { | ||||
// op:maxHeight 200, | // op:maxHeight 200, | ||||
@@ -107,6 +107,30 @@ namespace Learun.Application.Base.SystemModule | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 数字化考核 | |||||
/// </summary> | |||||
/// <param name="pagination">分页</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public static IEnumerable<LogEntity> GetDAMList(Pagination pagination, string queryJson, string userId) | |||||
{ | |||||
try | |||||
{ | |||||
return service.GetDAMList(pagination, queryJson, userId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -209,6 +209,110 @@ namespace Learun.Application.Base.SystemModule | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 日志列表 | |||||
/// </summary> | |||||
/// <param name="pagination">分页</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <param name="userId">操作用户Id</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<LogEntity> GetDAMList(Pagination pagination, string queryJson, string userId) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
strSql.Append("select zb.*,dd.*,ee.* from "); | |||||
strSql.Append("( select t.* from LR_Base_Log t where 1=1 "); | |||||
#region 条件 | |||||
// 日志分类 | |||||
if (!queryParam["CategoryId"].IsEmpty()) | |||||
{ | |||||
dp.Add("CategoryId", queryParam["CategoryId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.F_CategoryId = @CategoryId "); | |||||
} | |||||
// 操作时间 | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||||
strSql.Append(" AND (t.F_OperateTime >= @startTime and t.F_OperateTime <= @endTime) "); | |||||
} | |||||
// 操作用户Id | |||||
if (!queryParam["OperateUserId"].IsEmpty()) | |||||
{ | |||||
dp.Add("OperateUserId", queryParam["OperateUserId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.F_OperateUserId = @OperateUserId "); | |||||
} | |||||
// 操作用户账户 | |||||
if (!queryParam["OperateAccount"].IsEmpty()) | |||||
{ | |||||
dp.Add("OperateAccount", queryParam["OperateAccount"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.F_OperateAccount = @OperateAccount "); | |||||
} | |||||
// 操作类型 | |||||
if (!queryParam["OperateType"].IsEmpty()) | |||||
{ | |||||
dp.Add("OperateType", queryParam["OperateType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.F_OperateType = @OperateType "); | |||||
} | |||||
// 功能模块 | |||||
if (!queryParam["Module"].IsEmpty()) | |||||
{ | |||||
dp.Add("Module", queryParam["Module"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.F_Module = @Module "); | |||||
} | |||||
// 关键字 | |||||
if (!queryParam["keyword"].IsEmpty()) | |||||
{ | |||||
dp.Add("keyword", queryParam["keyword"].ToString(), DbType.String); | |||||
strSql.Append(" AND ( (t.F_CategoryId = '1') or (t.F_Module like'@keyword') or (t.F_IPAddress like '@keyword') ) "); | |||||
} | |||||
// 登录用户id | |||||
if (!string.IsNullOrEmpty(userId)) | |||||
{ | |||||
dp.Add("userId", queryParam["userId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.F_OperateUserId = @userId "); | |||||
} | |||||
#endregion | |||||
strSql.Append(" )zb "); | |||||
strSql.Append("left join( "); | |||||
strSql.Append(" select bb.F_userId,bb.F_userRelationid,bb.F_FullName,bb.F_EnCode,lbu.F_RealName,lbu.F_companyid,lbu.F_departmentid"); | |||||
strSql.Append(" from LR_BASE_USER lbu "); | |||||
strSql.Append(" left join( select AA.F_userRelationid,AA.F_UserId,lbr.* from LR_Base_Role lbr "); | |||||
strSql.Append(" left join ("); | |||||
strSql.Append(" select * from LR_Base_UserRelation lby "); | |||||
strSql.Append(" ) AA on AA.F_ObjectId = lbr.F_roleid "); | |||||
strSql.Append(" WHERE lbr.F_EnabledMark = 1 AND lbr.F_DeleteMark = 0 and lbr.F_EnCode= '100004' "); | |||||
strSql.Append(" )bb on bb.F_UserId = lbu.F_UserId where lbu.F_Description ='教师' and lbu.F_UserId=bb.F_UserId "); | |||||
strSql.Append(")dd on zb.F_operateUserId =dd.F_UserId "); | |||||
strSql.Append("left join ("); | |||||
strSql.Append(" select lbd.F_DepartmentId,lbd.F_CompanyId,lbd.F_FullName,lbd.F_Manager,cc.F_UserId from LR_BASE_DEPARTMENT lbd"); | |||||
strSql.Append(" left join ("); | |||||
strSql.Append(" select * from LR_Base_User lbu where lbu.F_EnabledMark = 1 AND lbu.F_DeleteMark = 0 and F_Description ='教师'"); | |||||
strSql.Append(" )"); | |||||
strSql.Append(" CC on lbd.F_FullName = CC.F_RealName"); | |||||
strSql.Append(" where lbd.F_DeleteMark = 0 and lbd.F_EnabledMark = 1 and lbd.F_FullName is not null and lbd.F_Manager is not null"); | |||||
strSql.Append(") ee on zb.F_operateUserId =ee.F_UserId "); | |||||
return this.BaseRepository().FindList<LogEntity>(strSql.ToString(), dp); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -223,6 +223,70 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 非流程提交(下发) | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void IssueList(string keyValue, string CreateUser) | |||||
{ | |||||
try | |||||
{ | |||||
sys_SendFileService.IssueList(keyValue, CreateUser); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void NoProcessId(string keyValue, int status) | |||||
{ | |||||
try | |||||
{ | |||||
sys_SendFileService.NoProcessId(keyValue, status); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 作废 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void CancelList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
sys_SendFileService.CancelList(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -59,5 +59,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
#endregion | #endregion | ||||
void OverIssue(string keyValue); | void OverIssue(string keyValue); | ||||
/// <summary> | |||||
/// 非流程下发 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="CreateUser"></param> | |||||
void IssueList(string keyValue, string CreateUser); | |||||
/// <summary> | |||||
/// 获取主表实体数据 | |||||
/// <param name="processId">流程实例ID</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
void NoProcessId(string keyValue, int status); | |||||
void CancelList(string keyValue); | |||||
} | } | ||||
} | } |
@@ -460,6 +460,269 @@ on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 非流程提交(下发) | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void IssueList(string keyValue, string CreateUser) | |||||
{ | |||||
try | |||||
{ | |||||
var entity = this.BaseRepository().FindEntity<Sys_SendFileEntity>(a => a.SFileId == keyValue); | |||||
if (null != entity) | |||||
{ | |||||
entity.SendFlag = 2; | |||||
entity.SendTime = DateTime.Now; | |||||
NoProcessId(keyValue, 2); | |||||
} | |||||
this.BaseRepository().Update(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 修改审批状态 | |||||
/// </summary> | |||||
/// <param name="processId"></param> | |||||
/// <param name="status"></param> | |||||
public void NoProcessId(string keyValue, int status) | |||||
{ | |||||
if (status == 2) | |||||
{ | |||||
var db = BaseRepository().BeginTrans(); | |||||
try | |||||
{ | |||||
var needpostuserlist = new List<UserEntity>(); | |||||
var Sys_SendFile = db.FindEntity<Sys_SendFileEntity>(m => m.SFileId == keyValue); | |||||
if (Sys_SendFile.SendType == "1") | |||||
{ | |||||
var teacherlist = db.FindList<UserEntity>(m => | |||||
m.F_DeleteMark != 1 && m.F_EnabledMark == 1 && m.F_Description == "教师" && | |||||
m.F_CompanyId == Sys_SendFile.ReceiverId); | |||||
needpostuserlist = teacherlist.ToList(); | |||||
foreach (var tEntity in teacherlist) | |||||
{ | |||||
Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); | |||||
receiveFile.Create(); | |||||
receiveFile.SFileId = Sys_SendFile.SFileId; | |||||
receiveFile.SenderId = Sys_SendFile.SenderId; | |||||
receiveFile.Sender = Sys_SendFile.Sender; | |||||
receiveFile.ReceiverId = tEntity.F_UserId; | |||||
receiveFile.Receiver = tEntity.F_RealName; | |||||
receiveFile.Title = Sys_SendFile.Title; | |||||
receiveFile.Contents = Sys_SendFile.Contents; | |||||
receiveFile.Url = Sys_SendFile.Url; | |||||
receiveFile.ReadFlag = false; | |||||
receiveFile.SendTime = DateTime.Now; | |||||
receiveFile.SendType = Sys_SendFile.SendType; | |||||
receiveFile.DelFlag = false; | |||||
receiveFile.STypeId = Sys_SendFile.STypeId; | |||||
receiveFile.ReplyFlag = false; | |||||
receiveFile.SLastDate = Sys_SendFile.SLastDate; | |||||
receiveFile.RUrl = Guid.NewGuid().ToString(); | |||||
db.Insert(receiveFile); | |||||
} | |||||
} | |||||
else if (Sys_SendFile.SendType == "2") | |||||
{ | |||||
var teacherlist = db.FindList<UserEntity>(m => | |||||
m.F_DeleteMark != 1 && m.F_EnabledMark == 1 && m.F_Description == "教师" && | |||||
Sys_SendFile.ReceiverId.Contains(m.F_DepartmentId)); | |||||
needpostuserlist = teacherlist.ToList(); | |||||
foreach (var tEntity in teacherlist) | |||||
{ | |||||
Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); | |||||
receiveFile.Create(); | |||||
receiveFile.SFileId = Sys_SendFile.SFileId; | |||||
receiveFile.SenderId = Sys_SendFile.SenderId; | |||||
receiveFile.Sender = Sys_SendFile.Sender; | |||||
receiveFile.ReceiverId = tEntity.F_UserId; | |||||
receiveFile.Receiver = tEntity.F_RealName; | |||||
receiveFile.Title = Sys_SendFile.Title; | |||||
receiveFile.Contents = Sys_SendFile.Contents; | |||||
receiveFile.Url = Sys_SendFile.Url; | |||||
receiveFile.ReadFlag = false; | |||||
receiveFile.SendTime = DateTime.Now; | |||||
receiveFile.SendType = Sys_SendFile.SendType; | |||||
receiveFile.DelFlag = false; | |||||
receiveFile.STypeId = Sys_SendFile.STypeId; | |||||
receiveFile.ReplyFlag = false; | |||||
receiveFile.SLastDate = Sys_SendFile.SLastDate; | |||||
receiveFile.RUrl = Guid.NewGuid().ToString(); | |||||
db.Insert(receiveFile); | |||||
} | |||||
} | |||||
else if (Sys_SendFile.SendType == "3") | |||||
{ | |||||
List<string> ppostid = Sys_SendFile.ReceiverId.Split(',').ToList(); | |||||
for (int i = 0; i < ppostid.Count; i++) | |||||
{ | |||||
ppostid[i] = "'" + ppostid[i] + "'"; | |||||
} | |||||
var teacherlist = db.FindList<UserEntity>( | |||||
@"select distinct a.* from [dbo].[LR_Base_User] a left join [dbo].[LR_Base_UserRelation] b | |||||
on a.F_UserId=b.F_UserId where b.F_ObjectId in(" + string.Join(",", ppostid) + | |||||
") and a.F_DeleteMark<>1 and a.F_EnabledMark=1 and a.F_Description='教师'"); | |||||
needpostuserlist = teacherlist.ToList(); | |||||
foreach (var tEntity in teacherlist) | |||||
{ | |||||
Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); | |||||
receiveFile.Create(); | |||||
receiveFile.SFileId = Sys_SendFile.SFileId; | |||||
receiveFile.SenderId = Sys_SendFile.SenderId; | |||||
receiveFile.Sender = Sys_SendFile.Sender; | |||||
receiveFile.ReceiverId = tEntity.F_UserId; | |||||
receiveFile.Receiver = tEntity.F_RealName; | |||||
receiveFile.Title = Sys_SendFile.Title; | |||||
receiveFile.Contents = Sys_SendFile.Contents; | |||||
receiveFile.Url = Sys_SendFile.Url; | |||||
receiveFile.ReadFlag = false; | |||||
receiveFile.SendTime = DateTime.Now; | |||||
receiveFile.SendType = Sys_SendFile.SendType; | |||||
receiveFile.DelFlag = false; | |||||
receiveFile.STypeId = Sys_SendFile.STypeId; | |||||
receiveFile.ReplyFlag = false; | |||||
receiveFile.SLastDate = Sys_SendFile.SLastDate; | |||||
receiveFile.RUrl = Guid.NewGuid().ToString(); | |||||
db.Insert(receiveFile); | |||||
} | |||||
} | |||||
else if (Sys_SendFile.SendType == "4") | |||||
{ | |||||
var teacherlist = db.FindList<UserEntity>(m => | |||||
m.F_DeleteMark != 1 && m.F_EnabledMark == 1 && m.F_Description == "教师" && | |||||
Sys_SendFile.ReceiverId.Contains(m.F_UserId)); | |||||
needpostuserlist = teacherlist.ToList(); | |||||
foreach (var tEntity in teacherlist) | |||||
{ | |||||
Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); | |||||
receiveFile.Create(); | |||||
receiveFile.SFileId = Sys_SendFile.SFileId; | |||||
receiveFile.SenderId = Sys_SendFile.SenderId; | |||||
receiveFile.Sender = Sys_SendFile.Sender; | |||||
receiveFile.ReceiverId = tEntity.F_UserId; | |||||
receiveFile.Receiver = tEntity.F_RealName; | |||||
receiveFile.Title = Sys_SendFile.Title; | |||||
receiveFile.Contents = Sys_SendFile.Contents; | |||||
receiveFile.Url = Sys_SendFile.Url; | |||||
receiveFile.ReadFlag = false; | |||||
receiveFile.SendTime = DateTime.Now; | |||||
receiveFile.SendType = Sys_SendFile.SendType; | |||||
receiveFile.DelFlag = false; | |||||
receiveFile.STypeId = Sys_SendFile.STypeId; | |||||
receiveFile.ReplyFlag = false; | |||||
receiveFile.SLastDate = Sys_SendFile.SLastDate; | |||||
receiveFile.RUrl = Guid.NewGuid().ToString(); | |||||
db.Insert(receiveFile); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
var teacherlist = db.FindList<UserEntity>( | |||||
@"select distinct a.* from [dbo].[LR_Base_User] a left join [dbo].[LR_Base_UserRelation] b on a.F_UserId=b.F_UserId where b.F_ObjectId ='" | |||||
+ Sys_SendFile.ReceiverId + "' and a.F_DeleteMark<>1 and a.F_EnabledMark=1 and a.F_Description='教师'"); | |||||
needpostuserlist = teacherlist.ToList(); | |||||
foreach (var tEntity in teacherlist) | |||||
{ | |||||
Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity(); | |||||
receiveFile.Create(); | |||||
receiveFile.SFileId = Sys_SendFile.SFileId; | |||||
receiveFile.SenderId = Sys_SendFile.SenderId; | |||||
receiveFile.Sender = Sys_SendFile.Sender; | |||||
receiveFile.ReceiverId = tEntity.F_UserId; | |||||
receiveFile.Receiver = tEntity.F_RealName; | |||||
receiveFile.Title = Sys_SendFile.Title; | |||||
receiveFile.Contents = Sys_SendFile.Contents; | |||||
receiveFile.Url = Sys_SendFile.Url; | |||||
receiveFile.ReadFlag = false; | |||||
receiveFile.SendTime = DateTime.Now; | |||||
receiveFile.SendType = Sys_SendFile.SendType; | |||||
receiveFile.DelFlag = false; | |||||
receiveFile.STypeId = Sys_SendFile.STypeId; | |||||
receiveFile.ReplyFlag = false; | |||||
receiveFile.SLastDate = Sys_SendFile.SLastDate; | |||||
receiveFile.RUrl = Guid.NewGuid().ToString(); | |||||
db.Insert(receiveFile); | |||||
} | |||||
} | |||||
Sys_SendFile.SendFlag = 2; | |||||
Sys_SendFile.SendTime = DateTime.Now; | |||||
db.Update(Sys_SendFile); | |||||
db.Commit(); | |||||
//读取信息推送管理-公文下发推送(02)的配置 | |||||
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "02"); | |||||
if (informationPushEntity != null && informationPushEntity.Status == true) | |||||
{ | |||||
//微信推送 | |||||
try | |||||
{ | |||||
PushWeixin(needpostuserlist, Sys_SendFile.Title); | |||||
} | |||||
catch (Exception e) | |||||
{ | |||||
} | |||||
//飞星推送 | |||||
Task.Run(async () => | |||||
{ | |||||
using (var hubConnection = new HubConnection(ConfigurationManager.AppSettings["CommunicationServeraddress"])) | |||||
{ | |||||
var hubProxy = hubConnection.CreateHubProxy("SignalRHub"); | |||||
await hubConnection.Start(); | |||||
await hubProxy.Invoke("PushAnnouncement", Sys_SendFile.SenderId, Sys_SendFile.Title, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_SendFile.Contents)).Substring(0, 20), "sendfile", string.Join(",", needpostuserlist.Select(m => m.F_UserId)), ""); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 作废 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void CancelList(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
var entity = this.BaseRepository().FindEntity<Sys_SendFileEntity>(a => a.SFileId == keyValue); | |||||
if (null != entity) | |||||
{ | |||||
entity.SendFlag = 0; | |||||
entity.SendTime = DateTime.Now; | |||||
this.BaseRepository().Delete<Sys_ReceiveFileEntity>(t => t.SFileId == keyValue); | |||||
} | |||||
this.BaseRepository().Update(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | } | ||||
#endregion | #endregion | ||||
} | } |