|
|
@ -289,22 +289,25 @@ public class Ghre_PlanServices : BaseServices<Ghre_Plan, Ghre_PlanDto, InsertGhr |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
var sql = $"select TrainDays,BeginDate,EndDate from [120.26.205.42].[GhrUshio].[dbo].Ushio_ExternalTrainApply where TrainNeeds like '%{d.Id}%'"; |
|
|
|
if (await QueryCompanyCode() == "Ushio") |
|
|
|
|
|
|
|
{ |
|
|
|
var applys = await DbAccess.QueryListAsync<Ushio_ExternalTrainApply>(sql); |
|
|
|
var sql = $"select TrainDays,BeginDate,EndDate from [120.26.205.42].[GhrUshio].[dbo].Ushio_ExternalTrainApply where TrainNeeds like '%{d.Id}%'"; |
|
|
|
|
|
|
|
|
|
|
|
d.M1_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 1).Sum(x => x.TrainDays); |
|
|
|
var applys = await DbAccess.QueryListAsync<Ushio_ExternalTrainApply>(sql); |
|
|
|
d.M2_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 2).Sum(x => x.TrainDays); |
|
|
|
|
|
|
|
d.M3_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 3).Sum(x => x.TrainDays); |
|
|
|
d.M1_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 1).Sum(x => x.TrainDays); |
|
|
|
d.M4_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 4).Sum(x => x.TrainDays); |
|
|
|
d.M2_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 2).Sum(x => x.TrainDays); |
|
|
|
d.M5_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 5).Sum(x => x.TrainDays); |
|
|
|
d.M3_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 3).Sum(x => x.TrainDays); |
|
|
|
d.M6_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 6).Sum(x => x.TrainDays); |
|
|
|
d.M4_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 4).Sum(x => x.TrainDays); |
|
|
|
d.M7_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 7).Sum(x => x.TrainDays); |
|
|
|
d.M5_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 5).Sum(x => x.TrainDays); |
|
|
|
d.M8_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 8).Sum(x => x.TrainDays); |
|
|
|
d.M6_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 6).Sum(x => x.TrainDays); |
|
|
|
d.M9_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 9).Sum(x => x.TrainDays); |
|
|
|
d.M7_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 7).Sum(x => x.TrainDays); |
|
|
|
d.M10_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 10).Sum(x => x.TrainDays); |
|
|
|
d.M8_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 8).Sum(x => x.TrainDays); |
|
|
|
d.M11_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 11).Sum(x => x.TrainDays); |
|
|
|
d.M9_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 9).Sum(x => x.TrainDays); |
|
|
|
d.M12_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 12).Sum(x => x.TrainDays); |
|
|
|
d.M10_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 10).Sum(x => x.TrainDays); |
|
|
|
|
|
|
|
d.M11_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 11).Sum(x => x.TrainDays); |
|
|
|
|
|
|
|
d.M12_Count = applys.Where(x => x.BeginDate.Year == year && x.BeginDate.Month == 12).Sum(x => x.TrainDays); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|