ทำ set parameter จาก font-end และ back-end ให้ jasper กำลังทำต่อ ในส่วนของรายชื่อ ทำวัน พฤหัสบดี ที่ 15/07/2564 เวลา 20.00 - 23.00 น.
This commit is contained in:
@@ -20,7 +20,7 @@ namespace TodoAPI2.Models
|
||||
string UpdateMultiple(List<eva_adjust_postponement_quotaInputModel> model);
|
||||
eva_adjust_postponement_quotaWithSelectionViewModel GetWithSelection(int id);
|
||||
eva_adjust_postponement_quotaWithSelectionViewModel GetBlankItem();
|
||||
|
||||
rep_eva_savemessageReportRequestModel setModelFor_rep_eva_savemessageReport(rep_eva_savemessageReportRequestModel model);
|
||||
DataContext GetContext();
|
||||
|
||||
}
|
||||
|
||||
@@ -511,6 +511,46 @@ namespace TodoAPI2.Models
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public rep_eva_savemessageReportRequestModel setModelFor_rep_eva_savemessageReport(rep_eva_savemessageReportRequestModel model)
|
||||
{
|
||||
model.theDate = MyHelper.GetDateFromString(model.theDate_text);
|
||||
model.theDate_text = MyHelper.GetDateStringForReport(model.theDate);
|
||||
|
||||
var postponement_data = (from postponement in _repository.Context.eva_adjust_postponement
|
||||
join create_evaluation in _repository.Context.eva_create_evaluation on postponement.create_evaluation_id equals create_evaluation.id
|
||||
where postponement.id == model.quota_id
|
||||
select new
|
||||
{
|
||||
create_evaluation.performance_plan_id,
|
||||
postponement.fiscal_year,
|
||||
postponement.theDate,
|
||||
postponement.limit_frame,
|
||||
postponement.limit_frame_quota
|
||||
}).FirstOrDefault();
|
||||
|
||||
if(postponement_data != null)
|
||||
{
|
||||
var plan = (from eva_p_p in _repository.Context.eva_performance_plan
|
||||
where eva_p_p.id == postponement_data.performance_plan_id
|
||||
select eva_p_p).FirstOrDefault();
|
||||
|
||||
var start_plan = (from s in _repository.Context.eva_performance_plan_detail
|
||||
where s.performance_plan_id == postponement_data.performance_plan_id
|
||||
select s.start_date).Min();
|
||||
|
||||
var end_plan = (from s in _repository.Context.eva_performance_plan_detail
|
||||
where s.performance_plan_id == postponement_data.performance_plan_id
|
||||
select s.end_date).Max();
|
||||
|
||||
model.theTime = plan.theTime;
|
||||
model.min_plan_start_date = MyHelper.GetDateStringForReport(start_plan);
|
||||
model.max_plan_end_date = MyHelper.GetDateStringForReport(end_plan);
|
||||
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Match Item
|
||||
|
||||
@@ -14,7 +14,17 @@ namespace TodoAPI2.Models
|
||||
public class rep_eva_savemessageReportRequestModel
|
||||
{
|
||||
public int? quota_id { get; set; }
|
||||
public string filetype { get; set; }
|
||||
public int? fiscal_year { get; set; }
|
||||
public int? theRound { get; set; }
|
||||
public decimal? limit_frame_quota { get; set; }
|
||||
public string limit_quota { get; set; }
|
||||
public string command_no { get; set; }
|
||||
public string theDate_text { get; set; }
|
||||
public DateTime? theDate { get; set; }
|
||||
public int? theTime { get; set; }
|
||||
public string min_plan_start_date { get; set; }
|
||||
public string max_plan_end_date { get; set; }
|
||||
public string filetype { get; set; }
|
||||
public string contentType { get { return MyHelper.GetContentType(filetype); } }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user