-
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Index.js
index 2615111ed..33797683a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherCertificate/Index.js
@@ -5,12 +5,17 @@
* 描 述:教师证书信息
*/
var refreshGirdData;
+var empId = request('empId');
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
+ if (!!empId) {
+ $('#TCNameDiv').hide();
+ $('#btnDiv > a').hide();
+ }
page.initGird();
page.bind();
},
@@ -60,7 +65,7 @@ var bootstrap = function ($, learun) {
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
- id: 'form',
+ id: 'formInTeacherCertificate',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/TeacherCertificate/Form',
width: 600,
@@ -74,8 +79,13 @@ var bootstrap = function ($, learun) {
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('TCID');
if (learun.checkrow(keyValue)) {
+ var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
+ if (CheckStatus == "1" || CheckStatus == "2") {
+ learun.alert.warning("当前项已审核!");
+ return false;
+ }
learun.layerForm({
- id: 'form',
+ id: 'formInTeacherCertificate',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/TeacherCertificate/Form?keyValue=' + keyValue,
width: 600,
@@ -90,6 +100,11 @@ var bootstrap = function ($, learun) {
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('TCID');
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/TeacherCertificate/DeleteForm', { keyValue: keyValue }, function () {
@@ -99,9 +114,41 @@ var bootstrap = function ($, learun) {
});
}
});
- // 打印
- $('#lr_print').on('click', function () {
- $('#gridtable').jqprintTable();
+ // 审核通过
+ $('#lr_checkYes').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('TCID');
+ 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/TeacherCertificate/DoCheck', { keyValue: keyValue, status: "1" }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ // 审核不通过
+ $('#lr_checkNo').on('click', function () {
+ var keyValue = $('#gridtable').jfGridValue('TCID');
+ 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/TeacherCertificate/DoCheck', { keyValue: keyValue, status: "2" }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
});
},
// 初始化列表
@@ -138,10 +185,15 @@ var bootstrap = function ($, learun) {
},
{ label: "任教学科", name: "TCClass", width: 100, align: "left" },
{ label: "取得时间", name: "TCTime", width: 100, align: "left" },
+ {
+ label: "审核状态", name: "CheckStatus", width: 100, align: "left", formatter: function (cellvalue) {
+ return cellvalue == "1" ? "
已通过" : cellvalue == "2" ? "
未通过" : "
未审核";
+ }
+ },
],
mainId: 'TCID',
isPage: true,
- sidx:'TCTime desc'
+ sidx: 'TCTime desc'
});
page.search();
},
@@ -149,6 +201,10 @@ var bootstrap = function ($, learun) {
param = param || {};
//param.StartTime = startTime;
//param.EndTime = endTime;
+ if (!!empId) {
+ param.TCName = empId;
+ param.CheckStatus = "1";
+ }
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Form.js
index b13b08058..40ae1629e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Form.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Form.js
@@ -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"
});
$("#TTLevel").lrDataItemSelect({ code: 'TrainLevel' });
},
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Index.cshtml
index 6ab9a2877..d212fb2b1 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Index.cshtml
@@ -22,7 +22,7 @@
-
+
录入
修改
删除
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Index.js
index f62d65d1f..bc8e266c0 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/TeacherTrain/Index.js
@@ -5,10 +5,15 @@
* 描 述:教师培训信息
*/
var refreshGirdData;
+var empId = request('empId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
+ if (!!empId) {
+ $('#multiple_condition_query').hide();
+ $('#btnDiv > a').hide();
+ }
page.initGird();
page.bind();
},
@@ -16,7 +21,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();
@@ -24,7 +35,7 @@ var bootstrap = function ($, learun) {
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
- id: 'form',
+ id: 'formInTeacherTrain',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/TeacherTrain/Form',
width: 800,
@@ -39,7 +50,7 @@ var bootstrap = function ($, learun) {
var keyValue = $('#gridtable').jfGridValue('TTID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
- id: 'form',
+ id: 'formInTeacherTrain',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/TeacherTrain/Form?keyValue=' + keyValue,
width: 800,
@@ -72,10 +83,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']);
}
});
}
@@ -107,6 +120,9 @@ var bootstrap = function ($, learun) {
},
search: function (param) {
param = param || {};
+ if (!!empId) {
+ param.EID = empId;
+ }
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
index 9f58dead3..9c295387a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/EmpInfo/EmpInfoService.cs
@@ -133,6 +133,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("CheckMark", queryParam["CheckMark"].ToString(), DbType.String);
strSql.Append(" AND t.CheckMark = @CheckMark ");
}
+ if (!queryParam["IsInActiveStatus"].IsEmpty())//员工状态
+ {
+ dp.Add("IsInActiveStatus", queryParam["IsInActiveStatus"].ToString(), DbType.String);
+ strSql.Append(" AND t.IsInActiveStatus = @IsInActiveStatus ");
+ }
var result = new List
();
result = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination).ToList();
foreach (var item in result)
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateBLL.cs
index 8936eafe8..3357da72c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateBLL.cs
@@ -118,6 +118,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
+ ///
+ /// 审核实体数据
+ /// 主键
+ ///
+ ///
+ public void DoCheck(string keyValue, string status)
+ {
+ try
+ {
+ teacherCertificateService.DoCheck(keyValue, status);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
#endregion
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateEntity.cs
index 525dc9167..12fc2d02e 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateEntity.cs
@@ -49,6 +49,23 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
///
[Column("TCTIME")]
public DateTime? TCTime { get; set; }
+ ///
+ /// 审核状态(0未审核,1审核通过,2审核不通过)
+ ///
+ [Column("CHECKSTATUS")]
+ public string CheckStatus { get; set; }
+ ///
+ /// 审核时间
+ ///
+ [Column("CHECKTIME")]
+ public DateTime? CheckTime { get; set; }
+ ///
+ /// 审核人
+ ///
+ [Column("CHECKUSER")]
+ public string CheckUser { get; set; }
+
+
#endregion
#region 扩展操作
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateIBLL.cs
index f035ef37e..b8f88d8da 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateIBLL.cs
@@ -43,6 +43,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
///
///
void SaveEntity(string keyValue, TeacherCertificateEntity entity);
+
+ ///
+ /// 审核实体数据
+ /// 主键
+ ///
+ ///
+ void DoCheck(string keyValue, string status);
#endregion
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateService.cs
index 910094978..a1cc6fe94 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherCertificate/TeacherCertificateService.cs
@@ -56,6 +56,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
dp.Add("TCTypeID", queryParam["TCTypeID"].ToString(), DbType.String);
strSql.Append(" AND t.TCTypeID=@TCTypeID ");
}
+ if (!queryParam["CheckStatus"].IsEmpty())
+ {
+ dp.Add("CheckStatus", queryParam["CheckStatus"].ToString(), DbType.String);
+ strSql.Append(" AND t.CheckStatus=@CheckStatus ");
+ }
return this.BaseRepository().FindList(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
@@ -156,6 +161,38 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}
+ ///
+ /// 审核实体数据
+ /// 主键
+ ///
+ ///
+ public void DoCheck(string keyValue, string status)
+ {
+ try
+ {
+ var userInfo = LoginUserInfo.Get();
+ if (status == "1")
+ {
+ this.BaseRepository().ExecuteBySql("update TeacherCertificate set CheckStatus='" + status + "',CheckTime='" + DateTime.Now + "',CheckUser='" + userInfo.userId + "' where TCID='" + keyValue + "' ");
+ }
+ else if (status == "2")
+ {
+ this.BaseRepository().ExecuteBySql("update TeacherCertificate set CheckStatus='" + status + "',CheckTime=null,CheckUser=null where TCID='" + keyValue + "' ");
+ }
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
#endregion
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherTrain/TeacherTrainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherTrain/TeacherTrainService.cs
index e4e1a386f..6232e55ad 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherTrain/TeacherTrainService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/TeacherTrain/TeacherTrainService.cs
@@ -31,19 +31,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
try
{
var strSql = new StringBuilder();
- strSql.Append("SELECT ");
- strSql.Append(@"
- t.TTID,
- t.EID,
- t.TTStartTime,
- t.TTEndTime,
- t.TTContent,
- t.TTOrganization,
- t.TTWay,
- t.TTCertificates,
- t.TTComment,
- t.TTLevel
- ");
+ strSql.Append("SELECT t.* ");
strSql.Append(" FROM TeacherTrain t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
@@ -102,17 +90,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
- var data = new List();
- var empInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(empId);
- if (empInfoEntity != null)
- {
- var userEntity = this.BaseRepository().FindEntity(x => x.F_Account == empInfoEntity.EmpNo);
- if (userEntity != null)
- {
- return this.BaseRepository().FindList(x => x.EID == userEntity.F_UserId);
- }
- }
- return data;
+ return this.BaseRepository().FindList(x => x.EID == empId);
}
catch (Exception ex)
{