...
|
...
|
@@ -35,14 +35,16 @@ func TestGetRootDepartment(t *testing.T) { |
|
|
func TestSortDepartmentStastics(t *testing.T) {
|
|
|
s := &protocol.DepartmentStatisticsResponse{
|
|
|
List: []*protocol.DepartmentStatistics{
|
|
|
{ChanceApprovedTotal: 12, AchievementTotal: 8, ACTotal: 20},
|
|
|
{ChanceApprovedTotal: 8, AchievementTotal: 12, ACTotal: 20},
|
|
|
{ChanceApprovedTotal: 20, AchievementTotal: 20, ACTotal: 40},
|
|
|
{ChanceApprovedTotal: 5, AchievementTotal: 10, ACTotal: 15},
|
|
|
//{ChanceApprovedTotal: 12, AchievementTotal: 8, ACTotal: 20},
|
|
|
//{ChanceApprovedTotal: 8, AchievementTotal: 12, ACTotal: 20},
|
|
|
//{ChanceApprovedTotal: 20, AchievementTotal: 20, ACTotal: 40},
|
|
|
//{ChanceApprovedTotal: 5, AchievementTotal: 10, ACTotal: 15},
|
|
|
{Dep: protocol.Dep{Id: 3}, ChanceApprovedTotal: 6, AchievementTotal: 10, ACTotal: 16},
|
|
|
{Dep: protocol.Dep{Id: 2}, ChanceApprovedTotal: 6, AchievementTotal: 10, ACTotal: 16},
|
|
|
{Dep: protocol.Dep{Id: 1}, ChanceApprovedTotal: 6, AchievementTotal: 10, ACTotal: 16},
|
|
|
{ChanceApprovedTotal: 20, AchievementTotal: 30, ACTotal: 50},
|
|
|
{Dep: protocol.Dep{Id: 2}, ChanceApprovedTotal: 7, AchievementTotal: 9, ACTotal: 16},
|
|
|
{Dep: protocol.Dep{Id: 1}, ChanceApprovedTotal: 7, AchievementTotal: 10, ACTotal: 17},
|
|
|
{Dep: protocol.Dep{Id: 0}, ChanceApprovedTotal: 10, AchievementTotal: 10, ACTotal: 20},
|
|
|
{Dep: protocol.Dep{Id: 4}, ChanceApprovedTotal: 6, AchievementTotal: 10, ACTotal: 16},
|
|
|
//{ChanceApprovedTotal: 20, AchievementTotal: 30, ACTotal: 50},
|
|
|
},
|
|
|
//List: []*protocol.DepartmentStatistics{
|
|
|
// {ChanceApprovingTotal: 10},
|
...
|
...
|
|