@@ -308,6 +308,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return Fail("职工编号已存在!"); | |||
} | |||
//员工状态时间 | |||
if (!string.IsNullOrEmpty(entity.IsInActiveStatus)) | |||
{ | |||
entity.IsInActiveTime = DateTime.Now; | |||
} | |||
} | |||
else | |||
{ | |||
@@ -326,6 +331,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
entity.SyncFlag = false; | |||
} | |||
//员工状态时间 | |||
var preEntity = empInfoIBLL.GetEmpInfoEntity(keyValue); | |||
if (preEntity != null) | |||
{ | |||
if (entity.IsInActiveStatus != preEntity.IsInActiveStatus) | |||
{ | |||
entity.IsInActiveTime = DateTime.Now; | |||
} | |||
} | |||
} | |||
empInfoIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
@@ -419,6 +419,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ label: "员工状态时间", name: "IsInActiveTime", width: 100, align: "left"}, | |||
{ | |||
label: "人员身份", name: "CompilationCategory", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -105,6 +105,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
teacherTitleEvaluationIBLL.SaveEntity(keyValue,entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DoCheck(string keyValue, string status) | |||
{ | |||
teacherTitleEvaluationIBLL.DoCheck(keyValue, status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -15,11 +15,12 @@ var bootstrap = function ($, learun) { | |||
page.initData(); | |||
}, | |||
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" | |||
}); | |||
$('#TTTitlesID').lrDataItemSelect({ code: 'jszc' }); | |||
$('#TTTitlesPostLevel').lrDataItemSelect({ code: 'TeacherTitlePostLevel' }); | |||
@@ -7,9 +7,9 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
@*<div class="lr-layout-tool-item"> | |||
<div id="datesearch"></div> | |||
</div> | |||
</div>*@ | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
@@ -29,6 +29,8 @@ | |||
<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_checkYes" class="btn btn-default"><i class="fa fa-print"></i> 审核通过</a> | |||
<a id="lr_checkNo" class="btn btn-default"><i class="fa fa-print"></i> 审核不通过</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -45,7 +45,13 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#EID').lrUserSelect(0); | |||
$('#EID').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=EmpInfo', | |||
param: { strWhere: "1=1 " }, | |||
value: "empid", | |||
text: "empname" | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -67,6 +73,11 @@ var bootstrap = function ($, learun) { | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('TTID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus == "1" || CheckStatus == "2") { | |||
learun.alert.warning("当前项已审核!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
@@ -83,6 +94,11 @@ var bootstrap = function ($, learun) { | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('TTID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus == "1" || CheckStatus == "2") { | |||
learun.alert.warning("当前项已审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/TeacherTitleEvaluation/DeleteForm', { keyValue: keyValue }, function () { | |||
@@ -92,6 +108,43 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 审核通过 | |||
$('#lr_checkYes').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('TTID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus == "1" || CheckStatus == "2") { | |||
learun.alert.warning("当前项已审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认审核通过该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/TeacherTitleEvaluation/DoCheck', { keyValue: keyValue, status: "1" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 审核不通过 | |||
$('#lr_checkNo').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('TTID'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckStatus = $('#gridtable').jfGridValue('CheckStatus'); | |||
if (CheckStatus == "1" || CheckStatus == "2") { | |||
learun.alert.warning("当前项已审核!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认审核不通过该项!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/TeacherTitleEvaluation/DoCheck', { keyValue: keyValue, status: "2" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -104,10 +157,12 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "教师姓名", name: "EID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('user', { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empid', | |||
callback: function (_data) { | |||
callback(_data.name); | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
@@ -117,10 +172,8 @@ var bootstrap = function ($, learun) { | |||
return cellvalue == 1 ? "男" : "女" | |||
} | |||
}, | |||
{ | |||
label: "出生年月", name: "Birthday", width: 100, align: "left" | |||
}, | |||
{ label: "评定时间", name: "TTTime", width: 100, align: "left" }, | |||
{ label: "出生日期", name: "Birthday", width: 120, align: "left" }, | |||
{ label: "评定时间", name: "TTTime", width: 120, align: "left" }, | |||
{ | |||
label: "评定职称", name: "TTTitlesID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -146,15 +199,21 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ label: "备注", name: "TTRemark", width: 100, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) { | |||
return cellvalue == "1" ? "<span class=\"label label-success\">已通过</span>" : cellvalue == "2" ? "<span class=\"label label-danger\">未通过</span>" : "<span class=\"label label-default\">未审核</span>"; | |||
} | |||
}, | |||
], | |||
mainId: 'TTID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.StartTime = startTime; | |||
param.EndTime = endTime; | |||
//param.StartTime = startTime; | |||
//param.EndTime = endTime; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
@@ -579,6 +579,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
[Column("PROFESSIONALTITLEGETTIME")] | |||
public DateTime? ProfessionalTitleGetTime { get; set; } | |||
/// <summary> | |||
/// 员工状态时间 | |||
/// </summary> | |||
[Column("ISINACTIVETIME")] | |||
public DateTime? IsInActiveTime { get; set; } | |||
#endregion | |||
@@ -118,6 +118,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DoCheck(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
teacherTitleEvaluationService.DoCheck(keyValue, status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -20,7 +20,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
[Column("TTID")] | |||
public string TTID { get; set; } | |||
/// <summary> | |||
/// EID | |||
/// 教师信息管理Id | |||
/// </summary> | |||
[Column("EID")] | |||
public string EID { get; set; } | |||
@@ -35,12 +35,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
[Column("TTTITLES")] | |||
public string TTTitles { get; set; } | |||
/// <summary> | |||
/// TTTitlesID | |||
/// 评定职称 | |||
/// </summary> | |||
[Column("TTTITLESID")] | |||
public string TTTitlesID { get; set; } | |||
/// <summary> | |||
/// TTTime | |||
/// 评定时间 | |||
/// </summary> | |||
[Column("TTTIME")] | |||
public DateTime? TTTime { get; set; } | |||
@@ -74,6 +74,23 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// </summary> | |||
[Column("WINNINGFILE")] | |||
public string WinningFile { get; set; } | |||
/// <summary> | |||
/// 审核状态(0未审核,1审核通过,2审核不通过) | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public string CheckStatus { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CHECKTIME")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSER")] | |||
public string CheckUser { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
@@ -103,7 +120,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// 性别 | |||
/// </summary> | |||
[NotMapped] | |||
public int? Sex { get; set; } | |||
public bool? Sex { get; set; } | |||
/// <summary> | |||
/// 出生年月 | |||
/// </summary> | |||
@@ -43,6 +43,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
/// <summary> | |||
/// <returns></returns> | |||
void SaveEntity(string keyValue, TeacherTitleEvaluationEntity entity); | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
void DoCheck(string keyValue, string status); | |||
#endregion | |||
} | |||
@@ -1,4 +1,5 @@ | |||
using Dapper; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
@@ -28,15 +29,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
try | |||
{ | |||
//取库名 | |||
var misdbname = BaseRepository("CollegeMIS").getDbConnection().Database; | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.*, | |||
u.F_EnCode as Encode, | |||
u.F_Gender as Sex, | |||
u.F_Birthday as Birthday | |||
"); | |||
strSql.Append(" FROM TeacherTitleEvaluation t left join LR_Base_User u on t.EID=u.F_UserId "); | |||
strSql.Append("SELECT t.*,e.EmpNo as Encode,e.GenderNo as Sex,e.Birthday as Birthday "); | |||
strSql.Append(" FROM TeacherTitleEvaluation t left join " + misdbname + ".dbo.EmpInfo e on t.EID=e.EmpId "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
@@ -49,10 +47,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
if (!queryParam["EID"].IsEmpty()) | |||
{ | |||
dp.Add("EID",queryParam["EID"].ToString(), DbType.String); | |||
dp.Add("EID", queryParam["EID"].ToString(), DbType.String); | |||
strSql.Append(" AND t.EID = @EID "); | |||
} | |||
return this.BaseRepository().FindList<TeacherTitleEvaluationEntity>(strSql.ToString(),dp, pagination); | |||
return this.BaseRepository().FindList<TeacherTitleEvaluationEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -104,7 +102,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
{ | |||
try | |||
{ | |||
this.BaseRepository().Delete<TeacherTitleEvaluationEntity>(t=>t.TTID == keyValue); | |||
this.BaseRepository().Delete<TeacherTitleEvaluationEntity>(t => t.TTID == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -152,6 +150,48 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
/// <summary> | |||
/// 审核实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DoCheck(string keyValue, string status) | |||
{ | |||
try | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
if (status == "1") | |||
{ | |||
this.BaseRepository().ExecuteBySql("update TeacherTitleEvaluation set CheckStatus='" + status + "',CheckTime='" + DateTime.Now + "',CheckUser='" + userInfo.userId + "' where TTID='" + keyValue + "' "); | |||
//修改教师信息管理表中职称相关字段 | |||
var entity = this.BaseRepository().FindEntity<TeacherTitleEvaluationEntity>(keyValue); | |||
var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpId == entity.EID); | |||
if (empInfoEntity != null) | |||
{ | |||
empInfoEntity.ProfessionalTitle = entity?.TTTitlesID; | |||
empInfoEntity.ProfessionalTitleLevel = entity?.TTTitlesPostLevel; | |||
empInfoEntity.ProfessionalTitleGetTime = entity?.TTTime; | |||
this.BaseRepository("CollegeMIS").Update(empInfoEntity); | |||
} | |||
} | |||
else if (status == "2") | |||
{ | |||
this.BaseRepository().ExecuteBySql("update TeacherTitleEvaluation set CheckStatus='" + status + "',CheckTime=null,CheckUser=null where TTID='" + keyValue + "' "); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||