| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <?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.usoftchina.saas.document.mapper.DataImportMapper" >
- <resultMap id="DetailMap" type="com.usoftchina.saas.commons.po.DataImportDetail" >
- <id column="dd_id" property="dd_id" jdbcType="INTEGER" />
- <result column="dd_maindata" property="dd_maindata" jdbcType="VARCHAR" />
- <result column="dd_detno" property="dd_detno" jdbcType="INTEGER" />
- <result column="dd_diid" property="dd_diid" jdbcType="INTEGER" />
- <result column="dd_checked" property="dd_checked" jdbcType="INTEGER" />
- <result column="dd_success" property="dd_success" jdbcType="INTEGER" />
- <result column="dd_toformal" property="dd_toformal" jdbcType="INTEGER" />
- <result column="companyid" property="companyid" jdbcType="INTEGER" />
- <result column="dd_detaildata" property="dd_detaildata" jdbcType="VARCHAR" />
- <result column="dd_codevalue" property="dd_codevalue" jdbcType="VARCHAR" />
- </resultMap>
- <delete id="deleteByCaller">
- delete from data_import where di_caller=#{caller} and companyid=#{companyid} and
- il_toformal=0 and il_result is not null
- </delete>
- <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.DataImport" >
- <selectKey resultType="java.lang.Integer" keyProperty="di_id">
- SELECT LAST_INSERT_ID() AS ID
- </selectKey>
- insert into data_import
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="di_caller != null" >
- di_caller,
- </if>
- <if test="companyid != null" >
- companyid,
- </if>
- <if test="di_date != null" >
- di_date,
- </if>
- <if test="di_count != null" >
- di_count,
- </if>
- <if test="di_result != null" >
- di_result,
- </if>
- <if test="di_success != null" >
- di_success,
- </if>
- <if test="di_man != null" >
- di_man,
- </if>
- <if test="di_toformal != null" >
- di_toformal,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="di_caller != null" >
- #{di_caller,jdbcType=VARCHAR},
- </if>
- <if test="companyid != null" >
- #{companyid,jdbcType=INTEGER},
- </if>
- <if test="di_date != null" >
- #{di_date,jdbcType=TIMESTAMP},
- </if>
- <if test="di_count != null" >
- #{di_count,jdbcType=INTEGER},
- </if>
- <if test="di_result != null" >
- #{di_result,jdbcType=VARCHAR},
- </if>
- <if test="di_success != null" >
- #{di_success,jdbcType=INTEGER},
- </if>
- <if test="di_man != null" >
- #{di_man,jdbcType=VARCHAR},
- </if>
- <if test="di_toformal != null" >
- #{di_toformal,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateErr" >
- update data_import
- set
- di_result = #{err},
- di_success = 0,
- where di_id = #{id}
- </update>
- <select id="selectDataById" resultMap="DetailMap">
- select * from data_importdetail
- where dd_diid = #{id}
- </select>
- <select id="selectMainBycode" resultMap="DetailMap">
- select * from data_importdetail
- where dd_codevalue = #{code} and dd_diid=#{id} and ifnull(dd_success,0)=0 and ifnull(dd_maindata,'')!='' and companyid=#{companyid}
- </select>
- <select id="selectMainOnly" resultMap="DetailMap">
- select * from data_importdetail
- where dd_diid=#{id} and ifnull(dd_success,0)=0 and ifnull(dd_maindata,'')!='' and companyid=#{companyid}
- </select>
- <update id="updateDataImport" parameterType="integer">
- update data_import set di_toformal=1,di_success=1 where di_id=#{id}
- </update>
- <update id="updateDataImportError">
- update data_import set di_toformal=1,di_result=#{err} where di_id=#{id}
- </update>
- </mapper>
|