|
|
@@ -0,0 +1,429 @@
|
|
|
+<?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.SaledownMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.saas.transfers.po.SaleDown" >
|
|
|
+ <id column="sa_id" property="id" jdbcType="INTEGER" />
|
|
|
+ <result column="sa_code" property="sa_code" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_customeruu" property="sa_customeruu" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_custid" property="sa_custid" jdbcType="INTEGER" />
|
|
|
+ <result column="sa_custcode" property="sa_custcode" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_custname" property="sa_custname" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_date" property="sa_date" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="sa_toplace" property="sa_toplace" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_currency" property="sa_currency" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_rate" property="sa_rate" jdbcType="DOUBLE" />
|
|
|
+ <result column="sa_selleruu" property="sa_selleruu" jdbcType="INTEGER" />
|
|
|
+ <result column="sa_sellerid" property="sa_sellerid" jdbcType="INTEGER" />
|
|
|
+ <result column="sa_seller" property="sa_seller" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_sellercode" property="sa_sellercode" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_custcontact" property="sa_custcontact" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_custcontactuu" property="sa_custcontactuu" jdbcType="INTEGER" />
|
|
|
+ <result column="sa_custmobile" property="sa_custmobile" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_pocode" property="sa_pocode" jdbcType="VARCHAR" />
|
|
|
+ <result column="b2b_pu_id" property="b2b_pu_id" jdbcType="INTEGER" />
|
|
|
+ <result column="sa_printstatus" property="sa_printstatus" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_printstatuscode" property="sa_printstatuscode" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_attach" property="sa_attach" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_status" property="sa_status" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_statuscode" property="sa_statuscode" jdbcType="VARCHAR" />
|
|
|
+ <result column="sa_remark" property="sa_remark" jdbcType="VARCHAR" />
|
|
|
+ <result column="companyId" property="companyId" jdbcType="INTEGER" />
|
|
|
+ <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap id="productMap" type="com.usoftchina.saas.document.entities.Product">
|
|
|
+ <id column="pr_id" property="id" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_code" property="pr_code" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_whid" property="pr_whid" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_standardprice" property="pr_standardprice" jdbcType="DOUBLE"/>
|
|
|
+ <result column="pr_purcprice" property="pr_purcprice" jdbcType="DOUBLE"/>
|
|
|
+ <result column="pr_saleprice" property="pr_saleprice" jdbcType="DOUBLE"/>
|
|
|
+ <result column="pr_vendid" property="pr_vendid" jdbcType="INTEGER"/>
|
|
|
+ <result column="pr_vendcode" property="pr_vendcode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_status" property="pr_status" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="companyId" property="companyId" jdbcType="INTEGER"/>
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER"/>
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="pr_text1" property="pr_text1" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_text2" property="pr_text2" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_text3" property="pr_text3" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_text4" property="pr_text4" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_text5" property="pr_text5" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pr_remark" property="pr_remark" jdbcType="VARCHAR"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List" >
|
|
|
+ sa_id, sa_code, sa_customeruu, sa_custid, sa_custcode, sa_custname, sa_date, sa_toplace,
|
|
|
+ sa_currency, sa_rate, sa_selleruu, sa_sellerid, sa_seller, sa_sellercode, sa_custcontact,
|
|
|
+ sa_custcontactuu, sa_custmobile, sa_pocode, b2b_pu_id, sa_printstatus, sa_printstatuscode,
|
|
|
+ sa_attach, sa_status, sa_statuscode, sa_remark, companyId, createTime, creatorId,
|
|
|
+ updateTime, updaterId
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from saledown
|
|
|
+ where sa_id = #{sa_id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
+ delete from saledown
|
|
|
+ where sa_id = #{sa_id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.usoftchina.saas.transfers.po.SaleDown" >
|
|
|
+ insert into saledown (sa_code, sa_customeruu,
|
|
|
+ sa_custid, sa_custcode, sa_custname,
|
|
|
+ sa_date, sa_toplace, sa_currency,
|
|
|
+ sa_rate, sa_selleruu, sa_sellerid,
|
|
|
+ sa_seller, sa_sellercode, sa_custcontact,
|
|
|
+ sa_custcontactuu, sa_custmobile, sa_pocode,
|
|
|
+ b2b_pu_id, sa_printstatus, sa_printstatuscode,
|
|
|
+ sa_attach, sa_status, sa_statuscode,
|
|
|
+ sa_remark, companyId, createTime,
|
|
|
+ creatorId, updateTime, updaterId
|
|
|
+ )
|
|
|
+ values ( #{sa_code,jdbcType=VARCHAR}, #{sa_customeruu,jdbcType=VARCHAR},
|
|
|
+ #{sa_custid,jdbcType=INTEGER}, #{sa_custcode,jdbcType=VARCHAR}, #{sa_custname,jdbcType=VARCHAR},
|
|
|
+ #{sa_date,jdbcType=TIMESTAMP}, #{sa_toplace,jdbcType=VARCHAR}, #{sa_currency,jdbcType=VARCHAR},
|
|
|
+ #{sa_rate,jdbcType=DOUBLE}, #{sa_selleruu,jdbcType=INTEGER}, #{sa_sellerid,jdbcType=INTEGER},
|
|
|
+ #{sa_seller,jdbcType=VARCHAR}, #{sa_sellercode,jdbcType=VARCHAR}, #{sa_custcontact,jdbcType=VARCHAR},
|
|
|
+ #{sa_custcontactuu,jdbcType=INTEGER}, #{sa_custmobile,jdbcType=VARCHAR}, #{sa_pocode,jdbcType=VARCHAR},
|
|
|
+ #{b2b_pu_id,jdbcType=INTEGER}, #{sa_printstatus,jdbcType=VARCHAR}, #{sa_printstatuscode,jdbcType=VARCHAR},
|
|
|
+ #{sa_attach,jdbcType=VARCHAR}, #{sa_status,jdbcType=VARCHAR}, #{sa_statuscode,jdbcType=VARCHAR},
|
|
|
+ #{sa_remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{creatorId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=INTEGER}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.saas.transfers.po.SaleDown" >
|
|
|
+ <selectKey resultType="java.lang.Long" keyProperty="id">
|
|
|
+ SELECT LAST_INSERT_ID() AS ID
|
|
|
+ </selectKey>
|
|
|
+ insert into saledown
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="sa_code != null" >
|
|
|
+ sa_code,
|
|
|
+ </if>
|
|
|
+ <if test="sa_customeruu != null" >
|
|
|
+ sa_customeruu,
|
|
|
+ </if>
|
|
|
+ <if test="sa_custid != null" >
|
|
|
+ sa_custid,
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcode != null" >
|
|
|
+ sa_custcode,
|
|
|
+ </if>
|
|
|
+ <if test="sa_custname != null" >
|
|
|
+ sa_custname,
|
|
|
+ </if>
|
|
|
+ <if test="sa_date != null" >
|
|
|
+ sa_date,
|
|
|
+ </if>
|
|
|
+ <if test="sa_toplace != null" >
|
|
|
+ sa_toplace,
|
|
|
+ </if>
|
|
|
+ <if test="sa_currency != null" >
|
|
|
+ sa_currency,
|
|
|
+ </if>
|
|
|
+ <if test="sa_rate != null" >
|
|
|
+ sa_rate,
|
|
|
+ </if>
|
|
|
+ <if test="sa_selleruu != null" >
|
|
|
+ sa_selleruu,
|
|
|
+ </if>
|
|
|
+ <if test="sa_sellerid != null" >
|
|
|
+ sa_sellerid,
|
|
|
+ </if>
|
|
|
+ <if test="sa_seller != null" >
|
|
|
+ sa_seller,
|
|
|
+ </if>
|
|
|
+ <if test="sa_sellercode != null" >
|
|
|
+ sa_sellercode,
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcontact != null" >
|
|
|
+ sa_custcontact,
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcontactuu != null" >
|
|
|
+ sa_custcontactuu,
|
|
|
+ </if>
|
|
|
+ <if test="sa_custmobile != null" >
|
|
|
+ sa_custmobile,
|
|
|
+ </if>
|
|
|
+ <if test="sa_pocode != null" >
|
|
|
+ sa_pocode,
|
|
|
+ </if>
|
|
|
+ <if test="b2b_pu_id != null" >
|
|
|
+ b2b_pu_id,
|
|
|
+ </if>
|
|
|
+ <if test="sa_printstatus != null" >
|
|
|
+ sa_printstatus,
|
|
|
+ </if>
|
|
|
+ <if test="sa_printstatuscode != null" >
|
|
|
+ sa_printstatuscode,
|
|
|
+ </if>
|
|
|
+ <if test="sa_attach != null" >
|
|
|
+ sa_attach,
|
|
|
+ </if>
|
|
|
+ <if test="sa_status != null" >
|
|
|
+ sa_status,
|
|
|
+ </if>
|
|
|
+ <if test="sa_statuscode != null" >
|
|
|
+ sa_statuscode,
|
|
|
+ </if>
|
|
|
+ <if test="sa_remark != null" >
|
|
|
+ sa_remark,
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null" >
|
|
|
+ companyId,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ createTime,
|
|
|
+ </if>
|
|
|
+ <if test="creatorId != null" >
|
|
|
+ creatorId,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ updateTime,
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ updaterId,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="sa_code != null" >
|
|
|
+ #{sa_code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_customeruu != null" >
|
|
|
+ #{sa_customeruu,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custid != null" >
|
|
|
+ #{sa_custid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcode != null" >
|
|
|
+ #{sa_custcode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custname != null" >
|
|
|
+ #{sa_custname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_date != null" >
|
|
|
+ #{sa_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="sa_toplace != null" >
|
|
|
+ #{sa_toplace,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_currency != null" >
|
|
|
+ #{sa_currency,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_rate != null" >
|
|
|
+ #{sa_rate,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="sa_selleruu != null" >
|
|
|
+ #{sa_selleruu,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_sellerid != null" >
|
|
|
+ #{sa_sellerid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_seller != null" >
|
|
|
+ #{sa_seller,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_sellercode != null" >
|
|
|
+ #{sa_sellercode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcontact != null" >
|
|
|
+ #{sa_custcontact,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcontactuu != null" >
|
|
|
+ #{sa_custcontactuu,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custmobile != null" >
|
|
|
+ #{sa_custmobile,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_pocode != null" >
|
|
|
+ #{sa_pocode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="b2b_pu_id != null" >
|
|
|
+ #{b2b_pu_id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_printstatus != null" >
|
|
|
+ #{sa_printstatus,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_printstatuscode != null" >
|
|
|
+ #{sa_printstatuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_attach != null" >
|
|
|
+ #{sa_attach,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_status != null" >
|
|
|
+ #{sa_status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_statuscode != null" >
|
|
|
+ #{sa_statuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_remark != null" >
|
|
|
+ #{sa_remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null" >
|
|
|
+ #{companyId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="creatorId != null" >
|
|
|
+ #{creatorId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.transfers.po.SaleDown" >
|
|
|
+ update saledown
|
|
|
+ <set >
|
|
|
+ <if test="sa_code != null" >
|
|
|
+ sa_code = #{sa_code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_customeruu != null" >
|
|
|
+ sa_customeruu = #{sa_customeruu,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custid != null" >
|
|
|
+ sa_custid = #{sa_custid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcode != null" >
|
|
|
+ sa_custcode = #{sa_custcode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custname != null" >
|
|
|
+ sa_custname = #{sa_custname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_date != null" >
|
|
|
+ sa_date = #{sa_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="sa_toplace != null" >
|
|
|
+ sa_toplace = #{sa_toplace,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_currency != null" >
|
|
|
+ sa_currency = #{sa_currency,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_rate != null" >
|
|
|
+ sa_rate = #{sa_rate,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="sa_selleruu != null" >
|
|
|
+ sa_selleruu = #{sa_selleruu,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_sellerid != null" >
|
|
|
+ sa_sellerid = #{sa_sellerid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_seller != null" >
|
|
|
+ sa_seller = #{sa_seller,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_sellercode != null" >
|
|
|
+ sa_sellercode = #{sa_sellercode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcontact != null" >
|
|
|
+ sa_custcontact = #{sa_custcontact,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custcontactuu != null" >
|
|
|
+ sa_custcontactuu = #{sa_custcontactuu,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_custmobile != null" >
|
|
|
+ sa_custmobile = #{sa_custmobile,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_pocode != null" >
|
|
|
+ sa_pocode = #{sa_pocode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="b2b_pu_id != null" >
|
|
|
+ b2b_pu_id = #{b2b_pu_id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="sa_printstatus != null" >
|
|
|
+ sa_printstatus = #{sa_printstatus,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_printstatuscode != null" >
|
|
|
+ sa_printstatuscode = #{sa_printstatuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_attach != null" >
|
|
|
+ sa_attach = #{sa_attach,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_status != null" >
|
|
|
+ sa_status = #{sa_status,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_statuscode != null" >
|
|
|
+ sa_statuscode = #{sa_statuscode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sa_remark != null" >
|
|
|
+ sa_remark = #{sa_remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null" >
|
|
|
+ companyId = #{companyId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null" >
|
|
|
+ createTime = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="creatorId != null" >
|
|
|
+ creatorId = #{creatorId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where sa_id = #{sa_id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="findProductBySpec" resultMap="productMap">
|
|
|
+ select * from product where pr_spec=#{spec} and companyid =#{companyid}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List" >
|
|
|
+ insert into saledowndetail (sd_said, sd_detno,sd_code,
|
|
|
+ sd_prodid, sd_prodcode, sd_prodspec,sd_orispeccode,sp_produnit,
|
|
|
+ sd_custorispeccode,sd_custprodcode,sd_custproddetail,sd_custprodspec
|
|
|
+ sd_qty,
|
|
|
+ sd_price, sd_total, sd_taxrate,
|
|
|
+ sd_delivery,
|
|
|
+ sd_remark,
|
|
|
+ companyId,createTime,b2b_pd_id)
|
|
|
+ values
|
|
|
+ <foreach collection="list" item="item" index="index" open="" close="" separator=",">
|
|
|
+ (
|
|
|
+ #{item.sd_said,jdbcType=INTEGER}, #{item.sd_detno,jdbcType=INTEGER},#{item.sd_code,jdbcType=VARCHAR},
|
|
|
+ #{item.sd_prodid,jdbcType=INTEGER}, #{item.sd_prodcode,jdbcType=VARCHAR},
|
|
|
+ #{item.sd_prodspec,jdbcType=VARCHAR},#{item.sd_orispeccode,jdbcType=VARCHAR},#{item.sp_produnit,jdbcType=VARCHAR},
|
|
|
+ #{item.sd_custorispeccode,jdbcType=VARCHAR},#{item.sd_custprodcode,jdbcType=VARCHAR},#{item.sd_custproddetail,jdbcType=VARCHAR},
|
|
|
+ #{item.sd_custprodspec,jdbcType=VARCHAR},
|
|
|
+ #{item.sd_qty,jdbcType=DOUBLE},
|
|
|
+ #{item.sd_price,jdbcType=DOUBLE}, #{item.sd_total,jdbcType=DOUBLE}, #{item.sd_taxrate,jdbcType=DOUBLE},
|
|
|
+ #{item.sd_delivery,jdbcType=TIMESTAMP},
|
|
|
+ #{item.sd_remark,jdbcType=VARCHAR},
|
|
|
+ #{item.companyId,jdbcType=INTEGER},#{item.createTime,jdbcType=TIMESTAMP}, #{item.b2b_pd_id}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="batchUpdateClose">
|
|
|
+ update saledown set sa_status='已关闭', sa_statuscode='CLOSE' where
|
|
|
+ b2b_pd_id in #{data} and companyid =#{companyid}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="batchUpdateResClose">
|
|
|
+ update saledown set sa_status='已审核',sa_statuscode='AUDITED' where
|
|
|
+ b2b_pd_id in #{data} and companyid =#{companyid}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|