@@ -4,7 +4,6 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using Learun.Application.Organization; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -19,7 +18,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
private SYS_ReceiveDocumentIBLL sYS_ReceiveDocumentIBLL = new SYS_ReceiveDocumentBLL(); | |||
private Sys_ReceiveFileIBLL receiveFileIbll=new Sys_ReceiveFileBLL(); | |||
private RoleIBLL roleIBLL = new RoleBLL(); | |||
#region 视图功能 | |||
@@ -32,16 +30,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult RoleForm() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 公文接收归档 | |||
/// <summary> | |||
@@ -140,23 +129,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetRoleData() | |||
{ | |||
var data = roleIBLL.GetListForSelect(); | |||
//var jsonData = new | |||
//{ | |||
// data = data | |||
//}; | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Sys_ReceiveDocumentData = sYS_ReceiveDocumentIBLL.GetSys_ReceiveDocumentEntity(keyValue); | |||
@@ -6,7 +6,6 @@ using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Web; | |||
using Learun.Application.Base.SystemModule; | |||
using Learun.Application.Base.AuthorizeModule; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
@@ -21,7 +20,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
private Sys_ReceiveFileIBLL sys_ReceiveFileIBLL = new Sys_ReceiveFileBLL(); | |||
private AnnexesFileIBLL annexesFileIbll = new AnnexesFileBLL(); | |||
private UserRelationIBLL userRelationIBLL = new UserRelationBLL(); | |||
#region 视图功能 | |||
@@ -302,29 +300,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | |||
return Success("发送成功"); | |||
} | |||
/// <summary> | |||
/// 根据角色批示 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult RoleReceive(string strEntity) | |||
{ | |||
Sys_IssueEntity entity = strEntity.ToObject<Sys_IssueEntity>(); | |||
var data = userRelationIBLL.GetUserIdList(entity.SpecifyReceiver); | |||
string userIds = ""; | |||
foreach (var item in data) | |||
{ | |||
if (userIds != "") | |||
{ | |||
userIds += ","; | |||
} | |||
userIds += item.F_UserId; | |||
} | |||
entity.SpecifyReceiver = userIds; | |||
sys_ReceiveFileIBLL.ReceiveDocumentIssue(entity); | |||
return Success("发送成功"); | |||
} | |||
/// <summary> | |||
@@ -162,7 +162,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson); | |||
var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 1); | |||
foreach (var item in data) | |||
{ | |||
@@ -206,7 +206,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult GetPageListParty(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson); | |||
var data = sys_SendFileIBLL.GetPageList(paginationobj, queryJson).Where(m => m.STypeId == 3); | |||
foreach (var item in data) | |||
{ | |||
@@ -366,7 +366,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
sys_SendFileIBLL.ChangeStatusByProcessId(guid, 2); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 结束下发 | |||
/// </summary> | |||
@@ -381,13 +380,33 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("下发成功!"); | |||
} | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult IssueList(string keyValue, string CreateUser) | |||
{ | |||
/* public ActionResult ReceiveFile(string keyValue) | |||
{ | |||
return View(); | |||
}*/ | |||
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 | |||
} | |||
@@ -61,19 +61,14 @@ var bootstrap = function ($, learun) { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
$('#Contents').html(data[id].Contents); | |||
//已读状态 且批示已填写的情况,不可编辑批示 | |||
if (readFlag == 'true' && data[id].SpecifyReceiver && data[id].SpecifyReceiver.length > 0) { | |||
$('#SpecifyReceiver').attr('readonly', 'readonly'); | |||
} | |||
} | |||
} | |||
$("#lrUploader_uploadBtn_Url").hide(); | |||
}); | |||
//已读状态不可修改批示 | |||
//if (readFlag == 'true') { | |||
// $('#SpecifyReceiver').attr('readonly', 'readonly'); | |||
//} | |||
if (readFlag == 'true') { | |||
$('#SpecifyReceiver').attr('readonly', 'readonly'); | |||
} | |||
var data = learun.httpGet(top.$.rootUrl + | |||
'/EducationalAdministration/Sys_ReceiveFile/GetInstructions?keyValue=' + | |||
keyValue, | |||
@@ -3,43 +3,39 @@ | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<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">主题<font face="宋体">*</font></div> | |||
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile"> | |||
<div class="lr-form-item-title">接收对象</div> | |||
<div id="SendType"></div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">接收对象<font face="宋体">*</font></div> | |||
<div id="SendType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="ReceiverIddiv"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<div id="ReceiverUserId"></div> | |||
<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="ReceiverUserId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="DeptIddiv"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="DeptId"></div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="DeptIddiv"> | |||
<div class="lr-form-item-title">接收部门<font face="宋体">*</font></div> | |||
<div id="DeptId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="PostIddiv"> | |||
<div class="lr-form-item-title">接收岗位</div> | |||
<div id="PostId"></div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="PostIddiv"> | |||
<div class="lr-form-item-title">接收岗位<font face="宋体">*</font></div> | |||
<div id="PostId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="RoleIddiv"> | |||
<div class="lr-form-item-title">接收角色</div> | |||
<div id="RoleId"></div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="CompanyIddiv"> | |||
<div class="lr-form-item-title">接收校区<font face="宋体">*</font></div> | |||
<div id="CompanyId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="CompanyIddiv"> | |||
<div class="lr-form-item-title">接收校区</div> | |||
<div id="CompanyId"></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="lr-form-item-title">文号<font face="宋体">*</font></div> | |||
<input id="DocNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile"> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">文件</div> | |||
<div id="Url"></div> | |||
<div id="Url" ></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 id="Contents" style="height:300px;"></div> | |||
</div> | |||
@@ -29,7 +29,7 @@ var bootstrap = function ($, learun) { | |||
$('#CompanyId').lrCompanySelect({ type: 'multiple' }); | |||
$('#DeptId').lrDepartmentSelect({ type: 'treemultiple' }); | |||
$('#PostId').lrPostSelect({ type: 'treemultiple' }); | |||
$('#RoleId').lrRoleSelect({ type: 'treemultiple' }); | |||
$('#RoleId').lrRoleSelect({ code: 'treemultiple' }); | |||
$('#ReceiverUserId').lrUserSelect({ type: '1' }); | |||
$('#SendType').lrDataItemSelect({ | |||
code: 'FileSendType', select: function (item) { | |||
@@ -118,7 +118,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}); | |||
$('#SendType').lrselectSet("2"); | |||
$('#SendType').lrselectSet("1"); | |||
$('#Url').lrUploader(); | |||
var ContentsUE = UE.getEditor('Contents'); | |||
$('#Contents')[0].ue = ContentsUE; | |||
@@ -132,7 +132,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
if (item.id === 1 || item.id === "1") { | |||
if (data[id].SendType === 1 || data[id].SendType == "1") { | |||
$("#CompanyIddiv").show(); | |||
$("#CompanyId").attr("isvalid", "yes"); | |||
$("#CompanyId").attr("checkexpession", "NotNull"); | |||
@@ -148,7 +148,8 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").hide(); | |||
$("#RoleId").removeAttr("isvalid"); | |||
$("#RoleId").removeAttr("NotNull"); | |||
} else if (item.id === 2 || item.id === "2") { | |||
$("#CompanyId").lrselectSet(data[id].ReceiverId); | |||
} else if (data[id].SendType === 2 || data[id].SendType == "2") { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
@@ -164,7 +165,9 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").hide(); | |||
$("#RoleId").removeAttr("isvalid"); | |||
$("#RoleId").removeAttr("NotNull"); | |||
} else if (item.id === 3 || item.id === "3") { | |||
$("#DeptId").lrselectSet(data[id].ReceiverId); | |||
} | |||
else if (data[id].SendType === 3 || data[id].SendType === "3") { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
@@ -180,7 +183,9 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").hide(); | |||
$("#RoleId").removeAttr("isvalid"); | |||
$("#RoleId").removeAttr("NotNull"); | |||
} else if (item.id === 4 || item.id === "4") { | |||
$("#PostId").lrselectSet(data[id].ReceiverId); | |||
} | |||
else if (data[id].SendType === 4 || data[id].SendType === "4") { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
@@ -196,6 +201,7 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").hide(); | |||
$("#RoleId").removeAttr("isvalid"); | |||
$("#RoleId").removeAttr("NotNull"); | |||
$("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); | |||
} else { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
@@ -212,6 +218,7 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").show(); | |||
$("#RoleId").attr("isvalid", "yes"); | |||
$("#RoleId").attr("checkexpession", "NotNull"); | |||
$("#RoleId").lrformselectSet(data[id].ReceiverId); | |||
} | |||
} | |||
} | |||
@@ -233,7 +240,7 @@ var bootstrap = function ($, learun) { | |||
keyValue = data[id].SFileId; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
if (item.id === 1 || item.id === "1") { | |||
if (data[id].SendType === 1 || data[id].SendType == "1") { | |||
$("#CompanyIddiv").show(); | |||
$("#CompanyId").attr("isvalid", "yes"); | |||
$("#CompanyId").attr("checkexpession", "NotNull"); | |||
@@ -249,7 +256,8 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").hide(); | |||
$("#RoleId").removeAttr("isvalid"); | |||
$("#RoleId").removeAttr("NotNull"); | |||
} else if (item.id === 2 || item.id === "2") { | |||
$("#CompanyId").lrselectSet(data[id].ReceiverId); | |||
} else if (data[id].SendType === 2 || data[id].SendType == "2") { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
@@ -265,7 +273,8 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").hide(); | |||
$("#RoleId").removeAttr("isvalid"); | |||
$("#RoleId").removeAttr("NotNull"); | |||
} else if (item.id === 3 || item.id === "3") { | |||
$("#DeptId").lrselectSet(data[id].ReceiverId); | |||
} else if (data[id].SendType === 3 || data[id].SendType === "3") { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
@@ -281,7 +290,8 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").hide(); | |||
$("#RoleId").removeAttr("isvalid"); | |||
$("#RoleId").removeAttr("NotNull"); | |||
} else if (item.id === 4 || item.id === "4") { | |||
$("#PostId").lrselectSet(data[id].ReceiverId); | |||
} else if (data[id].SendType === 4 || data[id].SendType === "4") { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
@@ -297,6 +307,7 @@ var bootstrap = function ($, learun) { | |||
$("#RoleIddiv").hide(); | |||
$("#RoleId").removeAttr("isvalid"); | |||
$("#RoleId").removeAttr("NotNull"); | |||
$("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); | |||
} else { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
@@ -305,14 +316,15 @@ var bootstrap = function ($, learun) { | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
$("#ReceiverIddiv").hide(); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
$("#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); | |||
} | |||
} | |||
} | |||
@@ -332,18 +344,10 @@ var bootstrap = function ($, learun) { | |||
var sendtype = $('#SendType').lrselectGet(); | |||
if (sendtype == "1") { | |||
formData.ReceiverId = $("#CompanyId").lrselectGet(); | |||
if (($("#CompanyId").find(".lr-select-placeholder").text()).indexOf('请选择') != -1) { | |||
formData.Receiver = ""; | |||
} else { | |||
formData.Receiver = $("#CompanyId").find(".lr-select-placeholder").text(); | |||
} | |||
formData.Receiver = $("#CompanyId").find(".lr-select-placeholder").text(); | |||
} else if (sendtype == "2") { | |||
formData.ReceiverId = $("#DeptId").lrselectGet(); | |||
if (($("#DeptId").find(".lr-select-placeholder").text()).indexOf('请选择') != -1) { | |||
formData.Receiver = ""; | |||
} else { | |||
formData.Receiver = $("#DeptId").find(".lr-select-placeholder").text(); | |||
} | |||
formData.Receiver = $("#DeptId").find(".lr-select-placeholder").text(); | |||
} else if (sendtype == "3") { | |||
formData.ReceiverId = $("#PostId").lrselectGet(); | |||
formData.Receiver = $("#PostId").find(".lr-select-placeholder").text(); | |||
@@ -8,29 +8,25 @@ | |||
<input id="Title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">接收对象</div> | |||
<div id="SendType" ></div> | |||
<div class="lr-form-item-title">接收对象<font face="宋体">*</font></div> | |||
<div id="SendType" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="ReceiverIddiv"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<div class="lr-form-item-title">接收人<font face="宋体">*</font></div> | |||
<div id="ReceiverUserId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="DeptIddiv"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="DeptId" ></div> | |||
<div class="lr-form-item-title">接收部门<font face="宋体">*</font></div> | |||
<div id="DeptId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="PostIddiv"> | |||
<div class="lr-form-item-title">接收岗位</div> | |||
<div class="lr-form-item-title">接收岗位<font face="宋体">*</font></div> | |||
<div id="PostId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" id="CompanyIddiv"> | |||
<div class="lr-form-item-title">接收校区</div> | |||
<div class="lr-form-item-title">接收校区<font face="宋体">*</font></div> | |||
<div id="CompanyId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">文号<font face="宋体">*</font></div> | |||
<input id="DocNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Sys_SendFile" > | |||
<div class="lr-form-item-title">文件</div> | |||
<div id="Url" ></div> | |||
@@ -35,10 +35,8 @@ var bootstrap = function ($, learun) { | |||
if (item != null && item != undefined) { | |||
if (item.id === 1 || item.id === "1") { | |||
$("#CompanyIddiv").show(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
//$("#CompanyId").attr("isvalid", "yes"); | |||
//$("#CompanyId").attr("checkexpession", "NotNull"); | |||
$("#CompanyId").attr("isvalid", "yes"); | |||
$("#CompanyId").attr("checkexpession", "NotNull"); | |||
$("#DeptIddiv").hide(); | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
@@ -53,10 +51,8 @@ var bootstrap = function ($, learun) { | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
$("#DeptIddiv").show(); | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
//$("#DeptId").attr("isvalid", "yes"); | |||
//$("#DeptId").attr("checkexpession", "NotNull"); | |||
$("#DeptId").attr("isvalid", "yes"); | |||
$("#DeptId").attr("checkexpession", "NotNull"); | |||
$("#ReceiverIddiv").hide(); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
@@ -69,15 +65,13 @@ var bootstrap = function ($, learun) { | |||
$("#CompanyId").removeAttr("NotNull"); | |||
$("#DeptIddiv").hide(); | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("checkexpession"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
$("#ReceiverIddiv").hide(); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
$("#PostIddiv").show(); | |||
$("#PostId").removeAttr("isvalid"); | |||
$("#PostId").removeAttr("NotNull"); | |||
//$("#PostId").attr("isvalid", "yes"); | |||
//$("#PostId").attr("checkexpession", "NotNull"); | |||
$("#PostId").attr("isvalid", "yes"); | |||
$("#PostId").attr("checkexpession", "NotNull"); | |||
} else { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
@@ -86,21 +80,12 @@ var bootstrap = function ($, learun) { | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
$("#ReceiverIddiv").show(); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
//$("#ReceiverUserId").attr("isvalid", "yes"); | |||
//$("#ReceiverUserId").attr("checkexpession", "NotNull"); | |||
$("#ReceiverUserId").attr("isvalid", "yes"); | |||
$("#ReceiverUserId").attr("checkexpession", "NotNull"); | |||
$("#PostIddiv").hide(); | |||
$("#PostId").removeAttr("isvalid"); | |||
$("#PostId").removeAttr("NotNull"); | |||
} | |||
} else { | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
} | |||
} | |||
}); | |||
@@ -168,10 +153,8 @@ var bootstrap = function ($, learun) { | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
$("#ReceiverIddiv").show(); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
//$("#ReceiverUserId").attr("isvalid", "yes"); | |||
//$("#ReceiverUserId").attr("checkexpession", "NotNull"); | |||
$("#ReceiverUserId").attr("isvalid", "yes"); | |||
$("#ReceiverUserId").attr("checkexpession", "NotNull"); | |||
$("#PostIddiv").hide(); | |||
$("#PostId").removeAttr("isvalid"); | |||
$("#PostId").removeAttr("NotNull"); | |||
@@ -199,10 +182,8 @@ var bootstrap = function ($, learun) { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
if (data[id].SendType === 1 || data[id].SendType == "1") { | |||
$("#CompanyIddiv").show(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
//$("#CompanyId").attr("isvalid", "yes"); | |||
//$("#CompanyId").attr("checkexpession", "NotNull"); | |||
$("#CompanyId").attr("isvalid", "yes"); | |||
$("#CompanyId").attr("checkexpession", "NotNull"); | |||
$("#DeptIddiv").hide(); | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
@@ -218,10 +199,8 @@ var bootstrap = function ($, learun) { | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
$("#DeptIddiv").show(); | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
//$("#DeptId").attr("isvalid", "yes"); | |||
//$("#DeptId").attr("checkexpession", "NotNull"); | |||
$("#DeptId").attr("isvalid", "yes"); | |||
$("#DeptId").attr("checkexpession", "NotNull"); | |||
$("#ReceiverIddiv").hide(); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
@@ -240,10 +219,8 @@ var bootstrap = function ($, learun) { | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
$("#PostIddiv").show(); | |||
$("#PostId").removeAttr("isvalid"); | |||
$("#PostId").removeAttr("NotNull"); | |||
//$("#PostId").attr("isvalid", "yes"); | |||
//$("#PostId").attr("checkexpession", "NotNull"); | |||
$("#PostId").attr("isvalid", "yes"); | |||
$("#PostId").attr("checkexpession", "NotNull"); | |||
$("#PostId").lrselectSet(data[id].ReceiverId); | |||
} else { | |||
$("#CompanyIddiv").hide(); | |||
@@ -253,10 +230,8 @@ var bootstrap = function ($, learun) { | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
$("#ReceiverIddiv").show(); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
//$("#ReceiverUserId").attr("isvalid", "yes"); | |||
//$("#ReceiverUserId").attr("checkexpession", "NotNull"); | |||
$("#ReceiverUserId").attr("isvalid", "yes"); | |||
$("#ReceiverUserId").attr("checkexpession", "NotNull"); | |||
$("#PostIddiv").hide(); | |||
$("#PostId").removeAttr("isvalid"); | |||
$("#PostId").removeAttr("NotNull"); | |||
@@ -280,31 +255,16 @@ var bootstrap = function ($, learun) { | |||
var sendtype = $('#SendType').lrselectGet(); | |||
if (sendtype == "1") { | |||
formData.ReceiverId = $("#CompanyId").lrselectGet(); | |||
if (($("#CompanyId").find(".lr-select-placeholder").text()).indexOf('请选择') != -1) { | |||
formData.Receiver = ""; | |||
} else { | |||
formData.Receiver = $("#CompanyId").find(".lr-select-placeholder").text(); | |||
} | |||
formData.Receiver = $("#CompanyId").find(".lr-select-placeholder").text(); | |||
} else if (sendtype == "2") { | |||
formData.ReceiverId = $("#DeptId").lrselectGet(); | |||
if (($("#DeptId").find(".lr-select-placeholder").text()).indexOf('请选择') != -1) { | |||
formData.Receiver = ""; | |||
} else { | |||
formData.Receiver = $("#DeptId").find(".lr-select-placeholder").text(); | |||
} | |||
formData.Receiver = $("#DeptId").find(".lr-select-placeholder").text(); | |||
} else if (sendtype == "3") { | |||
formData.ReceiverId = $("#PostId").lrselectGet(); | |||
formData.Receiver = $("#PostId").find(".lr-select-placeholder").text(); | |||
} else { | |||
formData.ReceiverId = $("#ReceiverUserId").lrformselectGet(); | |||
if (($("#ReceiverUserId").find("span").text()).indexOf('请选择') != -1) { | |||
formData.Receiver = ""; | |||
} else { | |||
formData.Receiver = $("#ReceiverUserId").find("span").text(); | |||
} | |||
formData.Receiver = $("#ReceiverUserId").find("span").text(); | |||
} | |||
if (!!processId) { | |||
formData.SProcessId = processId; | |||
@@ -7,9 +7,6 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -17,30 +14,6 @@ | |||
<div class="lr-form-item-title">主题</div> | |||
<input id="Title" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">接收对象</div> | |||
<div id="SendType"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" id="ReceiverIddiv"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<div id="ReceiverUserId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" id="DeptIddiv"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="DeptId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" id="PostIddiv"> | |||
<div class="lr-form-item-title">接收岗位</div> | |||
<div id="PostId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" id="CompanyIddiv"> | |||
<div class="lr-form-item-title">接收校区</div> | |||
<div id="CompanyId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">文号</div> | |||
<input id="DocNo" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -56,9 +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> 提交</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_read" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查阅情况</a> | |||
<a id="lr_OverIssue" class="btn btn-default"><i class="fa fa-minus-square"></i> 结束下发</a> | |||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-trash-o"></i> <span class="lrlg">作废</span></a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -8,114 +8,19 @@ var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var startTime; | |||
var endTime; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 时间搜索框 | |||
$('#datesearch').lrdate({ | |||
dfdata: [ | |||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } } | |||
], | |||
// 月 | |||
mShow: false, | |||
premShow: false, | |||
// 季度 | |||
jShow: false, | |||
prejShow: false, | |||
// 年 | |||
ysShow: false, | |||
yxShow: false, | |||
preyShow: false, | |||
yShow: false, | |||
// 默认 | |||
dfvalue: '1', | |||
selectfn: function (begin, end) { | |||
startTime = begin; | |||
endTime = end; | |||
page.search(); | |||
} | |||
}); | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 250, 400); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$("#ReceiverIddiv").hide(); | |||
$("#PostIddiv").hide(); | |||
$('#CompanyId').lrCompanySelect({ type: 'multiple' }); | |||
$('#DeptId').lrDepartmentSelect({ type: 'treemultiple' }); | |||
$('#PostId').lrPostSelect({ type: 'treemultiple' }); | |||
$('#ReceiverUserId').lrUserSelect({ type: '1' }); | |||
$('#SendType').lrDataItemSelect({ | |||
code: 'FileSendType', select: function (item) { | |||
if (item != null && item != undefined) { | |||
if (item.id === 1 || item.id === "1") { | |||
$("#CompanyIddiv").show(); | |||
$("#CompanyId").attr("isvalid", "yes"); | |||
$("#CompanyId").attr("checkexpession", "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"); | |||
} else if (item.id === 2 || item.id === "2") { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
$("#DeptIddiv").show(); | |||
$("#DeptId").attr("isvalid", "yes"); | |||
$("#DeptId").attr("checkexpession", "NotNull"); | |||
$("#ReceiverIddiv").hide(); | |||
$("#ReceiverUserId").removeAttr("isvalid"); | |||
$("#ReceiverUserId").removeAttr("NotNull"); | |||
$("#PostIddiv").hide(); | |||
$("#PostId").removeAttr("isvalid"); | |||
$("#PostId").removeAttr("NotNull"); | |||
} else if (item.id === 3 || item.id === "3") { | |||
$("#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").show(); | |||
$("#PostId").attr("isvalid", "yes"); | |||
$("#PostId").attr("checkexpession", "NotNull"); | |||
} else { | |||
$("#CompanyIddiv").hide(); | |||
$("#CompanyId").removeAttr("isvalid"); | |||
$("#CompanyId").removeAttr("NotNull"); | |||
$("#DeptIddiv").hide(); | |||
$("#DeptId").removeAttr("isvalid"); | |||
$("#DeptId").removeAttr("NotNull"); | |||
$("#ReceiverIddiv").show(); | |||
$("#ReceiverUserId").attr("isvalid", "yes"); | |||
$("#ReceiverUserId").attr("checkexpession", "NotNull"); | |||
$("#PostIddiv").hide(); | |||
$("#PostId").removeAttr("isvalid"); | |||
$("#PostId").removeAttr("NotNull"); | |||
} | |||
} | |||
} | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
@@ -233,16 +138,43 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 结束下发 | |||
$('#lr_OverIssue').on('click', function () { | |||
// 下发 | |||
$('#lr_nosubmit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('SFileId'); | |||
var CreateUser = learun.clientdata.get(['userinfo']).realName; | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否结束下发!', function (res) { | |||
var SendFlag = $('#gridtable').jfGridValue('SendFlag'); | |||
if (SendFlag !== 0) { | |||
learun.alert.warning("当前项目已下发,请勿重复下发!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/OverIssue', { keyValue: keyValue, }, function (res) { | |||
page.search(); | |||
}); | |||
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, {}); | |||
} | |||
} | |||
}); | |||
} | |||
@@ -254,7 +186,6 @@ var bootstrap = function ($, learun) { | |||
url: top.$.rootUrl + '/EducationalAdministration/Sys_SendFile/GetPageList', | |||
headData: [ | |||
{ label: "主题", name: "Title", width: 300, align: "left" }, | |||
{ label: "文号", name: "DocNo", width: 300, align: "left" }, | |||
{ | |||
label: "接收对象", name: "SendType", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -267,7 +198,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
{ | |||
label: "接收人", name: "Receiver", width: 300, align: "left" | |||
}, | |||
{ | |||
@@ -276,7 +207,6 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "下发时间", name: "SendTime", width: 150, align: "left" | |||
}, | |||
{ | |||
label: "状态", name: "SendFlag", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
@@ -289,22 +219,15 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "阅读数/接受人数", name: "NumberPeople", width: 150, align: "left" | |||
}, | |||
], | |||
mainId: 'SFileId', | |||
sidx: 'SendFlag asc,SendTime desc', | |||
isPage: true | |||
}); | |||
//page.search(); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.ReceiverId = param.DeptId + param.ReceiverUserId + param.PostId + param.CompanyId; | |||
param.SqlParameter = ' AND SendFlag<>4 and STypeId=1'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -238,7 +238,6 @@ var bootstrap = function ($, learun) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
param.STypeId = 3; | |||
param.SqlParameter = ' AND SendFlag<>4'; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
@@ -228,6 +228,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 | |||
} | |||
@@ -91,7 +91,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("DOCNO")] | |||
public string DocNo { get; set; } | |||
#endregion | |||
[NotMapped] | |||
[NotMapped] | |||
public string NumberPeople { get; set; } | |||
#region 扩展操作 | |||
/// <summary> | |||
@@ -61,5 +61,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
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); | |||
} | |||
} |
@@ -44,66 +44,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (queryParam["StartTime"].ToString() != "1753-01-01" && queryParam["EndTime"].ToString() != "3000-01-01") | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( t.SendTime >= @startTime AND t.SendTime <= @endTime or (t.SendTime is null or len(t.SendTime)=0)) "); | |||
} | |||
if (!queryParam["Title"].IsEmpty()) | |||
{ | |||
dp.Add("Title", "%" + queryParam["Title"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Title Like @Title "); | |||
} | |||
if (!queryParam["DocNo"].IsEmpty()) | |||
{ | |||
dp.Add("DocNo", "%" + queryParam["DocNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.DocNo Like @DocNo "); | |||
} | |||
if (!queryParam["SenderId"].IsEmpty()) | |||
{ | |||
dp.Add("SenderId", "" + queryParam["SenderId"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.SenderId = @SenderId "); | |||
} | |||
if (!queryParam["Receiver"].IsEmpty()) | |||
{ | |||
dp.Add("Receiver", "%" + queryParam["Receiver"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Receiver Like @Receiver "); | |||
} | |||
if (!queryParam["ReceiverId"].IsEmpty()) | |||
{ | |||
if (queryParam["ReceiverId"].ToString().Contains(",")) | |||
{ | |||
var arr = queryParam["ReceiverId"].ToString().Split(','); | |||
var str = ""; | |||
str += " AND ("; | |||
foreach (var item in arr) | |||
{ | |||
str += $" t.ReceiverId Like '%{item}%' and"; | |||
} | |||
str=str.Remove(str.LastIndexOf("and"), 3); | |||
str += " )"; | |||
strSql.Append(str); | |||
} | |||
else | |||
{ | |||
strSql.Append($" AND t.ReceiverId Like '%{queryParam["ReceiverId"].ToString()}%' "); | |||
} | |||
} | |||
if (!queryParam["SendType"].IsEmpty()) | |||
{ | |||
dp.Add("SendType", "" + queryParam["SendType"].ToString() + "", DbType.String); | |||
strSql.Append(" AND t.SendType = @SendType "); | |||
} | |||
//sql条件 | |||
if (!queryParam["SqlParameter"].IsEmpty()) | |||
{ | |||
strSql.Append(queryParam["SqlParameter"].ToString()); | |||
} | |||
//if (!queryParam["Receiver"].IsEmpty()) | |||
//{ | |||
// dp.Add("Receiver", "%" + queryParam["Receiver"].ToString() + "%", DbType.String); | |||
// strSql.Append(" AND t.Receiver Like @Receiver "); | |||
//} | |||
////sql条件 | |||
//if (!queryParam["SqlParameter"].IsEmpty()) | |||
//{ | |||
// strSql.Append(queryParam["SqlParameter"].ToString()); | |||
//} | |||
return this.BaseRepository().FindList<Sys_SendFileEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -530,6 +490,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 | |||
} |
@@ -259,8 +259,8 @@ | |||
<Compile Include="EducationalAdministration\Sys_ReceiveDocument\Sys_ReceiveDocumentEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveDocument\Sys_ReceiveDocumentIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveDocument\Sys_ReceiveDocumentService.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveFile\Sys_ReceiveFileBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveFile\Sys_IssueEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveFile\Sys_ReceiveFileBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveFile\Sys_ReceiveFileEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveFile\Sys_ReceiveFileIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_ReceiveFile\Sys_ReceiveFileService.cs" /> | |||