package com.chinaweal.aiccs.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;


public class ExportUtils {
    /**
     * 产生导出文件名
     * @param subfix
     * @return
     */
    public static String createFileNmae(String subfix){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        String fileName = sdf.format(new Date())+"."+subfix;
        return fileName;
    }

    /**
     * 信用分类导出字段映射表
     * @return
     */
    public static Map<String, String> getClassfyFieldmap() {
        Map<String,String> fieldmap = new HashMap<String, String>();
        fieldmap.put("regno","企业注册号");
        fieldmap.put("entname","企业名称");
        fieldmap.put("enttype","企业类型");
        fieldmap.put("regaicid","登记管辖机关");
        fieldmap.put("entstate","企业状态");
        fieldmap.put("lerepname","企业负责人");
        fieldmap.put("address","地址");
        fieldmap.put("localadm","监管机关");
        fieldmap.put("leveltype","企业信用等级");
        fieldmap.put("industryphy","行业");
        return fieldmap;
    }


    /**
     * 监管指标信息导出字段映射表
     * @return
     */
    public static Map<String, String> getSprnFieldmap() {
        Map<String,String> fieldmap = new HashMap<String, String>();
        fieldmap.put("regno","企业注册号");
        fieldmap.put("entname","企业名称");
        fieldmap.put("lerepname","企业负责人");
        fieldmap.put("address","地址");
        fieldmap.put("aicid","登记管辖机关");
        fieldmap.put("tel","联系电话");
        fieldmap.put("entstate","企业状态");
        fieldmap.put("enttype","企业类型");
        fieldmap.put("opscope","经营范围");
        fieldmap.put("country","企业国别");
        fieldmap.put("ecoproperty","经济性质");
        fieldmap.put("localadm","属地管理机关");
        fieldmap.put("industryphy","行业");
        fieldmap.put("checkperiod","检查频度");
        fieldmap.put("revisitdate","开业回访日期");
        fieldmap.put("investexpiredate","出资到期日期");
        fieldmap.put("revisitaftercasedate","案后回查日期");
        fieldmap.put("accountexpiredate","清算截止日期");
        fieldmap.put("parentrevokeddate","企业的分支机构已注/吊销日期");
        fieldmap.put("parentchangedate","相关投资企业的变更处理日期");
        fieldmap.put("representativelimited","法人代表受限");
        fieldmap.put("payfeedate","应缴费日期");
        fieldmap.put("annualcheckexpiredate","年检逾期日期");
        fieldmap.put("operexpiredate","经营期限截止日期");
        fieldmap.put("licenseexpiredate","营业执照有效截止日期");
        fieldmap.put("caseasistflag","案件协查标志");
        fieldmap.put("startcaseflag","立案查处标志");
        fieldmap.put("reviewdate","跟踪回查日期");
        fieldmap.put("disappeardate","下落不明日期");
        fieldmap.put("simplecasein1year","年内轻微违法次数");
        fieldmap.put("casesunder30k","三年内罚款3万元以下记录次数");
        fieldmap.put("casesover30k","三年内罚款3万元以上记录次数");
        fieldmap.put("mandatecorrectdate","责令整改日期");
        fieldmap.put("seriouscasedate","严重违法日期");
        fieldmap.put("stockfreezeexpiredate","股权冻结结束日期");
        fieldmap.put("reginfochangecheckdate","登记事项变更检查日期");
        fieldmap.put("requirechangedate","年检验照的限期变更日期");
        fieldmap.put("inclewflag","是否在线索中标志");
        fieldmap.put("in12315flag","是否在12315投诉处理中标志");
        fieldmap.put("contractdissensionflag","是否在合同纠纷调解中标志");
        fieldmap.put("stockholderrevokeddate","法人股东已被注销/吊销的日期");
        fieldmap.put("belongrevokeddate","隶属企业被注销/吊销的日期");
        fieldmap.put("parentoperexpiredate","隶属企业的营业期限");
        fieldmap.put("sameaddressflag","住所是否与其他企业相同");
        fieldmap.put("belongchangeflag","分支机构隶属法人已经变更");
        fieldmap.put("commoditydisqualification","商品有效期内抽检不合格");
        fieldmap.put("appealcount","最近一年消费者申述次数");
        return fieldmap;
    }

    /**
     * 信用类别导出字段映射表
     * @return
     */
    public static Map<String, String> getClassficationFieldmap() {
        Map<String,String> fieldmap = new HashMap<String, String>();
        fieldmap.put("regno","注册号");
        fieldmap.put("entname","企业名称");
        fieldmap.put("address","地址");
        fieldmap.put("enttype","企业类型");
        fieldmap.put("opscope","经营范围");
        fieldmap.put("lerepname","法定代表人");
        fieldmap.put("tel","联系电话");
        fieldmap.put("estdate","成立日期");
        fieldmap.put("apprdate","核准日期");
        fieldmap.put("entstate","企业状态");
        fieldmap.put("industryco","行业代码");
        fieldmap.put("regDestri","注册资本");
        fieldmap.put("recDestri","实收资本");
        fieldmap.put("conDestri","投资总额");
        fieldmap.put("domDestri","中方认缴额");
        fieldmap.put("forDestri","外方认缴额");
        fieldmap.put("empnum","从业人数");
        fieldmap.put("postalcode","邮政编码");
        fieldmap.put("pcerno","法人证件号码");
        fieldmap.put("country","企业国别");
        fieldmap.put("ecoproperty","经济性质");
        fieldmap.put("opfrom","企业经营期限");
        fieldmap.put("aicid","登记机关");
        fieldmap.put("regorg","登记管辖机关");
        fieldmap.put("localadm","属地管理机关");
        fieldmap.put("industryphy","行业门类");
        fieldmap.put("trpriperson","董事会成员信息");
        fieldmap.put("trinv","投资法人信息");
        fieldmap.put("trname","投资自然人信息");
        fieldmap.put("trlicinfo","前置审批信息");
        fieldmap.put("trbranch","分支机构信息");
        fieldmap.put("trbelong","隶属企业信息");
        fieldmap.put("fileno","档案号");
        return fieldmap;
    }

    /**
     * 违法违章台账 导出字段映射表
     * @return
     */
    public static Map<String, String> getIllegalBookFieldmap() {
        Map<String,String> fieldmap = new HashMap<String, String>();
        fieldmap.put("regNO","统一社会信用代码/注册号");
        fieldmap.put("entName","监管对象名称");
        fieldmap.put("address","监管对象地址");
        fieldmap.put("illegalCount","违法违规次数");
        fieldmap.put("localAdmString","所属监管机构");
        fieldmap.put("groupName","所属监管小组");
        fieldmap.put("areaName","所属监管片区");
        return fieldmap;
    }

    /**
     * 违法违章详情 导出字段映射表
     * @return
     */
    public static Map<String, String> getIllegalBookDetailFieldmap() {
        Map<String,String> fieldMap = new HashMap<String, String>();
        fieldMap.put("regNO","统一社会信用代码/注册号");
        fieldMap.put("entName","监管对象名称");
        fieldMap.put("toBeCheckedMan","被检查人");
        fieldMap.put("inspectTime","检查时间");
        fieldMap.put("measureTypeString","处理结果");
        fieldMap.put("inspector","检查人");
        fieldMap.put("actionDesc","违法描述");
        return fieldMap;
    }

    /**
     * 监管小组 对应的监管对象列表信息 导出字段映射表
     * @return
     */
    public static Map<String, String> getGroupObjectListFieldmap() {
        Map<String,String> map = new HashMap<String, String>();
        map.put("regNO","统一社会信用代码/注册号");
        map.put("entName","监管对象名称");
        map.put("address","监管对象地址");
        map.put("leRepName","法定代表人");
        map.put("levelType","信用等级");
        map.put("insObjTypeName","监管对象类型");
        map.put("realBusiness","实际经营范围");
        map.put("groupName","监管小组");
        map.put("areaName","所属片区");
        return map;
    }

    /**
     * 年度报告统计 导出字段映射表
     * @return
     */
    public static Map<String, String> getAnnualreportFieldmap() {
        Map<String,String> map = new HashMap<String, String>();
        map.put("entname","企业名称");
        map.put("registno","注册号");
        map.put("entaddress","地址");
        map.put("lerepname","法定代表人");
        map.put("orgid","登记管辖机关");
        map.put("entphone","联系电话");
        map.put("regorg","登记机关");
        map.put("enttype","企业类型");
        map.put("localadm","属地管理机关");
        map.put("registerdate","成立日期");
        map.put("liaName","联络员姓名");
        map.put("mobileTel","联络员手机");
        map.put("fixedPhone","联络员固话");
        map.put("email","联络员邮箱");
        return map;
    }

    /**
     * 严重违法失信企业名单统计, 导出字段信息映射
     * @return
     */
    public static Map<String, String> getSerIllegalListExportFieldmap(){

        Map<String,String> map = new HashMap<String, String>();
        map.put("entname", "企业名称");
        map.put("regno", "注册号");
        map.put("abntime", "列入日期");
        map.put("intoSponsorIllegal", "列入主办人");
        map.put("serillrea", "列入严重违法失信原因");
        map.put("lostcreditexplain", "列入事实和法律依据");
        map.put("remdate", "移出日期");
        map.put("remSponsorIllegal", "移出主办人");
        map.put("remexcpres", "移出严重违法失信原因");
        map.put("lostcreditexplainrem", "移出事实和法律依据");
        return map;
    }

    /**
     *  经营异常名录统计, 导出字段信息映射
     * @return
     */
    public static Map<String, String> getExportFieldExptList(){
        Map<String,String> map = new HashMap<String, String>();
        map.put("entname", "企业名称");
        map.put("regno", "注册号");
        map.put("enttype", "主体类型");
        map.put("abntime", "列入日期");
        map.put("intoSponsor", "列入主办人");
        map.put("specause", "列入原因");
        map.put("spereasons", "列入事由");
        map.put("remdate", "移出日期");
        map.put("remSponsor", "移出主办人");
        map.put("remexcpres", "移出原因");
        map.put("remreasons", "移出事由");
        return map;
    }

    /**
     *  综合查询企业信息, 导出字段信息映射
     * @return
     */
    public static Map<String, String> getEntInfoExportFieldList(){
        Map<String,String> map = new HashMap<String, String>();
        map.put("entName", "企业名称");
        map.put("regNO", "统一社会信用代码/注册号");
        map.put("leRepName", "法人代表");
        map.put("address", "地址");
        map.put("business", "经营范围");
//        map.put("insObjTypeName", "监管类型");
//        map.put("groupName", "监管小组");
//        map.put("areaName", "监管片区");
//        map.put("levelType", "信用级别");
        map.put("status", "状态");
        map.put("foundDate", "成立日期");
//        map.put("localAdm", "属地管辖机关");
//        map.put("localAdm", "属地管辖机关");
//        map.put("regAicID", "登记注册机关");
//        map.put("marketName", "所属市场");
//        map.put("realBusiness", "实际经营范围");
        map.put("lastInspectDate", "上次检查时间");
        map.put("apprDate", "核准登记日期");
        map.put("registdate", "最近年报时间");
        map.put("liaName", "联络员姓名");
        map.put("mobileTel", "联络员电话");
        return map;
    }

}
