@@ -21,11 +21,11 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | <div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | ||||
<div class="lr-form-item-title">会议开始时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">会议开始时间<font face="宋体">*</font></div> | ||||
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#BeginTime').trigger('change'); } })" /> | |||||
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#BeginTime').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | <div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | ||||
<div class="lr-form-item-title">会议结束时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">会议结束时间<font face="宋体">*</font></div> | ||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#EndTime').trigger('change'); } })" /> | |||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#EndTime').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | <div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | ||||
<div class="lr-form-item-title">会议记录者</div> | <div class="lr-form-item-title">会议记录者</div> | ||||
@@ -22,11 +22,11 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | <div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | ||||
<div class="lr-form-item-title">会议开始时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">会议开始时间<font face="宋体">*</font></div> | ||||
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#BeginTime').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | <div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | ||||
<div class="lr-form-item-title">会议结束时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">会议结束时间<font face="宋体">*</font></div> | ||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#EndTime').trigger('change'); } })" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | <div class="col-xs-12 lr-form-item" data-table="MeetingManagement"> | ||||
<div class="lr-form-item-title">会议记录者</div> | <div class="lr-form-item-title">会议记录者</div> | ||||
@@ -97,19 +97,12 @@ var bootstrap = function ($, learun) { | |||||
}; | }; | ||||
// 保存数据 | // 保存数据 | ||||
save = function (processId, callBack, i) { | save = function (processId, callBack, i) { | ||||
var formData = $('body').lrGetFormData(); | |||||
if (!!processId) { | |||||
formData.ProcessId = processId; | |||||
if (!!callBack) { | |||||
var res = { | |||||
code: 200, data: {} | |||||
}; | |||||
callBack(res, i); | |||||
} | } | ||||
var postData = { | |||||
strEntity: JSON.stringify(formData) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(res, i); | |||||
} | |||||
}); | |||||
}; | }; | ||||
page.init(); | page.init(); | ||||
} | } | ||||
@@ -43,8 +43,8 @@ | |||||
<a id="lr_attendance" class="btn btn-default"><i class="fa fa-plus"></i> 考勤</a> | <a id="lr_attendance" class="btn btn-default"><i class="fa fa-plus"></i> 考勤</a> | ||||
<a id="lr_minutes" class="btn btn-default"><i class="fa fa-plus"></i> 纪要</a> | <a id="lr_minutes" class="btn btn-default"><i class="fa fa-plus"></i> 纪要</a> | ||||
<a id="lr_notice" class="btn btn-default"><i class="fa fa-plus"></i> 通知</a> | <a id="lr_notice" class="btn btn-default"><i class="fa fa-plus"></i> 通知</a> | ||||
<a id="lr_checkyes" class="btn btn-default"><i class="fa fa-plus"></i> 审核通过</a> | |||||
<a id="lr_checkno" class="btn btn-default"><i class="fa fa-plus"></i> 审核不通过</a> | |||||
@*<a id="lr_checkyes" class="btn btn-default"><i class="fa fa-plus"></i> 审核通过</a> | |||||
<a id="lr_checkno" class="btn btn-default"><i class="fa fa-plus"></i> 审核不通过</a>*@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -40,11 +40,12 @@ | |||||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | <a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_attendance" class="btn btn-default"><i class="fa fa-plus"></i> 考勤</a> | |||||
@*<a id="lr_attendance" class="btn btn-default"><i class="fa fa-plus"></i> 考勤</a>*@ | |||||
<a id="lr_minutes" class="btn btn-default"><i class="fa fa-plus"></i> 纪要</a> | <a id="lr_minutes" class="btn btn-default"><i class="fa fa-plus"></i> 纪要</a> | ||||
<a id="lr_notice" class="btn btn-default"><i class="fa fa-plus"></i> 通知</a> | <a id="lr_notice" class="btn btn-default"><i class="fa fa-plus"></i> 通知</a> | ||||
<a id="lr_checkyes" class="btn btn-default"><i class="fa fa-plus"></i> 审核通过</a> | |||||
<a id="lr_checkno" class="btn btn-default"><i class="fa fa-plus"></i> 审核不通过</a> | |||||
<a id="lr_case" class="btn btn-default"><i class="fa fa-plus"></i> 签到情况</a> | |||||
@*<a id="lr_checkyes" class="btn btn-default"><i class="fa fa-plus"></i> 审核通过</a> | |||||
<a id="lr_checkno" class="btn btn-default"><i class="fa fa-plus"></i> 审核不通过</a>*@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -137,9 +137,34 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 考勤 | |||||
// 纪要 | // 纪要 | ||||
$('#lr_minutes').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'MeetingMinutesIndex', | |||||
title: '会议纪要', | |||||
url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Index?MeetID=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 通知 | // 通知 | ||||
$('#lr_notice').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'MeetingNoticeIndex', | |||||
title: '会议通知', | |||||
url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Index?MeetID=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 审核通过 | // 审核通过 | ||||
$('#lr_checkyes').on('click', function () { | $('#lr_checkyes').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
@@ -176,6 +201,20 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
// 会议签到情况 | |||||
$('#lr_case').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'viewform', | |||||
title: '签到情况', | |||||
url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/Index?MeetID=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -1,7 +1,7 @@ | |||||
@{ | @{ | ||||
/**/ | /**/ | ||||
ViewBag.Title = "我参加的会议"; | |||||
ViewBag.Title = "会议管理"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<div class="lr-layout "> | <div class="lr-layout "> | ||||
@@ -34,8 +34,15 @@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | <a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i> 查看</a> | ||||
<a id="lr_case" class="btn btn-default"><i class="fa fa-plus"></i> 签到情况</a> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||||
@*<a id="lr_attendance" class="btn btn-default"><i class="fa fa-plus"></i> 考勤</a>*@ | |||||
<a id="lr_minutes" class="btn btn-default"><i class="fa fa-plus"></i> 纪要</a> | |||||
<a id="lr_notice" class="btn btn-default"><i class="fa fa-plus"></i> 通知</a> | |||||
@*<a id="lr_checkyes" class="btn btn-default"><i class="fa fa-plus"></i> 审核通过</a> | |||||
<a id="lr_checkno" class="btn btn-default"><i class="fa fa-plus"></i> 审核不通过</a>*@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-body" id="gridtable"></div> | <div class="lr-layout-body" id="gridtable"></div> | ||||
@@ -28,6 +28,79 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'addform', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/Form', | |||||
width: 1000, | |||||
height: 800, | |||||
callBack: function (id) { | |||||
var res = false; | |||||
// 验证数据 | |||||
res = top[id].validForm(); | |||||
// 保存数据 | |||||
if (res) { | |||||
res = top[id].save('', function () { | |||||
page.search(); | |||||
}); | |||||
} | |||||
return res; | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus == "1") { | |||||
learun.alert.warning("当前项已审核通过!"); | |||||
return false; | |||||
} else if (CheckStatus == "3") { | |||||
learun.alert.warning("当前项审核中!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'editform', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/Form?keyValue=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
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('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus != "0") { | |||||
learun.alert.warning("当前项已审核或审核中!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 查看 | // 查看 | ||||
$('#lr_view').on('click', function () { | $('#lr_view').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
@@ -42,7 +115,106 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}); | }); | ||||
//提交 | |||||
$('#lr_submit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus == "1") { | |||||
learun.alert.warning("当前项已审核通过!"); | |||||
return false; | |||||
} else if (CheckStatus == "3") { | |||||
learun.alert.warning("当前项审核中!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||||
if (res) { | |||||
processId = learun.newGuid(); | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoSubmit', { keyValue: keyValue, status: '3', processId: processId }, function (res) { | |||||
refreshGirdData(res, {}); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 纪要 | |||||
$('#lr_minutes').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'MeetingMinutesIndex', | |||||
title: '会议纪要', | |||||
url: top.$.rootUrl + '/PersonnelManagement/MeetingMinutes/Index?MeetID=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 通知 | |||||
$('#lr_notice').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'MeetingNoticeIndex', | |||||
title: '会议通知', | |||||
url: top.$.rootUrl + '/PersonnelManagement/MeetingNotice/Index?MeetID=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
// 审核通过 | |||||
$('#lr_checkyes').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus == '1') { | |||||
learun.alert.warning("该项已审核通过!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认审核通过该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoCheck', { keyValue: keyValue, status: '1' }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 审核不通过 | |||||
$('#lr_checkno').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||||
if (CheckStatus == '2') { | |||||
learun.alert.warning("该项已审核不通过!"); | |||||
return false; | |||||
} | |||||
learun.layerConfirm('是否确认审核不通过该项!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DoCheck', { keyValue: keyValue, status: '2' }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 会议签到情况 | |||||
$('#lr_case').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'viewform', | |||||
title: '签到情况', | |||||
url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/Index?MeetID=' + keyValue, | |||||
width: 1000, | |||||
height: 800, | |||||
btn: null | |||||
}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -114,6 +286,17 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function (res, postData) { | refreshGirdData = function (res, postData) { | ||||
if (res && res.code && res.code == 200) { | |||||
// 发起流程 | |||||
var postData = { | |||||
schemeCode: 'MeetingManagementApply',// 填写流程对应模板编号 | |||||
processId: processId, | |||||
level: '1', | |||||
}; | |||||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||||
learun.loading(false); | |||||
}); | |||||
} | |||||
page.search(); | page.search(); | ||||
}; | }; | ||||
page.init(); | page.init(); | ||||
@@ -38,6 +38,7 @@ | |||||
<typeAlias alias="StuLeaveManagementMethod" type="Learun.Application.WorkFlow.StuLeaveManagementMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="StuLeaveManagementMethod" type="Learun.Application.WorkFlow.StuLeaveManagementMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="StuCancelLeaveManageMethod" type="Learun.Application.WorkFlow.StuCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="StuCancelLeaveManageMethod" type="Learun.Application.WorkFlow.StuCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="Acc_DormitoryChangeMethod" type="Learun.Application.WorkFlow.Acc_DormitoryChangeMethod,Learun.Application.WorkFlow" /> | <typeAlias alias="Acc_DormitoryChangeMethod" type="Learun.Application.WorkFlow.Acc_DormitoryChangeMethod,Learun.Application.WorkFlow" /> | ||||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | |||||
<!--任务调度器--> | <!--任务调度器--> | ||||
@@ -87,6 +88,7 @@ | |||||
<type type="IWorkFlowMethod" mapTo="StuLeaveManagementMethod" name="StuLeaveManagementMethod"></type> | <type type="IWorkFlowMethod" mapTo="StuLeaveManagementMethod" name="StuLeaveManagementMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="StuCancelLeaveManageMethod" name="StuCancelLeaveManageMethod"></type> | <type type="IWorkFlowMethod" mapTo="StuCancelLeaveManageMethod" name="StuCancelLeaveManageMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="Acc_DormitoryChangeMethod" name="Acc_DormitoryChangeMethod"></type> | <type type="IWorkFlowMethod" mapTo="Acc_DormitoryChangeMethod" name="Acc_DormitoryChangeMethod"></type> | ||||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | |||||
</container> | </container> | ||||
@@ -138,7 +138,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -262,6 +262,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public void ReceivedList(string processId) | |||||
{ | |||||
try | |||||
{ | |||||
meetingManagementService.ReceivedList(processId); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -82,6 +82,9 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
/// <summary> | /// <summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
void ChangeStatusByProcessId(string processId, string status, string userId); | void ChangeStatusByProcessId(string processId, string status, string userId); | ||||
void ReceivedList(string processId); | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -1,11 +1,19 @@ | |||||
using Dapper; | using Dapper; | ||||
using Learun.Application.Organization; | using Learun.Application.Organization; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.Application.TwoDevelopment.LR_Desktop; | |||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
using Learun.Util; | using Learun.Util; | ||||
using Microsoft.AspNet.SignalR.Client; | |||||
using Newtonsoft.Json; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Configuration; | |||||
using System.Data; | using System.Data; | ||||
using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading.Tasks; | |||||
using System.Web; | |||||
namespace Learun.Application.TwoDevelopment.PersonnelManagement | namespace Learun.Application.TwoDevelopment.PersonnelManagement | ||||
{ | { | ||||
@@ -127,7 +135,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
return this.BaseRepository("CollegeMIS").FindEntity<MeetingManagementEntity>(keyValue); | |||||
var data = this.BaseRepository("CollegeMIS").FindEntity<MeetingManagementEntity>(keyValue); | |||||
if (data != null) | |||||
{ | |||||
data.ConferenceRoomName = this.BaseRepository("CollegeMIS").FindEntity<ConferenceRoomEntity>(data.MeetingPlace).Name; | |||||
} | |||||
return data; | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -516,7 +529,112 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
} | } | ||||
public void ReceivedList(string processId) | |||||
{ | |||||
var Received = GetMeetingManagementEntityByProcessId(processId); | |||||
List<UserEntity> userInfos = new List<UserEntity>(); | |||||
foreach (var rid in Received.InternalParticipants.Split(',')) | |||||
{ | |||||
var user = this.BaseRepository().FindEntity<UserEntity>(m => m.F_UserId == rid); | |||||
if (!userInfos.Contains(user)) | |||||
{ | |||||
userInfos.Add(user); | |||||
} | |||||
} | |||||
if (!string.IsNullOrEmpty(Received.RecordPerson)) | |||||
{ | |||||
foreach (var rid in Received.RecordPerson.Split(',')) | |||||
{ | |||||
var user = this.BaseRepository().FindEntity<UserEntity>(m => m.F_UserId == rid); | |||||
if (!userInfos.Contains(user)) | |||||
{ | |||||
userInfos.Add(user); | |||||
} | |||||
} | |||||
} | |||||
//foreach (var uitem in userInfos) | |||||
//{ | |||||
// SYS_ReceiveMessageEntity receiveMessageEntity = new SYS_ReceiveMessageEntity(); | |||||
// receiveMessageEntity.Create(); | |||||
// receiveMessageEntity.SENDERID = Received.SENDERID; | |||||
// receiveMessageEntity.SENDER = messageentity.SENDER; | |||||
// receiveMessageEntity.RECEIVERID = uitem.F_UserId; | |||||
// receiveMessageEntity.RECEIVER = uitem.F_RealName; | |||||
// receiveMessageEntity.TITLE = messageentity.TITLE; | |||||
// receiveMessageEntity.CONTENTS = messageentity.CONTENTS; | |||||
// receiveMessageEntity.URL = messageentity.URL; | |||||
// receiveMessageEntity.READFLAG = 0; | |||||
// receiveMessageEntity.SENDTIME = DateTime.Now; | |||||
// receiveMessageEntity.DelFlag = false; | |||||
// this.BaseRepository().Insert(receiveMessageEntity); | |||||
//} | |||||
//读取信息推送管理-会议申请推送(03)的配置 | |||||
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "03"); | |||||
if (informationPushEntity != null && informationPushEntity.Status == true) | |||||
{ | |||||
//微信推送 | |||||
try | |||||
{ | |||||
PushWeixin(userInfos, Received.MeetingTitle); | |||||
} | |||||
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", Received.InternalParticipants, Received.MeetingTitle, Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)).Length < 20 ? Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)) : Util.Str.ReplaceHtml(HttpUtility.HtmlDecode(Received.Content)).Substring(0, 20), "mail", string.Join(",", userInfos.Select(m => m.F_UserId)), ""); | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
public void PushWeixin(List<UserEntity> needpostuserlist, string title) | |||||
{ | |||||
var WeChatConfigentity = BaseRepository().FindEntity<WeChatConfigEntity>(m => m.IsEnable == true); | |||||
string appid = WeChatConfigentity.APPId; | |||||
string secret = WeChatConfigentity.secret; | |||||
var wechatemplete = BaseRepository() | |||||
.FindEntity<WeChatTemplateEntity>(m => m.WeID == WeChatConfigentity.ID && m.TCode == "task"); | |||||
string weixintaskurl = wechatemplete.TUrl; | |||||
string weixintasktempid = wechatemplete.TempId; | |||||
var responsejson = Util.HttpMethods.HttpGet("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret); | |||||
foreach (UserEntity userinfo in needpostuserlist) | |||||
{ | |||||
if (userinfo != null && !string.IsNullOrEmpty(userinfo.OpenIdForWeixin)) | |||||
{ | |||||
//执行推送任务 | |||||
if (!string.IsNullOrEmpty(appid) && !string.IsNullOrEmpty(secret) && !string.IsNullOrEmpty(weixintaskurl) && !string.IsNullOrEmpty(weixintasktempid)) | |||||
{ | |||||
if (!string.IsNullOrEmpty(responsejson)) | |||||
{ | |||||
var weixintokenobj = JsonConvert.DeserializeObject<dynamic>(responsejson); | |||||
if (string.IsNullOrEmpty(weixintokenobj.errcode)) | |||||
{ | |||||
string access_token = weixintokenobj.access_token; | |||||
string jsondata = "{\"touser\":\"" + userinfo.OpenIdForWeixin + "\"," + | |||||
"\"template_id\":\"" + weixintasktempid + "\"," + | |||||
"\"url\":\"" + weixintaskurl + "\"," + | |||||
"\"data\":{" + | |||||
"\"first\": {\"value\":\"您有新的会议消息\",\"color\":\"#173177\"}," + | |||||
"\"keyword1\":{\"value\":\"未读邮件\",\"color\":\"#173177\"}," + | |||||
"\"keyword2\": {\"value\":\"" + title + "\",\"color\":\"#173177\"}," + | |||||
"\"keyword3\": {\"value\":\"待查看\",\"color\":\"#173177\"}," + | |||||
"\"keyword4\": {\"value\":\"您有新的未读会议【" + title + "】\",\"color\":\"#173177\"}" + | |||||
"}" + | |||||
"}"; | |||||
string pushresult = Util.HttpMethods.HttpPost("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + access_token, jsondata); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
} | } | ||||
@@ -17,6 +17,7 @@ namespace Learun.Application.WorkFlow | |||||
if (parameter.code == "agree") | if (parameter.code == "agree") | ||||
{ | { | ||||
meetingManagementIBLL.ChangeStatusByProcessId(parameter.processId, "1", parameter.userId); | meetingManagementIBLL.ChangeStatusByProcessId(parameter.processId, "1", parameter.userId); | ||||
meetingManagementIBLL.ReceivedList(parameter.processId); | |||||
} | } | ||||
else | else | ||||
{ | { | ||||