<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.gov.customs.wxjy.statReport.dao.CustomMStatFMapper">

    <resultMap type="CustomMStatF" id="CustomMStatFResult">
        <result property="ID" column="ID"/>
        <result property="MONTH" column="MONTH"/>
        <result property="customCode" column="CUSTOM_CODE"/>
        <result property="impDeclCount" column="IMP_DECL_COUNT"/>
        <result property="impManDeclCount" column="IMP_MAN_DECL_COUNT"/>
        <result property="impManualAuditDeclCount" column="IMP_MANUAL_AUDIT_DECL_COUNT"/>
        <result property="impDeclCountLm" column="IMP_DECL_COUNT_LM"/>
        <result property="impDeclCountLyDec" column="IMP_DECL_COUNT_LY_DEC"/>
        <result property="impDeclCountCuryear" column="IMP_DECL_COUNT_CURYEAR"/>
        <result property="impDeclCountYbl" column="IMP_DECL_COUNT_YBL"/>
        <result property="impTotalCost" column="IMP_TOTAL_COST"/>
        <result property="impTotalCostLm" column="IMP_TOTAL_COST_LM"/>
        <result property="impTotalCostLyDec" column="IMP_TOTAL_COST_LY_DEC"/>
        <result property="impTotalCostCy" column="IMP_TOTAL_COST_CY"/>
        <result property="impTotalCostYbl" column="IMP_TOTAL_COST_YBL"/>
        <result property="impCuCost" column="IMP_CU_COST"/>
        <result property="impCuCostLm" column="IMP_CU_COST_LM"/>
        <result property="impCuCostLyDec" column="IMP_CU_COST_LY_DEC"/>
        <result property="impCuCostCy" column="IMP_CU_COST_CY"/>
        <result property="impCuCostYbl" column="IMP_CU_COST_YBL"/>
        <result property="expDeclCount" column="EXP_DECL_COUNT"/>
        <result property="expManDeclCount" column="EXP_MAN_DECL_COUNT"/>
        <result property="expManualAuditDeclCount" column="EXP_MANUAL_AUDIT_DECL_COUNT"/>
        <result property="expDeclCountLm" column="EXP_DECL_COUNT_LM"/>
        <result property="expDeclCountLyDec" column="EXP_DECL_COUNT_LY_DEC"/>
        <result property="expDeclCountCuryear" column="EXP_DECL_COUNT_CURYEAR"/>
        <result property="expDeclCountYbl" column="EXP_DECL_COUNT_YBL"/>
        <result property="expTotalCost" column="EXP_TOTAL_COST"/>
        <result property="expTotalCostLm" column="EXP_TOTAL_COST_LM"/>
        <result property="expTotalCostLyDec" column="EXP_TOTAL_COST_LY_DEC"/>
        <result property="expTotalCostCy" column="EXP_TOTAL_COST_CY"/>
        <result property="expTotalCostYbl" column="EXP_TOTAL_COST_YBL"/>
        <result property="expCuCost" column="EXP_CU_COST"/>
        <result property="expCuCostLm" column="EXP_CU_COST_LM"/>
        <result property="expCuCostLyDec" column="EXP_CU_COST_LY_DEC"/>
        <result property="expCuCostCy" column="EXP_CU_COST_CY"/>
        <result property="expCuCostYbl" column="EXP_CU_COST_YBL"/>
    </resultMap>

    <sql id="baseVo">
        select ID, MONTH, CUSTOM_CODE, IMP_DECL_COUNT, IMP_MAN_DECL_COUNT, IMP_MANUAL_AUDIT_DECL_COUNT, IMP_DECL_COUNT_LM, IMP_DECL_COUNT_LY_DEC, IMP_DECL_COUNT_CURYEAR, IMP_DECL_COUNT_YBL, IMP_TOTAL_COST, IMP_TOTAL_COST_LM, IMP_TOTAL_COST_LY_DEC, IMP_TOTAL_COST_CY, IMP_TOTAL_COST_YBL, IMP_CU_COST, IMP_CU_COST_LM, IMP_CU_COST_LY_DEC, IMP_CU_COST_CY, IMP_CU_COST_YBL, EXP_DECL_COUNT, EXP_MAN_DECL_COUNT, EXP_MANUAL_AUDIT_DECL_COUNT, EXP_DECL_COUNT_LM, EXP_DECL_COUNT_LY_DEC, EXP_DECL_COUNT_CURYEAR, EXP_DECL_COUNT_YBL, EXP_TOTAL_COST, EXP_TOTAL_COST_LM, EXP_TOTAL_COST_LY_DEC, EXP_TOTAL_COST_CY, EXP_TOTAL_COST_YBL, EXP_CU_COST, EXP_CU_COST_LM, EXP_CU_COST_LY_DEC, EXP_CU_COST_CY, EXP_CU_COST_YBL
        from WXJY_CUSTOM_M_STAT_F
    </sql>

    <select id="selectList" parameterType="CustomMStatFQuery" resultMap="CustomMStatFResult">
        select '4700' as custom_code, nvl(sum(imp_decl_count), 0) as imp_decl_count,nvl(sum(IMP_MAN_DECL_COUNT), 0) as IMP_MAN_DECL_COUNT,
        nvl(sum(IMP_MANUAL_AUDIT_DECL_COUNT), 0) as IMP_MANUAL_AUDIT_DECL_COUNT,nvl(sum(IMP_DECL_COUNT_LM), 0) as IMP_DECL_COUNT_LM,
        nvl(sum(IMP_DECL_COUNT_LY_DEC), 0) as IMP_DECL_COUNT_LY_DEC,
        nvl(sum(IMP_DECL_COUNT_CURYEAR), 0) as IMP_DECL_COUNT_CURYEAR,nvl(sum(IMP_DECL_COUNT_YBL), 0) as IMP_DECL_COUNT_YBL,
        round(nvl(decode(sum(imp_decl_count) ,0 ,0, sum(imp_decl_count * imp_total_cost) / sum(imp_decl_count)), 0),2) as imp_total_cost,
        round(nvl(decode(sum(IMP_DECL_COUNT_LM) ,0 ,0, sum(IMP_DECL_COUNT_LM * IMP_TOTAL_COST_LM) / sum(IMP_DECL_COUNT_LM)), 0),2) as IMP_TOTAL_COST_LM,
        round(nvl(decode(sum(IMP_DECL_COUNT_LY_DEC) ,0 ,0, sum(IMP_DECL_COUNT_LY_DEC * IMP_TOTAL_COST_LY_DEC) / sum(IMP_DECL_COUNT_LY_DEC)), 0),2) as IMP_TOTAL_COST_LY_DEC,
        round(nvl(decode(sum(IMP_DECL_COUNT_CURYEAR) ,0 ,0, sum(IMP_DECL_COUNT_CURYEAR * IMP_TOTAL_COST_CY) / sum(IMP_DECL_COUNT_CURYEAR)), 0),2) as IMP_TOTAL_COST_CY,
        round(nvl(decode(sum(IMP_DECL_COUNT_YBL) ,0 ,0, sum(IMP_DECL_COUNT_YBL * IMP_TOTAL_COST_YBL) / sum(IMP_DECL_COUNT_YBL)), 0),2) as IMP_TOTAL_COST_YBL,
        round(nvl(decode(sum(imp_decl_count) ,0 ,0, sum(imp_decl_count * IMP_CU_COST) / sum(imp_decl_count)), 0),2) as IMP_CU_COST,
        round(nvl(decode(sum(IMP_DECL_COUNT_LM) ,0 ,0, sum(IMP_DECL_COUNT_LM * IMP_CU_COST_LM) / sum(IMP_DECL_COUNT_LM)), 0),2) as IMP_CU_COST_LM,
        round(nvl(decode(sum(IMP_DECL_COUNT_LY_DEC), 0, 0, sum(IMP_DECL_COUNT_LY_DEC * IMP_CU_COST_LY_DEC) / sum(IMP_DECL_COUNT_LY_DEC)), 0),2) as IMP_CU_COST_LY_DEC,
        round(nvl(decode(sum(IMP_DECL_COUNT_CURYEAR), 0, 0, sum(IMP_DECL_COUNT_CURYEAR * IMP_CU_COST_CY) / sum(IMP_DECL_COUNT_CURYEAR)), 0),2) as IMP_CU_COST_CY,
        round(nvl(decode(sum(IMP_DECL_COUNT_YBL) ,0 ,0, sum(IMP_DECL_COUNT_YBL * IMP_CU_COST_YBL) / sum(IMP_DECL_COUNT_YBL)), 0),2) as IMP_CU_COST_YBL,
        nvl(sum(exp_decl_count), 0) as exp_decl_count,nvl(sum(EXP_MAN_DECL_COUNT), 0) as EXP_MAN_DECL_COUNT,
        nvl(sum(EXP_MANUAL_AUDIT_DECL_COUNT), 0) as EXP_MANUAL_AUDIT_DECL_COUNT,nvl(sum(EXP_DECL_COUNT_LM), 0) as EXP_DECL_COUNT_LM,
        nvl(sum(EXP_DECL_COUNT_LY_DEC), 0) as EXP_DECL_COUNT_LY_DEC,
        nvl(sum(EXP_DECL_COUNT_CURYEAR), 0) as EXP_DECL_COUNT_CURYEAR,nvl(sum(EXP_DECL_COUNT_YBL), 0) as EXP_DECL_COUNT_YBL,
        round(nvl(decode(sum(exp_decl_count) ,0 ,0, sum(exp_decl_count * exp_total_cost) / sum(exp_decl_count)), 0),2) as exp_total_cost,
        round(nvl(decode(sum(EXP_DECL_COUNT_LM) ,0 ,0, sum(EXP_DECL_COUNT_LM * EXP_TOTAL_COST_LM) / sum(EXP_DECL_COUNT_LM)), 0),2) as EXP_TOTAL_COST_LM,
        round(nvl(decode(sum(EXP_DECL_COUNT_LY_DEC) ,0 ,0, sum(EXP_DECL_COUNT_LY_DEC * EXP_TOTAL_COST_LY_DEC) / sum(EXP_DECL_COUNT_LY_DEC)), 0),2) as EXP_TOTAL_COST_LY_DEC,
        round(nvl(decode(sum(EXP_DECL_COUNT_CURYEAR) ,0 ,0, sum(EXP_DECL_COUNT_CURYEAR * EXP_TOTAL_COST_CY) / sum(EXP_DECL_COUNT_CURYEAR)), 0),2) as EXP_TOTAL_COST_CY,
        round(nvl(decode(sum(EXP_DECL_COUNT_YBL) ,0 ,0, sum(EXP_DECL_COUNT_YBL * EXP_TOTAL_COST_YBL) / sum(EXP_DECL_COUNT_YBL)), 0),2) as EXP_TOTAL_COST_YBL,
        round(nvl(decode(sum(exp_decl_count) ,0 ,0, sum(exp_decl_count * EXP_CU_COST) / sum(exp_decl_count)), 0),2) as EXP_CU_COST,
        round(nvl(decode(sum(EXP_DECL_COUNT_LM) ,0 ,0, sum(EXP_DECL_COUNT_LM * EXP_CU_COST_LM) / sum(EXP_DECL_COUNT_LM)), 0),2) as EXP_CU_COST_LM,
        round(nvl(decode(sum(EXP_DECL_COUNT_LY_DEC), 0, 0, sum(EXP_DECL_COUNT_LY_DEC * EXP_CU_COST_LY_DEC) / sum(EXP_DECL_COUNT_LY_DEC)), 0),2) as EXP_CU_COST_LY_DEC,
        round(nvl(decode(sum(EXP_DECL_COUNT_CURYEAR), 0, 0, sum(EXP_DECL_COUNT_CURYEAR * EXP_CU_COST_CY) / sum(EXP_DECL_COUNT_CURYEAR)), 0),2) as EXP_CU_COST_CY,
        round(nvl(decode(sum(EXP_DECL_COUNT_YBL) ,0 ,0, sum(EXP_DECL_COUNT_YBL * IMP_CU_COST_YBL) / sum(EXP_DECL_COUNT_YBL)), 0),2) as EXP_CU_COST_YBL
        from  WXJY_CUSTOM_M_STAT_F where custom_code != '4700'
        <if test="beginDate != null and beginDate != ''">
            and month = #{beginDate}
        </if>
        union all
        select * from (select a.custom_code,
        nvl(a.imp_decl_count,0) imp_decl_count,
        nvl(a.IMP_MAN_DECL_COUNT,0) IMP_MAN_DECL_COUNT,
        nvl(a.IMP_MANUAL_AUDIT_DECL_COUNT,0) IMP_MANUAL_AUDIT_DECL_COUNT,
        nvl(a.IMP_DECL_COUNT_LM,0) IMP_DECL_COUNT_LM,
        nvl(a.IMP_DECL_COUNT_LY_DEC,0) IMP_DECL_COUNT_LY_DEC,
        nvl(a.IMP_DECL_COUNT_CURYEAR,0) IMP_DECL_COUNT_CURYEAR,
        nvl(a.IMP_DECL_COUNT_YBL,0) IMP_DECL_COUNT_YBL,
        round(nvl(a.imp_total_cost,0), 2) imp_total_cost,
        round(nvl(a.imp_total_cost_lm,0), 2) imp_total_cost_lm,
        round(nvl(a.imp_total_cost_ly_dec,0), 2) imp_total_cost_ly_dec,
        round(nvl(a.IMP_TOTAL_COST_CY,0), 2) IMP_TOTAL_COST_CY,
        round(nvl(a.IMP_TOTAL_COST_YBL,0), 2) IMP_TOTAL_COST_YBL,
        round(nvl(a.IMP_CU_COST,0), 2) IMP_CU_COST,
        round(nvl(a.IMP_CU_COST_LM,0), 2) IMP_CU_COST_LM,
        round(nvl(a.IMP_CU_COST_LY_DEC,0), 2) IMP_CU_COST_LY_DEC,
        round(nvl(a.IMP_CU_COST_CY,0), 2) IMP_CU_COST_CY,
        round(nvl(a.IMP_CU_COST_YBL,0), 2) IMP_CU_COST_YBL,
        nvl(a.exp_decl_count,0) exp_decl_count,
        nvl(a.EXP_MAN_DECL_COUNT,0) EXP_MAN_DECL_COUNT,
        nvl(a.EXP_MANUAL_AUDIT_DECL_COUNT,0) EXP_MANUAL_AUDIT_DECL_COUNT,
        nvl(a.EXP_DECL_COUNT_LM,0) EXP_DECL_COUNT_LM,
        nvl(a.EXP_DECL_COUNT_LY_DEC,0) EXP_DECL_COUNT_LY_DEC,
        nvl(a.EXP_DECL_COUNT_CURYEAR,0) EXP_DECL_COUNT_CURYEAR,
        nvl(a.EXP_DECL_COUNT_YBL,0) EXP_DECL_COUNT_YBL,
        round(nvl(a.exp_total_cost,0), 2) exp_total_cost,
        round(nvl(a.exp_total_cost_lm,0), 2) exp_total_cost_lm,
        round(nvl(a.exp_total_cost_ly_dec,0), 2) exp_total_cost_ly_dec,
        round(nvl(a.EXP_TOTAL_COST_CY,0), 2) EXP_TOTAL_COST_CY,
        round(nvl(a.EXP_TOTAL_COST_YBL,0), 2) EXP_TOTAL_COST_YBL,
        round(nvl(a.EXP_CU_COST,0), 2) EXP_CU_COST,
        round(nvl(a.EXP_CU_COST_LM,0), 2) EXP_CU_COST_LM,
        round(nvl(a.EXP_CU_COST_LY_DEC,0), 2) EXP_CU_COST_LY_DEC,
        round(nvl(a.EXP_CU_COST_CY,0), 2) EXP_CU_COST_CY,
        round(nvl(a.EXP_CU_COST_YBL,0), 2) EXP_CU_COST_YBL
        from WXJY_CUSTOM_M_STAT_F a
        where custom_code != '4700'
        <if test="beginDate != null and beginDate != ''">
            and month = #{beginDate}
        </if>
        order by a.custom_code)
    </select>

    <select id="selectByID" parameterType="String"
        resultMap="CustomMStatFResult">
        <include refid="baseVo"/>
        where ID = #{ID}
    </select>

    <insert id="insert" parameterType="CustomMStatF">
        insert into WXJY_CUSTOM_M_STAT_F
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="ID != null and ID != ''">ID,
            </if>
            <if test="MONTH != null">MONTH,
            </if>
            <if test="customCode != null">CUSTOM_CODE,
            </if>
            <if test="impDeclCount != null">IMP_DECL_COUNT,
            </if>
            <if test="impManDeclCount != null">IMP_MAN_DECL_COUNT,
            </if>
            <if test="impManualAuditDeclCount != null">IMP_MANUAL_AUDIT_DECL_COUNT,
            </if>
            <if test="impDeclCountLm != null">IMP_DECL_COUNT_LM,
            </if>
            <if test="impDeclCountLyDec != null">IMP_DECL_COUNT_LY_DEC,
            </if>
            <if test="impDeclCountCuryear != null">IMP_DECL_COUNT_CURYEAR,
            </if>
            <if test="impDeclCountYbl != null">IMP_DECL_COUNT_YBL,
            </if>
            <if test="impTotalCost != null">IMP_TOTAL_COST,
            </if>
            <if test="impTotalCostLm != null">IMP_TOTAL_COST_LM,
            </if>
            <if test="impTotalCostLyDec != null">IMP_TOTAL_COST_LY_DEC,
            </if>
            <if test="impTotalCostCy != null">IMP_TOTAL_COST_CY,
            </if>
            <if test="impTotalCostYbl != null">IMP_TOTAL_COST_YBL,
            </if>
            <if test="impCuCost != null">IMP_CU_COST,
            </if>
            <if test="impCuCostLm != null">IMP_CU_COST_LM,
            </if>
            <if test="impCuCostLyDec != null">IMP_CU_COST_LY_DEC,
            </if>
            <if test="impCuCostCy != null">IMP_CU_COST_CY,
            </if>
            <if test="impCuCostYbl != null">IMP_CU_COST_YBL,
            </if>
            <if test="expDeclCount != null">EXP_DECL_COUNT,
            </if>
            <if test="expManDeclCount != null">EXP_MAN_DECL_COUNT,
            </if>
            <if test="expManualAuditDeclCount != null">EXP_MANUAL_AUDIT_DECL_COUNT,
            </if>
            <if test="expDeclCountLm != null">EXP_DECL_COUNT_LM,
            </if>
            <if test="expDeclCountLyDec != null">EXP_DECL_COUNT_LY_DEC,
            </if>
            <if test="expDeclCountCuryear != null">EXP_DECL_COUNT_CURYEAR,
            </if>
            <if test="expDeclCountYbl != null">EXP_DECL_COUNT_YBL,
            </if>
            <if test="expTotalCost != null">EXP_TOTAL_COST,
            </if>
            <if test="expTotalCostLm != null">EXP_TOTAL_COST_LM,
            </if>
            <if test="expTotalCostLyDec != null">EXP_TOTAL_COST_LY_DEC,
            </if>
            <if test="expTotalCostCy != null">EXP_TOTAL_COST_CY,
            </if>
            <if test="expTotalCostYbl != null">EXP_TOTAL_COST_YBL,
            </if>
            <if test="expCuCost != null">EXP_CU_COST,
            </if>
            <if test="expCuCostLm != null">EXP_CU_COST_LM,
            </if>
            <if test="expCuCostLyDec != null">EXP_CU_COST_LY_DEC,
            </if>
            <if test="expCuCostCy != null">EXP_CU_COST_CY,
            </if>
            <if test="expCuCostYbl != null">EXP_CU_COST_YBL,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="ID != null and ID != ''">#{ID},
            </if>
            <if test="MONTH != null">#{MONTH},
            </if>
            <if test="customCode != null">#{customCode},
            </if>
            <if test="impDeclCount != null">#{impDeclCount},
            </if>
            <if test="impManDeclCount != null">#{impManDeclCount},
            </if>
            <if test="impManualAuditDeclCount != null">#{impManualAuditDeclCount},
            </if>
            <if test="impDeclCountLm != null">#{impDeclCountLm},
            </if>
            <if test="impDeclCountLyDec != null">#{impDeclCountLyDec},
            </if>
            <if test="impDeclCountCuryear != null">#{impDeclCountCuryear},
            </if>
            <if test="impDeclCountYbl != null">#{impDeclCountYbl},
            </if>
            <if test="impTotalCost != null">#{impTotalCost},
            </if>
            <if test="impTotalCostLm != null">#{impTotalCostLm},
            </if>
            <if test="impTotalCostLyDec != null">#{impTotalCostLyDec},
            </if>
            <if test="impTotalCostCy != null">#{impTotalCostCy},
            </if>
            <if test="impTotalCostYbl != null">#{impTotalCostYbl},
            </if>
            <if test="impCuCost != null">#{impCuCost},
            </if>
            <if test="impCuCostLm != null">#{impCuCostLm},
            </if>
            <if test="impCuCostLyDec != null">#{impCuCostLyDec},
            </if>
            <if test="impCuCostCy != null">#{impCuCostCy},
            </if>
            <if test="impCuCostYbl != null">#{impCuCostYbl},
            </if>
            <if test="expDeclCount != null">#{expDeclCount},
            </if>
            <if test="expManDeclCount != null">#{expManDeclCount},
            </if>
            <if test="expManualAuditDeclCount != null">#{expManualAuditDeclCount},
            </if>
            <if test="expDeclCountLm != null">#{expDeclCountLm},
            </if>
            <if test="expDeclCountLyDec != null">#{expDeclCountLyDec},
            </if>
            <if test="expDeclCountCuryear != null">#{expDeclCountCuryear},
            </if>
            <if test="expDeclCountYbl != null">#{expDeclCountYbl},
            </if>
            <if test="expTotalCost != null">#{expTotalCost},
            </if>
            <if test="expTotalCostLm != null">#{expTotalCostLm},
            </if>
            <if test="expTotalCostLyDec != null">#{expTotalCostLyDec},
            </if>
            <if test="expTotalCostCy != null">#{expTotalCostCy},
            </if>
            <if test="expTotalCostYbl != null">#{expTotalCostYbl},
            </if>
            <if test="expCuCost != null">#{expCuCost},
            </if>
            <if test="expCuCostLm != null">#{expCuCostLm},
            </if>
            <if test="expCuCostLyDec != null">#{expCuCostLyDec},
            </if>
            <if test="expCuCostCy != null">#{expCuCostCy},
            </if>
            <if test="expCuCostYbl != null">#{expCuCostYbl},
            </if>
        </trim>
    </insert>

    <update id="update" parameterType="CustomMStatF">
        update WXJY_CUSTOM_M_STAT_F
        <trim prefix="SET" suffixOverrides=",">
            <if test="MONTH != null">MONTH =
                #{MONTH},
            </if>
            <if test="customCode != null">CUSTOM_CODE =
                #{customCode},
            </if>
            <if test="impDeclCount != null">IMP_DECL_COUNT =
                #{impDeclCount},
            </if>
            <if test="impManDeclCount != null">IMP_MAN_DECL_COUNT =
                #{impManDeclCount},
            </if>
            <if test="impManualAuditDeclCount != null">IMP_MANUAL_AUDIT_DECL_COUNT =
                #{impManualAuditDeclCount},
            </if>
            <if test="impDeclCountLm != null">IMP_DECL_COUNT_LM =
                #{impDeclCountLm},
            </if>
            <if test="impDeclCountLyDec != null">IMP_DECL_COUNT_LY_DEC =
                #{impDeclCountLyDec},
            </if>
            <if test="impDeclCountCuryear != null">IMP_DECL_COUNT_CURYEAR =
                #{impDeclCountCuryear},
            </if>
            <if test="impDeclCountYbl != null">IMP_DECL_COUNT_YBL =
                #{impDeclCountYbl},
            </if>
            <if test="impTotalCost != null">IMP_TOTAL_COST =
                #{impTotalCost},
            </if>
            <if test="impTotalCostLm != null">IMP_TOTAL_COST_LM =
                #{impTotalCostLm},
            </if>
            <if test="impTotalCostLyDec != null">IMP_TOTAL_COST_LY_DEC =
                #{impTotalCostLyDec},
            </if>
            <if test="impTotalCostCy != null">IMP_TOTAL_COST_CY =
                #{impTotalCostCy},
            </if>
            <if test="impTotalCostYbl != null">IMP_TOTAL_COST_YBL =
                #{impTotalCostYbl},
            </if>
            <if test="impCuCost != null">IMP_CU_COST =
                #{impCuCost},
            </if>
            <if test="impCuCostLm != null">IMP_CU_COST_LM =
                #{impCuCostLm},
            </if>
            <if test="impCuCostLyDec != null">IMP_CU_COST_LY_DEC =
                #{impCuCostLyDec},
            </if>
            <if test="impCuCostCy != null">IMP_CU_COST_CY =
                #{impCuCostCy},
            </if>
            <if test="impCuCostYbl != null">IMP_CU_COST_YBL =
                #{impCuCostYbl},
            </if>
            <if test="expDeclCount != null">EXP_DECL_COUNT =
                #{expDeclCount},
            </if>
            <if test="expManDeclCount != null">EXP_MAN_DECL_COUNT =
                #{expManDeclCount},
            </if>
            <if test="expManualAuditDeclCount != null">EXP_MANUAL_AUDIT_DECL_COUNT =
                #{expManualAuditDeclCount},
            </if>
            <if test="expDeclCountLm != null">EXP_DECL_COUNT_LM =
                #{expDeclCountLm},
            </if>
            <if test="expDeclCountLyDec != null">EXP_DECL_COUNT_LY_DEC =
                #{expDeclCountLyDec},
            </if>
            <if test="expDeclCountCuryear != null">EXP_DECL_COUNT_CURYEAR =
                #{expDeclCountCuryear},
            </if>
            <if test="expDeclCountYbl != null">EXP_DECL_COUNT_YBL =
                #{expDeclCountYbl},
            </if>
            <if test="expTotalCost != null">EXP_TOTAL_COST =
                #{expTotalCost},
            </if>
            <if test="expTotalCostLm != null">EXP_TOTAL_COST_LM =
                #{expTotalCostLm},
            </if>
            <if test="expTotalCostLyDec != null">EXP_TOTAL_COST_LY_DEC =
                #{expTotalCostLyDec},
            </if>
            <if test="expTotalCostCy != null">EXP_TOTAL_COST_CY =
                #{expTotalCostCy},
            </if>
            <if test="expTotalCostYbl != null">EXP_TOTAL_COST_YBL =
                #{expTotalCostYbl},
            </if>
            <if test="expCuCost != null">EXP_CU_COST =
                #{expCuCost},
            </if>
            <if test="expCuCostLm != null">EXP_CU_COST_LM =
                #{expCuCostLm},
            </if>
            <if test="expCuCostLyDec != null">EXP_CU_COST_LY_DEC =
                #{expCuCostLyDec},
            </if>
            <if test="expCuCostCy != null">EXP_CU_COST_CY =
                #{expCuCostCy},
            </if>
            <if test="expCuCostYbl != null">EXP_CU_COST_YBL =
                #{expCuCostYbl},
            </if>
        </trim>
        where ID = #{ID}
    </update>

    <delete id="deleteByID" parameterType="String">
        delete
        from WXJY_CUSTOM_M_STAT_F where ID = #{ID}
    </delete>

    <delete id="deleteByIDs" parameterType="String">
        delete from WXJY_CUSTOM_M_STAT_F where ID in
        <foreach item="ID" collection="array" open="(" separator="," close=")">
            #{ID}
        </foreach>
    </delete>

    <delete id="logicDelete" parameterType="String">
        update  WXJY_CUSTOM_M_STAT_F set is_del = 1  where ID = #{ID}
    </delete>
</mapper>