Bläddra i källkod

公文接收

中职版本
zhichao lei 4 år sedan
förälder
incheckning
1b4b623ce3
31 ändrade filer med 674 tillägg och 146 borttagningar
  1. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs
  2. +26
    -32
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs
  3. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.cshtml
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.js
  5. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.cshtml
  6. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.js
  7. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml
  8. +115
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js
  9. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.cshtml
  10. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.js
  11. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml
  12. +136
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js
  13. +0
    -31
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.cshtml.30961.1.2019-10-25.09-36-12.0372
  14. +0
    -59
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.js.30962.1.2019-10-25.09-36-12.0442
  15. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js
  16. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexDocument.js
  17. +4
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml
  18. +55
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js
  19. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.js
  20. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml
  21. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js
  22. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListDocument.js
  23. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListParty.js
  24. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  25. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js
  26. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs
  27. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs
  28. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs
  29. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs
  30. +102
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs
  31. +12
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Sys_ReceiveDocumentMethod.cs

+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveDocumentController.cs Visa fil

@@ -47,6 +47,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
/// <summary>
/// 指派人列表
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IssueForm()
{
return View();
}

/// <summary>
/// 阅读详情
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult ReadList()
{
return View();
}
#endregion

#region 获取数据
@@ -118,6 +137,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success("删除成功!");
}
/// <summary>
/// 结束下发
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult OverIssue(string keyValue)
{
var entity = sYS_ReceiveDocumentIBLL.GetSys_ReceiveDocumentEntity(keyValue);
if (null != entity)
{
entity.RSendFlag = "4";
sYS_ReceiveDocumentIBLL.SaveEntity(keyValue, entity);
}
return Success("操作成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>


+ 26
- 32
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_ReceiveFileController.cs Visa fil

@@ -62,6 +62,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return View();
}
/// <summary>
/// 主页面【党政公文查阅】
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexGWJS()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
@@ -100,38 +109,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}

[HttpGet]
[AjaxOnly]
public ActionResult GetPageListDocument(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 2);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListParty(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 3);
var data = sys_ReceiveFileIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
@@ -236,6 +214,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
sys_ReceiveFileIBLL.Issue(entity);
return Success("保存成功!");
}


/// <summary>
/// 公文接收 下发指定接收人
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult ReceiveDocumentIssue(string strEntity)
{
Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>();
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity);
return Success("保存成功!");
}
/// <summary>
/// 查看实体数据
/// <param name="keyValue">主键</param>


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.cshtml Visa fil

@@ -19,6 +19,11 @@
<div class="lr-form-item-title">文件标题</div>
<input id="RTitle" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveDocument" >
<div class="lr-form-item-title">文件</div>
<div id="RFile" ></div>
</div>

<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveDocument" >
<div class="lr-form-item-title">内容</div>
<div id="RContent" style="height:200px;"></div>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Form.js Visa fil

@@ -26,6 +26,7 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
$('#RFile').lrUploader();
$('#RReceiveUnit').lrselect({
type: 'tree',
allowSearch: true,


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.cshtml Visa fil

@@ -19,6 +19,10 @@
<div class="lr-form-item-title">文件标题</div>
<input id="RTitle" type="text" readonly="readonly" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveDocument">
<div class="lr-form-item-title">文件</div>
<div id="RFile" readonly="readonly"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveDocument">
<div class="lr-form-item-title">内容</div>
<div id="RContent" style="height:200px;" readonly="readonlyj"></div>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/FormView.js Visa fil

@@ -32,6 +32,7 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree',
param: {}
});
$('#RFile').lrUploader();
$('#RUrgencyDegree').lrDataItemSelect({ code: 'UrgencyDegree' });
var RContentUE = UE.getEditor('RContent');
$('#RContent')[0].ue = RContentUE;


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.cshtml Visa fil

@@ -37,6 +37,12 @@
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
</div>
<div class=" btn-group btn-group-sm" >
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i>&nbsp;查看</a>
<a id="lr_IssueSpecifyReceiver" class="btn btn-default"><i class="fa fa-envelope"></i>&nbsp;下发</a>
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i>&nbsp;结束下发</a>
<a id="lr_read" class="btn btn-default"><i class="fa fa-calendar-minus-o"></i>&nbsp;查阅情况</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>


+ 115
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/Index.js Visa fil

@@ -77,6 +77,31 @@ var bootstrap = function ($, learun) {
});
}
});
// 查看
$('#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,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('RID');
@@ -115,6 +140,64 @@ var bootstrap = function ($, learun) {
});
}
});
// 下发审批指定接收人
$('#lr_IssueSpecifyReceiver').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('RID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '下发审批指定接收人',
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/IssueForm?keyValue=' + keyValue,
width: 800,
height: 200,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
// 结束下发
$('#lr_OverIssue').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('RID');
if (learun.checkrow(keyValue)) {
var SendFlag = $('#gridtable').jfGridValue('RSendFlag');
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, {});
});
}
});
}
});
// 查阅情况
$('#lr_read').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('RID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '查阅情况',
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveDocument/ReadList?keyValue=' + keyValue,
width: 850,
height: 400,
btn: null
});
}
});
},
// 初始化列表
initGird: function () {
@@ -146,13 +229,42 @@ var bootstrap = function ($, learun) {
}
},
{ 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: "SpecifyReceiver", width: 300, align: "left" },
{
label: "状态", name: "RSendFlag", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue == 1) {
if (cellvalue === "1") {
return '<span class=\"label label-warning\">审批中</span>';
} else if (cellvalue == 2) {
return '<span class=\"label label-success\">已下发</span>';
} else if (cellvalue === "2") {
return '<span class=\"label label-info\">审批通过</span>';
} else if (cellvalue === "3") {
return '<span class=\"label label-danger\" >审批失败</span>';
} else if (cellvalue === "4") {
return '<span class=\"label label-success\" >下发完毕</span>';
} else {
return '<span class=\"label label-default\" >草稿</span>';
}


+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.cshtml Visa fil

@@ -0,0 +1,11 @@
@{
ViewBag.Title = "公文发送";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="ReceiverIddiv">
<div class="lr-form-item-title">接收人<font face="宋体">*</font></div>
<div id="SpecifyReceiver" isvalid="yes" checkexpession="NotNull" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.js")

+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/IssueForm.js Visa fil

@@ -0,0 +1,62 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-11 10:31
* 描 述:公文发送
*/
var acceptClick;
var keyValue = request('keyValue');
var rFileId = request('rFileId');
var specifyReceiver = request('specifyReceiver');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#SpecifyReceiver').lrUserSelect({ type: '1' });
},
initData: function () {
if (rFileId) {
$('#SpecifyReceiver').lrformselectSet(specifyReceiver);
}
}
};
// 验证数据是否填写完整
validForm = function () {
if (!$('#form').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
formData.RFileId = rFileId;
formData.SFileId = keyValue;
var postData = {
strEntity: JSON.stringify(formData)
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/ReceiveDocumentIssue', postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, formData, i);
}
});
};
page.init();
}

+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.cshtml Visa fil

@@ -0,0 +1,29 @@
@{
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">
<input id="Receiver" 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>&nbsp;<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>
<a id="lr_Issue" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;下发</a>
</div>

</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js")

+ 136
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/ReadList.js Visa fil

@@ -0,0 +1,136 @@
/* * 版 本 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 () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#Receiver').val();
page.search({ Receiver: keyword });
});
// 刷新
$('#lr_refresh').on('click', function () {
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;
}
});
}

});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList',
headData: [
{
label: "接收人", name: "Receiver", width: 150, align: "left"
},
{
label: "查阅时间", name: "ReadTime", width: 150, align: "left"
},
{
label: "指定接收人", name: "SpecifyReceiver", width: 150, align: "left", formatterAsync:
function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user',
{
key: value,
callback: function (_data) {
if (_data.length > 0) {
var text = '';
$.each(_data,
function (i, item) {
if (item) {
text += item.name + ',';
}
});
text = text.substring(0, text.lastIndexOf(','));
callback(text);
} else {
callback(_data.name);
}
}
});
}
},
{
label: "状态", name: "ReadFlag", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue === true) {
return '<span class=\"label label-success\">已读</span>';
} else {
return '<span class=\"label label-warning\">未读</span>';
}
}
},
{
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>';
}
}
}
],
mainId: 'RFileId',
isPage: true,
sidx: 'ReadFlag,ReadTime',
sord: 'ASC'
});
page.search();
},
search: function (param) {
param = param || {};
param.SFileId = keyValue;
param.STypeId = 4;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 0
- 31
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.cshtml.30961.1.2019-10-25.09-36-12.0372 Visa fil

@@ -1,31 +0,0 @@
@{
ViewBag.Title = "公文收发";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile">
<div class="lr-form-item-title">发送人</div>
<input id="Sender" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile">
<div class="lr-form-item-title">主题</div>
<input id="Title" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile">
<div class="lr-form-item-title">接收对象</div>
<div id="SendType" readonly="readonly"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile">
<div class="lr-form-item-title">发送时间</div>
<input id="SendTime" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile">
<div class="lr-form-item-title">附件</div>
<div id="Url" style="padding-right:60px;"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Sys_ReceiveFile">
<div class="lr-form-item-title">内容</div>
<div id="Contents" style="margin-top:6px;"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Form.js")

+ 0
- 59
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Form.js.30962.1.2019-10-25.09-36-12.0442 Visa fil

@@ -1,59 +0,0 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2019-04-11 10:08
* 描 述:公文收发
*/
var acceptClick;
var keyValue = request('keyValue');
var bootstrap = function ($, learun) {
"use strict";
var selectedRow = learun.frameTab.currentIframe().selectedRow;
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#SendType').lrDataItemSelect({ code: 'FileSendType' });
if (selectedRow.ReadFlag == true) {//已读
$('#Url').lrUploader();
} else {//未读
$('#Url').lrUploader({ RFileId: selectedRow.RFileId });
}
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/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]);
$('#Contents').html(data[id].Contents);
}
}
$("#lrUploader_uploadBtn_Url").hide();
});
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js Visa fil

@@ -215,6 +215,7 @@ var bootstrap = function ($, learun) {
param.StartTime = startTime;
param.EndTime = endTime;
param.ReceiverId = learun.clientdata.get(['userinfo']).userId;
param.STypeId = 1;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexDocument.js Visa fil

@@ -142,7 +142,7 @@ var bootstrap = function ($, learun) {
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageListDocument',
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList',
headData: [
{ label: "发送人", name: "Sender", width: 100, align: "left" },
{ label: "主题", name: "Title", width: 300, align: "left" },
@@ -193,6 +193,7 @@ var bootstrap = function ($, learun) {
param.StartTime = startTime;
param.EndTime = endTime;
param.ReceiverId = learun.clientdata.get(['userinfo']).userId;
param.STypeId = 2;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Index.cshtml.30963.1.2019-10-25.09-36-12.0482 → Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.cshtml Visa fil

@@ -2,7 +2,7 @@
ViewBag.Title = "公文收发";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
@@ -25,8 +25,9 @@
<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_Read" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查阅</a>
<a id="lr_SpecifyReceiver" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;指定接收人</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
</div>
@@ -35,4 +36,4 @@
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/Index.js")
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js")

Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveDocument/_sgbak/Index.js.30964.1.2019-10-25.09-36-12.0522 → Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexGWJS.js Visa fil

@@ -79,6 +79,22 @@ var bootstrap = function ($, learun) {
});
}
});
// 指定接收人
$('#lr_SpecifyReceiver').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('RFileId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formSys_ReceiveFile',
title: '指定接收人',
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/SpecifyReceiverForm?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('RFileId');
@@ -117,10 +133,10 @@ var bootstrap = function ($, learun) {
if (selectedRow.ReadFlag == false) {
//判断附件
//if (selectedRow.Url == null || selectedRow.Url == "") {
//自动已读
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () {
refreshGirdData();
});
//自动已读
learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/Read', { keyValue: keyValue }, function () {
refreshGirdData();
});
//}
}
},
@@ -135,10 +151,18 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList',
headData: [
{ label: "发送人", name: "Sender", width: 100, align: "left" },
{
label: "发送人", name: "SenderId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}},
{ label: "主题", name: "Title", width: 300, align: "left" },
{ label: "发送时间", name: "SendTime", width: 130, align: "left" },
{
@@ -152,6 +176,30 @@ var bootstrap = function ($, learun) {
});
}
},
{
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) {
@@ -175,6 +223,7 @@ var bootstrap = function ($, learun) {
param.StartTime = startTime;
param.EndTime = endTime;
param.ReceiverId = learun.clientdata.get(['userinfo']).userId;
param.STypeId = 4;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};

+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_ReceiveFile/IndexParty.js Visa fil

@@ -136,7 +136,7 @@ var bootstrap = function ($, learun) {
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageListParty',
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList',
headData: [
{ label: "发送人", name: "Sender", width: 100, align: "left" },
{ label: "主题", name: "Title", width: 300, align: "left" },
@@ -175,6 +175,7 @@ var bootstrap = function ($, learun) {
param.StartTime = startTime;
param.EndTime = endTime;
param.ReceiverId = learun.clientdata.get(['userinfo']).userId;
param.STypeId=3
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.cshtml Visa fil

@@ -29,10 +29,10 @@
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp; 查看</a>
<a id="lr_IssueSpecifyReceiver" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;下发审批指定接收人</a>
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;结束下发</a>
<a id="lr_read" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp; 查阅情况</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i>&nbsp; 查看</a>
<a id="lr_IssueSpecifyReceiver" class="btn btn-default"><i class="fa fa-envelope"></i>&nbsp;下发审批指定接收人</a>
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i>&nbsp;结束下发</a>
<a id="lr_read" class="btn btn-default"><i class="fa fa-calendar-minus-o"></i>&nbsp; 查阅情况</a>
</div>
</div>
</div>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadList.js Visa fil

@@ -125,6 +125,7 @@ var bootstrap = function ($, learun) {
search: function (param) {
param = param || {};
param.SFileId = keyValue;
param.STypeId = 1;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListDocument.js Visa fil

@@ -47,7 +47,7 @@ var bootstrap = function ($, learun) {
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageListDocument',
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList',
headData: [
{
label: "接收人", name: "Receiver", width: 150, align: "left"
@@ -89,6 +89,8 @@ var bootstrap = function ($, learun) {
search: function (param) {
param = param || {};
param.SFileId = keyValue;
param.STypeId = 2;

$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/ReadListParty.js Visa fil

@@ -28,7 +28,7 @@ var bootstrap = function ($, learun) {
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageListParty',
url: top.$.rootUrl + '/EducationalAdministration/Sys_ReceiveFile/GetPageList',
headData: [
{
label: "接收人", name: "Receiver", width: 150, align: "left"
@@ -57,6 +57,8 @@ var bootstrap = function ($, learun) {
search: function (param) {
param = param || {};
param.SFileId = keyValue;
param.STypeId = 3;

$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Visa fil

@@ -977,10 +977,13 @@
<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\IssueForm.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\ReadList.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\FormParty.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\FormReadDocument.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\FormDocument.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\IndexGWJS.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\IndexParty.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\IndexDocument.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\Index.js" />
@@ -6810,6 +6813,9 @@
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\OnsitePayForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IssueForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\SpecifyReceiverForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\IssueForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveDocument\ReadList.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_ReceiveFile\IndexGWJS.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/script/lr-clientdata.js Visa fil

@@ -299,7 +299,7 @@
var data = storage.get("userData").data || {};
var keys = op.key.split(',');
var array=new Array();
if (keys.length > 0) {
if (keys.length > 1) {
$.each(keys,
function (i, item) {



+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentEntity.cs Visa fil

@@ -59,6 +59,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("RSENDFLAG")]
public string RSendFlag { get; set; }
/// <summary>
/// 已接收
/// </summary>
[Column("RECEIVERID")]
public string ReceiverId { get; set; }
/// <summary>
/// 指定接收人(校长审批意见)
/// </summary>
[Column("SPECIFYRECEIVER")]
public string SpecifyReceiver { get; set; }
/// <summary>
/// 上传文件
/// </summary>
[Column("RFile")]
public string RFile { get; set; }
/// <summary>
/// 发送人
/// </summary>
[Column("SENDERID")]
public string SenderId { get; set; }
#endregion

#region 扩展操作
@@ -67,7 +87,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
public void Create()
{
var loginUser = LoginUserInfo.Get();
this.RID = Guid.NewGuid().ToString();
this.RFile = Guid.NewGuid().ToString();
this.SenderId = loginUser.userId;
this.RSendFlag = "0";
}
/// <summary>


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveDocument/Sys_ReceiveDocumentService.cs Visa fil

@@ -36,6 +36,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
t.RReceiveUnit,
t.RUrgencyDegree,
t.RTitle,
t.RFile,
t.ReceiverId,
t.SenderId,
t.SpecifyReceiver,
t.RContent,
t.RSendFlag,
t.RProcessId


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileBLL.cs Visa fil

@@ -257,6 +257,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
public void ReceiveDocumentIssue(Sys_IssueEntity entity)
{
try
{
sys_ReceiveFileService.ReceiveDocumentIssue(entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion



+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileIBLL.cs Visa fil

@@ -78,5 +78,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#endregion

void Issue(Sys_IssueEntity entity);
void ReceiveDocumentIssue(Sys_IssueEntity entity);
}
}

+ 102
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_ReceiveFile/Sys_ReceiveFileService.cs Visa fil

@@ -55,6 +55,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Title Like @Title ");
}
if (!queryParam["STypeId"].IsEmpty())
{
dp.Add("STypeId", queryParam["STypeId"].ToString(), DbType.Int32);
strSql.Append(" AND t.STypeId = @STypeId ");
}
if (!queryParam["ReceiverId"].IsEmpty())
{
dp.Add("ReceiverId", queryParam["ReceiverId"].ToString(), DbType.String);
@@ -384,9 +389,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
foreach (var item in teacherlist)
{
if (listReceive?.Contains(item.F_Account) != true)
if (listReceive?.Contains(item.F_UserId) != true)
{
listReceive.Add(item.F_Account);
listReceive.Add(item.F_UserId);
Sys_SendFile.Receiver += "," + item.F_RealName;
}

@@ -435,6 +440,101 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 公文接收 下发指定接收人
/// </summary>
/// <param name="entity"></param>
public void ReceiveDocumentIssue(Sys_IssueEntity entity)
{
var db = this.BaseRepository().BeginTrans();
try
{
//从‘查阅情况’ 列表中跳转 将发送情况改变
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();

foreach (var tEntity in teacherlist)
{
Sys_ReceiveFileEntity receiveFile = new Sys_ReceiveFileEntity();
receiveFile.Create();
receiveFile.SFileId = Sys_ReceiveDocument.RID;
receiveFile.SenderId = Sys_ReceiveDocument.SenderId;
receiveFile.ReceiverId = tEntity.F_UserId;
receiveFile.Receiver = tEntity.F_RealName;
receiveFile.Title = Sys_ReceiveDocument.RTitle;
receiveFile.Contents = Sys_ReceiveDocument.RContent;
receiveFile.Url = Sys_ReceiveDocument.RFile;
receiveFile.ReadFlag = false;
receiveFile.SendTime = DateTime.Now;
receiveFile.SendType = "";
receiveFile.DelFlag = false;
receiveFile.STypeId = 4;//公文接收 下发
receiveFile.ReplyFlag = false;
receiveFile.RUrl = Guid.NewGuid().ToString();
db.Insert(receiveFile);
}
var listReceive = Sys_ReceiveDocument.ReceiverId?.Split(',').ToList();
if (listReceive == null)
{
listReceive = new List<string>();
}
foreach (var item in teacherlist)
{
if (listReceive?.Contains(item.F_UserId) != true)
{
listReceive.Add(item.F_UserId);
}

}


StringBuilder stringBuilder = new StringBuilder();
foreach (var item in listReceive)
{
stringBuilder.Append(item + ",");
}

Sys_ReceiveDocument.ReceiverId = stringBuilder.ToString().TrimEnd(',');
db.Update(Sys_ReceiveDocument);
db.Commit();
//微信推送
try
{
PushWeixin(teacherlist, Sys_ReceiveDocument.RTitle);
}
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_ReceiveDocument.SenderId, Sys_ReceiveDocument.RTitle, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Sys_ReceiveDocument.RContent)).Substring(0, 20), "sendfile", string.Join(",", teacherlist.Select(m => m.F_UserId)), "");
}
});
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void PushWeixin(List<UserEntity> needpostuserlist, string title)
{
var WeChatConfigentity = BaseRepository().FindEntity<WeChatConfigEntity>(m => m.IsEnable == true);


+ 12
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Sys_ReceiveDocumentMethod.cs Visa fil

@@ -10,13 +10,24 @@ namespace Learun.Application.WorkFlow
public class Sys_ReceiveDocumentMethod : IWorkFlowMethod
{
SYS_ReceiveDocumentIBLL asset = new SYS_ReceiveDocumentBLL();
NWFTaskIBLL nWFTaskIBLL = new NWFTaskBLL();


public void Execute(WfMethodParameter parameter)
{
if (parameter.code == "agree")
{
asset.ChangeStatusByProcessId(parameter.processId, 2);

//审批同意的话需要 获取校长审批意见
var list = nWFTaskIBLL.GetLogList(parameter.processId);
var logEntity = list.FirstOrDefault(a => a.F_TaskUserName == "超级管理员");
var entity = asset.GetEntityByProcessId(parameter.processId);
if (null != entity && null != logEntity)
{
entity.SpecifyReceiver = logEntity.F_Des;
asset.SaveEntity(entity.RID, entity);
}
}
else
{


Laddar…
Avbryt
Spara