@@ -41,6 +41,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 审核界面 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult AuditForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -145,6 +155,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success(data); | |||
} | |||
/// <summary> | |||
/// 提交单子 | |||
/// </summary> | |||
/// <param name="keyValue">表主键</param> | |||
/// <param name="pastatus">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int pastatus, string processId) | |||
{ | |||
dtHonorInfoIBLL.ModifyStatus(keyValue, pastatus, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -94,6 +94,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult SaveForm(string keyValue, DtHonorTypeEntity entity) | |||
{ | |||
var Model = dtHonorTypeIBLL.GetByItemId(keyValue, entity.ItemId); | |||
if (string.IsNullOrEmpty(entity.ItemId) || string.IsNullOrEmpty(entity.ItemName) || string.IsNullOrEmpty(entity.HOrder.ToString())) | |||
{ | |||
return Fail("请填写必填项"); | |||
} | |||
if (string.IsNullOrEmpty(entity.ParentId)) | |||
{ | |||
entity.ParentId = "0"; | |||
@@ -96,6 +96,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult SaveForm(string keyValue, DtRaceTypeEntity entity) | |||
{ | |||
var model = dtRaceTypeIBLL.GetEntityByCode(entity.ItemId); | |||
if (string.IsNullOrEmpty(entity.ItemId) || string.IsNullOrEmpty(entity.ItemName) || string.IsNullOrEmpty(entity.DOrder)) | |||
{ | |||
return Fail("请填写必填项"); | |||
} | |||
if (string.IsNullOrEmpty(entity.ParentId)) | |||
{ | |||
entity.ParentId = "0"; | |||
@@ -0,0 +1,47 @@ | |||
@{ | |||
ViewBag.Title = "荣誉称号"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="DtHonorInfo"> | |||
<div class="lr-form-item-title">申请开始时间<font face="宋体">*</font></div> | |||
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#BeginTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtHonorInfo"> | |||
<div class="lr-form-item-title">申请结束时间<font face="宋体">*</font></div> | |||
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#EndTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtHonorInfo"> | |||
<div class="lr-form-item-title">类型<font face="宋体">*</font></div> | |||
<div id="ItemId" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtHonorInfo"> | |||
<div class="lr-form-item-title">评定周期<font face="宋体">*</font></div> | |||
<div id="Cycle" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtHonorInfo"> | |||
<div class="lr-form-item-title">评定学年<font face="宋体">*</font></div> | |||
<div id="SchoolYear" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="DtHonorInfo"> | |||
<div class="lr-form-item-title">评定学期<font face="宋体">*</font></div> | |||
<div id="Emester" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DtHonorInfo"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Demo" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="DtHonorInfo" style="display: none; "> | |||
<div class="lr-form-item-title">添加用户</div> | |||
<input id="CareteUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-4 lr-form-item" data-table="DtHonorInfo" style="display: none; "> | |||
<div class="lr-form-item-title">添加时间</div> | |||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="DtHonorInfo" style="display: none; "> | |||
<div class="lr-form-item-title">状态</div> | |||
<input id="State" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/AuditForm/Form.js") |
@@ -0,0 +1,118 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-08-13 15:17 | |||
* 描 述:荣誉称号 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
if(!!data) | |||
{ | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#ItemId').lrHonorTypeSelect(); | |||
$('#Cycle').lrDataItemSelect({ code: 'ThisCycle' }); | |||
$('#SchoolYear').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/DtHonorInfo/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#Emester').lrDataItemSelect({ code: 'Semester' }); | |||
$('#CareteUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#CareteUser').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#State').val('0'); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DtHonorInfo/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]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId,param,callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/DtHonorInfo/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
if(id == 'DtHonorInfo' && data[id] ){ | |||
keyValue = data[id].Id; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); } | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if(!!processId){ | |||
formData.processId =processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/DtHonorInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -18,24 +18,23 @@ var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
if(!!data) | |||
{ | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
if(!!data) { | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
@@ -43,7 +42,7 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#ItemId').lrDataItemSelect({ code: 'HonorType' }); | |||
$('#ItemId').lrHonorTypeSelect(); | |||
$('#Cycle').lrDataItemSelect({ code: 'ThisCycle' }); | |||
$('#SchoolYear').lrselect({ | |||
placeholder: "请选择学年", | |||
@@ -56,6 +55,7 @@ var bootstrap = function ($, learun) { | |||
$('#CareteUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#CareteUser').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||
$('#State').val('0'); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
@@ -10,19 +10,21 @@ | |||
<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类型</div> | |||
<div id="ItemId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">评定周期</div> | |||
<div id="Cycle"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">评定学年</div> | |||
<div id="SchoolYear"></div> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类型</div> | |||
<div id="ItemId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">评定周期</div> | |||
<div id="Cycle"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">评定学年</div> | |||
<div id="SchoolYear"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -35,6 +37,7 @@ | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-trash-x"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -46,7 +46,7 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#ItemId').lrDataItemSelect({ code: 'HonorType' }); | |||
$('#ItemId').lrHonorTypeSelect(); | |||
$('#Cycle').lrDataItemSelect({ code: 'ThisCycle' }); | |||
//学年 | |||
$('#SchoolYear').lrselect({ | |||
@@ -119,6 +119,25 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var State = $('#gridtable').jfGridValue('State'); | |||
if (State !== 0) { | |||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/DtHonorInfo/ModifyStatus', { keyValue: keyValue, pastatus: 1, processId: processId }, function (res) { | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -128,13 +147,14 @@ var bootstrap = function ($, learun) { | |||
{ label: "申请开始时间", name: "BeginTime", width: 180, align: "left" }, | |||
{ label: "申请结束时间", name: "EndTime", width: 180, align: "left" }, | |||
{ | |||
label: "类型", name: "ItemId", width: 200, align: "left", | |||
label: "荣誉称号", name: "ItemId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DtHonorType', | |||
key: value, | |||
code: 'HonorType', | |||
keyId: 'itemid', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
callback(_data['itemname']); | |||
} | |||
}); | |||
} | |||
@@ -182,19 +202,19 @@ var bootstrap = function ($, learun) { | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 0) { | |||
return '<span class=\"label label-warning\">草稿</span>'; | |||
} | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue == 1) { | |||
return '<span class=\"label label-danger\">审批中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\">审批通过</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
isPage: true, | |||
mainId: 'Id', | |||
isPage: true | |||
sord: 'asc' | |||
}); | |||
page.search(); | |||
//page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
@@ -212,6 +232,19 @@ var bootstrap = function ($, learun) { | |||
processId: processId, | |||
level: '1', | |||
}; | |||
var ItemId = $('#gridtable').jfGridValue('ItemId'); | |||
ItemId = ItemId.substring(0, 3); | |||
switch (ItemId) { | |||
case "001": | |||
postData["schemeCode"] = 'Dispatch'; | |||
break; | |||
case "002": | |||
postData["schemeCode"] = '222'; | |||
break; | |||
case "003": | |||
postData["schemeCode"] = '333'; | |||
break; | |||
} | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
@@ -19,6 +19,7 @@ var bootstrap = function ($, learun) { | |||
$('#ParentId').lrHonorTypeSelect(); | |||
$('#IsValid').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||
$('#IsValid').lrselectSet("true"); | |||
$('#State').lrselectSet('0'); | |||
}, | |||
initData: function () { | |||
if (!!selectedRow) { | |||
@@ -32,10 +33,7 @@ var bootstrap = function ($, learun) { | |||
if (!$('form').lrValidform()) { | |||
return false; | |||
} | |||
//var postData = $('#form').lrGetFormData(keyValue); | |||
var postData = { | |||
strEntity: JSON.stringify($('form').lrGetFormData(keyValue)) | |||
}; | |||
var postData = $('#form').lrGetFormData(keyValue); | |||
if (postData["ParentId"] == '' || postData["ParentId"] == ' ') { | |||
postData["ParentId"] = $("#ParentId").lrselectGet(); | |||
} | |||
@@ -81,22 +81,11 @@ var bootstrap = function ($, learun) { | |||
headData: [ | |||
{ label: "编码", name: "ItemId", width: 200, align: "left" }, | |||
{ label: "名称", name: "ItemName", width: 200, align: "left" }, | |||
{ | |||
label: "类型", name: "ItemId", width: 200, align: "left", | |||
//formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('dataItem', { | |||
// key: value, | |||
// code: 'HonorType', | |||
// callback: function (_data) { | |||
// callback(_data.text); | |||
// } | |||
// }); | |||
//} | |||
}, | |||
{ label: "类型", name: "ItemId", width: 200, align: "left" }, | |||
{ label: "排序", name: "HOrder", width: 200, align: "left" }, | |||
{ | |||
label: "有效", name: "IsValid", width: 200, align: "left", | |||
formatter: function (cellvalue, options, rowObject) { | |||
formatter: function (cellvalue, options, rowObject) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
@@ -83,7 +83,6 @@ var bootstrap = function ($, learun) { | |||
{ label: "编码", name: "ItemId", width: 300, align: "left" }, | |||
{ | |||
label: "有效", name: "IsValid", width: 300, align: "left", | |||
//formatter: function (cellvalue, options, rowObject) { | |||
formatter: function (cellvalue) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
@@ -1008,6 +1008,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\DtHonoraryUser\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtHonoraryUser\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtHonoraryUser\IndexTwo.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtHonorInfo\AuditForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceInfo\BJIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceInfo\ZYIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtRaceInfo\QXIndex.cshtml" /> | |||
@@ -7456,6 +7457,7 @@ | |||
<Content Include="Areas\CustomFunction\Views\ContestCoachGroup\FormStu.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\ContestCoachGroup\IndexArrange.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\ContestCoachGroup\FormArrange.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\DtHonorInfo\AuditForm.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | |||
@@ -30,6 +30,7 @@ | |||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="DispatchMethod" type="Learun.Application.WorkFlow.DispatchMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="DtStuLeaveMethod" type="Learun.Application.WorkFlow.DtStuLeaveMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="HonorMethod" type="Learun.Application.WorkFlow.HonorMethod,Learun.Application.WorkFlow" /> | |||
<!--任务调度器--> | |||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | |||
@@ -70,7 +71,8 @@ | |||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="DispatchMethod" name="DispatchMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="DtStuLeaveMethod" name="DtStuLeaveMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="HonorMethod" name="HonorMethod"></type> | |||
</container> | |||
<container name="TsIOCcontainer"> | |||
@@ -144,5 +144,74 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交审核 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="pastatus">状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int pastatus, string processId) | |||
{ | |||
try | |||
{ | |||
dtHonorInfoService.ModifyStatus(keyValue, pastatus, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改审核状态 | |||
/// </summary> | |||
/// <param name="pastatus">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int pastatus, string processId) | |||
{ | |||
try | |||
{ | |||
dtHonorInfoService.ModifyStatusByProcessId(pastatus, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void ModifTimeByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
dtHonorInfoService.ModifTimeByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -51,5 +51,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
void SaveEntity(string keyValue, DtHonorInfoEntity entity); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="pastatus">状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatus(string keyValue, int pastatus, string processId); | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="i"></param> | |||
/// <param name="processId"></param> | |||
void ModifyStatusByProcessId(int i, string processId); | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="processId"></param> | |||
void ModifTimeByProcessId(string processId); | |||
#endregion | |||
} | |||
} |
@@ -31,19 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.BeginTime, | |||
t.EndTime, | |||
t.ItemId, | |||
t.Cycle, | |||
t.SchoolYear, | |||
t.Emester, | |||
t.Demo, | |||
t.CareteUser, | |||
t.CreateTime, | |||
t.State | |||
"); | |||
strSql.Append(@" * "); | |||
strSql.Append(" FROM DtHonorInfo t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
@@ -51,26 +39,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||
{ | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.Date); | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.Date); | |||
strSql.Append(" AND ( t.BeginTime >= @startTime AND t.EndTime <= @endTime ) "); | |||
} | |||
if (!queryParam["ItemId"].IsEmpty()) | |||
{ | |||
dp.Add("ItemId",queryParam["ItemId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ItemId = @ItemId "); | |||
dp.Add("ItemId", queryParam["ItemId"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.ItemId like @ItemId "); | |||
} | |||
if (!queryParam["Cycle"].IsEmpty()) | |||
{ | |||
dp.Add("Cycle",queryParam["Cycle"].ToString(), DbType.String); | |||
dp.Add("Cycle", queryParam["Cycle"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Cycle = @Cycle "); | |||
} | |||
if (!queryParam["SchoolYear"].IsEmpty()) | |||
{ | |||
dp.Add("SchoolYear",queryParam["SchoolYear"].ToString(), DbType.String); | |||
dp.Add("SchoolYear", queryParam["SchoolYear"].ToString(), DbType.String); | |||
strSql.Append(" AND t.SchoolYear = @SchoolYear "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<DtHonorInfoEntity>(strSql.ToString(),dp, pagination); | |||
return this.BaseRepository("CollegeMIS").FindList<DtHonorInfoEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -118,7 +106,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<DtHonorInfoEntity>(t=>t.processId == processId); | |||
return this.BaseRepository("CollegeMIS").FindEntity<DtHonorInfoEntity>(t => t.processId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -145,7 +133,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<DtHonorInfoEntity>(t=>t.Id == keyValue); | |||
this.BaseRepository("CollegeMIS").Delete<DtHonorInfoEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -196,5 +184,72 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
#region 扩展数据 | |||
public void ModifyStatus(string keyValue, int pastatus, string processId) | |||
{ | |||
try | |||
{ | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<DtHonorInfoEntity>(o => o.Id == keyValue); | |||
entity.processId = processId; | |||
entity.State = pastatus; | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
catch (Exception e) | |||
{ | |||
if (e is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(e); | |||
} | |||
} | |||
} | |||
public void ModifTimeByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<DtHonorInfoEntity>(a => a.processId == processId); | |||
entity.State = 2; | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
catch (Exception e) | |||
{ | |||
if (e is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(e); | |||
} | |||
} | |||
} | |||
public void ModifyStatusByProcessId(int pastatus, string processId) | |||
{ | |||
try | |||
{ | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<DtHonorInfoEntity>(a => a.processId == processId); | |||
entity.State = Convert.ToInt32(pastatus); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
catch (Exception e) | |||
{ | |||
if (e is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(e); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -97,6 +97,7 @@ | |||
<Compile Include="NodeMethod\ADR_AddApplyMethod.cs" /> | |||
<Compile Include="NodeMethod\Ass_AcceptanceMethod.cs" /> | |||
<Compile Include="NodeMethod\Ass_ReceiveMethod.cs" /> | |||
<Compile Include="NodeMethod\HonorMethod.cs" /> | |||
<Compile Include="NodeMethod\DtStuLeaveMethod.cs" /> | |||
<Compile Include="NodeMethod\DispatchMethod.cs" /> | |||
<Compile Include="NodeMethod\MeetingManagementApplyMethod.cs" /> | |||
@@ -7,9 +7,9 @@ using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
namespace Learun.Application.WorkFlow | |||
{ | |||
public class DispatchMethod : IWorkFlowMethod | |||
public class HonorMethod : IWorkFlowMethod | |||
{ | |||
DispatchIBLL dispatchIBLL = new DispatchBLL(); | |||
DtHonorInfoBLL dtHonorInfoIBll = new DtHonorInfoBLL(); | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
@@ -18,11 +18,11 @@ namespace Learun.Application.WorkFlow | |||
{ | |||
if (parameter.code == "agree") | |||
{ | |||
dispatchIBLL.ModifyStatusByProcessId(2, parameter.processId); | |||
dtHonorInfoIBll.ModifyStatusByProcessId(2, parameter.processId); | |||
} | |||
else | |||
{ | |||
dispatchIBLL.ModifyStatusByProcessId(0, parameter.processId); | |||
dtHonorInfoIBll.ModifyStatusByProcessId(0, parameter.processId); | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
namespace Learun.Application.WorkFlow | |||
{ | |||
public class DispatchMethod : IWorkFlowMethod | |||
{ | |||
DispatchIBLL dispatchIBLL = new DispatchBLL(); | |||
/// <summary> | |||
/// 审核 | |||
/// </summary> | |||
/// <param name="parameter"></param> | |||
public void Execute(WfMethodParameter parameter) | |||
{ | |||
if (parameter.code == "agree") | |||
{ | |||
dispatchIBLL.ModifyStatusByProcessId(2, parameter.processId); | |||
} | |||
else | |||
{ | |||
dispatchIBLL.ModifyStatusByProcessId(0, parameter.processId); | |||
} | |||
} | |||
} | |||
} |