/*
 * @Author: Kane
 * @Date: 2023-03-14 16:38:06
 * @LastEditors: Kane
 * @FilePath: /desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/archievement/ArchievementQueryController.java
 * @Description: 
 * 
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
 */

package com.cpic.xim.web.controllers.archievement;

import java.util.Vector;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping( "/archievement" )
public class ArchievementQueryController
{
    @PostMapping( "/query_caller_archievement.do" )
    public void queryCallerArchievement()
    {

    }

    @PostMapping( "/query_department_archievement.do" )
    @ResponseBody
    public DepartmentArchievementQueryResult queryDepartmentArchievement()
    {
        DepartmentArchievementQueryResult result = new DepartmentArchievementQueryResult();

        genTestDepartmentData( result );

        return result;
    }

    void genTestDepartmentData( DepartmentArchievementQueryResult data )
    {
        Vector<Integer> mensual_archievement = new Vector<Integer>();

        mensual_archievement.add( 200 );
        mensual_archievement.add( 213 );
        mensual_archievement.add( 333 );
        mensual_archievement.add( 444 );
        mensual_archievement.add( 555 );
        mensual_archievement.add( 666 );

        data.setSuccess( true );
        data.setMessage( "成功" );
        data.setTotalArchievement( 1234567890 );
        data.setInsuranceRenewalRate( "65" );
        data.setAttachingRate( "75" );
        data.addAdvanceRewardGainer( "沈群" );
        data.addLeadingRewardGainer( "王鸿津" );
        data.addLeadingRewardGainer( "林宗泽" );
        data.addBackwardStaff( "王炜" );
        data.setMensualArchievementList( null );
        data.setMensualArchievementList( mensual_archievement );
    }
}
