package com.jeeplus.modules.sg.substation.util;

import com.jeeplus.common.utils.StringUtils;
import com.jeeplus.common.utils.excel.ImportExcel;
import com.jeeplus.common.utils.sg.ExcelUtil;
import com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee;

import java.lang.reflect.Array;
import java.util.*;

public class SubstationInfo {
    public static final String SHEET_JZHZB = "变电站建筑工程费用汇总表";
    public static final String SHEET_HZHZB = "变电站安装工程费用汇总表";


    public static final String JZMX_BJZ = "变电站建筑工程";
    public static final String JZMX_ZYGC = "主要生产工程";
    public static final String JZMX_ZYSCJZ = "主要生产建筑";
    public static final String JZMX_ZKTXL = "主控通信楼";
    public static final String JZMX_1000JDS = "1000kV继电器室";
    public static final String JZMX_750JDS = "750kV继电器室";
    public static final String JZMX_500JDS = "500kV继电器室";
    public static final String JZMX_330JDS = "330kV继电器室";
    public static final String JZMX_220JDS = "220kV继电器室";
    public static final String JZMX_110JDS = "110kV继电器室";
    public static final String JZMX_66JDS = "66kV继电器室";
    public static final String JZMX_35JDS = "35kV继电器室";
    public static final String JZMX_10JDS = " 10kV继电器室";
    public static final String JZMX_ZYPDZZS = "站用配电装置室";
    public static final String JZMX_1000PDZZS = "1000kV配电装置室";
    public static final String JZMX_750PDZZS = "750kV配电装置室";
    public static final String JZMX_500PDZZS = "500kV配电装置室";
    public static final String JZMX_330PDZZS = "330kV配电装置室";
    public static final String JZMX_220PDZZS = "220kV配电装置室";
    public static final String JZMX_110PDZZS = "110kV配电装置室";
    public static final String JZMX_66PDZZS = "66kV配电装置室";
    public static final String JZMX_35PDZZS = "35kV配电装置室";
    public static final String JZMX_10PDZZS = "10kV配电装置室";
    public static final String JZMX_GDCLBC = "固定串联补偿装置控制室";
    public static final String JZMX_KKGYDKQ = "可控高压电抗器晶闸管阀室";
    public static final String JZMX_KKCLBCZZ= "可控串联补偿装置控制室";
    public static final String JZMX_JZWGBCZZ= "静止无功补偿装置晶闸管阀室";



    public static final String JZMX_PDZZJZ = "配电装置建筑";
    public static final String JZMX_ZBYQXT = "主变压器系统";
    public static final String JZMX_GZJJJC = "构支架及基础";
    public static final String JZMX_ZBYQJC = "主变压器设备基础";
    public static final String JZMX_ZBYQYK = "主变压器油坑及卵石";
    public static final String JZMX_FHQ = "防火墙";
    public static final String JZMX_SGYC = "事故油池";

    public static final String JZMX_JGSBJC = "构架及设备基础";
    public static final String JZMX_1000JGJC = "1000kV构架及基础";
    public static final String JZMX_1000SBZJ = "1000kV设备支架及基础";
    public static final String JZMX_750JGJC = "750kV构架及基础";
    public static final String JZMX_750SBZJ = "750kV设备支架及基础";
    public static final String JZMX_500JGJC = "500kV构架及基础";
    public static final String JZMX_500SBZJ = "500kV设备支架及基础";
    public static final String JZMX_330JGJC = "330kV构架及基础";
    public static final String JZMX_330SBZJ = "330kV设备支架及基础";
    public static final String JZMX_220JGJC = "220kV构架及基础";
    public static final String JZMX_220SBZJ = "220kV设备支架及基础";
    public static final String JZMX_110JGJC = "110kV构架及基础";
    public static final String JZMX_110SBZJ = "110kV设备支架及基础";
    public static final String JZMX_66JGJC = "66kV构架及基础";
    public static final String JZMX_66SBZJ = "66kV设备支架及基础";
    public static final String JZMX_35JGJC = "35kV构架及基础";
    public static final String JZMX_35SBZJ = "35kV设备支架及基础";
    public static final String JZMX_10JGJC = "10kV构架及基础";
    public static final String JZMX_10SBZJ = "10kV设备支架及基础";
    public static final String JZMX_GYDKQXT = "高压电抗器系统";
    public static final String JZMX_GYDKQ = "高压电抗器设备基础";
    public static final String JZMX_GYYCJLS = "高抗油池及卵石";
    public static final String JZMX_CLBCXT = "串联补偿系统";
    public static final String JZMX_CLBCSBJC = "串联补偿设备平台基础";
    public static final String JZMX_CLBCSBJG = "串联补偿设备平台结构";
//    public static final String JZMX_GZJJJC = "构支架及基础";
    public static final String JZMX_SBZJJJC = "设备支架及基础";
    public static final String JZMX_DYDRQ = "低压电容器";
    public static final String JZMX_DYDKQ= "低压电抗器";
    public static final String JZMX_JZWGBC= "静止无功补偿装置";
//    public static final String JZMX_GZJJJC= "构支架及基础";
    public static final String JZMX_JZWGBCJC= "静止无功补偿装置设备基础";
    public static final String JZMX_ZYBYQXT= "站用变压器系统";
    public static final String JZMX_ZYBYQSBJC= "站用变压器设备基础";
//    public static final String JZMX_FHQ= "防火墙";
    public static final String JZMX_BLZT= "避雷针塔";
    public static final String JZMX_DLGD= "电缆沟道";
    public static final String JZMX_LGJDP= "栅栏及地坪";
    public static final String JZMX_PDZZQY= "配电装置区域地面封闭";

    public static final String JZMX_GSXTJZ= "供水系统建筑";
    public static final String JZMX_ZQGSGD= "站区供水管道";
    public static final String JZMX_ZHSBF= "综合水泵房";
    public static final String JZMX_SJ= "深井";
    public static final String JZMX_XSC= "蓄水池";

    public static final String JZMX_XFXT= "消防系统";
    public static final String JZMX_XFSBF= "消防水泵房";
    public static final String JZMX_YLFS= "雨淋阀室";
    public static final String JZMX_ZQXFGD= "站区消防管道";
    public static final String JZMX_XFQC= "消防器材";
    public static final String JZMX_TSXFXT= "特殊消防系统";
    public static final String JZMX_XFSC= "消防水池";


    public static final String JZMX_FZSCGC= "辅助生产工程";
    public static final String JZMX_FZSCJZ= "辅助生产建筑";
    public static final String JZMX_ZHL= "综合楼";
    public static final String JZMX_JWS= "警卫室";
    public static final String JZMX_YSBF= "雨水泵房";

    public static final String JZMX_ZQXJZ= "站区性建筑";
    public static final String JZMX_CDPZ= "场地平整";
    public static final String JZMX_ZQDLJGC= "站区道路及广场";
    public static final String JZMX_ZQPS= "站区排水";
    public static final String JZMX_WQJDM= "围墙及大门";

    public static final String JZMX_TSGZW= "特殊构筑物";
    public static final String JZMX_DTQJDSQ= "挡土墙及挡水墙";
    public static final String JZMX_FHPSG= "防洪排水沟";
    public static final String JZMX_HP= "护坡";

    public static final String JZMX_ZQLH= "站区绿化";

    public static final String JZMX_ZZDXGC= "与站址有关的单项工程";
    public static final String JZMX_DJCL= "地基处理";
    public static final String JZMX_ZWDL= "站外道路";
    public static final String JZMX_ZWSY= "站外水源";
    public static final String JZMX_ZWPS= "站外排水";
    public static final String JZMX_SGJS= "施工降水";
    public static final String JZMX_LSGC= "临时工程";


    public static final String AZMX_BDZAZ= "变电站安装工程";
    public static final String AZMX_ZYSCGC= "主要生产工程";

    public static final String AZMX_ZBYQXT= "主变压器系统";
    public static final String AZMX_ZBYQ= "主变压器系统";

    public static final String AZMX_PDZZ= "配电装置";
    public static final String AZMX_WLPDZZ= "屋内配电装置";
    public static final String AZMX_WWPDZZ= "屋外配电装置";

    public static final String AZMX_WGBC= "无功补偿";
    public static final String AZMX_GYDKQ= "高压电抗器";
    public static final String AZMX_GDGYDKQ= "固定高压电抗器";
    public static final String AZMX_KKGYDKQ= "可控高压电抗器";
    public static final String AZMX_CLBCZZ= "串联补偿装置";
    public static final String AZMX_GDCLDKQ= "固定串联补偿装置";
    public static final String AZMX_KKCLDKQ= "可控串联补偿装置";
    public static final String AZMX_DYDRQ= "低压电容器";
    public static final String AZMX_DYDKQ= "低压电抗器";
    public static final String AZMX_JZWGBCZZ= "静止无功补偿装置";

    public static final String AZMX_KZJZLXT= "控制及直流系统";
    public static final String AZMX_JSJJKXT= "计算机监控系统";
    public static final String AZMX_JDBH= "继电保护";
    public static final String AZMX_JLXTUPS= "直流系统及不间断电源";
    public static final String AZMX_ZLFZXI= "智能辅助控制系统";
    public static final String AZMX_ZXJKXT= "在线监测系统";
    public static final String AZMX_FZSB = "辅助设备与设施";

    public static final String AZMX_ZYDXT= "站用电系统";
    public static final String AZMX_ZYBYQ= "站用变压器";
    public static final String AZMX_ZYPDZZ= "站用配电装置";
    public static final String AZMX_ZQZM= "站区照明";

    public static final String AZMX_DLJJD= "电缆及接地";
    public static final String AZMX_QZDL= "全站电缆";
    public static final String AZMX_DLDL= "电力电缆";
    public static final String AZMX_KZDL= "控制电缆";
    public static final String AZMX_DLFZSS= "电缆辅助设施";
    public static final String AZMX_DLFH= "电缆防火";
    public static final String AZMX_QZJD= "全站接地";

    public static final String AZMX_TXJYDXT= "通信及远动系统";
    public static final String AZMX_TXXT= "通信系统";
    public static final String AZMX_YDJJFXT= "远动及计费系统";

    public static final String AZMX_QZTS= "全站调试";
    public static final String AZMX_FXTTS= "分系统调试";
    public static final String AZMX_ZTQDTS= "整套启动调试";
    public static final String AZMX_TSXMTS= "特殊项目调试";

    public static final String AZMX_FZSCGC= "辅助生产工程";
    public static final String AZMX_JXJXPSB= "检修及修配设备";
    public static final String AZMX_SYSB= "试验设备";
    public static final String AZMX_SF6CLSB= "油及SF6处理设备";
    public static final String AZMX_ZZDXGC= "与站址有关的单项工程";
    public static final String AZMX_ZWDY= "站外电源";
    public static final String AZMX_ZWDYXL= "站外电源线路";
    public static final String AZMX_ZWDYJG= "站外电源间隔";
    public static final String AZMX_ZWTX= "站外通信";
    public static final String AZMX_ZWTXXL= "站外通信线路";




    public static final String CS_LS = "临时设施费";
    public static final String CS_AQWM = "安全文明施工费";
    public static final String CS_SGZJ = "冬雨季施工增加费";
    public static final String GF_WXZY = "危险作业意外伤害保险费";
    public static final String QT_SGCDZY = "施工场地租用费";
    public static final String QT_ZBDL = "招标代理";
    public static final String QT_HJ = "合计";
    public static final String QT_XJ = "小计";
    public static final String BZZSSL = "补增值税税率调整差额";
    public static final String KJJGCC = "扣减甲供材超供材料费";
    public static final String KJYJSG = "扣夜间施工增加费";
    public static final String GCJS = "工程结算价";
    public static final String TBJG = "竣工结算价合计";
    public static final String TBJG1 = "投标报价";
    public static final String CE = "差额";
    public static final String CS_JZ = "建筑措施项目";
    public static final String CS_JZ_1 = "一";
    public static final String CS_AZ = "安装措施项目";
    public static final String GF_AZ = "安装规费项目";


    public static final String DLJZ = "电缆建筑";
    public static final String DLAZ = "电缆安装";

    public static final String HZ_JZGC = "建筑工程";
    public static final String HZ_AZGC = "安装工程";


    public static final String TZ_RGF = "人工费";
    public static final String TZ_CBRCG = "承包分采购";
    public static final String TZ_FBRCG = "发包人采购";
    public static final String TZ_JX = "机械费";
    public static final String TZ_CSF1 = "措施费-1";
    public static final String TZ_CSF2 = "措施费-2";
    public static final String TZ_CSF3 = "措施费二";
    public static final String TZ_QTF = "其他费";
    public static final String TZ_GF = "规费";
    public static final String TZ_SF = "税费";

    public static final String JS_FBFX="分部分项工程费";
    public static final String JS_CBRF="承包人采购设备费";
    public static final String JS_CSXM="措施项目费";
    public static final String JS_QTXM="其他项目费";
    public static final String JS_GF="规费";
    public static final String JS_SJ="税金";
    public static final String JS_FBRF="发包人采购材料费";
    public static final String JS_JGJS="竣工结算价合计";
    public static final String JS_BZZS="补增值税税率调整差额";
    public static final String JS_KJJG="扣减甲供材超供材料费";
    public static final String JS_GCJS="工程结算价";
    public static final String JS_REASON="数据核验正确";


    //主要生产建筑
    public static String[] ZYSCWBS = {"21110000","21111000","21112000","21113000","21114000","21115000","21116000","21117000","21118000","21119000"
            ,"2111A000","2111B000","2111C000","2111D000","2111F000","2111G000","2111H000","2111J000","2111K000", "2111L000","2111M000",
            "2111N000","2111P000","2111Q000","2111R000"};
    public static String[] ZYSCJZSTR = {JZMX_ZYSCJZ,JZMX_ZKTXL,JZMX_1000JDS,JZMX_750JDS,JZMX_500JDS,JZMX_330JDS,JZMX_220JDS,JZMX_110JDS,JZMX_66JDS,JZMX_35JDS,JZMX_10JDS,JZMX_ZYPDZZS,JZMX_1000PDZZS,JZMX_750PDZZS,
            JZMX_500PDZZS,JZMX_330PDZZS,JZMX_220PDZZS,JZMX_110PDZZS,JZMX_66PDZZS,JZMX_35PDZZS,JZMX_10PDZZS,JZMX_GDCLBC,JZMX_KKGYDKQ,JZMX_KKCLBCZZ,JZMX_JZWGBCZZ};

    //配电装置
    public static String[] PDZZJZWBS = {"21121000","2112B000","2112C000","2112D000","2112F000","2112G000","2112H000","2112J000","2112K000","2112L000","2112M000"};
    public static String[] PDZZJZSTR = {JZMX_ZBYQXT,JZMX_GYDKQXT,JZMX_CLBCXT,JZMX_DYDRQ,JZMX_DYDKQ,JZMX_JZWGBC,JZMX_ZYBYQXT,JZMX_BLZT,JZMX_DLGD,JZMX_LGJDP,JZMX_PDZZQY};

    public static String[] KFJGSBWBS = {"21122100","21122200","21123100","21123200","21124100","21124200","21125100","21125200","21126100","21126200","21127100","21127200"
            ,"21128100","21128200","21129100","21129200","2112A100","2112A200"};
    public static String[] KFJGSBSTR = {JZMX_1000JGJC,JZMX_1000SBZJ,JZMX_750JGJC,JZMX_750SBZJ,JZMX_500JGJC,JZMX_500SBZJ,JZMX_330JGJC,JZMX_330SBZJ,JZMX_220JGJC,JZMX_220SBZJ,
            JZMX_110JGJC,JZMX_110SBZJ,JZMX_66JGJC,JZMX_66SBZJ,JZMX_35JGJC,JZMX_35SBZJ,JZMX_10JGJC,JZMX_10SBZJ};

    public static String[] DETWBS = {"21121100","21121200","21121300","21121400","21121500","2112B100","2112B200","2112B300","2112B400","2112B500","2112C100","2112C200"
             ,"2112C300","2112C400","2112G100","2112G200","2112H100","2112H200"};

    public static String[] PDZZALLSTR = {JZMX_ZBYQXT,JZMX_GYDKQXT,JZMX_CLBCXT,JZMX_DYDRQ,JZMX_DYDKQ,JZMX_JZWGBC,JZMX_ZYBYQXT,JZMX_BLZT,JZMX_DLGD,JZMX_LGJDP,JZMX_PDZZQY,
            JZMX_1000JGJC,JZMX_1000SBZJ,JZMX_750JGJC,JZMX_750SBZJ,JZMX_500JGJC,JZMX_500SBZJ,JZMX_330JGJC,JZMX_330SBZJ,JZMX_220JGJC,JZMX_220SBZJ,
            JZMX_110JGJC,JZMX_110SBZJ,JZMX_66JGJC,JZMX_66SBZJ,JZMX_35JGJC,JZMX_35SBZJ,JZMX_10JGJC,JZMX_10SBZJ,JZMX_GZJJJC, JZMX_ZBYQJC,JZMX_ZBYQYK,JZMX_FHQ,JZMX_SGYC,JZMX_JGSBJC
            ,JZMX_CLBCSBJC,JZMX_CLBCSBJG,JZMX_SBZJJJC,JZMX_JZWGBCJC,JZMX_JZWGBCJC,JZMX_ZYBYQSBJC
    };




    //供水系统建筑
    public static String[] GSXTWBS = {"21130000","21131000","21133000","21134000","21135000"};
    public static String[] GSXTSTR = {JZMX_GSXTJZ,JZMX_ZQGSGD,JZMX_ZHSBF,JZMX_SJ,JZMX_XSC};

    //消防系统
    public static String[] XFXTWBS = {"21140000","21141000","21142000","21143000","21144000","21145000","21146000"};
    public static String[] XFXTSTR = {JZMX_XFXT,JZMX_XFSBF,JZMX_YLFS,JZMX_ZQXFGD,JZMX_XFQC,JZMX_TSXFXT,JZMX_XFSC};

    //辅助生产建筑
    public static String[] FZSCWBS = {"21210000","21211000","21212000","21213000"};
    public static String[] FZSCSTR = {JZMX_FZSCJZ,JZMX_ZHL,JZMX_JWS,JZMX_YSBF};


    //站区性建筑
    public static String[] ZQXWBS = {"21220000","21221000","21222000","21223000","21224000"};
    public static String[] ZQXSTR = {JZMX_ZQXJZ,JZMX_CDPZ,JZMX_ZQDLJGC,JZMX_ZQPS,JZMX_WQJDM};

    //特殊构筑物
    public static String[] TXGJWWBS = {"21230000","21231000","21232000","21233000"};
    public static String[] TXGJWSTR = {JZMX_TSGZW,JZMX_DTQJDSQ,JZMX_FHPSG,JZMX_HP};


    //与站址有关的单项工程
    public static String[] YDZYGWBS = {"21310000","21320000","21330000","21340000","21350000","21360000"};
    public static String[] YDZYGSTR = {JZMX_DJCL,JZMX_ZWDL,JZMX_ZWSY,JZMX_ZWPS,JZMX_SGJS,JZMX_LSGC};



    //主变压器系统
    public static String[] ZBYQWBS = {"23110000","23111000"};
    public static String[] ZBYQSTR = {AZMX_ZBYQXT,AZMX_ZBYQ};

    //配电装置
    public static String[] PDZZWBS = {"23120000","23121000","23122000"};
    public static String[] PDZZSTR = {AZMX_PDZZ,AZMX_WLPDZZ,AZMX_WWPDZZ};

    //无功补偿
    public static String[] WGBCWBS = {"23130000","23131000","23131100","23131200","23132000","23132100","23132200","23133000","23134000","23135000"};
    public static String[] WGBCSTR = {AZMX_WGBC,AZMX_GYDKQ,AZMX_GDGYDKQ,AZMX_KKGYDKQ,AZMX_CLBCZZ,AZMX_GDCLDKQ,AZMX_KKCLDKQ,AZMX_DYDRQ,AZMX_DYDKQ,AZMX_JZWGBCZZ};

    //控制及直流系统
    public static String[] KZZLWBS = {"23140000","23141000","23142000","23143000","23144000","23145000"};
    public static String[] KZZLSTR = {AZMX_KZJZLXT,AZMX_JSJJKXT,AZMX_JDBH,AZMX_JLXTUPS,AZMX_ZLFZXI,AZMX_ZXJKXT,AZMX_FZSB};

    //站用电系统
    public static String[] ZYDWBS = {"23150000","23151000","23152000","23153000"};
    public static String[] ZYDSTR = {AZMX_ZYDXT,AZMX_ZYBYQ,AZMX_ZYPDZZ,AZMX_ZQZM};

    //电缆及接地
    public static String[] DLJDWBS = {"23160000","23161000","23161100","23161200","23161300","23161400","23162000"};
    public static String[] DLJDSTR = {AZMX_DLJJD,AZMX_QZDL,AZMX_DLDL,AZMX_KZDL,AZMX_DLFZSS,AZMX_DLFH,AZMX_QZJD};

    //通信及远动系统
    public static String[] TXYDWBS = {"23170000","23171000","23172000"};
    public static String[] TXYDSTR = {AZMX_TXJYDXT,AZMX_TXXT,AZMX_YDJJFXT};

    //全站调试
    public static String[] QZTSWBS = {"23180000","23181000","23182000","23183000"};
    public static String[] QZTSSTR = {AZMX_QZTS,AZMX_FXTTS,AZMX_ZTQDTS,AZMX_TSXMTS};

    //辅助生产工程
    public static String[] AFZSCWBS = {"23200000","23210000","23220000","23230000"};
    public static String[] AFZSCSTR = {AZMX_FZSCGC,AZMX_JXJXPSB,AZMX_SYSB,AZMX_SF6CLSB};

    //站外电源
    public static String[] ZWDYWBS = {"23310000","23311000","23312000"};
    public static String[] ZWDYSTR = {AZMX_ZWDY,AZMX_ZWDYXL,AZMX_ZWDYJG};

    //站外通信
    public static String[] ZWTXWBS = {"23320000","23321000"};
    public static String[] ZWTXSTR = {AZMX_ZWTX,AZMX_ZWTXXL};

    //建筑WBS
    public static String[] BDZJZWBS = {"21000000",
            "21100000",
            "21110000",
            "21111000",
            "21112000",
            "21113000",
            "21114000",
            "21115000",
            "21116000",
            "21117000",
            "21118000",
            "21119000",
            "2111A000",
            "2111B000",
            "2111C000",
            "2111D000",
            "2111F000",
            "2111G000",
            "2111H000",
            "2111J000",
            "2111K000",
            "2111L000",
            "2111M000",
            "2111N000",
            "2111P000",
            "2111Q000",
            "2111R000",
            "21120000",
            "21121000",
            "21121100",
            "21121200",
            "21121300",
            "21121400",
            "21121500",
            "21122000",
            "21122100",
            "21122200",
            "21123000",
            "21123100",
            "21123200",
            "21124000",
            "21124100",
            "21124200",
            "21125000",
            "21125100",
            "21125200",
            "21126000",
            "21126100",
            "21126200",
            "21127000",
            "21127100",
            "21127200",
            "21128000",
            "21128100",
            "21128200",
            "21129000",
            "21129100",
            "21129200",
            "2112A000",
            "2112A100",
            "2112A200",
            "2112B000",
            "2112B100",
            "2112B200",
            "2112B300",
            "2112B400",
            "2112B500",
            "2112C000",
            "2112C100",
            "2112C200",
            "2112C300",
            "2112C400",
            "2112D000",
            "2112F000",
            "2112G000",
            "2112G100",
            "2112G200",
            "2112H000",
            "2112H100",
            "2112H200",
            "2112J000",
            "2112K000",
            "2112L000",
            "2112M000",
            "21130000",
            "21131000",
            "21132000",
            "21133000",
            "21134000",
            "21135000",
            "21140000",
            "21141000",
            "21142000",
            "21143000",
            "21144000",
            "21145000",
            "21146000",
            "21200000",
            "21210000",
            "21211000",
            "21212000",
            "21213000",
            "21220000",
            "21221000",
            "21222000",
            "21223000",
            "21224000",
            "21230000",
            "21231000",
            "21232000",
            "21233000",
            "21240000",
            "21300000",
            "21310000",
            "21320000",
            "21330000",
            "21340000",
            "21350000",
            "21360000",
    };
    public static String[] BDZAZWBS ={
            "23000000",
            "23100000",
            "23110000",
            "23111000",
            "23120000",
            "23121000",
            "23122000",
            "23130000",
            "23131000",
            "23131100",
            "23131200",
            "23132000",
            "23132100",
            "23132200",
            "23133000",
            "23134000",
            "23135000",
            "23140000",
            "23141000",
            "23142000",
            "23143000",
            "23144000",
            "23145000",
            "23150000",
            "23151000",
            "23152000",
            "23153000",
            "23160000",
            "23161000",
            "23161100",
            "23161200",
            "23161300",
            "23161400",
            "23162000",
            "23170000",
            "23171000",
            "23172000",
            "23180000",
            "23181000",
            "23182000",
            "23183000",
            "23200000",
            "23210000",
            "23220000",
            "23230000",
            "23300000",
            "23310000",
            "23311000",
            "23312000",
            "23320000",
            "23321000"
    };
    public static String[] BDZOTHWBS = {"24120000","24220000"};


    /**
     * 获取基础数据
     */
    public static JkxlDetailFee getBashInfo(ImportExcel importExcel,ImportExcel importExcel1,String wbs,String str){
        double[] doubles = ExcelUtil.getBashArray(importExcel,str,2,new int[]{12,13, 14, 15, 17});
        double d = ExcelUtil.getDouble(importExcel1,str,1,3);  //直接工程费
        JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
        jkxlDetailFee.setWbsCode(wbs);
        jkxlDetailFee.setOriginalTotalCost(doubles[0]);
        jkxlDetailFee.setOriginalRgCost(doubles[1]);
        jkxlDetailFee.setOriginalFbrCost(doubles[3]);
        jkxlDetailFee.setOriginalCbrCost(doubles[2]);
        jkxlDetailFee.setOriginalJxCost(doubles[4]);
        jkxlDetailFee.setZjgcFee(d);
        return jkxlDetailFee;
    }


    /**
     * 获取基础数据
     */
    public static List<JkxlDetailFee> getBashInfo(ImportExcel importExcel,ImportExcel importExcel1,String[] wbs,String[] str){
        double[][] doubles = ExcelUtil.getBashArray(importExcel,str,2,new int[]{12,13, 14, 15, 17});
        List<JkxlDetailFee> jkxlDetailFees = new ArrayList<>();
        JkxlDetailFee jkxlDetailFee = null;
        for(int i=0;i<str.length;i++){
            double d = ExcelUtil.getDouble(importExcel1,str[i],1,3);  //直接工程费
            jkxlDetailFee = new JkxlDetailFee();
            jkxlDetailFee.setWbsCode(wbs[i]);
            jkxlDetailFee.setOriginalTotalCost(doubles[i][0]);
            jkxlDetailFee.setZjgcFee(d);
            jkxlDetailFee.setOriginalRgCost(doubles[i][1]);
            jkxlDetailFee.setOriginalFbrCost(doubles[i][3]);
            jkxlDetailFee.setOriginalCbrCost(doubles[i][2]);
            jkxlDetailFee.setOriginalJxCost(doubles[i][4]);
            jkxlDetailFees.add(jkxlDetailFee);
        }
        return jkxlDetailFees;
    }

    /**
     *获得基础数据,工程费分摊
     */
    public static List<JkxlDetailFee> getBashInfos(ImportExcel importExcel,ImportExcel importExcel1,String[] wbs,String[] str ,String types){
         double[][] doubles = ExcelUtil.getBashArray(importExcel,str,2,new int[]{12,13, 14, 15, 17});
         double d = ExcelUtil.getDouble(importExcel1,str[0],1,3);  //直接工程费
         String index = ExcelUtil.getIndex(importExcel,str[0],2);    //获取角标
         int s = 1;
         if(StringUtils.isNotBlank(index)){
             double[][] doubles1 = getUnidentification(importExcel,index,str,types);
             for(int m=1;m<doubles.length;m++) {
                 if(doubles[m][0] != 0.00){
                     s = m;
                     break;
                 }
             }
             for(int k=0;k<doubles1.length;k++){
                 doubles[s][0] = doubles[s][0] + doubles1[k][0];
                 doubles[s][1] = doubles[s][1] + doubles1[k][1];
                 doubles[s][2] = doubles[s][2] + doubles1[k][2];
                 doubles[s][3] = doubles[s][3] + doubles1[k][3];
                 doubles[s][4] = doubles[s][4] + doubles1[k][4];
             }
         }
         double total = doubles[0][0];
         int len = str.length;
         double[] zjgc = new double[len];
         zjgc[0] = d;
         for(int i=1;i<len;i++){
             double rate = 0.00;
             if(total != 0.00){
                 rate = doubles[i][0]/total;
             }
             zjgc[i] = d*rate;
         }
         List<JkxlDetailFee> jkxlDetailFees = new ArrayList<>();
         JkxlDetailFee jkxlDetailFee = null;
         for(int j=0;j<str.length;j++){
             jkxlDetailFee = new JkxlDetailFee();
             jkxlDetailFee.setOriginalTotalCost(doubles[j][0]);
             jkxlDetailFee.setZjgcFee(zjgc[j]);
             jkxlDetailFee.setOriginalRgCost(doubles[j][1]);
             jkxlDetailFee.setOriginalFbrCost(doubles[j][3]);
             jkxlDetailFee.setOriginalCbrCost(doubles[j][2]);
             jkxlDetailFee.setOriginalJxCost(doubles[j][4]);
             jkxlDetailFee.setWbsCode(wbs[j]);
             jkxlDetailFees.add(jkxlDetailFee);
         }
         return jkxlDetailFees;
    }

    /**
     *获得基础数据,工程费分摊
     */
    public static List<JkxlDetailFee> getBashInfos(ImportExcel importExcel,ImportExcel importExcel1,String[] wbs,String[] str){
        double[][] doubles = ExcelUtil.getBashArray(importExcel,str,2,new int[]{12,13, 14, 15, 17});
        double d = ExcelUtil.getDouble(importExcel1,str[0],1,3);  //直接工程费
        double total = doubles[0][0];
        int len = str.length;
        double[] zjgc = new double[len];
        zjgc[0] = d;
        for(int i=1;i<len;i++){
            double rate = 0.00;
            if(total != 0.00){
                rate = doubles[i][0]/total;
            }
            zjgc[i] = d*rate;
        }
        List<JkxlDetailFee> jkxlDetailFees = new ArrayList<>();
        JkxlDetailFee jkxlDetailFee = null;
        for(int j=0;j<str.length;j++){
            jkxlDetailFee = new JkxlDetailFee();
            jkxlDetailFee.setOriginalTotalCost(doubles[j][0]);
            jkxlDetailFee.setZjgcFee(zjgc[j]);
            jkxlDetailFee.setOriginalRgCost(doubles[j][1]);
            jkxlDetailFee.setOriginalFbrCost(doubles[j][3]);
            jkxlDetailFee.setOriginalCbrCost(doubles[j][2]);
            jkxlDetailFee.setOriginalJxCost(doubles[j][4]);
            jkxlDetailFee.setWbsCode(wbs[j]);
            jkxlDetailFees.add(jkxlDetailFee);
        }
        return jkxlDetailFees;
    }





    /**
     * 建筑安装基础数据
     */
    public static JkxlDetailFee getTolalInfo(ImportExcel importExcel,ImportExcel importExcel1,String wbs,String str){
        double[] doubles = ExcelUtil.getDoubleArray(importExcel,str,2,new int[]{12,13, 14, 15, 17});
        double d = ExcelUtil.getDouble(importExcel1,QT_HJ,0,3);  //直接工程费
        double e = ExcelUtil.getDouble(importExcel1,QT_HJ,0,2);  //合计
        JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
        jkxlDetailFee.setWbsCode(wbs);
        jkxlDetailFee.setOriginalTotalCost(e);
        jkxlDetailFee.setOriginalRgCost(doubles[1]);
        jkxlDetailFee.setOriginalFbrCost(doubles[3]);
        jkxlDetailFee.setOriginalCbrCost(doubles[2]);
        jkxlDetailFee.setOriginalJxCost(doubles[4]);
        jkxlDetailFee.setZjgcFee(d);
        return jkxlDetailFee;
    }

    /**
     * 配电装置建筑基础数据
     */
    public static List<JkxlDetailFee> getPdzzjz(ImportExcel importExcel,ImportExcel importExcel1){
        JkxlDetailFee total = getBashInfo(importExcel,importExcel1,"21120000",JZMX_PDZZJZ);//配电装置
        List<JkxlDetailFee> total1 = getBashInfo(importExcel,importExcel1,PDZZJZWBS,PDZZJZSTR);
        String index1 = ExcelUtil.getIndex(importExcel,JZMX_PDZZJZ,2);    //获取角标
        if(StringUtils.isNotBlank(index1)){
            double[][] doubles1 = getUnidentification(importExcel,index1,PDZZALLSTR,"1");
            for(JkxlDetailFee jkxlDetailFee2 : total1){
                if(jkxlDetailFee2.getWbsCode().equals("2112K000")){
                    for(int k=0;k<doubles1.length;k++) {
                        jkxlDetailFee2.setOriginalTotalCost(jkxlDetailFee2.getOriginalTotalCost() + doubles1[k][0]);
                        jkxlDetailFee2.setOriginalRgCost(jkxlDetailFee2.getOriginalRgCost() + doubles1[k][1]);
                        jkxlDetailFee2.setOriginalFbrCost(jkxlDetailFee2.getOriginalFbrCost() + doubles1[k][2]);
                        jkxlDetailFee2.setOriginalCbrCost(jkxlDetailFee2.getOriginalCbrCost() + doubles1[k][3]);
                        jkxlDetailFee2.setOriginalJxCost(jkxlDetailFee2.getOriginalJxCost() + doubles1[k][4]);
                    }
                }
            }
        }
        List<JkxlDetailFee> kvjg = getBashInfo(importExcel,importExcel1,KFJGSBWBS,KFJGSBSTR);//构架及设备基础无3级表头
        List<JkxlDetailFee> kvtotal = new ArrayList<>(); //构架及设备基础
        for(int i=0;i<kvjg.size()/2;i++){
            String wbs = kvjg.get(i*2).getWbsCode().substring(0,5);
            double t1 = kvjg.get(i*2).getOriginalTotalCost();
            double r1 = kvjg.get(i*2).getOriginalRgCost();
            double c1 = kvjg.get(i*2).getOriginalCbrCost();
            double f1 = kvjg.get(i*2).getOriginalFbrCost();
            double j1 = kvjg.get(i*2).getOriginalJxCost();
            double t2 = kvjg.get(i*2+1).getOriginalTotalCost();
            double r2 = kvjg.get(i*2+1).getOriginalRgCost();
            double c2 = kvjg.get(i*2+1).getOriginalCbrCost();
            double f2 = kvjg.get(i*2+1).getOriginalFbrCost();
            double j2 = kvjg.get(i*2+1).getOriginalJxCost();
            JkxlDetailFee jkxlDetailFee =new JkxlDetailFee();
            jkxlDetailFee.setOriginalTotalCost(t1+t2);
            jkxlDetailFee.setOriginalRgCost(r1+r2);
            jkxlDetailFee.setOriginalCbrCost(c1+c2);
            jkxlDetailFee.setOriginalFbrCost(f1+f2);
            jkxlDetailFee.setOriginalJxCost(j1+j2);
            jkxlDetailFee.setWbsCode(wbs+"000");
            kvtotal.add(jkxlDetailFee);
        }
        total1.addAll(kvtotal); //合并
        for(JkxlDetailFee jkxlDetailFee:total1){
            double rate = 0.00;
            if(total.getOriginalTotalCost() != 0.00) {
                rate = jkxlDetailFee.getOriginalTotalCost() / total.getOriginalTotalCost();
            }
            double zjgc = total.getZjgcFee()*rate;
            jkxlDetailFee.setZjgcFee(zjgc);
        }
        String[] cf = {JZMX_ZBYQXT,JZMX_GYDKQXT,JZMX_CLBCXT,JZMX_JZWGBC,JZMX_ZYBYQXT};
        String[] index = new String[cf.length];
        for(int j=0;j<cf.length;j++){
            String str = cf[j];
            String str1 = "";
            int lastRow = importExcel.getLastDataRowNum();
            for(int i=0;i<lastRow;i++){
                String type = importExcel.getValue(i+1,2);
                if(type.equals("")){
                    continue;
                }
                if(type.contains(str)){
                    str1 = type.substring(0,3);
                    break;
                }
            }
          index[j] = str1;
        }
        double[][] d = new double[18][5];
        int lastRow = importExcel.getLastDataRowNum();
        int[] arr = {12,13,14,15,17};
        for(int i=0;i<lastRow;i++){
            String type = importExcel.getValue(i+1,2);
            if(type.equals("")){
                continue;
            }
            if(type.contains(JZMX_GZJJJC)){
                String st = type.substring(0,3);
                if(st.equals(index[0])){
                    for(int j=0;j<arr.length;j++){
                        d[0][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                } else if(st.equals(index[1])){
                    for(int j=0;j<arr.length;j++){
                        d[5][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                } else if(st.equals(index[2])){
                    for(int j=0;j<arr.length;j++){
                        d[12][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                } else if(st.equals(index[3])){
                    for(int j=0;j<arr.length;j++){
                        d[14][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                }
            }
            if(type.contains(JZMX_ZBYQJC)){
                for(int j=0;j<arr.length;j++){
                        d[1][j] = importExcel.getDouble(i+1,arr[j]);
                }
            }
            if(type.contains(JZMX_ZBYQYK)){
                for(int j=0;j<arr.length;j++){
                    d[2][j] = importExcel.getDouble(i+1,arr[j]);
                }
            }
            if(type.contains(JZMX_FHQ)){
                String st = type.substring(0,3);
                if(st.equals(index[0])){
                    for(int j=0;j<arr.length;j++){
                        d[3][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                } else if(st.equals(index[1])){
                    for(int j=0;j<arr.length;j++){
                        d[8][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                } else if(st.equals(index[4])){
                    for(int j=0;j<arr.length;j++){
                        d[17][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                }
            }
            if(type.contains(JZMX_SGYC)){
                String st = type.substring(0,3);
                if(st.equals(index[0])){
                    for(int j=0;j<arr.length;j++){
                        d[4][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                } else if(st.equals(index[1])){
                    for(int j=0;j<arr.length;j++){
                        d[9][j] = importExcel.getDouble(i+1,arr[j]);
                    }
                }
            }
            if(type.contains(JZMX_GYDKQ)){
                for(int j=0;j<arr.length;j++){
                    d[6][j] = importExcel.getDouble(i+1,arr[j]);
                }
            }
            if(type.contains(JZMX_GYYCJLS)){
                for(int j=0;j<arr.length;j++){
                    d[7][j] = importExcel.getDouble(i+1,arr[j]);
                }
            }
            if(type.contains(JZMX_CLBCSBJC)){
                for(int j=0;j<arr.length;j++){
                    d[10][j] = importExcel.getDouble(i+1,arr[j]);
                }
            }
            if(type.contains(JZMX_CLBCSBJG)){
                for(int j=0;j<arr.length;j++){
                    d[11][j] = importExcel.getDouble(i+1,arr[j]);
                }
            }
            if(type.contains(JZMX_SBZJJJC)){
                String st = type.substring(0,3);
                if(st.equals(index[2])) {
                    for (int j = 0; j < arr.length; j++) {
                        d[13][j] = importExcel.getDouble(i + 1, arr[j]);
                    }
                }
            }
            if(type.contains(JZMX_JZWGBCJC)){
                for(int j=0;j<arr.length;j++){
                    d[15][j] = importExcel.getDouble(i+1,arr[j]);
                }
            }
            if(type.contains(JZMX_ZYBYQSBJC)){
                for(int j=0;j<arr.length;j++){
                    d[17][j] = importExcel.getDouble(i+1,arr[j]);
                }
            }

        }
        List<JkxlDetailFee> detailFees = new ArrayList<>();
        JkxlDetailFee jkxlDetailFee1 = null;
        for(int k=0;k<18;k++){
            jkxlDetailFee1 = new JkxlDetailFee();
           jkxlDetailFee1.setOriginalTotalCost(d[k][0]);
           jkxlDetailFee1.setOriginalRgCost(d[k][1]);
           jkxlDetailFee1.setOriginalCbrCost(d[k][2]);
           jkxlDetailFee1.setOriginalFbrCost(d[k][3]);
           jkxlDetailFee1.setOriginalJxCost(d[k][4]);
           jkxlDetailFee1.setWbsCode(DETWBS[k]);
           detailFees.add(jkxlDetailFee1);
        }

        //主变压器系统
        JkxlDetailFee zby= total1.get(0);
        List<JkxlDetailFee> zbys = detailFees.subList(0,5);
        List<JkxlDetailFee> zbyss = ftFee(zby,zbys);

        //高压电抗器系统
        JkxlDetailFee gyd= total1.get(1);
        List<JkxlDetailFee> gyds = detailFees.subList(5,10);
        List<JkxlDetailFee> gydss = ftFee(gyd,gyds);
        //串联补偿系统
        JkxlDetailFee clbc= total1.get(2);
        List<JkxlDetailFee> clbcs = detailFees.subList(10,14);
        List<JkxlDetailFee> clbcss = ftFee(clbc,clbcs);
        //静止无功补偿装置
        JkxlDetailFee jzw= total1.get(5);
        List<JkxlDetailFee> jzws = detailFees.subList(14,16);
        List<JkxlDetailFee> jzwss = ftFee(jzw,jzws);
        //站用变压器系统
        JkxlDetailFee zyb= total1.get(6);
        JkxlDetailFee zyba = detailFees.get(16);
        JkxlDetailFee zybb = detailFees.get(17);
        List<JkxlDetailFee> zybs = new ArrayList<>();
        zybs.add(zyba);
        zybs.add(zybb);
        List<JkxlDetailFee> zybss = ftFee(zyb,zybs);
        //1000kV构架及设备基础
        JkxlDetailFee jg1000 = total1.get(11);
        List<JkxlDetailFee> jg1000s = kvjg.subList(0,2);
        List<JkxlDetailFee> jg1000ss = ftFee(jg1000,jg1000s);

        //750kV构架及设备基础
        JkxlDetailFee jg750 = total1.get(12);
        List<JkxlDetailFee> jg750s = kvjg.subList(2,4);
        List<JkxlDetailFee> jg750ss = ftFee(jg750,jg750s);

        //500kV构架及设备基础
        JkxlDetailFee jg500 = total1.get(13);
        List<JkxlDetailFee> jg500s = kvjg.subList(4,6);
        List<JkxlDetailFee> jg500ss = ftFee(jg500,jg500s);

        //330kV构架及设备基础
        JkxlDetailFee jg330 = total1.get(14);
        List<JkxlDetailFee> jg330s = kvjg.subList(6,8);
        List<JkxlDetailFee> jg300ss = ftFee(jg330,jg330s);
        //220kV构架及设备基础
        JkxlDetailFee jg220 = total1.get(15);
        List<JkxlDetailFee> jg220s = kvjg.subList(8,10);
        List<JkxlDetailFee> jg220ss = ftFee(jg220,jg220s);
        //110kV构架及设备基础
        JkxlDetailFee jg110 = total1.get(16);
        List<JkxlDetailFee> jg110s = kvjg.subList(10,12);
        List<JkxlDetailFee> jg110ss = ftFee(jg110,jg110s);
        //66kV构架及设备基础
        JkxlDetailFee jg66 = total1.get(17);
        List<JkxlDetailFee> jg66s = kvjg.subList(12,14);
        List<JkxlDetailFee> jg66ss = ftFee(jg66,jg66s);
        //35kV构架及设备基础
        JkxlDetailFee jg35 = total1.get(18);
        List<JkxlDetailFee> jg35s = kvjg.subList(14,16);
        List<JkxlDetailFee> jg35ss = ftFee(jg35,jg35s);
        //10kV构架及设备基础
        JkxlDetailFee jg10 = total1.get(19);
        JkxlDetailFee jg10a = kvjg.get(16);
        JkxlDetailFee jg10b = kvjg.get(17);
        List<JkxlDetailFee> jg10s = new ArrayList<>();
        jg10s.add(jg10a);
        jg10s.add(jg10b);
        List<JkxlDetailFee> jg10ss = ftFee(jg10,jg10s);
        total1.addAll(zbyss);
        total1.addAll(gydss);
        total1.addAll(clbcss);
        total1.addAll(jzwss);
        total1.addAll(zybss);
        total1.addAll(jg1000ss);
        total1.addAll(jg750ss);
        total1.addAll(jg500ss);
        total1.addAll(jg300ss);
        total1.addAll(jg220ss);
        total1.addAll(jg110ss);
        total1.addAll(jg66ss);
        total1.addAll(jg35ss);
        total1.addAll(jg10ss);
        total1.add(total);
     return total1;

    }


    private static List<JkxlDetailFee> ftFee(JkxlDetailFee jkxlDetailFee,List<JkxlDetailFee> list){
        double gc = jkxlDetailFee.getZjgcFee();
        double d = jkxlDetailFee.getOriginalTotalCost();
        for(JkxlDetailFee jkxlDetailFee1:list){
            double rate = 0.00;
            if(d != 0.00){
                 rate = jkxlDetailFee1.getOriginalTotalCost()/d;
            }
            double d1 = gc*rate;
            jkxlDetailFee1.setZjgcFee(d1);
        }
        return list;

    }



    /**
     * 控制直流基础数据
     */
    public static List<JkxlDetailFee> getKzzl(ImportExcel importExcel,ImportExcel importExcel1){
        String[] str = KZZLSTR;
        String[] wbs = KZZLWBS;
        double[][] doubles = ExcelUtil.getBashArray(importExcel,str,2,new int[]{12,13, 14, 15, 17});
        double d = ExcelUtil.getDouble(importExcel1,str[0],1,3);  //直接工程费
        String index = ExcelUtil.getIndex(importExcel,str[0],2);    //获取角标
        int s = 1;
        if(StringUtils.isNotBlank(index)){
            double[][] doubles1 = getUnidentification(importExcel,index,str,"1");
            for(int m=1;m<doubles.length;m++) {
                if(doubles[m][0] != 0.00){
                    s = m;
                    break;
                }
            }
            for(int k=0;k<doubles1.length;k++){
                doubles[s][0] = doubles[s][0] + doubles1[k][0];
                doubles[s][1] = doubles[s][1] + doubles1[k][1];
                doubles[s][2] = doubles[s][2] + doubles1[k][2];
                doubles[s][3] = doubles[s][3] + doubles1[k][3];
                doubles[s][4] = doubles[s][4] + doubles1[k][4];
            }
        }
        double total = doubles[0][0];
        double[] zjgc = new double[5];
        zjgc[0] = d;
        for(int i=1;i<5;i++){
            double rate = 0.00;
            if(total != 0.00) {
                rate = doubles[i][0] / total;
            }
            zjgc[i] = d*rate;
        }
        List<JkxlDetailFee> jkxlDetailFees = new ArrayList<>();
        JkxlDetailFee jkxlDetailFee = null;
        for(int j=0;j<5;j++){
            jkxlDetailFee = new JkxlDetailFee();
            jkxlDetailFee.setOriginalTotalCost(doubles[j][0]);
            jkxlDetailFee.setZjgcFee(zjgc[j]);
            jkxlDetailFee.setOriginalRgCost(doubles[j][1]);
            jkxlDetailFee.setOriginalFbrCost(doubles[j][3]);
            jkxlDetailFee.setOriginalCbrCost(doubles[j][2]);
            jkxlDetailFee.setOriginalJxCost(doubles[j][4]);
            jkxlDetailFee.setWbsCode(wbs[j]);
            jkxlDetailFees.add(jkxlDetailFee);
        }
        double zg = 0.00;
        if(total != 0.00){
             zg = d*(doubles[5][0]+doubles[6][0])/total;
        }
        JkxlDetailFee jkxlDetailFee1 = new JkxlDetailFee();
        jkxlDetailFee1.setOriginalTotalCost(doubles[5][0]+doubles[6][0]);
        jkxlDetailFee1.setZjgcFee(zg);
        jkxlDetailFee1.setOriginalRgCost(doubles[5][1]+doubles[6][1]);
        jkxlDetailFee1.setOriginalFbrCost(doubles[5][3]+doubles[6][3]);
        jkxlDetailFee1.setOriginalCbrCost(doubles[5][2]+doubles[6][2]);
        jkxlDetailFee1.setOriginalJxCost(doubles[5][4]+doubles[6][4]);
        jkxlDetailFee1.setWbsCode(wbs[5]);
        jkxlDetailFees.add(jkxlDetailFee1);
        return jkxlDetailFees;
    }

    /**
     * 电缆及接地基础数据
     */
    public static List<JkxlDetailFee> getDljd(ImportExcel importExcel,ImportExcel importExcel1){
        List<JkxlDetailFee> list = new ArrayList<>();
        JkxlDetailFee total = getBashInfo(importExcel,importExcel1,"23160000",AZMX_DLJJD);
        double[] qzdl = ExcelUtil.getBashArray(importExcel,AZMX_QZDL,2,new int[]{12,13, 14, 15, 17});
        double[] qzjd = ExcelUtil.getBashArray(importExcel,AZMX_QZJD,2,new int[]{12,13, 14, 15, 17});
        double qzZjgc = 0.00;
        double jdZjgc = 0.00;
        if(total.getOriginalTotalCost()!= 0.00) {
             qzZjgc = total.getZjgcFee() * qzdl[0] / total.getOriginalTotalCost();
             jdZjgc = total.getZjgcFee() * qzjd[0] / total.getOriginalTotalCost();
        }
        JkxlDetailFee dl = new JkxlDetailFee();
        dl.setWbsCode("23161000");
        dl.setOriginalTotalCost(qzdl[0]);
        dl.setOriginalRgCost(qzdl[1]);
        dl.setOriginalFbrCost(qzdl[3]);
        dl.setOriginalCbrCost(qzdl[2]);
        dl.setOriginalJxCost(qzdl[4]);
        dl.setZjgcFee(qzZjgc);
        JkxlDetailFee jd = new JkxlDetailFee();
        jd.setWbsCode("23162000");
        jd.setOriginalTotalCost(qzjd[0]);
        jd.setOriginalRgCost(qzjd[1]);
        jd.setOriginalFbrCost(qzjd[3]);
        jd.setOriginalCbrCost(qzjd[2]);
        jd.setOriginalJxCost(qzjd[4]);
        jd.setZjgcFee(jdZjgc);
        list.add(total);
        list.add(dl);
        list.add(jd);
        String[] wbs = {"23161100","23161200","23161300","23161400"};
        double[][] qz = ExcelUtil.getBashArray(importExcel,new String[]{AZMX_DLDL,AZMX_KZDL,AZMX_DLFZSS,AZMX_DLFH},2,new int[]{12,13, 14, 15, 17});
        for(int i=0;i<4;i++){
            JkxlDetailFee jkxlDetailFee = new JkxlDetailFee();
            double gc = 0.00;
            if(qzdl[0] != 0.00) {
                gc = qzZjgc * qz[i][0] / qzdl[0];
            }
            jkxlDetailFee.setWbsCode(wbs[i]);
            jkxlDetailFee.setOriginalTotalCost(qz[i][0]);
            jkxlDetailFee.setOriginalRgCost(qz[i][1]);
            jkxlDetailFee.setOriginalFbrCost(qz[i][3]);
            jkxlDetailFee.setOriginalCbrCost(qz[i][2]);
            jkxlDetailFee.setOriginalJxCost(qz[i][4]);
            jkxlDetailFee.setZjgcFee(gc);
            list.add(jkxlDetailFee);
        }
        return list;
    }


    /**
     * 获取措施费2中的建筑措施费
     * 代码逻辑：如果第一列有“小计”返回该列值，如果没有继续判断，如果第三列没有“建筑措施项目”
     * 返回0，如果有返回第二列文字为“一”行的值
     */
    public static double getCsJzFee(ImportExcel importExcel){
        int lastRow = importExcel.getLastDataRowNum();
        double d = 0.00;
        List list = new ArrayList();
        for(int i=0;i<lastRow;i++){
            String type = importExcel.getValue(i+1,2);
            String type1 = importExcel.getValue(i+1,0);
            list.add(type);
            if(type1.equals(QT_XJ)){
                d = importExcel.getDouble(i+1,10);
                return d;
            }
        }
        if(!list.contains(CS_JZ)){
            return d;
        }

        for(int i=0;i<lastRow;i++){
            String type = importExcel.getValue(i+1,1);
            if(type.equals("")){
                continue;
            }
            if(type.equals(CS_JZ_1)){
                d = importExcel.getDouble(i+1,10);
                break;
            }
        }
        return d;
    }


    /**
     * 获取措施费2中 安装措施费
     * 代码逻辑：查找第三列，如果不包含“安装措施项目”则返回0，
     * 否则返回“一”行金额。（结合上面获取建筑费）的方法似乎，措施费2中，建筑和安装只存在一种
     */
    public static double getCsAzFee(ImportExcel importExcel){
        int lastRow = importExcel.getLastDataRowNum();
        double d = 0.00;
        List list = new ArrayList();
        for(int i=0;i<lastRow;i++){
            String type = importExcel.getValue(i+1,2);
            list.add(type);

        }
        if(!list.contains(CS_AZ)){
            return d;
        }
        for(int i=0;i<lastRow;i++){
            String type = importExcel.getValue(i+1,1);
            if(type.equals("")){
                continue;
            }
            if(type.equals(CS_JZ_1)){
                d = importExcel.getDouble(i+1,10);
            }
        }
        return d;
    }


    public static double[][] getUnidentification(ImportExcel importExcel,String st,String[] strs,String types){
        int startRow = 0;
        int lastRow = importExcel.getLastDataRowNum();
        String jds = "";
        if(types.equals("1")) {
            for (int i = 0; i < lastRow; i++) {
                String type = importExcel.getValue(i + 1, 2);
                if (type.contains(JZMX_FZSCGC)) {
                    lastRow = i + 1;
                    break;
                }
            }
            if(lastRow == importExcel.getLastDataRowNum()){
                for (int i = 0; i < lastRow; i++) {
                    String type = importExcel.getValue(i + 1, 2);
                    if (type.contains(JZMX_ZZDXGC)) {
                        lastRow = i + 1;
                        break;
                    }
                }
            }
        }
        if(types.equals("2")){
            for (int i = 0; i < lastRow; i++) {
                String type = importExcel.getValue(i + 1, 2);
                if (type.contains(JZMX_FZSCGC)) {
                    startRow = i + 1;
                    break;
                }
            }
            for (int i = 0; i < lastRow; i++) {
                String type = importExcel.getValue(i + 1, 2);
                if (type.contains(JZMX_ZZDXGC)) {
                    lastRow = i + 1;
                    break;
                }
            }
        }
        int len1 = st.length();
        List<String> list = new ArrayList();
        for(int i=startRow;i<lastRow;i++){
            String type = importExcel.getValue(i+1,2);
            if(type.equals("")){
                continue;
            }
            if(type.length()<len1){
                continue;
            }
            String newtype = type.substring(0,len1);
            ArrayList<String> strings = new ArrayList<>();
            for(int k=0;k<strs.length;k++){
               strings.add(strs[k].trim());
            }
            if(newtype.equals(st)){
                    int in = type.indexOf(" ");
                    String s = type.substring(in,type.length()).trim();
                    boolean bol = strings.contains(s);
                    if(in>4){
                        bol=true;
                        if(StringUtils.isNotBlank(jds)){
                            String newstr = type.substring(0,3);
                            String newjds = type.substring(0,3);
                            if(newstr.equals(newjds) && !strings.contains(s)){
                                bol = false;
                            }
                        }
                    }
                    if(strs[0].equals(JZMX_ZYSCJZ) && in==3 && (s.contains("继电器室") || s.contains("配电装置室"))){
                        bol=true;
                        jds = type;
                    }
                    if(!bol){
                        list.add(type);
                    }

            }
        }
        double[][] d = new double[list.size()][5];
        for(int j=0;j<list.size();j++){
            String str = list.get(j);
            d[j][0] = ExcelUtil.getDouble(importExcel,str,2,12);
            d[j][1] = ExcelUtil.getDouble(importExcel,str,2,13);
            d[j][2] = ExcelUtil.getDouble(importExcel,str,2,14);
            d[j][3] = ExcelUtil.getDouble(importExcel,str,2,15);
            d[j][4] = ExcelUtil.getDouble(importExcel,str,2,17);
        }
       return d;
    }

   //与站址有关的单项工程基础数据
    public static List<JkxlDetailFee> getDxInfo(ImportExcel importExcel,ImportExcel importExcel1,String[] wbs,String[] str){
        int startRow = 0;
        int lastRow = importExcel.getLastDataRowNum();
        List<String> list = new ArrayList();
            for (int i = 0; i < lastRow; i++) {
                String type = importExcel.getValue(i + 1, 2);
                if (type.contains(JZMX_ZZDXGC)) {
                    startRow = i + 1;
                    break;
                }
            }
            if(startRow != 0) {
                for (int i = startRow; i < lastRow; i++) {
                    String type = importExcel.getValue(i + 1, 2);
                    if (type.contains(" ")) {
                        int in = type.indexOf(" ");
                        if (in == 1) {
                            String s = type.substring(in, type.length()).trim();
                            boolean b = Arrays.asList(str).contains(s);
                            if (!b) {
                                list.add(type);
                            }
                        }
                    }
                }
            }
        double[][] d = new double[list.size()][5];
        for(int j=0;j<list.size();j++){
            String strs = list.get(j);
            d[j][0] = ExcelUtil.getDouble(importExcel,strs,2,12);
            d[j][1] = ExcelUtil.getDouble(importExcel,strs,2,13);
            d[j][2] = ExcelUtil.getDouble(importExcel,strs,2,14);
            d[j][3] = ExcelUtil.getDouble(importExcel,strs,2,15);
            d[j][4] = ExcelUtil.getDouble(importExcel,strs,2,17);
        }
        double[] d2 = new double[list.size()];
        for(int m=0;m<list.size();m++){
            d2[m] = ExcelUtil.getDouble(importExcel1,list.get(m).substring(2,list.get(m).length()).trim(),1,3);
        }
        double[][] doubles = ExcelUtil.getBashArray(importExcel,str,2,new int[]{12,13, 14, 15, 17});
        int s = 1;
        for(int n=1;n<doubles.length;n++) {
            if(doubles[n][0] != 0.00){
                s = n;
                break;
            }
        }
        for(int k=0;k<d.length;k++){
            doubles[s][0] = doubles[s][0] + d[k][0];
            doubles[s][1] = doubles[s][1] + d[k][1];
            doubles[s][2] = doubles[s][2] + d[k][2];
            doubles[s][3] = doubles[s][3] + d[k][3];
            doubles[s][4] = doubles[s][4] + d[k][4];
        }
        List<JkxlDetailFee> jkxlDetailFees = new ArrayList<>();
        JkxlDetailFee jkxlDetailFee = null;
        for(int i=0;i<str.length;i++){
            double d1 = ExcelUtil.getDouble(importExcel1,str[i],1,3);  //直接工程费
            jkxlDetailFee = new JkxlDetailFee();
            jkxlDetailFee.setWbsCode(wbs[i]);
            jkxlDetailFee.setOriginalTotalCost(doubles[i][0]);
            jkxlDetailFee.setZjgcFee(d1);
            jkxlDetailFee.setOriginalRgCost(doubles[i][1]);
            jkxlDetailFee.setOriginalFbrCost(doubles[i][3]);
            jkxlDetailFee.setOriginalCbrCost(doubles[i][2]);
            jkxlDetailFee.setOriginalJxCost(doubles[i][4]);
            jkxlDetailFees.add(jkxlDetailFee);
        }
        JkxlDetailFee jkxlDetailFee1 = jkxlDetailFees.get(s-1);
        for(int n1=0;n1<d2.length;n1++) {
            jkxlDetailFee1.setZjgcFee(jkxlDetailFee1.getZjgcFee() + d2[n1]);
        }
        return jkxlDetailFees;
    }




}
