package com.ruoyi.web.modules.industryservice.research.support;

import java.time.Instant;
import java.util.UUID;
import com.ruoyi.web.modules.farming.domain.vo.TechServicePersonnelVo;
import com.ruoyi.web.modules.industryservice.domain.BizCooperativeDevelopment;
import com.ruoyi.web.modules.industryservice.domain.BizDisposableIncome;
import com.ruoyi.web.modules.industryservice.domain.BizFamilyRanch;
import com.ruoyi.web.modules.industryservice.domain.BizFarmerHousehold;
import com.ruoyi.web.modules.industryservice.domain.BizLargeLivestockFarmer;
import com.ruoyi.web.modules.industryservice.domain.BizLivestockOwnershipHousehold;
import com.ruoyi.web.modules.industryservice.domain.BizLivestockProductOutput;
import com.ruoyi.web.modules.industryservice.domain.BizPasture;
import com.ruoyi.web.modules.industryservice.domain.BizRuralThreeAssets;
import com.ruoyi.web.modules.industryservice.domain.BizThreeAssetsProblemReport;
import com.ruoyi.web.modules.industryservice.domain.BizVaccinationData;
import com.ruoyi.web.modules.industryservice.domain.BizYakAsset;
import com.ruoyi.web.modules.industryservice.domain.BizYakHerdInventory;
import com.ruoyi.web.modules.industryservice.domain.BizYakOutboundReport;
import com.ruoyi.web.modules.industryservice.domain.dto.OpenApiResponse;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchCooperativeDevelopmentVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchCommonProsperityProjectVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchDisposableIncomeVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchFamilyRanchVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchFarmerHouseholdVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLargeLivestockFarmerVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockOwnershipHouseholdVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchLivestockProductOutputVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchPastureVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchRuralThreeAssetsVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchTechServicePersonnelVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchThreeAssetsProblemReportVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchVaccinationDataVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakAssetVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakHerdInventoryVo;
import com.ruoyi.web.modules.industryservice.research.domain.vo.ResearchYakOutboundReportVo;
import com.ruoyi.web.modules.prosperity.domain.BizCommonProsperityProject;

/**
 * 科研开放接口响应组装与实体脱敏转换。
 */
public final class ResearchOpenApiSupport
{
    private ResearchOpenApiSupport()
    {
    }

    public static <T> OpenApiResponse<T> success(T data)
    {
        OpenApiResponse<T> response = new OpenApiResponse<>();
        response.setCode(200);
        response.setMessage("success");
        response.setRequestId(UUID.randomUUID().toString());
        response.setData(data);
        response.setTimestamp(Instant.now().toString());
        return response;
    }

    public static <T> OpenApiResponse<T> error(int code, String message)
    {
        OpenApiResponse<T> response = new OpenApiResponse<>();
        response.setCode(code);
        response.setMessage(message);
        response.setRequestId(UUID.randomUUID().toString());
        response.setTimestamp(Instant.now().toString());
        return response;
    }

    public static ResearchPastureVo toPastureVo(BizPasture row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchPastureVo vo = new ResearchPastureVo();
        vo.setPastureId(row.getId());
        vo.setPastureName(row.getPastureName());
        vo.setFarmType(row.getFarmType());
        vo.setCounty(row.getCounty());
        vo.setTown(row.getTown());
        vo.setRegionSummary(ResearchOpenApiMasking.regionSummary(row.getCounty(), row.getTown()));
        vo.setLatitude(ResearchOpenApiMasking.roundCoordinate(row.getLatitude()));
        vo.setLongitude(ResearchOpenApiMasking.roundCoordinate(row.getLongitude()));
        vo.setFloorArea(row.getFloorArea());
        vo.setScaleBreeding(row.getScaleBreeding());
        vo.setBreedSpecies(row.getBreedSpecies());
        vo.setIntroduction(row.getIntroduction());
        vo.setPersonInCharge(ResearchOpenApiMasking.maskPersonName(row.getPersonInCharge()));
        vo.setContactPhone(ResearchOpenApiMasking.maskPhone(row.getContactPhone()));
        return vo;
    }

    public static ResearchYakAssetVo toYakAssetVo(BizYakAsset row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchYakAssetVo vo = new ResearchYakAssetVo();
        vo.setSubjectCode(ResearchOpenApiMasking.subjectCode(row.getId()));
        vo.setPastureName(row.getPastureName());
        vo.setEnclosureName(row.getEnclosureName());
        vo.setGender(row.getGender());
        vo.setCattleVariety(row.getCattleVariety());
        vo.setAgeMonths(row.getAgeMonths());
        vo.setBirthYear(ResearchOpenApiMasking.birthYear(row.getBirthDate()));
        vo.setBirthMonth(ResearchOpenApiMasking.birthMonth(row.getBirthDate()));
        vo.setAssetStatus(row.getAssetStatus());
        vo.setAssetStatusLabel(ResearchOpenApiMasking.assetStatusLabel(row.getAssetStatus()));
        vo.setEntryWeightKg(row.getEntryWeightKg());
        vo.setSource(row.getSource());
        vo.setBreedingMethod(row.getBreedingMethod());
        vo.setEntryCycle(row.getEntryCycle());
        vo.setRealtimeTemp(row.getRealtimeTemp());
        vo.setRealtimeSteps(row.getRealtimeSteps());
        vo.setEnvTemp(row.getEnvTemp());
        vo.setFatherSubjectCode(ResearchOpenApiMasking.pseudonymCode(row.getFatherYakNo(), "YP"));
        vo.setMotherSubjectCode(ResearchOpenApiMasking.pseudonymCode(row.getMotherYakNo(), "YM"));
        return vo;
    }

    public static ResearchYakHerdInventoryVo toYakHerdInventoryVo(BizYakHerdInventory row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchYakHerdInventoryVo vo = new ResearchYakHerdInventoryVo();
        vo.setInventoryId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setVillageCount(row.getVillageCount());
        vo.setHerdsmanHouseholdCount(row.getHerdsmanHouseholdCount());
        vo.setBreedingBullCount(row.getBreedingBullCount());
        vo.setBullCastratedCount(row.getBullCastratedCount());
        vo.setBullTotal(row.getBullTotal());
        vo.setCowYoungCount(row.getCowYoungCount());
        vo.setCowAdultCount(row.getCowAdultCount());
        vo.setCowTotal(row.getCowTotal());
        vo.setMilkingCowCount(row.getMilkingCowCount());
        vo.setFertileCowCount(row.getFertileCowCount());
        vo.setDairyTotal(row.getDairyTotal());
        vo.setSheepTotal(row.getSheepTotal());
        vo.setMilkingSheepCount(row.getMilkingSheepCount());
        vo.setInsuredYakCount(row.getInsuredYakCount());
        vo.setYakTotal(row.getYakTotal());
        vo.setGrandTotal(row.getGrandTotal());
        vo.setYakSheepTotal(row.getYakSheepTotal());
        return vo;
    }

    public static ResearchYakOutboundReportVo toYakOutboundReportVo(BizYakOutboundReport row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchYakOutboundReportVo vo = new ResearchYakOutboundReportVo();
        vo.setOutboundId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setFarmerHouseholdCount(row.getFarmerHouseholdCount());
        vo.setFarmerPopulationCount(row.getFarmerPopulationCount());
        vo.setYakOutboundCount(row.getYakOutboundCount());
        vo.setCattleOutboundCount(row.getCattleOutboundCount());
        vo.setSheepOutboundCount(row.getSheepOutboundCount());
        vo.setGoatOutboundCount(row.getGoatOutboundCount());
        vo.setHorseMuleOutboundCount(row.getHorseMuleOutboundCount());
        vo.setDonkeyOutboundCount(row.getDonkeyOutboundCount());
        vo.setSelfConsumptionCattleCount(row.getSelfConsumptionCattleCount());
        vo.setSelfConsumptionSheepCount(row.getSelfConsumptionSheepCount());
        vo.setSelfConsumptionGoatCount(row.getSelfConsumptionGoatCount());
        return vo;
    }

    public static ResearchCooperativeDevelopmentVo toCooperativeDevelopmentVo(BizCooperativeDevelopment row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchCooperativeDevelopmentVo vo = new ResearchCooperativeDevelopmentVo();
        vo.setCooperativeId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setCooperativeName(row.getCooperativeName());
        vo.setLegalRepresentative(ResearchOpenApiMasking.maskPersonName(row.getLegalRepresentative()));
        vo.setEstablishDate(row.getEstablishDate());
        vo.setRegisteredCapital(row.getRegisteredCapital());
        vo.setYearEndTotalAssets(row.getYearEndTotalAssets());
        vo.setMemberHouseholdCount(row.getMemberHouseholdCount());
        vo.setMemberPopulationCount(row.getMemberPopulationCount());
        vo.setPovertyMonitorCount(row.getPovertyMonitorCount());
        vo.setCattleShareCount(row.getCattleShareCount());
        vo.setSheepShareCount(row.getSheepShareCount());
        vo.setLivestockShareTotal(row.getLivestockShareTotal());
        vo.setGrasslandShareArea(row.getGrasslandShareArea());
        vo.setLaborShareCount(row.getLaborShareCount());
        vo.setCashShareAmount(row.getCashShareAmount());
        vo.setOtherShareAmount(row.getOtherShareAmount());
        vo.setTotalIncome(row.getTotalIncome());
        vo.setNetIncome(row.getNetIncome());
        vo.setCashDividend(row.getCashDividend());
        vo.setInKindDividend(row.getInKindDividend());
        vo.setRevolvingFund(row.getRevolvingFund());
        vo.setLossAmount(row.getLossAmount());
        vo.setCollegeGraduateCount(row.getCollegeGraduateCount());
        vo.setCollegeGraduateWage(row.getCollegeGraduateWage());
        vo.setFarmerTransferEmploymentCount(row.getFarmerTransferEmploymentCount());
        vo.setFarmerTransferWage(row.getFarmerTransferWage());
        vo.setCattleInventoryCount(row.getCattleInventoryCount());
        vo.setCattleOutboundCount(row.getCattleOutboundCount());
        vo.setSheepInventoryCount(row.getSheepInventoryCount());
        vo.setSheepOutboundCount(row.getSheepOutboundCount());
        vo.setTrademarkProductCount(row.getTrademarkProductCount());
        vo.setQualityCertProductCount(row.getQualityCertProductCount());
        vo.setTrainingManageCount(row.getTrainingManageCount());
        vo.setTrainingSkillCount(row.getTrainingSkillCount());
        vo.setTrainingOtherCount(row.getTrainingOtherCount());
        vo.setBusinessScope(row.getBusinessScope());
        vo.setBusinessModel(row.getBusinessModel());
        vo.setOperationStatus(row.getOperationStatus());
        return vo;
    }

    public static ResearchLivestockProductOutputVo toLivestockProductOutputVo(BizLivestockProductOutput row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchLivestockProductOutputVo vo = new ResearchLivestockProductOutputVo();
        vo.setOutputId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setMeatOutput(row.getMeatOutput());
        vo.setMilkOutput(row.getMilkOutput());
        return vo;
    }

    public static ResearchFamilyRanchVo toFamilyRanchVo(BizFamilyRanch row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchFamilyRanchVo vo = new ResearchFamilyRanchVo();
        vo.setRanchId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setEnterpriseName(row.getEnterpriseName());
        vo.setLegalRepresentative(ResearchOpenApiMasking.maskPersonName(row.getLegalRepresentative()));
        vo.setEnterpriseType(row.getEnterpriseType());
        vo.setRegisteredCapital(row.getRegisteredCapital());
        vo.setEstablishDate(row.getEstablishDate());
        vo.setLivestockLaborCount(row.getLivestockLaborCount());
        vo.setStockSubtotal(row.getStockSubtotal());
        vo.setCattleYearEndStock(row.getCattleYearEndStock());
        vo.setCattleBreedingFemaleStock(row.getCattleBreedingFemaleStock());
        vo.setSheepYearEndStock(row.getSheepYearEndStock());
        vo.setSheepBreedingFemaleStock(row.getSheepBreedingFemaleStock());
        vo.setCattleOutbound(row.getCattleOutbound());
        vo.setSheepOutbound(row.getSheepOutbound());
        vo.setGrasslandAreaSubtotal(row.getGrasslandAreaSubtotal());
        vo.setGrassBalanceArea(row.getGrassBalanceArea());
        vo.setTransferGrassArea(row.getTransferGrassArea());
        vo.setApprovedCarryingCapacity(row.getApprovedCarryingCapacity());
        vo.setYearEndStockSheepUnit(row.getYearEndStockSheepUnit());
        vo.setIsGrassBalanced(row.getIsGrassBalanced());
        vo.setIncome(row.getIncome());
        vo.setExpense(row.getExpense());
        vo.setProfit(row.getProfit());
        vo.setSubsidyYear(row.getSubsidyYear());
        vo.setHasSubsidy(row.getHasSubsidy());
        vo.setSubsidyAmount(row.getSubsidyAmount());
        vo.setHasTrademark(row.getHasTrademark());
        vo.setHasQualityCert(row.getHasQualityCert());
        vo.setSalesChannel(row.getSalesChannel());
        vo.setDrivenPopulation(row.getDrivenPopulation());
        vo.setWagePaid(row.getWagePaid());
        return vo;
    }

    public static ResearchDisposableIncomeVo toDisposableIncomeVo(BizDisposableIncome row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchDisposableIncomeVo vo = new ResearchDisposableIncomeVo();
        vo.setIncomeId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setRuralDisposableIncome(row.getRuralDisposableIncome());
        vo.setPovertyNetIncome(row.getPovertyNetIncome());
        vo.setIncomeIncrease(row.getIncomeIncrease());
        vo.setIncomeGrowthRate(row.getIncomeGrowthRate());
        return vo;
    }

    public static ResearchFarmerHouseholdVo toFarmerHouseholdVo(BizFarmerHousehold row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchFarmerHouseholdVo vo = new ResearchFarmerHouseholdVo();
        vo.setHouseholdId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setHouseholdCount(row.getHouseholdCount());
        vo.setPopulationCount(row.getPopulationCount());
        vo.setPastureContractArea(row.getPastureContractArea());
        vo.setGrazingBanArea(row.getGrazingBanArea());
        vo.setGrassBalanceArea(row.getGrassBalanceArea());
        vo.setApprovedCarryingCapacity(row.getApprovedCarryingCapacity());
        vo.setYearEndStockSheepUnit(row.getYearEndStockSheepUnit());
        vo.setIsPureHerder(row.getIsPureHerder());
        vo.setIsNoLivestock(row.getIsNoLivestock());
        vo.setIsExtinctHousehold(row.getIsExtinctHousehold());
        vo.setIsOverloadHerder(row.getIsOverloadHerder());
        vo.setNeedCap(row.getNeedCap());
        vo.setNeedFloor(row.getNeedFloor());
        vo.setGrazingBanSubsidy(row.getGrazingBanSubsidy());
        vo.setGrassBalanceReward(row.getGrassBalanceReward());
        vo.setSubsidyRewardSubtotal(row.getSubsidyRewardSubtotal());
        vo.setAfterCapFloorSubsidy(row.getAfterCapFloorSubsidy());
        vo.setVillageSupervisorSubsidy(row.getVillageSupervisorSubsidy());
        vo.setSubsidyTotal(row.getSubsidyTotal());
        return vo;
    }

    public static ResearchCommonProsperityProjectVo toCommonProsperityProjectVo(BizCommonProsperityProject row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchCommonProsperityProjectVo vo = new ResearchCommonProsperityProjectVo();
        vo.setProjectId(row.getId());
        vo.setProjectName(row.getProjectName());
        vo.setProjectType(row.getProjectType());
        vo.setIntroduction(row.getIntroduction());
        vo.setProjectContent(row.getProjectContent());
        vo.setInvestmentAmount(row.getInvestmentAmount());
        vo.setImplYear(row.getImplYear());
        vo.setImplStatus(row.getImplStatus());
        vo.setVideoFileUrl(row.getVideoFileUrl());
        vo.setCoverFileUrl(row.getCoverFileUrl());
        vo.setPublishStatus(row.getPublishStatus());
        vo.setPublishTime(row.getPublishTime());
        vo.setOpImageCount(row.getOpImageCount());
        return vo;
    }

    public static ResearchLargeLivestockFarmerVo toLargeLivestockFarmerVo(BizLargeLivestockFarmer row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchLargeLivestockFarmerVo vo = new ResearchLargeLivestockFarmerVo();
        vo.setFarmerId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setEnterpriseName(row.getEnterpriseName());
        vo.setLegalRepresentative(ResearchOpenApiMasking.maskPersonName(row.getLegalRepresentative()));
        vo.setEnterpriseType(row.getEnterpriseType());
        vo.setRegisteredCapital(row.getRegisteredCapital());
        vo.setEstablishDate(row.getEstablishDate());
        vo.setLivestockLaborCount(row.getLivestockLaborCount());
        vo.setStockSubtotal(row.getStockSubtotal());
        vo.setCattleYearEndStock(row.getCattleYearEndStock());
        vo.setCattleBreedingFemaleStock(row.getCattleBreedingFemaleStock());
        vo.setSheepYearEndStock(row.getSheepYearEndStock());
        vo.setSheepBreedingFemaleStock(row.getSheepBreedingFemaleStock());
        vo.setCattleOutbound(row.getCattleOutbound());
        vo.setSheepOutbound(row.getSheepOutbound());
        vo.setGrasslandAreaSubtotal(row.getGrasslandAreaSubtotal());
        vo.setGrassBalanceArea(row.getGrassBalanceArea());
        vo.setTransferGrassArea(row.getTransferGrassArea());
        vo.setApprovedCarryingCapacity(row.getApprovedCarryingCapacity());
        vo.setYearEndStockSheepUnit(row.getYearEndStockSheepUnit());
        vo.setIsGrassBalanced(row.getIsGrassBalanced());
        vo.setIncome(row.getIncome());
        vo.setExpense(row.getExpense());
        vo.setProfit(row.getProfit());
        vo.setSubsidyYear(row.getSubsidyYear());
        vo.setHasSubsidy(row.getHasSubsidy());
        vo.setSubsidyAmount(row.getSubsidyAmount());
        vo.setHasTrademark(row.getHasTrademark());
        vo.setHasQualityCert(row.getHasQualityCert());
        vo.setSalesChannel(row.getSalesChannel());
        vo.setDrivenPopulation(row.getDrivenPopulation());
        vo.setWagePaid(row.getWagePaid());
        return vo;
    }

    public static ResearchVaccinationDataVo toVaccinationDataVo(BizVaccinationData row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchVaccinationDataVo vo = new ResearchVaccinationDataVo();
        vo.setVaccinationId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setShouldVaccinateCount(row.getShouldVaccinateCount());
        vo.setActualVaccinateCount(row.getActualVaccinateCount());
        vo.setImmunityRate(row.getImmunityRate());
        return vo;
    }

    public static ResearchLivestockOwnershipHouseholdVo toLivestockOwnershipHouseholdVo(
            BizLivestockOwnershipHousehold row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchLivestockOwnershipHouseholdVo vo = new ResearchLivestockOwnershipHouseholdVo();
        vo.setOwnershipId(row.getId());
        vo.setStatYear(row.getStatYear());
        vo.setStatMonth(row.getStatMonth());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setWithLivestockHouseholdCount(row.getWithLivestockHouseholdCount());
        vo.setWithLivestockPopulationCount(row.getWithLivestockPopulationCount());
        vo.setWithLivestockLaborCount(row.getWithLivestockLaborCount());
        vo.setWithLivestockAnimalCount(row.getWithLivestockAnimalCount());
        vo.setWithoutLivestockHouseholdCount(row.getWithoutLivestockHouseholdCount());
        vo.setWithoutLivestockPopulationCount(row.getWithoutLivestockPopulationCount());
        vo.setWithoutLivestockLaborCount(row.getWithoutLivestockLaborCount());
        return vo;
    }

    public static ResearchRuralThreeAssetsVo toRuralThreeAssetsVo(BizRuralThreeAssets row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchRuralThreeAssetsVo vo = new ResearchRuralThreeAssetsVo();
        vo.setAssetsId(row.getId());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setOperatingFixedAssets(row.getOperatingFixedAssets());
        vo.setNonOperatingFixedAssets(row.getNonOperatingFixedAssets());
        vo.setFixedAssets(row.getFixedAssets());
        return vo;
    }

    public static ResearchThreeAssetsProblemReportVo toThreeAssetsProblemReportVo(BizThreeAssetsProblemReport row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchThreeAssetsProblemReportVo vo = new ResearchThreeAssetsProblemReportVo();
        vo.setProblemId(row.getId());
        vo.setReportTime(row.getReportTime());
        vo.setTownName(row.getTownName());
        vo.setVillageName(row.getVillageName());
        vo.setProblemLevel(row.getProblemLevel());
        vo.setProblemDetail(row.getProblemDetail());
        vo.setHandleResult(row.getHandleResult());
        return vo;
    }

    public static ResearchTechServicePersonnelVo toTechServicePersonnelVo(TechServicePersonnelVo row)
    {
        if (row == null)
        {
            return null;
        }
        ResearchTechServicePersonnelVo vo = new ResearchTechServicePersonnelVo();
        vo.setEnvoyMaleCount(row.getEnvoyMaleCount());
        vo.setEnvoyFemaleCount(row.getEnvoyFemaleCount());
        vo.setEnvoyPartyMemberCount(row.getEnvoyPartyMemberCount());
        vo.setEnvoyTotalCount(row.getEnvoyTotalCount());
        vo.setAgriJuniorCount(row.getAgriJuniorCount());
        vo.setAgriClerkCount(row.getAgriClerkCount());
        vo.setAgriIntermediateCount(row.getAgriIntermediateCount());
        vo.setAgriAssociateSeniorCount(row.getAgriAssociateSeniorCount());
        vo.setAgriManagementCount(row.getAgriManagementCount());
        vo.setAgriTotalCount(row.getAgriTotalCount());
        return vo;
    }
}
