@@ -247,6 +247,19 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdPartyFace', | |||||
key: value, | |||||
keyId: 'partyfaceno', | |||||
callback: function (_data) { | |||||
callback(_data['partyface']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | { | ||||
label: "系所", name: "DeptNo", width: 100, align: "left", | label: "系所", name: "DeptNo", width: 100, align: "left", | ||||
formatterAsync: function (callback, value, row, op, $cell) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
@@ -292,6 +292,14 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
Background = new Color() | Background = new Color() | ||||
}); | }); | ||||
dt.Columns.Add("姓名", typeof(string)); | dt.Columns.Add("姓名", typeof(string)); | ||||
excelConfig.ColumnEntity.Add(new ColumnModel() | |||||
{ | |||||
Column = "发放时间", | |||||
ExcelColumn = "发放时间", | |||||
Alignment = "center", | |||||
Background = new Color() | |||||
}); | |||||
dt.Columns.Add("发放时间", typeof(string)); | |||||
foreach (var item in itemList) | foreach (var item in itemList) | ||||
{ | { | ||||
excelConfig.ColumnEntity.Add(new ColumnModel() | excelConfig.ColumnEntity.Add(new ColumnModel() | ||||
@@ -93,13 +93,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
{ | { | ||||
var entity = teacherDimissionIBLL.GetTeacherDimissionEntity(keyValue); | var entity = teacherDimissionIBLL.GetTeacherDimissionEntity(keyValue); | ||||
teacherDimissionIBLL.DeleteEntity(keyValue); | teacherDimissionIBLL.DeleteEntity(keyValue); | ||||
//修改用户状态 | |||||
if (entity != null) | |||||
{ | |||||
userIBLL.UpdateState(entity.EID, 1); | |||||
} | |||||
return Success("删除成功!"); | return Success("删除成功!"); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -114,10 +108,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||||
{ | { | ||||
TeacherDimissionEntity entity = strEntity.ToObject<TeacherDimissionEntity>(); | TeacherDimissionEntity entity = strEntity.ToObject<TeacherDimissionEntity>(); | ||||
teacherDimissionIBLL.SaveEntity(keyValue, entity); | teacherDimissionIBLL.SaveEntity(keyValue, entity); | ||||
//修改用户状态 | |||||
userIBLL.UpdateState(entity.EID, 0); | |||||
return Success("保存成功!"); | return Success("保存成功!"); | ||||
} | } | ||||
#endregion | #endregion | ||||
@@ -30,7 +30,7 @@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | <a id="lr_view" 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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_import" class="btn btn-default"><i class="fa fa-trash-o"></i> 导入</a> | |||||
<a id="lr_import" class="btn btn-default"><i class="fa fa-share-square-o"></i> 导入</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -12,7 +12,7 @@ | |||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">教师</div> | <div class="lr-form-item-title">教师</div> | ||||
<div id="EmpId"></div> | |||||
<input id="EName" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">异动类型</div> | <div class="lr-form-item-title">异动类型</div> | ||||
@@ -16,7 +16,6 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#EmpId').lrUserSelect(0); | |||||
$('#ChangeType').lrDataItemSelect({ code: 'TeacherChangeType' }); | $('#ChangeType').lrDataItemSelect({ code: 'TeacherChangeType' }); | ||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
@@ -24,7 +23,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
learun.layerForm({ | |||||
learun.layerForm({ | |||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/PersonnelManagement/TeacherChange/Form', | url: top.$.rootUrl + '/PersonnelManagement/TeacherChange/Form', | ||||
@@ -55,9 +54,9 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherChange/DeleteForm', { keyValue: keyValue}, function () { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherChange/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | refreshGirdData(); | ||||
}); | }); | ||||
} | } | ||||
@@ -70,35 +69,42 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/PersonnelManagement/TeacherChange/GetPageList', | url: top.$.rootUrl + '/PersonnelManagement/TeacherChange/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "教师", name: "EmpId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "异动时间", name: "ChangeTime", width: 130, align: "left"}, | |||||
{ label: "异动类型", name: "ChangeType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'TeacherChangeType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
{ | |||||
label: "教师", name: "EmpId", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empid', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "异动时间", name: "ChangeTime", width: 130, align: "left" }, | |||||
{ | |||||
label: "异动类型", name: "ChangeType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'TeacherChangeType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId:'Id', | |||||
isPage: true | |||||
mainId: 'Id', | |||||
isPage: true, | |||||
sidx: 'ChangeTime desc' | |||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -3,25 +3,29 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission"> | |||||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | <div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | ||||
<div id="EID" isvalid="yes" checkexpession="NotNull" ></div> | |||||
<div id="EID" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission"> | |||||
<div class="lr-form-item-title">原在职状态</div> | |||||
<div id="EStatus" readonly="readonly"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission"> | |||||
<div class="lr-form-item-title">离职时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">离职时间<font face="宋体">*</font></div> | ||||
<input id="TDTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#TDTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="TDTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#TDTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission"> | |||||
<div class="lr-form-item-title">离职原因<font face="宋体">*</font></div> | <div class="lr-form-item-title">离职原因<font face="宋体">*</font></div> | ||||
<input id="TDReason" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="TDReason" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission"> | |||||
<div class="lr-form-item-title">经手人<font face="宋体">*</font></div> | <div class="lr-form-item-title">经手人<font face="宋体">*</font></div> | ||||
<input id="TDTransactor" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="TDTransactor" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherDimission"> | |||||
<div class="lr-form-item-title">备注</div> | <div class="lr-form-item-title">备注</div> | ||||
<input id="TDComment" type="text" class="form-control" /> | |||||
<input id="TDComment" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherDimission/Form.js") | @Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherDimission/Form.js") |
@@ -15,19 +15,26 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#EID').lrformselect({ | |||||
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', | |||||
layerUrlW: 400, | |||||
layerUrlH: 300, | |||||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | |||||
$('#EID').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "empid", | |||||
text: "empname", | |||||
select: function (item) { | |||||
if (!!item) { | |||||
$('#EStatus').lrselectSet(item.isinactivestatus); | |||||
} | |||||
} | |||||
}); | }); | ||||
$('#EStatus').lrDataItemSelect({ code: 'JobStatus' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/GetFormData?keyValue=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/GetFormData?keyValue=' + keyValue, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
@@ -12,7 +12,7 @@ | |||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">教师姓名</div> | <div class="lr-form-item-title">教师姓名</div> | ||||
<div id="EID"></div> | |||||
<input id="EName" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -16,14 +16,13 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#EID').lrUserSelect(0); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
learun.layerForm({ | |||||
learun.layerForm({ | |||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/PersonnelManagement/TeacherDimission/Form', | url: top.$.rootUrl + '/PersonnelManagement/TeacherDimission/Form', | ||||
@@ -54,9 +53,9 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('TDID'); | var keyValue = $('#gridtable').jfGridValue('TDID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/DeleteForm', { keyValue: keyValue}, function () { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherDimission/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | refreshGirdData(); | ||||
}); | }); | ||||
} | } | ||||
@@ -69,28 +68,32 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/PersonnelManagement/TeacherDimission/GetPageList', | url: top.$.rootUrl + '/PersonnelManagement/TeacherDimission/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "教师姓名", name: "EID", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "离职时间", name: "TDTime", width: 100, align: "left"}, | |||||
{ label: "离职原因", name: "TDReason", width: 100, align: "left"}, | |||||
{ label: "经手人", name: "TDTransactor", width: 100, align: "left"}, | |||||
{ label: "备注", name: "TDComment", width: 100, align: "left"}, | |||||
{ | |||||
label: "教师姓名", name: "EID", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empid', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "离职时间", name: "TDTime", width: 100, align: "left" }, | |||||
{ label: "离职原因", name: "TDReason", width: 100, align: "left" }, | |||||
{ label: "经手人", name: "TDTransactor", width: 100, align: "left" }, | |||||
{ label: "备注", name: "TDComment", width: 100, align: "left" }, | |||||
], | ], | ||||
mainId:'TDID', | |||||
mainId: 'TDID', | |||||
isPage: true | isPage: true | ||||
}); | }); | ||||
page.search(); | page.search(); | ||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -3,21 +3,25 @@ | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | Layout = "~/Views/Shared/_Form.cshtml"; | ||||
} | } | ||||
<div class="lr-form-wrap"> | <div class="lr-form-wrap"> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire"> | |||||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | <div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | ||||
<div id="EID" isvalid="yes" checkexpession="NotNull" ></div> | |||||
<div id="EID" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire"> | |||||
<div class="lr-form-item-title">原在职状态</div> | |||||
<div id="EStatus" readonly="readonly"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire"> | |||||
<div class="lr-form-item-title">退休时间<font face="宋体">*</font></div> | <div class="lr-form-item-title">退休时间<font face="宋体">*</font></div> | ||||
<input id="TRTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#TRTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
<input id="TRTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#TRTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire"> | |||||
<div class="lr-form-item-title">退休年龄<font face="宋体">*</font></div> | <div class="lr-form-item-title">退休年龄<font face="宋体">*</font></div> | ||||
<input id="TRAges" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | <input id="TRAges" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | ||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire" > | |||||
<div class="col-xs-12 lr-form-item" data-table="TeacherRetire"> | |||||
<div class="lr-form-item-title">备注</div> | <div class="lr-form-item-title">备注</div> | ||||
<input id="TRComment" type="text" class="form-control" /> | |||||
<input id="TRComment" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherRetire/Form.js") | @Html.AppendJsFile("/Areas/PersonnelManagement/Views/TeacherRetire/Form.js") |
@@ -15,19 +15,26 @@ var bootstrap = function ($, learun) { | |||||
page.initData(); | page.initData(); | ||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#EID').lrformselect({ | |||||
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', | |||||
layerUrlW: 400, | |||||
layerUrlH: 300, | |||||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | |||||
$('#EID').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "empid", | |||||
text: "empname", | |||||
select: function (item) { | |||||
if (!!item) { | |||||
$('#EStatus').lrselectSet(item.isinactivestatus); | |||||
} | |||||
} | |||||
}); | }); | ||||
$('#EStatus').lrDataItemSelect({ code: 'JobStatus' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherRetire/GetFormData?keyValue=' + keyValue, function (data) { | $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/TeacherRetire/GetFormData?keyValue=' + keyValue, function (data) { | ||||
for (var id in data) { | for (var id in data) { | ||||
if (!!data[id].length && data[id].length > 0) { | if (!!data[id].length && data[id].length > 0) { | ||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||||
} | } | ||||
else { | else { | ||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | $('[data-table="' + id + '"]').lrSetFormData(data[id]); | ||||
@@ -15,7 +15,7 @@ | |||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">教师姓名</div> | <div class="lr-form-item-title">教师姓名</div> | ||||
<div id="EID"></div> | |||||
<input id="EName" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -45,14 +45,13 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#EID').lrUserSelect(0); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
}); | }); | ||||
// 新增 | // 新增 | ||||
$('#lr_add').on('click', function () { | $('#lr_add').on('click', function () { | ||||
learun.layerForm({ | |||||
learun.layerForm({ | |||||
id: 'form', | id: 'form', | ||||
title: '新增', | title: '新增', | ||||
url: top.$.rootUrl + '/PersonnelManagement/TeacherRetire/Form', | url: top.$.rootUrl + '/PersonnelManagement/TeacherRetire/Form', | ||||
@@ -83,9 +82,9 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('TRID'); | var keyValue = $('#gridtable').jfGridValue('TRID'); | ||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | if (res) { | ||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherRetire/DeleteForm', { keyValue: keyValue}, function () { | |||||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherRetire/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | refreshGirdData(); | ||||
}); | }); | ||||
} | } | ||||
@@ -98,20 +97,24 @@ var bootstrap = function ($, learun) { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | $('#gridtable').lrAuthorizeJfGrid({ | ||||
url: top.$.rootUrl + '/PersonnelManagement/TeacherRetire/GetPageList', | url: top.$.rootUrl + '/PersonnelManagement/TeacherRetire/GetPageList', | ||||
headData: [ | headData: [ | ||||
{ label: "教师姓名", name: "EID", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
}}, | |||||
{ label: "退休时间", name: "TRTime", width: 100, align: "left"}, | |||||
{ label: "退休年龄", name: "TRAges", width: 100, align: "left"}, | |||||
{ label: "备注", name: "TRComment", width: 100, align: "left"}, | |||||
{ | |||||
label: "教师姓名", name: "EID", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||||
key: value, | |||||
keyId: 'empid', | |||||
callback: function (_data) { | |||||
callback(_data['empname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "退休时间", name: "TRTime", width: 100, align: "left" }, | |||||
{ label: "退休年龄", name: "TRAges", width: 100, align: "left" }, | |||||
{ label: "备注", name: "TRComment", width: 100, align: "left" }, | |||||
], | ], | ||||
mainId:'TRID', | |||||
mainId: 'TRID', | |||||
isPage: true | isPage: true | ||||
}); | }); | ||||
}, | }, | ||||
@@ -119,7 +122,7 @@ var bootstrap = function ($, learun) { | |||||
param = param || {}; | param = param || {}; | ||||
param.StartTime = startTime; | param.StartTime = startTime; | ||||
param.EndTime = endTime; | param.EndTime = endTime; | ||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | } | ||||
}; | }; | ||||
refreshGirdData = function () { | refreshGirdData = function () { | ||||
@@ -21,8 +21,12 @@ var bootstrap = function ($, learun) { | |||||
// layerUrlH: 300, | // layerUrlH: 300, | ||||
// dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | // dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | ||||
//}); | //}); | ||||
$('#EID').lrDataSourceSelect({ | |||||
code: 'EmpInfo', value: 'empid', text: 'empname', | |||||
$('#EID').lrselect({ | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||||
param: { strWhere: "1=1 " }, | |||||
value: "empid", | |||||
text: "empname", | |||||
select: function (item) { | select: function (item) { | ||||
if (!!item) { | if (!!item) { | ||||
$('#TCTitlesID').lrselectSet(item.professionaltitle); | $('#TCTitlesID').lrselectSet(item.professionaltitle); | ||||
@@ -12,7 +12,7 @@ | |||||
<div class="lr-query-formcontent"> | <div class="lr-query-formcontent"> | ||||
<div class="col-xs-12 lr-form-item"> | <div class="col-xs-12 lr-form-item"> | ||||
<div class="lr-form-item-title">教师姓名</div> | <div class="lr-form-item-title">教师姓名</div> | ||||
<div id="EID"></div> | |||||
<input id="EName" type="text" class="form-control" /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -16,7 +16,7 @@ var bootstrap = function ($, learun) { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | ||||
page.search(queryJson); | page.search(queryJson); | ||||
}, 220, 400); | }, 220, 400); | ||||
$('#EID').lrUserSelect(0); | |||||
//$('#EID').lrUserSelect(0); | |||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
location.reload(); | location.reload(); | ||||
@@ -719,7 +719,7 @@ namespace Learun.Application.Excel | |||||
Sal_UserSalaryEntity sal_UserSalaryEntity = new Sal_UserSalaryEntity(); | Sal_UserSalaryEntity sal_UserSalaryEntity = new Sal_UserSalaryEntity(); | ||||
sal_UserSalaryEntity.Create(); | sal_UserSalaryEntity.Create(); | ||||
sal_UserSalaryEntity.F_UserId = userIBLL.GetEntityByName(dr["姓名"].ToString())?.F_UserId; | sal_UserSalaryEntity.F_UserId = userIBLL.GetEntityByName(dr["姓名"].ToString())?.F_UserId; | ||||
sal_UserSalaryEntity.USDate = DateTime.Now; | |||||
sal_UserSalaryEntity.USDate = Convert.ToDateTime(dr["发放时间"].ToString()); | |||||
stall = 0;//重置应发合计 | stall = 0;//重置应发合计 | ||||
stactual = 0;//重置实发合计 | stactual = 0;//重置实发合计 | ||||
foreach (var templateItem in templateItemList) | foreach (var templateItem in templateItemList) | ||||
@@ -28,23 +28,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var admsdb = this.BaseRepository("CollegeMIS").getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.EmpId, | |||||
t.ChangeTime, | |||||
t.ChangeType | |||||
"); | |||||
strSql.Append(" FROM TeacherChange t "); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM TeacherChange t left join " + admsdb + ".dbo.EmpInfo e on t.EmpId=e.EmpId "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["EmpId"].IsEmpty()) | |||||
if (!queryParam["EName"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("EmpId", queryParam["EmpId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EmpId = @EmpId "); | |||||
dp.Add("EName", "%" + queryParam["EName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND e.EmpName like @EName "); | |||||
} | } | ||||
if (!queryParam["ChangeType"].IsEmpty()) | if (!queryParam["ChangeType"].IsEmpty()) | ||||
{ | { | ||||
@@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
[Column("ENAME")] | [Column("ENAME")] | ||||
public string EName { get; set; } | public string EName { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 原在职状态 | |||||
/// </summary> | |||||
[Column("ESTATUS")] | |||||
public string EStatus { get; set; } | |||||
/// <summary> | |||||
/// TDReason | /// TDReason | ||||
/// </summary> | /// </summary> | ||||
[Column("TDREASON")] | [Column("TDREASON")] | ||||
@@ -1,4 +1,5 @@ | |||||
using Dapper; | using Dapper; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
@@ -28,25 +29,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var admsdb = this.BaseRepository("CollegeMIS").getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.TDID, | |||||
t.EID, | |||||
t.TDTime, | |||||
t.TDReason, | |||||
t.TDTransactor, | |||||
t.TDComment | |||||
"); | |||||
strSql.Append(" FROM TeacherDimission t "); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM TeacherDimission t left join " + admsdb + ".dbo.EmpInfo e on t.EID=e.EmpId "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["EID"].IsEmpty()) | |||||
if (!queryParam["EName"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("EID", queryParam["EID"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EID = @EID "); | |||||
dp.Add("EName", "%" + queryParam["EName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND e.EmpName like @EName "); | |||||
} | } | ||||
return this.BaseRepository().FindList<TeacherDimissionEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository().FindList<TeacherDimissionEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
@@ -103,15 +97,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
try | try | ||||
{ | { | ||||
var entity = db.FindEntity<TeacherDimissionEntity>(keyValue); | var entity = db.FindEntity<TeacherDimissionEntity>(keyValue); | ||||
//人事异动 | |||||
db.Delete<TeacherChangeEntity>(x => x.EmpId == entity.EID && x.ChangeType == "02"); | |||||
db.Delete<TeacherDimissionEntity>(t => t.TDID == keyValue); | |||||
if (entity != null) | |||||
{ | |||||
//更新教师信息 | |||||
var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpId == entity.EID); | |||||
if (empInfoEntity != null) | |||||
{ | |||||
empInfoEntity.IsInActiveStatus = entity.EStatus; | |||||
this.BaseRepository("CollegeMIS").Update(empInfoEntity); | |||||
} | |||||
//人事异动 | |||||
db.Delete<TeacherChangeEntity>(x => x.EmpId == entity.EID && x.ChangeType == "02"); | |||||
db.Delete(entity); | |||||
} | |||||
db.Commit(); | db.Commit(); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | if (ex is ExceptionEx) | ||||
{ | { | ||||
throw; | throw; | ||||
@@ -166,9 +170,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
db.Commit(); | db.Commit(); | ||||
//更新教师信息 | |||||
var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpId == entity.EID); | |||||
if (empInfoEntity != null) | |||||
{ | |||||
empInfoEntity.IsInActiveStatus = "0"; | |||||
this.BaseRepository("CollegeMIS").Update(empInfoEntity); | |||||
} | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | if (ex is ExceptionEx) | ||||
{ | { | ||||
throw; | throw; | ||||
@@ -30,6 +30,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
[Column("ENAME")] | [Column("ENAME")] | ||||
public string EName { get; set; } | public string EName { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 原在职状态 | |||||
/// </summary> | |||||
[Column("ESTATUS")] | |||||
public string EStatus { get; set; } | |||||
/// <summary> | |||||
/// TRAges | /// TRAges | ||||
/// </summary> | /// </summary> | ||||
[Column("TRAGES")] | [Column("TRAGES")] | ||||
@@ -1,4 +1,5 @@ | |||||
using Dapper; | using Dapper; | ||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using Learun.DataBase.Repository; | using Learun.DataBase.Repository; | ||||
using Learun.Util; | using Learun.Util; | ||||
using System; | using System; | ||||
@@ -28,16 +29,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var admsdb = this.BaseRepository("CollegeMIS").getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.TRID, | |||||
t.EID, | |||||
t.TRTime, | |||||
t.TRAges, | |||||
t.TRComment | |||||
"); | |||||
strSql.Append(" FROM TeacherRetire t "); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM TeacherRetire t left join " + admsdb + ".dbo.EmpInfo e on t.EID=e.EmpId "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
@@ -48,10 +43,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | ||||
strSql.Append(" AND ( t.TRTime >= @startTime AND t.TRTime <= @endTime ) "); | strSql.Append(" AND ( t.TRTime >= @startTime AND t.TRTime <= @endTime ) "); | ||||
} | } | ||||
if (!queryParam["EID"].IsEmpty()) | |||||
if (!queryParam["EName"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("EID", queryParam["EID"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EID = @EID "); | |||||
dp.Add("EName", "%" + queryParam["EName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND e.EmpName like @EName "); | |||||
} | } | ||||
return this.BaseRepository().FindList<TeacherRetireEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository().FindList<TeacherRetireEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
@@ -108,15 +103,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
try | try | ||||
{ | { | ||||
var entity = db.FindEntity<TeacherRetireEntity>(keyValue); | var entity = db.FindEntity<TeacherRetireEntity>(keyValue); | ||||
//人事异动 | |||||
db.Delete<TeacherChangeEntity>(x => x.EmpId == entity.EID && x.ChangeType == "01"); | |||||
db.Delete<TeacherRetireEntity>(t => t.TRID == keyValue); | |||||
if (entity != null) | |||||
{ | |||||
//更新教师信息 | |||||
var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpId == entity.EID); | |||||
if (empInfoEntity != null) | |||||
{ | |||||
empInfoEntity.IsInActiveStatus = entity.EStatus; | |||||
this.BaseRepository("CollegeMIS").Update(empInfoEntity); | |||||
} | |||||
//人事异动 | |||||
db.Delete<TeacherChangeEntity>(x => x.EmpId == entity.EID && x.ChangeType == "01"); | |||||
db.Delete(entity); | |||||
} | |||||
db.Commit(); | db.Commit(); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | if (ex is ExceptionEx) | ||||
{ | { | ||||
throw; | throw; | ||||
@@ -171,9 +176,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
} | } | ||||
db.Commit(); | db.Commit(); | ||||
//更新教师信息 | |||||
var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpId == entity.EID); | |||||
if (empInfoEntity != null) | |||||
{ | |||||
empInfoEntity.IsInActiveStatus = "6"; | |||||
this.BaseRepository("CollegeMIS").Update(empInfoEntity); | |||||
} | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | if (ex is ExceptionEx) | ||||
{ | { | ||||
throw; | throw; | ||||
@@ -29,32 +29,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var admsdb = this.BaseRepository("CollegeMIS").getDbConnection().Database; | |||||
var strSql = new StringBuilder(); | var strSql = new StringBuilder(); | ||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.TCID, | |||||
t.EID, | |||||
t.TCTitlesID, | |||||
t.TCTime, | |||||
t.TCTitlesNewID, | |||||
t.TCChangeTime, | |||||
t.TCTitlesPostLevel, | |||||
t.TCTitlesPostLevelNew, | |||||
t.TCChangeReason, | |||||
t.TCRemark, | |||||
u.F_Gender as Sex, | |||||
u.F_Birthday as Birthday | |||||
"); | |||||
strSql.Append(" FROM TeacherTitleChange t left join LR_Base_User u on t.EID=u.F_UserId "); | |||||
strSql.Append("SELECT t.* "); | |||||
strSql.Append(" FROM TeacherTitleChange t left join " + admsdb + ".dbo.EmpInfo e on t.EID=e.EmpId "); | |||||
strSql.Append(" WHERE 1=1 "); | strSql.Append(" WHERE 1=1 "); | ||||
var queryParam = queryJson.ToJObject(); | var queryParam = queryJson.ToJObject(); | ||||
// 虚拟参数 | // 虚拟参数 | ||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["EID"].IsEmpty()) | |||||
if (!queryParam["EName"].IsEmpty()) | |||||
{ | { | ||||
dp.Add("EID", queryParam["EID"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EID = @EID "); | |||||
dp.Add("EName", "%" + queryParam["EName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND e.EmpName like @EName "); | |||||
} | } | ||||
return this.BaseRepository().FindList<TeacherTitleChangeEntity>(strSql.ToString(), dp, pagination); | return this.BaseRepository().FindList<TeacherTitleChangeEntity>(strSql.ToString(), dp, pagination); | ||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
@@ -107,7 +95,22 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository().Delete<TeacherTitleChangeEntity>(t => t.TCID == keyValue); | |||||
var entity = this.BaseRepository().FindEntity<TeacherTitleChangeEntity>(keyValue); | |||||
if (entity != null) | |||||
{ | |||||
//更新教师信息 | |||||
var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpId == entity.EID); | |||||
if (empInfoEntity != null) | |||||
{ | |||||
empInfoEntity.ProfessionalTitle = entity.TCTitlesID; | |||||
empInfoEntity.ProfessionalTitleLevel = entity.TCTitlesPostLevel; | |||||
empInfoEntity.ProfessionalTitleGetTime = entity.TCTime; | |||||
this.BaseRepository("CollegeMIS").Update(empInfoEntity); | |||||
} | |||||
//删除变更 | |||||
this.BaseRepository().Delete(entity); | |||||
} | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||