|
|
@ -94,6 +94,11 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
|
|
|
|
|
|
|
|
var entitys = await Db.Ado.SqlQueryAsync<Ghre_ExamRecordDto>(sql); |
|
|
|
var entitys = await Db.Ado.SqlQueryAsync<Ghre_ExamRecordDto>(sql); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var attachments = new List<Ghre_Attachment>(); |
|
|
|
|
|
|
|
var ids = entitys.Select(x => x.Id.ToString()).ToList(); |
|
|
|
|
|
|
|
if (ids.Count > 0) |
|
|
|
|
|
|
|
attachments = await Db.Queryable<Ghre_Attachment>().Where(x => ids.Contains(x.TableName)).ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
entitys.ForEach(async x => |
|
|
|
entitys.ForEach(async x => |
|
|
|
{ |
|
|
|
{ |
|
|
|
x.ScoreMethodLabel = await GetParaLabel("ScoreMethod", x.ScoreMethod); |
|
|
|
x.ScoreMethodLabel = await GetParaLabel("ScoreMethod", x.ScoreMethod); |
|
|
@ -102,7 +107,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
//x.StudyStatusLabel = await GetParaLabel("TrainingStudyStatus", x.StudyStatus); |
|
|
|
//x.StudyStatusLabel = await GetParaLabel("TrainingStudyStatus", x.StudyStatus); |
|
|
|
if (x.IsPass != null) |
|
|
|
if (x.IsPass != null) |
|
|
|
x.IsPassLabel = x.IsPass == true ? "合格" : "不合格"; |
|
|
|
x.IsPassLabel = x.IsPass == true ? "合格" : "不合格"; |
|
|
|
|
|
|
|
x.Attachments = attachments.Where(o => o.TableName == x.Id.ToString()).ToList(); |
|
|
|
//x.InStatusLabel = x.InStatus == "1" ? "在职" : null; |
|
|
|
//x.InStatusLabel = x.InStatus == "1" ? "在职" : null; |
|
|
|
//x.InStatusLabel = x.InStatus == "2" ? "离职" : null; |
|
|
|
//x.InStatusLabel = x.InStatus == "2" ? "离职" : null; |
|
|
|
//x.InStatusLabel = x.InStatus == "0" ? "未入职" : null; |
|
|
|
//x.InStatusLabel = x.InStatus == "0" ? "未入职" : null; |
|
|
@ -1039,8 +1044,6 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
return ServiceResult.OprateSuccess("成功!"); |
|
|
|
return ServiceResult.OprateSuccess("成功!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Excel导入 |
|
|
|
#region Excel导入 |
|
|
|
public override async Task<ServiceResult<string>> DownloadExcel(string menuName) |
|
|
|
public override async Task<ServiceResult<string>> DownloadExcel(string menuName) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -1265,4 +1268,20 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe |
|
|
|
return ServiceResult<ExcelData>.OprateSuccess("导入成功!", data); |
|
|
|
return ServiceResult<ExcelData>.OprateSuccess("导入成功!", data); |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 提交附件 |
|
|
|
|
|
|
|
public async Task<ServiceResult> SubmitAttachment(long examRecordId, List<InsertGhre_AttachmentInput> attachments) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var paths = attachments.Select(x => x.PhysicsPath).Distinct().ToList(); |
|
|
|
|
|
|
|
await Db.Updateable<Ghre_Attachment>() |
|
|
|
|
|
|
|
.SetColumns(it => new Ghre_Attachment() { TableName = null }) |
|
|
|
|
|
|
|
.Where(it => it.TableName == examRecordId.ObjToString()) |
|
|
|
|
|
|
|
.ExecuteCommandAsync(); |
|
|
|
|
|
|
|
await Db.Updateable<Ghre_Attachment>() |
|
|
|
|
|
|
|
.SetColumns(it => new Ghre_Attachment() { TableName = examRecordId.ObjToString() }) |
|
|
|
|
|
|
|
.Where(it => paths.Contains(it.PhysicsPath)) |
|
|
|
|
|
|
|
.ExecuteCommandAsync(); |
|
|
|
|
|
|
|
return ServiceResult.OprateSuccess("保存成功!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
} |
|
|
|
} |