<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//oos.juyouhx.com//DTD Mapper 3.0//EN" "http://oss.juyouhx.com/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.scpyun.platform.standard.jilinsscgsdp.importErrorExecl" name="execl导入业务">
    <insert id="saveErrorExeclInfo" parameterType="map">
        INSERT INTO jl_import_error_execl
        (
        job_id,
        garden_name,
        residential_name,
        building_name,
        unit_name,
        floor_num,
        doorplate_num,
        user_name,
        sex,
        folk,
        cardno,
        political_outlook,
        living_condition,
        tel,
        hj_address,
        now_address,
        relation,
        juzhu_type,
        huji_type,
        user_type,
        key_focus_personnel_type,
        remarks,
        error_reason,
        error_reason_detail,
        create_time
        )
        VALUES
        (
        #{jobId},
        #{gardenName},
        #{residentialName},
        #{buildingName},
        #{unitName},
        #{floorNum},
        #{doorplateNum},
        #{userName},
        #{sex},
        #{folk},
        TO_BASE64(AES_ENCRYPT(upper(#{cardno}),'*#id#')),
        #{politicalOutlook},
        #{livingCondition},
        #{tel},
        #{hjAddress},
        #{nowAddress},
        #{relation},
        #{juzhuType},
        #{hujiType},
        #{userType},
        #{keyFocusPersonnelType},
        #{remarks},
        #{errorReason},
        #{errorReasonDetail},
        #{createTime}
        )
    </insert>
    <select id="getErreExecl" parameterType="string" resultType="map">
        SELECT
        garden_name gardenName,
        residential_name residentialName,
        building_name buildingName,
        unit_name unitName,
        floor_num floorNum,
        doorplate_num doorplateNum,
        user_name userName,
        sex  sex,
        folk folk,
        CAST(AES_DECRYPT(FROM_BASE64(jgu.cardno),'*#id#') AS CHAR) cardno,
        political_outlook politicalOutlook,
        living_condition livingCondition,
        tel tel,
        hj_address hjAddress,
        now_address nowAddress,
        relation relation,
        juzhu_type juzhuType,
        huji_type hujiType,
        user_type userType,
        key_focus_personnel_type keyFocusPersonnelType,
        remarks remarks,
        error_reason errorReason
        FROM jl_import_error_execl
        where job_id = #{jobId}
    </select>
</mapper>
