diff --git a/EXCEL/eva_salary_cylinder.xlsx b/EXCEL/eva_salary_cylinder.xlsx index 1ad1d85..ef60e9c 100644 Binary files a/EXCEL/eva_salary_cylinder.xlsx and b/EXCEL/eva_salary_cylinder.xlsx differ diff --git a/Models/eva_limit_frame_plan/eva_limit_frame_planEntity.cs b/Models/eva_limit_frame_plan/eva_limit_frame_planEntity.cs index aaec12d..70256f9 100644 --- a/Models/eva_limit_frame_plan/eva_limit_frame_planEntity.cs +++ b/Models/eva_limit_frame_plan/eva_limit_frame_planEntity.cs @@ -56,12 +56,12 @@ namespace TodoAPI2.Models public void DoAfterInsertUpdate(DataContext context) { - total_salary = (from i in context.eva_limit_frame_employee - join j in context.eva_limit_frame_group - on i.frame_group_guid equals j.id - select i.salary).Sum(); - limit_frame_005_total = total_salary * limit_frame_005 / 100; - limit_frame_005_total_rounded = MyHelper.RoundOff(limit_frame_005_total.Value, 10); + //total_salary = (from i in context.eva_limit_frame_employee + // join j in context.eva_limit_frame_group + // on i.frame_group_guid equals j.id + // select i.salary).Sum(); + //limit_frame_005_total = total_salary * limit_frame_005 / 100; + //limit_frame_005_total_rounded = MyHelper.RoundOff(limit_frame_005_total.Value, 10); } } diff --git a/Models/vw_limit_frame_plan/vw_limit_frame_planService.cs b/Models/vw_limit_frame_plan/vw_limit_frame_planService.cs index 4e2329c..6631520 100644 --- a/Models/vw_limit_frame_plan/vw_limit_frame_planService.cs +++ b/Models/vw_limit_frame_plan/vw_limit_frame_planService.cs @@ -256,6 +256,10 @@ namespace TodoAPI2.Models _repository.Context.AddRange(result_frame_group); _repository.Context.AddRange(result_frame_employee); + entity.total_salary = all_all_emp.Sum(z => z.salary); + entity.limit_frame_005_total = entity.total_salary * entity.limit_frame_005 / 100; + entity.limit_frame_005_total_rounded = MyHelper.RoundOff(entity.limit_frame_005_total.Value, 10); + entity.SetAutoField(_repository.Context); if (is_force_save)