|
@@ -0,0 +1,482 @@
|
|
|
|
|
+<?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.sale.mapper.SaledownMapper" >
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.saas.sale.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>
|
|
|
|
|
+
|
|
|
|
|
+ <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="long" >
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
|
+ from saledown
|
|
|
|
|
+ where sa_id = #{sa_id}
|
|
|
|
|
+ </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.sale.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.sale.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.sale.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>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List" >
|
|
|
|
|
+ insert into saledowndetail (sd_said, sd_detno,sd_code,
|
|
|
|
|
+ sd_prodid, sd_prodcode, sd_prodspec,sd_orispeccode,sd_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.sd_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_pu_id in (${data}) and companyid =${companyid}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="batchUpdateResClose">
|
|
|
|
|
+ update saledown set sa_status='已审核',sa_statuscode='AUDITED' where
|
|
|
|
|
+ b2b_pu_id in (${data}) and companyid =${companyid}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <select id="count" parameterType="long" resultType="int">
|
|
|
|
|
+ select count(1) from saledown where B2b_pu_id = #{id}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="detailMap" type="com.usoftchina.saas.sale.po.SaleDownDetail" >
|
|
|
|
|
+ <id column="sd_id" property="id" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="sd_said" property="sd_said" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="sd_code" property="sd_code" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_detno" property="sd_detno" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="b2b_pd_id" property="b2b_pd_id" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="sd_prodid" property="sd_prodid" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="sd_prodcode" property="sd_prodcode" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_prodspec" property="sd_prodspec" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_orispeccode" property="sd_orispeccode" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_custorispeccode" property="sd_custorispeccode" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_custprodcode" property="sd_custprodcode" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_custproddetail" property="sd_custproddetail" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_custprodspec" property="sd_custprodspec" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_produnit" property="sd_produnit" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_qty" property="sd_qty" jdbcType="DOUBLE" />
|
|
|
|
|
+ <result column="sd_price" property="sd_price" jdbcType="DOUBLE" />
|
|
|
|
|
+ <result column="sd_total" property="sd_total" jdbcType="DOUBLE" />
|
|
|
|
|
+ <result column="sd_taxrate" property="sd_taxrate" jdbcType="DOUBLE" />
|
|
|
|
|
+ <result column="sd_costprice" property="sd_costprice" jdbcType="DOUBLE" />
|
|
|
|
|
+ <result column="sd_taxtotal" property="sd_taxtotal" jdbcType="DOUBLE" />
|
|
|
|
|
+ <result column="sd_delivery" property="sd_delivery" jdbcType="TIMESTAMP" />
|
|
|
|
|
+ <result column="sd_remark" property="sd_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" />
|
|
|
|
|
+ <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="Detail_Column_List" >
|
|
|
|
|
+ sd_id, sd_said, sd_code, sd_detno, b2b_pd_id, sd_prodid, sd_prodcode, sd_prodspec,
|
|
|
|
|
+ sd_orispeccode, sd_custorispeccode, sd_custprodcode, sd_custproddetail, sd_custprodspec,
|
|
|
|
|
+ sd_produnit, sd_qty, sd_price, sd_total, sd_taxrate, sd_costprice, sd_taxtotal, sd_delivery,
|
|
|
|
|
+ sd_remark, companyId, createTime, creatorId, updateTime, updaterId, creatorName
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectByFK" parameterType="long" resultMap="detailMap">
|
|
|
|
|
+ select * from saledowndetail where sd_said=#{id}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectListByCon" resultMap="BaseResultMap">
|
|
|
|
|
+ select * from saledown
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="con != null">
|
|
|
|
|
+ ${con}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyId != null">
|
|
|
|
|
+ and companyId = #{companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by sa_id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="batchUpdate" parameterType="com.usoftchina.saas.sale.po.SaleDownDetail">
|
|
|
|
|
+ <foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
|
|
|
|
+ update saledetail <set>
|
|
|
|
|
+ sd_said = #{item.sd_said},
|
|
|
|
|
+ sd_detno = #{item.sd_detno},
|
|
|
|
|
+ sd_prodid = #{item.sd_prodid},
|
|
|
|
|
+ sd_prodcode = #{item.sd_prodcode},
|
|
|
|
|
+ sd_qty = #{item.sd_qty,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_price = #{item.sd_price,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_total = #{item.sd_total,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_taxrate = #{item.sd_taxrate,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_netprice = #{item.sd_netprice,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_nettotal = #{item.sd_nettotal,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_delivery = #{item.sd_delivery,jdbcType=TIMESTAMP},
|
|
|
|
|
+ sd_sendqty = #{item.sd_sendqty,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_pdqty = #{item.sd_pdqty,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_remark = #{item.sd_remark,jdbcType=VARCHAR},
|
|
|
|
|
+ companyId = #{item.companyId,jdbcType=INTEGER},
|
|
|
|
|
+ updaterId = #{item.updaterId,jdbcType=INTEGER},
|
|
|
|
|
+ updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ sd_text1 = #{item.sd_text1,jdbcType=VARCHAR},
|
|
|
|
|
+ sd_text2 = #{item.sd_text2,jdbcType=VARCHAR},
|
|
|
|
|
+ sd_text3 = #{item.sd_text3,jdbcType=VARCHAR},
|
|
|
|
|
+ sd_text4 = #{item.sd_text4,jdbcType=VARCHAR},
|
|
|
|
|
+ sd_text5 = #{item.sd_text5,jdbcType=VARCHAR},
|
|
|
|
|
+ sd_yqty = #{item.sd_yqty,jdbcType=DOUBLE},
|
|
|
|
|
+ sd_code = #{item.sd_code,jdbcType=VARCHAR}
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where sd_id = #{item.id,jdbcType=INTEGER}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </update>
|
|
|
|
|
+</mapper>
|