package com.seeyon.apps.src_ydctdatasync.datamap;

import com.seeyon.apps.src_ydctdatasync.utils.EnumMapUtils;

import java.util.Collections;
import java.util.Map;
import java.util.function.Function;

public class GztdAssetMode extends AbstractAssetDataMapMode{

    @Override
    public void preProcess(Map<String, Object> map) {
        super.preProcess(map);
        String zcTypeFwValue = EnumMapUtils.getEnumItemValue(zcRootPcode,agent,"资产类型","土地");
        String zcTypeLevel2 = EnumMapUtils.getEnumItemValue(zcRootPcode,agent,"资产分类（资产系统）","自用出让地");
        map.put("zcTypeFwValue",zcTypeFwValue);
        map.put("zcTypeLevel2",zcTypeLevel2);
    }

    @Override
    public Map<String, Function<Object, Object>> getFieldProcessors() {
        return Collections.emptyMap();
    }

    @Override
    public boolean support() {
        return false;
    }

    @Override
    public void transfer(Object target, Object source) {
        commonAttrTransfer(target,source);
        Map<String, Object> targetMap = (Map<String, Object>) target;
        Map<String, Object> sourceMap = (Map<String, Object>) source;
        targetMap.put("资产类型",sourceMap.get("zcTypeFwValue"));//填充资产类型
        targetMap.put("资产二级类型",sourceMap.get("zcTypeLevel2"));//填充资产二级类型
        targetMap.put("土地性质",sourceMap.get("land_nature"));//填充土地性质
//        targetMap.put("field0079",sourceMap.get(""));//填充资产所属单位
//        targetMap.put("field0062",sourceMap.get(""));//填充管理单位
//        targetMap.put("field0204",sourceMap.get(""));//填充建设单位编号
//        targetMap.put("field0205",sourceMap.get(""));//填充建设单位
//        targetMap.put("field0063",sourceMap.get(""));//填充建设产权单位编号
//        targetMap.put("field0064",sourceMap.get(""));//填充建设产权单位
    }
}
