| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- <?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.transfers.mapper.ApcheckMapper" >
- <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Apcheck" >
- <id column="ac_id" property="id" jdbcType="INTEGER" />
- <result column="ac_b2bid" property="ac_b2bid" jdbcType="INTEGER" />
- <result column="ac_code" property="ac_code" jdbcType="VARCHAR" />
- <result column="ac_date" property="ac_date" jdbcType="TIMESTAMP" />
- <result column="ac_apdate" property="ac_apdate" jdbcType="TIMESTAMP" />
- <result column="ac_fromdate" property="ac_fromdate" jdbcType="TIMESTAMP" />
- <result column="ac_todate" property="ac_todate" jdbcType="TIMESTAMP" />
- <result column="ac_venduu" property="ac_venduu" jdbcType="VARCHAR" />
- <result column="ac_vendid" property="ac_vendid" jdbcType="INTEGER" />
- <result column="ac_vendcode" property="ac_vendcode" jdbcType="VARCHAR" />
- <result column="ac_vendname" property="ac_vendname" jdbcType="VARCHAR" />
- <result column="ac_currency" property="ac_currency" jdbcType="VARCHAR" />
- <result column="ac_rate" property="ac_rate" jdbcType="DOUBLE" />
- <result column="ac_checkamount" property="ac_checkamount" jdbcType="DOUBLE" />
- <result column="ac_confirmstatus" property="ac_confirmstatus" jdbcType="VARCHAR" />
- <result column="ac_confirmstatuscode" property="ac_confirmstatuscode" jdbcType="VARCHAR" />
- <result column="ac_confirmdate" property="ac_confirmdate" jdbcType="TIMESTAMP" />
- <result column="ac_remark" property="ac_remark" jdbcType="VARCHAR" />
- <result column="ac_sendstatus" property="ac_sendstatus" jdbcType="VARCHAR" />
- <result column="ac_thisamount" property="ac_thisamount" jdbcType="DOUBLE" />
- <result column="ac_thisuncheck" property="ac_thisuncheck" jdbcType="DOUBLE" />
- <result column="ac_thispay" property="ac_thispay" jdbcType="DOUBLE" />
- <result column="ac_thissend" property="ac_thissend" jdbcType="DOUBLE" />
- <result column="ac_thischeck" property="ac_thischeck" jdbcType="DOUBLE" />
- <result column="ac_payamont" property="ac_payamont" jdbcType="DOUBLE" />
- <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
- <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
- <result column="companyId" property="companyId" jdbcType="BIGINT" />
- <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
- <result column="updaterName" property="updaterName" jdbcType="VARCHAR" />
- <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
- </resultMap>
- <resultMap id="detailMap" type="com.usoftchina.saas.money.po.ApcheckDetail">
- <id column="ad_id" property="id" jdbcType="INTEGER" />
- <result column="ad_acid" property="ad_acid" jdbcType="INTEGER" />
- <result column="ad_detno" property="ad_detno" jdbcType="INTEGER" />
- <result column="ad_inoutno" property="ad_inoutno" jdbcType="VARCHAR" />
- <result column="ad_pdno" property="ad_pdno" jdbcType="INTEGER" />
- <result column="ad_prodcode" property="ad_prodcode" jdbcType="VARCHAR" />
- <result column="ad_pucode" property="ad_pucode" jdbcType="VARCHAR" />
- <result column="ad_price" property="ad_price" jdbcType="DOUBLE" />
- <result column="ad_taxrate" property="ad_taxrate" jdbcType="DOUBLE" />
- <result column="ad_b2bqty" property="ad_b2bqty" jdbcType="DOUBLE" />
- <result column="companyId" property="companyId" jdbcType="BIGINT" />
- <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
- <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
- <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List" >
- ac_id, ac_b2bid, ac_code, ac_date, ac_apdate, ac_fromdate, ac_todate, ac_venduu,
- ac_vendid, ac_vendcode, ac_vendname, ac_currency, ac_rate, ac_checkamount, ac_confirmstatus,
- ac_confirmstatuscode, ac_confirmdate, ac_remark, ac_sendstatus, ac_thisamount, ac_thisuncheck,
- ac_thispay, ac_thissend, ac_thischeck, ac_payamont, creatorId, creatorName, companyId,
- updaterId, updaterName, createTime
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from apcheck
- where ac_id = #{ac_id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from apcheck
- where ac_id = #{ac_id,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Apcheck" >
- <selectKey resultType="java.lang.Long" keyProperty="id">
- SELECT LAST_INSERT_ID() AS ID
- </selectKey>
- insert into apcheck
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="ac_b2bid != null" >
- ac_b2bid,
- </if>
- <if test="ac_code != null" >
- ac_code,
- </if>
- <if test="ac_date != null" >
- ac_date,
- </if>
- <if test="ac_apdate != null" >
- ac_apdate,
- </if>
- <if test="ac_fromdate != null" >
- ac_fromdate,
- </if>
- <if test="ac_todate != null" >
- ac_todate,
- </if>
- <if test="ac_venduu != null" >
- ac_venduu,
- </if>
- <if test="ac_vendid != null" >
- ac_vendid,
- </if>
- <if test="ac_vendcode != null" >
- ac_vendcode,
- </if>
- <if test="ac_vendname != null" >
- ac_vendname,
- </if>
- <if test="ac_currency != null" >
- ac_currency,
- </if>
- <if test="ac_rate != null" >
- ac_rate,
- </if>
- <if test="ac_checkamount != null" >
- ac_checkamount,
- </if>
- <if test="ac_confirmstatus != null" >
- ac_confirmstatus,
- </if>
- <if test="ac_confirmstatuscode != null" >
- ac_confirmstatuscode,
- </if>
- <if test="ac_confirmdate != null" >
- ac_confirmdate,
- </if>
- <if test="ac_remark != null" >
- ac_remark,
- </if>
- <if test="ac_sendstatus != null" >
- ac_sendstatus,
- </if>
- <if test="ac_thisamount != null" >
- ac_thisamount,
- </if>
- <if test="ac_thisuncheck != null" >
- ac_thisuncheck,
- </if>
- <if test="ac_thispay != null" >
- ac_thispay,
- </if>
- <if test="ac_thissend != null" >
- ac_thissend,
- </if>
- <if test="ac_thischeck != null" >
- ac_thischeck,
- </if>
- <if test="ac_payamont != null" >
- ac_payamont,
- </if>
- <if test="creatorId != null" >
- creatorId,
- </if>
- <if test="creatorName != null" >
- creatorName,
- </if>
- <if test="companyId != null" >
- companyId,
- </if>
- <if test="updaterId != null" >
- updaterId,
- </if>
- <if test="updaterName != null" >
- updaterName,
- </if>
- <if test="createTime != null" >
- createTime,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="ac_b2bid != null" >
- #{ac_b2bid,jdbcType=INTEGER},
- </if>
- <if test="ac_code != null" >
- #{ac_code,jdbcType=VARCHAR},
- </if>
- <if test="ac_date != null" >
- #{ac_date,jdbcType=TIMESTAMP},
- </if>
- <if test="ac_apdate != null" >
- #{ac_apdate,jdbcType=TIMESTAMP},
- </if>
- <if test="ac_fromdate != null" >
- #{ac_fromdate,jdbcType=TIMESTAMP},
- </if>
- <if test="ac_todate != null" >
- #{ac_todate,jdbcType=TIMESTAMP},
- </if>
- <if test="ac_venduu != null" >
- #{ac_venduu,jdbcType=VARCHAR},
- </if>
- <if test="ac_vendid != null" >
- #{ac_vendid,jdbcType=INTEGER},
- </if>
- <if test="ac_vendcode != null" >
- #{ac_vendcode,jdbcType=VARCHAR},
- </if>
- <if test="ac_vendname != null" >
- #{ac_vendname,jdbcType=VARCHAR},
- </if>
- <if test="ac_currency != null" >
- #{ac_currency,jdbcType=VARCHAR},
- </if>
- <if test="ac_rate != null" >
- #{ac_rate,jdbcType=DOUBLE},
- </if>
- <if test="ac_checkamount != null" >
- #{ac_checkamount,jdbcType=DOUBLE},
- </if>
- <if test="ac_confirmstatus != null" >
- #{ac_confirmstatus,jdbcType=VARCHAR},
- </if>
- <if test="ac_confirmstatuscode != null" >
- #{ac_confirmstatuscode,jdbcType=VARCHAR},
- </if>
- <if test="ac_confirmdate != null" >
- #{ac_confirmdate,jdbcType=TIMESTAMP},
- </if>
- <if test="ac_remark != null" >
- #{ac_remark,jdbcType=VARCHAR},
- </if>
- <if test="ac_sendstatus != null" >
- #{ac_sendstatus,jdbcType=VARCHAR},
- </if>
- <if test="ac_thisamount != null" >
- #{ac_thisamount,jdbcType=DOUBLE},
- </if>
- <if test="ac_thisuncheck != null" >
- #{ac_thisuncheck,jdbcType=DOUBLE},
- </if>
- <if test="ac_thispay != null" >
- #{ac_thispay,jdbcType=DOUBLE},
- </if>
- <if test="ac_thissend != null" >
- #{ac_thissend,jdbcType=DOUBLE},
- </if>
- <if test="ac_thischeck != null" >
- #{ac_thischeck,jdbcType=DOUBLE},
- </if>
- <if test="ac_payamont != null" >
- #{ac_payamont,jdbcType=DOUBLE},
- </if>
- <if test="creatorId != null" >
- #{creatorId,jdbcType=INTEGER},
- </if>
- <if test="creatorName != null" >
- #{creatorName,jdbcType=VARCHAR},
- </if>
- <if test="companyId != null" >
- #{companyId,jdbcType=BIGINT},
- </if>
- <if test="updaterId != null" >
- #{updaterId,jdbcType=INTEGER},
- </if>
- <if test="updaterName != null" >
- #{updaterName,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <insert id="batchInsert" parameterType="java.util.List" >
- insert into apcheckdetail (ad_acid, ad_detno,
- ad_inoutno, ad_pdno, ad_prodcode,
- ad_pucode, ad_price, ad_taxrate,
- ad_b2bqty, companyId, createTime,
- creatorId, creatorName)
- values
- <foreach collection="list" item="item" index="index" open="" close="" separator=",">
- (
- #{item.ad_acid}, #{item.ad_detno,jdbcType=INTEGER},
- #{item.ad_inoutno,jdbcType=VARCHAR}, #{item.ad_pdno,jdbcType=INTEGER}, #{item.ad_prodcode,jdbcType=VARCHAR},
- #{item.ad_pucode,jdbcType=VARCHAR}, #{item.ad_price,jdbcType=DOUBLE}, #{item.ad_taxrate,jdbcType=DOUBLE},
- #{item.ad_b2bqty,jdbcType=DOUBLE}, #{item.companyId,jdbcType=BIGINT}, #{item.createTime,jdbcType=TIMESTAMP},
- #{item.creatorId,jdbcType=INTEGER}, #{item.creatorName,jdbcType=VARCHAR}
- )
- </foreach>
- </insert>
- <resultMap id="vendorMap" type="com.usoftchina.saas.document.entities.Vendor">
- <result column="ve_code" property="ve_code" jdbcType="VARCHAR" />
- <result column="ve_shortname" property="ve_shortname" jdbcType="VARCHAR"/>
- <result column="ve_uu" property="ve_uu" jdbcType="VARCHAR" />
- <result column="ve_name" property="ve_name" jdbcType="VARCHAR" />
- <result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
- <result column="ve_begindate" property="ve_begindate" jdbcType="TIMESTAMP" />
- <result column="ve_beginapamount" property="ve_beginapamount" jdbcType="DOUBLE" />
- <result column="ve_beginprepayamount" property="ve_beginprepayamount" jdbcType="DOUBLE" />
- <result column="ve_promisedays" property="ve_promisedays" jdbcType="INTEGER" />
- <result column="ve_taxrate" property="ve_taxrate" jdbcType="DOUBLE" />
- <result column="ve_nsrzh" property="ve_nsrzh" jdbcType="VARCHAR" />
- <result column="ve_bankaccount" property="ve_bankaccount" jdbcType="VARCHAR" />
- <result column="ve_bankcode" property="ve_bankcode" jdbcType="VARCHAR" />
- <result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
- <result column="ve_statuscode" property="ve_statuscode" jdbcType="VARCHAR" />
- <result column="companyId" property="companyId" jdbcType="INTEGER" />
- <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
- <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
- <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
- <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
- <result column="ve_text4" property="ve_text4" jdbcType="VARCHAR" />
- <result column="ve_text5" property="ve_text5" jdbcType="VARCHAR" />
- <result column="ve_payamount" property="ve_payamount" jdbcType="DOUBLE" />
- <result column="ve_leftamount" property="ve_leftamount" jdbcType="DOUBLE" />
- <result column="ve_beginym" property="ve_beginym" jdbcType="INTEGER" />
- <result column="ve_preamount" property="ve_preamount" jdbcType="DOUBLE" />
- <result column="ve_remark" property="ve_remark" jdbcType="VARCHAR" />
- <result column="ve_address" property="ve_address" jdbcType="VARCHAR" />
- <result column="ve_currency" property="ve_currency" jdbcType="VARCHAR" />
- </resultMap>
- <select id="getVendorByuu" resultMap="vendorMap">
- select * from vendor where ve_uu=#{uu} and companyid=#{companyid}
- </select>
- <select id="count" parameterType="long" resultType="int">
- select count(1) from apcheck where ac_b2bid=#{id}
- </select>
- </mapper>
|