package controller

func LaborReportFormat(data []map[string]string) ([]interface{}, [][]interface{})  {
	row := []interface{}{
		"进厂编号","小组","临时工","电话","身份证号","劳务所","进场时间","进组时间","退组时间","进组取整时间","退组取整时间",
		"退场时间","审核时间","审核人","晚饭时间(分)","在线时长","本次工作时长","备注",
	}
	column := map[string]int{
		"enter_number" : 0,
		"user_workgroup_name" : 1,
		"name" : 2,
		"mobile_phone" : 3,
		"identity_number" : 4,
		"labor_company" : 5,
		"enter_at" : 6,
		"check_in_at" : 7,
		"check_out_at" : 8,
		"round_check_in_at" : 9,
		"round_check_out_at" : 10,
		"exit_at" : 11,
		"verify_at" : 12,
		"group_user_id" : 13,
		"relax_time" : 14,
		"online_duration" : 15,
		"working_duration" : 16,
		"remark" : 17,
	}
	list := make([][]interface{},len(data))
	for k,v := range data{
		line := make([]interface{},len(row))
		for key,value := range column {
			line[value] = v[key]
		}
		list[k] = line
	}
	return row, list
}
