|
|
|
@ -1,4 +1,6 @@ |
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
|
using Tiobon.Core.IServices; |
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services; |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 培训费用_宝连通 (服务) |
|
|
|
@ -12,4 +14,51 @@ public class Ghre_TrainFeeApplyOrder_BoltoneServices : BaseServices<Ghre_TrainFe |
|
|
|
|
base.BaseDal = dal; |
|
|
|
|
base._caching = caching; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override async Task<ServicePageResult<Ghre_TrainFeeApplyOrder_BoltoneDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
var result = await base.QueryFilterPage(filter, "WorkState=1", IsEnable); |
|
|
|
|
|
|
|
|
|
var DT_TableDataT1 = result.result.DT_TableDataT1; |
|
|
|
|
|
|
|
|
|
var applicantDeptIds = DT_TableDataT1.Select(x => x.ApplicantDeptId).Distinct().ToList(); |
|
|
|
|
var deptIds = DT_TableDataT1.Select(x => x.DeptId).Distinct().ToList(); |
|
|
|
|
var teacherIds = DT_TableDataT1.Select(x => x.TeacherId).Distinct().ToList(); |
|
|
|
|
deptIds.AddRange(applicantDeptIds); |
|
|
|
|
deptIds = deptIds.Distinct().ToList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var staffIds = DT_TableDataT1.Select(x => x.ApplicantId).Distinct().ToList(); |
|
|
|
|
staffIds.AddRange(teacherIds); |
|
|
|
|
staffIds = staffIds.Distinct().ToList(); |
|
|
|
|
|
|
|
|
|
var staffs = await Db.Queryable<Ghra_Staff>().Where(x => staffIds.Contains(x.StaffID)).ToListAsync(); |
|
|
|
|
var depts = await Db.Queryable<Ghro_Dept>().Where(x => deptIds.Contains(x.DeptID)).ToListAsync(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < DT_TableDataT1.Count; i++) |
|
|
|
|
{ |
|
|
|
|
DT_TableDataT1[i].InOrOut = await GetParaLabel("CourseInOrOut", DT_TableDataT1[i].InOrOut); |
|
|
|
|
DT_TableDataT1[i].TrainFeeCourseType = await GetParaLabel("TrainFeeCourseType-Boltone", DT_TableDataT1[i].TrainFeeCourseType); |
|
|
|
|
DT_TableDataT1[i].TrainTimeType = await GetParaLabel("TrainTimeType-Boltone", DT_TableDataT1[i].TrainTimeType); |
|
|
|
|
if (DT_TableDataT1[i].ApplicantId.IsNotEmptyOrNull()) |
|
|
|
|
DT_TableDataT1[i].ApplicantName = staffs.FirstOrDefault(x => x.StaffID == DT_TableDataT1[i].ApplicantId)?.StaffName; |
|
|
|
|
|
|
|
|
|
if (DT_TableDataT1[i].ApplicantDeptId.IsNotEmptyOrNull()) |
|
|
|
|
DT_TableDataT1[i].ApplicantDeptName = depts.FirstOrDefault(x => x.DeptID == DT_TableDataT1[i].ApplicantDeptId)?.DeptName; |
|
|
|
|
|
|
|
|
|
if (DT_TableDataT1[i].DeptId.IsNotEmptyOrNull()) |
|
|
|
|
DT_TableDataT1[i].DeptName = depts.FirstOrDefault(x => x.DeptID == DT_TableDataT1[i].DeptId)?.DeptName; |
|
|
|
|
if (DT_TableDataT1[i].TeacherId.IsNotEmptyOrNull()) |
|
|
|
|
DT_TableDataT1[i].TeacherName = staffs.FirstOrDefault(x => x.StaffID == DT_TableDataT1[i].TeacherId)?.StaffName; |
|
|
|
|
|
|
|
|
|
DT_TableDataT1[i].IsApplyFee1 = DT_TableDataT1[i].IsApplyFee == 1 ? "是" : "否"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |