แก้ไข op หลายข้อ
This commit is contained in:
@@ -94,9 +94,9 @@ namespace TodoAPI2.Models
|
||||
select x.fiscal_year).Distinct().OrderBy(x => x.Value).ToList();
|
||||
|
||||
i.item_eva_year = fill_list_number((from x in _repository.Context.eva_adjust_postponement
|
||||
select x.fiscal_year).Distinct().OrderBy(x => x.Value).ToList());
|
||||
select x.fiscal_year).Distinct().OrderByDescending(x => x.Value).ToList());
|
||||
i.item_eva_no = fill_list_number((from x in _repository.Context.eva_adjust_postponement
|
||||
select x.theRound).Distinct().OrderBy(x => x.Value).ToList());
|
||||
select x.theRound).Distinct().OrderByDescending(x => x.Value).ToList());
|
||||
|
||||
return i;
|
||||
}
|
||||
@@ -104,9 +104,9 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
var i = new eva_self_reviewWithSelectionViewModel();
|
||||
i.item_eva_year = fill_list_number((from x in _repository.Context.eva_adjust_postponement
|
||||
select x.fiscal_year).Distinct().OrderBy(x => x.Value).ToList());
|
||||
select x.fiscal_year).Distinct().OrderByDescending(x => x.Value).ToList());
|
||||
i.item_eva_no = fill_list_number((from x in _repository.Context.eva_adjust_postponement
|
||||
select x.theRound).Distinct().OrderBy(x => x.Value).ToList());
|
||||
select x.theRound).Distinct().OrderByDescending(x => x.Value).ToList());
|
||||
|
||||
|
||||
return i;
|
||||
@@ -147,14 +147,16 @@ namespace TodoAPI2.Models
|
||||
&& (!model.eva_no.HasValue || fk_eva_adjust_postponementResult1.theRound == model.eva_no)
|
||||
&& fk_eva_adjust_postponementResult1.fiscal_year.HasValue
|
||||
|
||||
orderby m_eva_self_review.created descending
|
||||
orderby
|
||||
(fk_eva_adjust_postponementResult1.fiscal_year.HasValue ? fk_eva_adjust_postponementResult1.fiscal_year : fk_eva_adjust_postponementResult2.fiscal_year) descending,
|
||||
(fk_eva_adjust_postponementResult1.theRound.HasValue ? fk_eva_adjust_postponementResult1.theRound : fk_eva_adjust_postponementResult2.theRound) descending
|
||||
select new eva_self_reviewViewModel()
|
||||
{
|
||||
id = m_eva_self_review.id,
|
||||
adjust_postponement_id = m_eva_self_review.adjust_postponement_id,
|
||||
adjust_postponement_quota_id = m_eva_self_review.adjust_postponement_quota_id,
|
||||
employee_id = m_eva_self_review.employee_id,
|
||||
eva_year = fk_eva_adjust_postponementResult1.fiscal_year.HasValue? fk_eva_adjust_postponementResult1.fiscal_year : fk_eva_adjust_postponementResult2.fiscal_year,
|
||||
eva_year = (fk_eva_adjust_postponementResult1.fiscal_year.HasValue? fk_eva_adjust_postponementResult1.fiscal_year : fk_eva_adjust_postponementResult2.fiscal_year),
|
||||
eva_no = fk_eva_adjust_postponementResult1.theRound.HasValue? fk_eva_adjust_postponementResult1.theRound : fk_eva_adjust_postponementResult2.theRound,
|
||||
|
||||
adjust_postponement_id_eva_adjust_postponement_fiscal_year = fk_eva_adjust_postponementResult1.fiscal_year.HasValue ? fk_eva_adjust_postponementResult1.fiscal_year : fk_eva_adjust_postponementResult2.fiscal_year,
|
||||
@@ -166,7 +168,7 @@ namespace TodoAPI2.Models
|
||||
Created = m_eva_self_review.created,
|
||||
Updated = m_eva_self_review.updated
|
||||
}
|
||||
).OrderBy(x => x.eva_year * 10 + x.eva_no).ToList();
|
||||
).ToList();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ namespace TodoAPI2.Models
|
||||
var i = new external_linkageViewModel();
|
||||
i.external_id = Convert.ToInt32(dr["id"]);
|
||||
//i.id_guid = Guid.Parse(dr["id"].ToString());
|
||||
i.external_code = dr["theRound"].ToString();
|
||||
i.external_code = dr["fiscal_year"].ToString() + dr["theRound"].ToString();
|
||||
i.external_name = dr["theRound"].ToString() + "/" + dr["fiscal_year"].ToString();
|
||||
result.Add(i);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace TodoAPI2.Models
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<rep_eva01WithSelectionViewModel>(entity);
|
||||
i.item_org_id = (from x in ext.GetSortingDep() select x).ToList();
|
||||
i.item_round_id = (from x in ext.GetEvaRound() select x).ToList();
|
||||
i.item_round_id = (from x in ext.GetEvaRound() orderby x.external_code descending select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
@@ -67,7 +67,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
var i = new rep_eva01WithSelectionViewModel();
|
||||
i.item_org_id = (from x in ext.GetSortingDep() select x).ToList();
|
||||
i.item_round_id = (from x in ext.GetEvaRound() select x).ToList();
|
||||
i.item_round_id = (from x in ext.GetEvaRound() orderby x.external_code descending select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace TodoAPI2.Models
|
||||
var entity = _repository.Get(id);
|
||||
var i = Mapper.Map<rep_eva02WithSelectionViewModel>(entity);
|
||||
i.item_org_id = (from x in ext.GetSortingDep() select x).ToList();
|
||||
i.item_round_id = (from x in ext.GetEvaRound() select x).ToList();
|
||||
i.item_round_id = (from x in ext.GetEvaRound() orderby x.external_code descending select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
@@ -67,7 +67,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
var i = new rep_eva02WithSelectionViewModel();
|
||||
i.item_org_id = (from x in ext.GetSortingDep() select x).ToList();
|
||||
i.item_round_id = (from x in ext.GetEvaRound() select x).ToList();
|
||||
i.item_round_id = (from x in ext.GetEvaRound() orderby x.external_code descending select x).ToList();
|
||||
|
||||
|
||||
return i;
|
||||
|
||||
Reference in New Issue
Block a user