<?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="com.goldenwater.slaj.hidd.mapper.BisHiddAssessRecMapper">
    <resultMap type="com.goldenwater.slaj.hidd.domain.BisHiddAssessRec" id="BisHiddAssessRecResult">
        <result property="id" column="id"/>
        <result property="assessId" column="assess_id"/>
        <result property="orgGuid" column="org_guid"/>
        <result property="orgName" column="org_name"/>
        <result property="orgCode" column="org_code"/>
        <result property="unitSum" column="unit_sum"/>
        <result property="unitCheckSum" column="unit_check_sum"/>
        <result property="hiddSum" column="hidd_sum"/>
        <result property="hiddUnsolverSum" column="hidd_unsolver_sum"/>
        <result property="hiddSolvingSum" column="hidd_solving_sum"/>
        <result property="hiddOvsolverSum" column="hidd_ovsolver_sum"/>
        <result property="hiddSolveSum" column="hidd_solve_sum"/>
        <result property="hiddHisSum" column="hidd_his_sum"/>
        <result property="majorHiddHisSum" column="major_hidd_his_sum"/>
        <result property="normalHiddHisSum" column="normal_hidd_his_sum"/>
        <result property="hiddHisSoSum" column="hidd_his_so_sum"/>
        <result property="majorHiddHisSoSum" column="major_hidd_his_so_sum"/>
        <result property="normalHiddHisSoSum" column="normal_hidd_his_so_sum"/>
        <result property="majorHiddSum" column="major_hidd_sum"/>
        <result property="normalHiddSum" column="normal_hidd_sum"/>
        <result property="mHiddUnsolverSum" column="m_hidd_unsolver_sum"/>
        <result property="mHiddSolvingSum" column="m_hidd_solving_sum"/>
        <result property="mHiddOvsolverSum" column="m_hidd_ovsolver_sum"/>
        <result property="mHiddSolveSum" column="m_hidd_solve_sum"/>
        <result property="nHiddUnsolverSum" column="n_hidd_unsolver_sum"/>
        <result property="nHiddSolvingSum" column="n_hidd_solving_sum"/>
        <result property="nHiddOvsolverSum" column="n_hidd_ovsolver_sum"/>
        <result property="nHiddSolveSum" column="n_hidd_solve_sum"/>
        <result property="hiddRank" column="hidd_rank"/>
    </resultMap>
    <sql id="selectBisHiddAssessRecVo">
        select id, assess_id, org_guid, org_name, org_code, unit_sum, unit_check_sum, hidd_sum, hidd_unsolver_sum, hidd_solving_sum, hidd_ovsolver_sum, hidd_solve_sum, hidd_his_sum, major_hidd_his_sum, normal_hidd_his_sum, hidd_his_so_sum, major_hidd_his_so_sum, normal_hidd_his_so_sum, major_hidd_sum, normal_hidd_sum, m_hidd_unsolver_sum, m_hidd_solving_sum, m_hidd_ovsolver_sum, m_hidd_solve_sum, n_hidd_unsolver_sum, n_hidd_solving_sum, n_hidd_ovsolver_sum, n_hidd_solve_sum, hidd_rank
        from bis_hidd_assess_rec
    </sql>
    <select id="selectBisHiddAssessRecById" parameterType="Long" resultMap="BisHiddAssessRecResult">
        <include refid="selectBisHiddAssessRecVo"/>
        where id = #{id}
    </select>
    <select id="selectBisHiddAssessRecList" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddAssessRec" resultMap="BisHiddAssessRecResult">
        <include refid="selectBisHiddAssessRecVo"/>
        <where>
            <if test="assessId != null">AND assess_id = #{assessId}</if>
            <if test="orgGuid != null and orgGuid != ''">AND org_guid = #{orgGuid}</if>
        </where>
    </select>
    <insert id="insertBisHiddAssessRec" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddAssessRec">
        insert into bis_hidd_assess_rec (assess_id, org_guid, org_name, org_code, unit_sum, unit_check_sum, hidd_sum, hidd_unsolver_sum, hidd_solving_sum, hidd_ovsolver_sum, hidd_solve_sum, hidd_his_sum, major_hidd_his_sum, normal_hidd_his_sum, hidd_his_so_sum, major_hidd_his_so_sum, normal_hidd_his_so_sum, major_hidd_sum, normal_hidd_sum, m_hidd_unsolver_sum, m_hidd_solving_sum, m_hidd_ovsolver_sum, m_hidd_solve_sum, n_hidd_unsolver_sum, n_hidd_solving_sum, n_hidd_ovsolver_sum, n_hidd_solve_sum, hidd_rank)
        values (#{assessId}, #{orgGuid}, #{orgName}, #{orgCode}, #{unitSum}, #{unitCheckSum}, #{hiddSum}, #{hiddUnsolverSum}, #{hiddSolvingSum}, #{hiddOvsolverSum}, #{hiddSolveSum}, #{hiddHisSum}, #{majorHiddHisSum}, #{normalHiddHisSum}, #{hiddHisSoSum}, #{majorHiddHisSoSum}, #{normalHiddHisSoSum}, #{majorHiddSum}, #{normalHiddSum}, #{mHiddUnsolverSum}, #{mHiddSolvingSum}, #{mHiddOvsolverSum}, #{mHiddSolveSum}, #{nHiddUnsolverSum}, #{nHiddSolvingSum}, #{nHiddOvsolverSum}, #{nHiddSolveSum}, #{hiddRank})
    </insert>
    <update id="updateBisHiddAssessRec" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddAssessRec">
        update bis_hidd_assess_rec
        <set>
            <if test="assessId != null">assess_id = #{assessId},</if>
            <if test="orgGuid != null">org_guid = #{orgGuid},</if>
            <if test="orgName != null">org_name = #{orgName},</if>
            <if test="orgCode != null">org_code = #{orgCode},</if>
            <if test="unitSum != null">unit_sum = #{unitSum},</if>
            <if test="unitCheckSum != null">unit_check_sum = #{unitCheckSum},</if>
            <if test="hiddSum != null">hidd_sum = #{hiddSum},</if>
            <if test="hiddUnsolverSum != null">hidd_unsolver_sum = #{hiddUnsolverSum},</if>
            <if test="hiddSolvingSum != null">hidd_solving_sum = #{hiddSolvingSum},</if>
            <if test="hiddOvsolverSum != null">hidd_ovsolver_sum = #{hiddOvsolverSum},</if>
            <if test="hiddSolveSum != null">hidd_solve_sum = #{hiddSolveSum},</if>
            <if test="hiddHisSum != null">hidd_his_sum = #{hiddHisSum},</if>
            <if test="majorHiddHisSum != null">major_hidd_his_sum = #{majorHiddHisSum},</if>
            <if test="normalHiddHisSum != null">normal_hidd_his_sum = #{normalHiddHisSum},</if>
            <if test="hiddHisSoSum != null">hidd_his_so_sum = #{hiddHisSoSum},</if>
            <if test="majorHiddHisSoSum != null">major_hidd_his_so_sum = #{majorHiddHisSoSum},</if>
            <if test="normalHiddHisSoSum != null">normal_hidd_his_so_sum = #{normalHiddHisSoSum},</if>
            <if test="majorHiddSum != null">major_hidd_sum = #{majorHiddSum},</if>
            <if test="normalHiddSum != null">normal_hidd_sum = #{normalHiddSum},</if>
            <if test="mHiddUnsolverSum != null">m_hidd_unsolver_sum = #{mHiddUnsolverSum},</if>
            <if test="mHiddSolvingSum != null">m_hidd_solving_sum = #{mHiddSolvingSum},</if>
            <if test="mHiddOvsolverSum != null">m_hidd_ovsolver_sum = #{mHiddOvsolverSum},</if>
            <if test="mHiddSolveSum != null">m_hidd_solve_sum = #{mHiddSolveSum},</if>
            <if test="nHiddUnsolverSum != null">n_hidd_unsolver_sum = #{nHiddUnsolverSum},</if>
            <if test="nHiddSolvingSum != null">n_hidd_solving_sum = #{nHiddSolvingSum},</if>
            <if test="nHiddOvsolverSum != null">n_hidd_ovsolver_sum = #{nHiddOvsolverSum},</if>
            <if test="nHiddSolveSum != null">n_hidd_solve_sum = #{nHiddSolveSum},</if>
            <if test="hiddRank != null">hidd_rank = #{hiddRank},</if>
        </set>
        where id = #{id}
    </update>
    <delete id="deleteBisHiddAssessRecById" parameterType="Long">
        delete from bis_hidd_assess_rec where id = #{id}
    </delete>
    <delete id="deleteBisHiddAssessRecByIds" parameterType="Long">
        delete from bis_hidd_assess_rec where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
