|
|
@@ -2,11 +2,6 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.goafanti.common.dao.TOrderMidMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderMid">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
<result column="salesman_id" jdbcType="VARCHAR" property="salesmanId" />
|
|
|
@@ -20,168 +15,46 @@
|
|
|
<result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
|
|
|
<result column="order_receivables" jdbcType="DECIMAL" property="orderReceivables" />
|
|
|
<result column="order_arrears" jdbcType="DECIMAL" property="orderArrears" />
|
|
|
+ <result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
|
|
|
<result column="cost_amount" jdbcType="DECIMAL" property="costAmount" />
|
|
|
<result column="dep_name" jdbcType="VARCHAR" property="depName" />
|
|
|
- <result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
|
|
|
+ <result column="province_name" jdbcType="VARCHAR" property="provinceName" />
|
|
|
+ <result column="legal_affairs" jdbcType="INTEGER" property="legalAffairs" />
|
|
|
</resultMap>
|
|
|
- <sql id="Example_Where_Clause">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
- <where>
|
|
|
- <foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
- <if test="criteria.valid">
|
|
|
- <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
- <foreach collection="criteria.criteria" item="criterion">
|
|
|
- <choose>
|
|
|
- <when test="criterion.noValue">
|
|
|
- and ${criterion.condition}
|
|
|
- </when>
|
|
|
- <when test="criterion.singleValue">
|
|
|
- and ${criterion.condition} #{criterion.value}
|
|
|
- </when>
|
|
|
- <when test="criterion.betweenValue">
|
|
|
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
- </when>
|
|
|
- <when test="criterion.listValue">
|
|
|
- and ${criterion.condition}
|
|
|
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
- #{listItem}
|
|
|
- </foreach>
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- </if>
|
|
|
- </foreach>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
- <sql id="Update_By_Example_Where_Clause">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
- <where>
|
|
|
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
- <if test="criteria.valid">
|
|
|
- <trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
- <foreach collection="criteria.criteria" item="criterion">
|
|
|
- <choose>
|
|
|
- <when test="criterion.noValue">
|
|
|
- and ${criterion.condition}
|
|
|
- </when>
|
|
|
- <when test="criterion.singleValue">
|
|
|
- and ${criterion.condition} #{criterion.value}
|
|
|
- </when>
|
|
|
- <when test="criterion.betweenValue">
|
|
|
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
- </when>
|
|
|
- <when test="criterion.listValue">
|
|
|
- and ${criterion.condition}
|
|
|
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
- #{listItem}
|
|
|
- </foreach>
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </foreach>
|
|
|
- </trim>
|
|
|
- </if>
|
|
|
- </foreach>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
<sql id="Base_Column_List">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
id, order_no, salesman_id, finance_id, salesman_name, finance_name, final_receivables,
|
|
|
final_Receivables_time, invoice_amount, create_time, buyer_name, order_receivables,
|
|
|
- order_arrears, cost_amount, dep_name, payment_amount
|
|
|
+ order_arrears, payment_amount, cost_amount, dep_name, province_name, legal_affairs
|
|
|
</sql>
|
|
|
- <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderMidExample" resultMap="BaseResultMap">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
- select
|
|
|
- <if test="distinct">
|
|
|
- distinct
|
|
|
- </if>
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from t_order_mid
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- <if test="orderByClause != null">
|
|
|
- order by ${orderByClause}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from t_order_mid
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
delete from t_order_mid
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderMidExample">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
- delete from t_order_mid
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </delete>
|
|
|
- <insert id="insert" parameterType="com.goafanti.common.model.TOrderMid">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
- insert into t_order_mid (id, order_no, salesman_id,
|
|
|
- finance_id, salesman_name, finance_name,
|
|
|
- final_receivables, final_Receivables_time,
|
|
|
- invoice_amount, create_time, buyer_name,
|
|
|
- order_receivables, order_arrears, cost_amount,
|
|
|
- dep_name, payment_amount)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR},
|
|
|
- #{financeId,jdbcType=VARCHAR}, #{salesmanName,jdbcType=VARCHAR}, #{financeName,jdbcType=VARCHAR},
|
|
|
- #{finalReceivables,jdbcType=DECIMAL}, #{finalReceivablesTime,jdbcType=TIMESTAMP},
|
|
|
- #{invoiceAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{buyerName,jdbcType=VARCHAR},
|
|
|
- #{orderReceivables,jdbcType=DECIMAL}, #{orderArrears,jdbcType=DECIMAL}, #{costAmount,jdbcType=DECIMAL},
|
|
|
- #{depName,jdbcType=VARCHAR}, #{paymentAmount,jdbcType=DECIMAL})
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderMid" useGeneratedKeys="true">
|
|
|
+ insert into t_order_mid (order_no, salesman_id, finance_id,
|
|
|
+ salesman_name, finance_name, final_receivables,
|
|
|
+ final_Receivables_time, invoice_amount,
|
|
|
+ create_time, buyer_name, order_receivables,
|
|
|
+ order_arrears, payment_amount, cost_amount,
|
|
|
+ dep_name, province_name, legal_affairs
|
|
|
+ )
|
|
|
+ values (#{orderNo,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR},
|
|
|
+ #{salesmanName,jdbcType=VARCHAR}, #{financeName,jdbcType=VARCHAR}, #{finalReceivables,jdbcType=DECIMAL},
|
|
|
+ #{finalReceivablesTime,jdbcType=TIMESTAMP}, #{invoiceAmount,jdbcType=DECIMAL},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{buyerName,jdbcType=VARCHAR}, #{orderReceivables,jdbcType=DECIMAL},
|
|
|
+ #{orderArrears,jdbcType=DECIMAL}, #{paymentAmount,jdbcType=DECIMAL}, #{costAmount,jdbcType=DECIMAL},
|
|
|
+ #{depName,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR}, #{legalAffairs,jdbcType=INTEGER}
|
|
|
+ )
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderMid">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderMid" useGeneratedKeys="true">
|
|
|
insert into t_order_mid
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
<if test="orderNo != null">
|
|
|
order_no,
|
|
|
</if>
|
|
|
@@ -218,20 +91,23 @@
|
|
|
<if test="orderArrears != null">
|
|
|
order_arrears,
|
|
|
</if>
|
|
|
+ <if test="paymentAmount != null">
|
|
|
+ payment_amount,
|
|
|
+ </if>
|
|
|
<if test="costAmount != null">
|
|
|
cost_amount,
|
|
|
</if>
|
|
|
<if test="depName != null">
|
|
|
dep_name,
|
|
|
</if>
|
|
|
- <if test="paymentAmount != null">
|
|
|
- payment_amount,
|
|
|
+ <if test="provinceName != null">
|
|
|
+ province_name,
|
|
|
+ </if>
|
|
|
+ <if test="legalAffairs != null">
|
|
|
+ legal_affairs,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
<if test="orderNo != null">
|
|
|
#{orderNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -268,122 +144,24 @@
|
|
|
<if test="orderArrears != null">
|
|
|
#{orderArrears,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="paymentAmount != null">
|
|
|
+ #{paymentAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
<if test="costAmount != null">
|
|
|
#{costAmount,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="depName != null">
|
|
|
#{depName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="paymentAmount != null">
|
|
|
- #{paymentAmount,jdbcType=DECIMAL},
|
|
|
+ <if test="provinceName != null">
|
|
|
+ #{provinceName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="legalAffairs != null">
|
|
|
+ #{legalAffairs,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <select id="countByExample" parameterType="com.goafanti.common.model.TOrderMidExample" resultType="java.lang.Long">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
- select count(*) from t_order_mid
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <update id="updateByExampleSelective" parameterType="map">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
- update t_order_mid
|
|
|
- <set>
|
|
|
- <if test="record.id != null">
|
|
|
- id = #{record.id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.orderNo != null">
|
|
|
- order_no = #{record.orderNo,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.salesmanId != null">
|
|
|
- salesman_id = #{record.salesmanId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.financeId != null">
|
|
|
- finance_id = #{record.financeId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.salesmanName != null">
|
|
|
- salesman_name = #{record.salesmanName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.financeName != null">
|
|
|
- finance_name = #{record.financeName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.finalReceivables != null">
|
|
|
- final_receivables = #{record.finalReceivables,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="record.finalReceivablesTime != null">
|
|
|
- final_Receivables_time = #{record.finalReceivablesTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="record.invoiceAmount != null">
|
|
|
- invoice_amount = #{record.invoiceAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="record.createTime != null">
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="record.buyerName != null">
|
|
|
- buyer_name = #{record.buyerName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.orderReceivables != null">
|
|
|
- order_receivables = #{record.orderReceivables,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="record.orderArrears != null">
|
|
|
- order_arrears = #{record.orderArrears,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="record.costAmount != null">
|
|
|
- cost_amount = #{record.costAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="record.depName != null">
|
|
|
- dep_name = #{record.depName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.paymentAmount != null">
|
|
|
- payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </update>
|
|
|
- <update id="updateByExample" parameterType="map">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
- update t_order_mid
|
|
|
- set id = #{record.id,jdbcType=INTEGER},
|
|
|
- order_no = #{record.orderNo,jdbcType=VARCHAR},
|
|
|
- salesman_id = #{record.salesmanId,jdbcType=VARCHAR},
|
|
|
- finance_id = #{record.financeId,jdbcType=VARCHAR},
|
|
|
- salesman_name = #{record.salesmanName,jdbcType=VARCHAR},
|
|
|
- finance_name = #{record.financeName,jdbcType=VARCHAR},
|
|
|
- final_receivables = #{record.finalReceivables,jdbcType=DECIMAL},
|
|
|
- final_Receivables_time = #{record.finalReceivablesTime,jdbcType=TIMESTAMP},
|
|
|
- invoice_amount = #{record.invoiceAmount,jdbcType=DECIMAL},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- buyer_name = #{record.buyerName,jdbcType=VARCHAR},
|
|
|
- order_receivables = #{record.orderReceivables,jdbcType=DECIMAL},
|
|
|
- order_arrears = #{record.orderArrears,jdbcType=DECIMAL},
|
|
|
- cost_amount = #{record.costAmount,jdbcType=DECIMAL},
|
|
|
- dep_name = #{record.depName,jdbcType=VARCHAR},
|
|
|
- payment_amount = #{record.paymentAmount,jdbcType=DECIMAL}
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderMid">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
update t_order_mid
|
|
|
<set>
|
|
|
<if test="orderNo != null">
|
|
|
@@ -422,24 +200,25 @@
|
|
|
<if test="orderArrears != null">
|
|
|
order_arrears = #{orderArrears,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="paymentAmount != null">
|
|
|
+ payment_amount = #{paymentAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
<if test="costAmount != null">
|
|
|
cost_amount = #{costAmount,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="depName != null">
|
|
|
dep_name = #{depName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="paymentAmount != null">
|
|
|
- payment_amount = #{paymentAmount,jdbcType=DECIMAL},
|
|
|
+ <if test="provinceName != null">
|
|
|
+ province_name = #{provinceName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="legalAffairs != null">
|
|
|
+ legal_affairs = #{legalAffairs,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderMid">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 23 11:31:19 CST 2020.
|
|
|
- -->
|
|
|
update t_order_mid
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
salesman_id = #{salesmanId,jdbcType=VARCHAR},
|
|
|
@@ -453,13 +232,15 @@
|
|
|
buyer_name = #{buyerName,jdbcType=VARCHAR},
|
|
|
order_receivables = #{orderReceivables,jdbcType=DECIMAL},
|
|
|
order_arrears = #{orderArrears,jdbcType=DECIMAL},
|
|
|
+ payment_amount = #{paymentAmount,jdbcType=DECIMAL},
|
|
|
cost_amount = #{costAmount,jdbcType=DECIMAL},
|
|
|
dep_name = #{depName,jdbcType=VARCHAR},
|
|
|
- payment_amount = #{paymentAmount,jdbcType=DECIMAL}
|
|
|
+ province_name = #{provinceName,jdbcType=VARCHAR},
|
|
|
+ legal_affairs = #{legalAffairs,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="selectByOrderNo" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from t_order_mid
|
|
|
where order_no = #{id,jdbcType=INTEGER}
|
|
|
@@ -478,10 +259,10 @@
|
|
|
where order_no= #{orderNo}
|
|
|
</update>
|
|
|
<update id="updateInvoice">
|
|
|
- update t_order_mid m,(select order_no,sum(amount)amount from t_order_invoice where status=2 group by order_no)b
|
|
|
- set m.invoice_amount=b.amount where m.order_no= #{orderNo} and m.order_no=b.order_no
|
|
|
+ update t_order_mid m,(select order_no,sum(amount)amount from t_order_invoice where status=2 group by order_no)b
|
|
|
+ set m.invoice_amount=b.amount where m.order_no= #{orderNo} and m.order_no=b.order_no
|
|
|
</update>
|
|
|
- <update id="addOrderReceivables">
|
|
|
+ <update id="addOrderReceivables">
|
|
|
update t_order_mid set order_receivables=order_receivables+#{money},
|
|
|
order_arrears=order_arrears+#{money}
|
|
|
where order_no=#{orderNo}
|
|
|
@@ -489,8 +270,8 @@
|
|
|
<select id="selectDepNameByDepid" resultType="java.lang.String">
|
|
|
select name from department where id= #{orderDep}
|
|
|
</select>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<update id="updateCostAmount">
|
|
|
update t_order_task a ,t_order_mid b
|
|
|
<set>
|
|
|
@@ -503,7 +284,7 @@
|
|
|
</set>
|
|
|
where a.order_no=b.order_no and a.id= #{tid}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<update id="updateAddCostAmount">
|
|
|
update t_order_task a ,t_order_mid b
|
|
|
<set>
|
|
|
@@ -513,5 +294,60 @@
|
|
|
</set>
|
|
|
where a.order_no=b.order_no and a.id= #{tid}
|
|
|
</update>
|
|
|
-
|
|
|
+ <update id="updateByOrderNo">
|
|
|
+ update t_order_mid
|
|
|
+ <set>
|
|
|
+
|
|
|
+ <if test="salesmanId != null">
|
|
|
+ salesman_id = #{salesmanId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="financeId != null">
|
|
|
+ finance_id = #{financeId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="salesmanName != null">
|
|
|
+ salesman_name = #{salesmanName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="financeName != null">
|
|
|
+ finance_name = #{financeName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="finalReceivables != null">
|
|
|
+ final_receivables = #{finalReceivables,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="finalReceivablesTime != null">
|
|
|
+ final_Receivables_time = #{finalReceivablesTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceAmount != null">
|
|
|
+ invoice_amount = #{invoiceAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="buyerName != null">
|
|
|
+ buyer_name = #{buyerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="orderReceivables != null">
|
|
|
+ order_receivables = #{orderReceivables,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="orderArrears != null">
|
|
|
+ order_arrears = #{orderArrears,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="paymentAmount != null">
|
|
|
+ payment_amount = #{paymentAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="costAmount != null">
|
|
|
+ cost_amount = #{costAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="depName != null">
|
|
|
+ dep_name = #{depName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="provinceName != null">
|
|
|
+ province_name = #{provinceName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="legalAffairs != null">
|
|
|
+ legal_affairs = #{legalAffairs,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+
|
|
|
</mapper>
|