package com.jeeplus.modules.workcontent.common;

import com.jeeplus.common.utils.SpringContextHolder;
import com.jeeplus.modules.workcontent.service.*;

public class WorkContentDetailFactory {

    //工程费用Service
    private static WorkContentInvestmentCostService investmentCostService = SpringContextHolder.getBean(WorkContentInvestmentCostService.class);
    //认价管理Service
    private static WorkContentPricemanageService pricemanageService = SpringContextHolder.getBean(WorkContentPricemanageService.class);
    //资金计划Service
    private static WorkContentFundplanService fundplanService = SpringContextHolder.getBean(WorkContentFundplanService.class);
    //资料管理Service
    private static WorkContentDocumentService contentDocumentService = SpringContextHolder.getBean(WorkContentDocumentService.class);
    //清单及控制价编审Service
    private static WorkContentCtrlpriceService ctrlpriceService = SpringContextHolder.getBean(WorkContentCtrlpriceService.class);
    //合约规划Service
    private static WorkContentContprogramService contprogramService = SpringContextHolder.getBean(WorkContentContprogramService.class);
    //结算编审Service
    private static WorkContentBudgetService budgetService = SpringContextHolder.getBean(WorkContentBudgetService.class);
    //招标策划Service
    private static WorkContentBiddingplanService biddingplanService = SpringContextHolder.getBean(WorkContentBiddingplanService.class);
    //变更管理Service
    private static WorkContentAltermanageService altermanageService = SpringContextHolder.getBean(WorkContentAltermanageService.class);
    //签证管理Service
    private static WorkContentVisamanageService visamanageService = SpringContextHolder.getBean(WorkContentVisamanageService.class);
    //价差管理Service
    private static WorkContentPriceadjustService priceadjustService = SpringContextHolder.getBean(WorkContentPriceadjustService.class);
    //合同管理Service
    private static WorkContentContractinfoService contractinfoService = SpringContextHolder.getBean(WorkContentContractinfoService.class);
    //索赔管理Service
    private static WorkContentClaimService contentClaimService = SpringContextHolder.getBean(WorkContentClaimService.class);
    //工程价款管理Service
    private static WorkContentProjectpriceService projectpriceService = SpringContextHolder.getBean(WorkContentProjectpriceService.class);
    //合约动态生成
    private static WorkContentContractSumService contractsumService = SpringContextHolder.getBean(WorkContentContractSumService.class);

    public static WorkContentDetailBaseService getDetailService(String type){
        switch (type){
            case "13":
            case "22":
            case "25":
                return investmentCostService;
            case "31":
                return contprogramService;
            case "32":
                return biddingplanService;
            case "34":
                return ctrlpriceService;
            case "41":
                return contractinfoService;
            case "42":
                return pricemanageService;
            case "43":
                return altermanageService;
            case "45":
                return visamanageService;
            case "46":
                return contentClaimService;
            case "47":
                return fundplanService;
            case "48":
                return projectpriceService;
            case "49":
                return priceadjustService;
            case "52":
                return budgetService;
            case "53":
                return contentDocumentService;
            case "400":
                return contractsumService;
            default:
                return null;
        }
    }
}
