package com.seeyon.apps.src_ydctdatasync.datamap;

import com.seeyon.apps.src_ydctdatasync.dao.MyJdbcAgent;
import com.seeyon.ctp.util.JDBCAgent;

import java.util.Map;

public abstract class AbstractFeeDataMapMode extends AbstractDataMapMode{

    protected MyJdbcAgent agent;
    protected String zcRootPcode;

    public String getZcRootPcode() {
        return zcRootPcode;
    }

    public void setZcRootPcode(String zcRootPcode) {
        this.zcRootPcode = zcRootPcode;
    }

    @Override
    public void preProcess(Map<String, Object> map) {

    }

    @Override
    public void commonAttrTransfer(Object target, Object source) {
        Map<String, Object> targetMap = (Map<String, Object>) target;
        Map<String, Object> sourceMap = (Map<String, Object>) source;
        targetMap.put("数据来源","住保系统集成获取的收支数据"); //填充数据来源
        targetMap.put("住保-合同编号",sourceMap.get("contract_no")); //填充合同编号
        targetMap.put("合同ID",sourceMap.get("contract_id")); //填充合同ID
        targetMap.put("住保系统编码",sourceMap.get("house_id")); //住保系统编码
        targetMap.put("住保-小区",sourceMap.get("village_name")); //填充小区
        targetMap.put("住保-楼栋",sourceMap.get("building_name")); //填充楼栋
        targetMap.put("住保-单元",sourceMap.get("unit_name")); //填充单元
        targetMap.put("住保-房号",sourceMap.get("house_number")); //填充房号
        targetMap.put("住保-租户联系方式",sourceMap.get("tenant_phone_number")); //填充租户联系方式
        targetMap.put("订单描述说明",sourceMap.get("recharge_desc")); //填充订单说明
        targetMap.put("OA付款单位","宜都市住保运营管理有限公司"); //填充OA付款单位，默认宜都市住保运营管理有限公司
        targetMap.put("OA收款单位","宜都市住保运营管理有限公司"); //填充OA收款单位，默认宜都市住保运营管理有限公司
    }

    public MyJdbcAgent getAgent() {
        return agent;
    }

    public void setAgent(MyJdbcAgent agent) {
        this.agent = agent;
    }
}
