Browse Source

【修改】月常规工作绩效:导入优化;

应县
dyy 7 months ago
parent
commit
266a1f5829
6 changed files with 40 additions and 158 deletions
  1. +0
    -28
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/JobPerformanceController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/JobPerformance/ImportForm.js
  3. +33
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs
  4. +2
    -57
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/JobPerformance/JobPerformanceBLL.cs
  5. +2
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/JobPerformance/JobPerformanceIBLL.cs
  6. +2
    -66
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/JobPerformance/JobPerformanceService.cs

+ 0
- 28
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/JobPerformanceController.cs View File

@@ -70,34 +70,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
#endregion

#region 获取数据
/// <summary>
/// 人员类别
/// </summary>
/// <returns></returns>
public ActionResult PeopleType()
{
var data = jobPerformanceIBLL.GetPeopleType();
return Success(data);
}
/// <summary>
/// 岗位类别
/// </summary>
/// <returns></returns>
public ActionResult PostType()
{
var data = jobPerformanceIBLL.GetPostType();
return Success(data);
}
/// <summary>
/// 薪级
/// </summary>
/// <returns></returns>
public ActionResult PayGrade()
{
var data = jobPerformanceIBLL.GetPayGrade();
return Success(data);
}

/// <summary>
/// 获取列表数据
/// </summary>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/JobPerformance/ImportForm.js View File

@@ -106,7 +106,7 @@ var bootstrap = function ($, learun) {
param['chunks'] = fileInfo[file.id].chunks;
param['ext'] = file.ext;
param['templateId'] = id;
learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/ExcelImport/SalarySheetImport", param, function (res) {
learun.httpAsyncPost(top.$.rootUrl + "/LR_SystemModule/ExcelImport/JobPerformanceImport", param, function (res) {
var $fileItem = $('#lr_form_file_queue_list').find('#lr_filequeue_' + file.id);
$fileItem.find('.lr-uploader-progress').remove();
if (res.code == learun.httpCode.success) {


+ 33
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Controllers/ExcelImportController.cs View File

@@ -23,6 +23,7 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
private AnnexesFileIBLL annexesFileIBLL = new AnnexesFileBLL();
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
private WageScheduleIBLL wageScheduleIBLL = new WageScheduleBLL();
private JobPerformanceIBLL jobPerformanceIBLL = new JobPerformanceBLL();

#region 视图功能
/// <summary>
@@ -352,6 +353,38 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
return Fail("导入数据失败!");
}
}

/// <summary>
/// 工作绩效导入
/// </summary>
/// <param name="templateId">模板Id</param>
/// <param name="fileId">文件主键</param>
/// <param name="chunks">分片数</param>
/// <param name="ext">文件扩展名</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult JobPerformanceImport(string fileId, int chunks, string ext)
{
UserInfo userInfo = LoginUserInfo.Get();
string path = annexesFileIBLL.SaveAnnexes(fileId, fileId + "." + ext, chunks, userInfo);
if (!string.IsNullOrEmpty(path))
{
DataTable dt = ExcelHelper.ExcelImport(path);
string res = jobPerformanceIBLL.JobPerformanceImport(dt, fileId);
var data = new
{
Success = res.Split('|')[0],
Fail = res.Split('|')[1]
};
return JsonResult(data);
}
else
{
return Fail("导入数据失败!");
}
}

/// <summary>
/// 下载文件(导入文件未被导入的数据)
/// </summary>


+ 2
- 57
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/JobPerformance/JobPerformanceBLL.cs View File

@@ -92,61 +92,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public List<JobPerformanceEntity> GetPeopleType()
{
try
{
return jobPerformanceService.GetPeopleType().Select(x => new JobPerformanceEntity { }).Distinct().ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public List<JobPerformanceEntity> GetPostType()
{
try
{
return jobPerformanceService.GetPostType().Select(x => new JobPerformanceEntity { }).Distinct().ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public List<JobPerformanceEntity> GetPayGrade()
{
try
{
return jobPerformanceService.GetPayGrade().Select(x => new JobPerformanceEntity { }).Distinct().ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据
@@ -223,11 +168,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="dt"></param>
/// <param name="fileId"></param>
/// <returns></returns>
public string SalarySheelImport(DataTable dt, string fileId)
public string JobPerformanceImport(DataTable dt, string fileId)
{
try
{
return jobPerformanceService.SalarySheelImport(dt, fileId);
return jobPerformanceService.JobPerformanceImport(dt, fileId);
}
catch (Exception ex)
{


+ 2
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/JobPerformance/JobPerformanceIBLL.cs View File

@@ -34,11 +34,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <returns></returns>
JobPerformanceEntity GetEntity(string keyValue);

List<JobPerformanceEntity> GetPeopleType();
List<JobPerformanceEntity> GetPostType();
List<JobPerformanceEntity> GetPayGrade();

#endregion

#region 提交数据
@@ -63,7 +59,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="dt"></param>
/// <param name="fileId"></param>
/// <returns></returns>
string SalarySheelImport(DataTable dt, string fileId);
string JobPerformanceImport(DataTable dt, string fileId);
#endregion

}


+ 2
- 66
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/JobPerformance/JobPerformanceService.cs View File

@@ -134,71 +134,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}


public List<JobPerformanceEntity> GetPeopleType()
{
try
{
string sql = " select distinct PeopleType from JobPerformance where 1=1 and PeopleType is not null order by PeopleType asc ";
return this.BaseRepository("CollegeMIS").FindList<JobPerformanceEntity>(sql).ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public List<JobPerformanceEntity> GetPostType()
{
try
{
string sql = " select distinct PostType from JobPerformance where 1=1 and PostType is not null order by PostType asc ";
return this.BaseRepository("CollegeMIS").FindList<JobPerformanceEntity>(sql).ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 薪级
/// </summary>
/// <param name="PayGrade"></param>
/// <returns></returns>
public List<JobPerformanceEntity> GetPayGrade()
{
try
{
string sql = " select distinct PayGrade from JobPerformance where 1=1 and PayGrade is not null order by PayGrade asc";
return this.BaseRepository("CollegeMIS").FindList<JobPerformanceEntity>(sql).ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据
@@ -323,7 +259,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="dt"></param>
/// <param name="fileId"></param>
/// <returns></returns>
public string SalarySheelImport(DataTable dt, string fileId)
public string JobPerformanceImport(DataTable dt, string fileId)
{
try
{


Loading…
Cancel
Save