|
@@ -32,6 +32,8 @@
|
|
|
<result column="creatorId" property="creatorId" jdbcType="INTEGER" />
|
|
<result column="creatorId" property="creatorId" jdbcType="INTEGER" />
|
|
|
<result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
<result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
<result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="sa_salecode" property="sa_salecode" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sa_sendstatus" property="sa_sendstatus" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
<sql id="Base_Column_List" >
|
|
@@ -350,7 +352,7 @@
|
|
|
updaterId = #{updaterId,jdbcType=INTEGER},
|
|
updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
</set>
|
|
</set>
|
|
|
- where sa_id = #{sa_id,jdbcType=INTEGER}
|
|
|
|
|
|
|
+ where sa_id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
<insert id="batchInsert" parameterType="java.util.List" >
|
|
<insert id="batchInsert" parameterType="java.util.List" >
|
|
@@ -423,6 +425,8 @@
|
|
|
<result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
<result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
<result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
<result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
|
|
<result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_proddetail" property="sd_proddetail" jdbcType="VARCHAR" />
|
|
|
|
|
+ <result column="sd_proddetail" property="sd_proddetail" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Detail_Column_List" >
|
|
<sql id="Detail_Column_List" >
|
|
|
sd_id, sd_said, sd_code, sd_detno, b2b_pd_id, sd_prodid, sd_prodcode, sd_prodspec,
|
|
sd_id, sd_said, sd_code, sd_detno, b2b_pd_id, sd_prodid, sd_prodcode, sd_prodspec,
|
|
@@ -432,11 +436,12 @@
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectByFK" parameterType="long" resultMap="detailMap">
|
|
<select id="selectByFK" parameterType="long" resultMap="detailMap">
|
|
|
- select * from saledowndetail where sd_said=#{id}
|
|
|
|
|
|
|
+ select saledowndetail.*, pr_detail sd_proddetail, pr_brand sd_prodbrand from saledowndetail left join product on sd_prodid = pr_id where sd_said=#{id}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectListByCon" resultMap="BaseResultMap">
|
|
<select id="selectListByCon" resultMap="BaseResultMap">
|
|
|
- select * from saledown
|
|
|
|
|
|
|
+ select * from
|
|
|
|
|
+ (select saledown.*,sale.sa_sendstatus from saledown left join sale on sa_saleid = sale.sa_id)tab_
|
|
|
<where>
|
|
<where>
|
|
|
<if test="con != null">
|
|
<if test="con != null">
|
|
|
${con}
|
|
${con}
|
|
@@ -450,31 +455,12 @@
|
|
|
|
|
|
|
|
<update id="batchUpdate" parameterType="com.usoftchina.saas.sale.po.SaleDownDetail">
|
|
<update id="batchUpdate" parameterType="com.usoftchina.saas.sale.po.SaleDownDetail">
|
|
|
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
|
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
|
|
- update saledetail <set>
|
|
|
|
|
- sd_said = #{item.sd_said},
|
|
|
|
|
- sd_detno = #{item.sd_detno},
|
|
|
|
|
|
|
+ update saledowndetail <set>
|
|
|
sd_prodid = #{item.sd_prodid},
|
|
sd_prodid = #{item.sd_prodid},
|
|
|
sd_prodcode = #{item.sd_prodcode},
|
|
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},
|
|
sd_remark = #{item.sd_remark,jdbcType=VARCHAR},
|
|
|
companyId = #{item.companyId,jdbcType=INTEGER},
|
|
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}
|
|
|
|
|
|
|
+ updateTime = now()
|
|
|
</set>
|
|
</set>
|
|
|
where sd_id = #{item.id,jdbcType=INTEGER}
|
|
where sd_id = #{item.id,jdbcType=INTEGER}
|
|
|
</foreach>
|
|
</foreach>
|