|
|
@@ -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.TemporaryReceivablesMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.goafanti.common.model.TemporaryReceivables">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
<result column="corporate_name" jdbcType="VARCHAR" property="corporateName" />
|
|
|
@@ -17,160 +12,35 @@
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
<result column="financial_pay_no" jdbcType="VARCHAR" property="financialPayNo" />
|
|
|
+ <result column="merge_Status" jdbcType="INTEGER" property="mergeStatus" />
|
|
|
</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 Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- <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 Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- <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 Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- id, order_no, corporate_name, amount, receivables_time, aid, remarks, status, create_time,
|
|
|
- financial_pay_no
|
|
|
+ id, order_no, corporate_name, amount, receivables_time, aid, remarks, `status`, create_time,
|
|
|
+ financial_pay_no, merge_Status
|
|
|
</sql>
|
|
|
- <select id="selectByExample" parameterType="com.goafanti.common.model.TemporaryReceivablesExample" resultMap="BaseResultMap">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- select
|
|
|
- <if test="distinct">
|
|
|
- distinct
|
|
|
- </if>
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from temporary_receivables
|
|
|
- <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 Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from temporary_receivables
|
|
|
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 Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
delete from temporary_receivables
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
- <delete id="deleteByExample" parameterType="com.goafanti.common.model.TemporaryReceivablesExample">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- delete from temporary_receivables
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </delete>
|
|
|
- <insert id="insert" parameterType="com.goafanti.common.model.TemporaryReceivables">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- insert into temporary_receivables (id, order_no, corporate_name,
|
|
|
- amount, receivables_time, aid,
|
|
|
- remarks, status, create_time,
|
|
|
- financial_pay_no)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{corporateName,jdbcType=VARCHAR},
|
|
|
- #{amount,jdbcType=DECIMAL}, #{receivablesTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR},
|
|
|
- #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
- #{financialPayNo,jdbcType=VARCHAR})
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TemporaryReceivables" useGeneratedKeys="true">
|
|
|
+ insert into temporary_receivables (order_no, corporate_name, amount,
|
|
|
+ receivables_time, aid, remarks,
|
|
|
+ `status`, create_time, financial_pay_no,
|
|
|
+ merge_Status)
|
|
|
+ values (#{orderNo,jdbcType=VARCHAR}, #{corporateName,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL},
|
|
|
+ #{receivablesTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
|
|
|
+ #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{financialPayNo,jdbcType=VARCHAR},
|
|
|
+ #{mergeStatus,jdbcType=INTEGER})
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="com.goafanti.common.model.TemporaryReceivables">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TemporaryReceivables" useGeneratedKeys="true">
|
|
|
insert into temporary_receivables
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
<if test="orderNo != null">
|
|
|
order_no,
|
|
|
</if>
|
|
|
@@ -190,7 +60,7 @@
|
|
|
remarks,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- status,
|
|
|
+ `status`,
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
@@ -198,11 +68,11 @@
|
|
|
<if test="financialPayNo != null">
|
|
|
financial_pay_no,
|
|
|
</if>
|
|
|
+ <if test="mergeStatus != null">
|
|
|
+ merge_Status,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
<if test="orderNo != null">
|
|
|
#{orderNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -230,89 +100,12 @@
|
|
|
<if test="financialPayNo != null">
|
|
|
#{financialPayNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="mergeStatus != null">
|
|
|
+ #{mergeStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <select id="countByExample" parameterType="com.goafanti.common.model.TemporaryReceivablesExample" resultType="java.lang.Long">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- select count(*) from temporary_receivables
|
|
|
- <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 Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- update temporary_receivables
|
|
|
- <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.corporateName != null">
|
|
|
- corporate_name = #{record.corporateName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.amount != null">
|
|
|
- amount = #{record.amount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="record.receivablesTime != null">
|
|
|
- receivables_time = #{record.receivablesTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="record.aid != null">
|
|
|
- aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.remarks != null">
|
|
|
- remarks = #{record.remarks,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.status != null">
|
|
|
- status = #{record.status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.createTime != null">
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="record.financialPayNo != null">
|
|
|
- financial_pay_no = #{record.financialPayNo,jdbcType=VARCHAR},
|
|
|
- </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 Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
- update temporary_receivables
|
|
|
- set id = #{record.id,jdbcType=INTEGER},
|
|
|
- order_no = #{record.orderNo,jdbcType=VARCHAR},
|
|
|
- corporate_name = #{record.corporateName,jdbcType=VARCHAR},
|
|
|
- amount = #{record.amount,jdbcType=DECIMAL},
|
|
|
- receivables_time = #{record.receivablesTime,jdbcType=TIMESTAMP},
|
|
|
- aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
- remarks = #{record.remarks,jdbcType=VARCHAR},
|
|
|
- status = #{record.status,jdbcType=INTEGER},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- financial_pay_no = #{record.financialPayNo,jdbcType=VARCHAR}
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TemporaryReceivables">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
update temporary_receivables
|
|
|
<set>
|
|
|
<if test="orderNo != null">
|
|
|
@@ -334,7 +127,7 @@
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- status = #{status,jdbcType=INTEGER},
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
@@ -342,15 +135,13 @@
|
|
|
<if test="financialPayNo != null">
|
|
|
financial_pay_no = #{financialPayNo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="mergeStatus != null">
|
|
|
+ merge_Status = #{mergeStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TemporaryReceivables">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Mon Oct 14 11:33:48 CST 2019.
|
|
|
- -->
|
|
|
update temporary_receivables
|
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
corporate_name = #{corporateName,jdbcType=VARCHAR},
|
|
|
@@ -358,9 +149,10 @@
|
|
|
receivables_time = #{receivablesTime,jdbcType=TIMESTAMP},
|
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
- status = #{status,jdbcType=INTEGER},
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- financial_pay_no = #{financialPayNo,jdbcType=VARCHAR}
|
|
|
+ financial_pay_no = #{financialPayNo,jdbcType=VARCHAR},
|
|
|
+ merge_Status = #{mergeStatus,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
@@ -380,11 +172,12 @@
|
|
|
where aid = #{aid} and status < 2
|
|
|
</delete>
|
|
|
<select id="selectByaid" resultMap="BaseResultMap">
|
|
|
-
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from temporary_receivables
|
|
|
- where aid = #{aid,jdbcType=INTEGER}
|
|
|
+ where aid = #{aid}
|
|
|
+ and merge_status= #{mergeStatus}
|
|
|
+
|
|
|
</select>
|
|
|
<select id="selectReceivablesList" parameterType="java.lang.String" resultType="com.goafanti.order.bo.ReceivablesListBo">
|
|
|
select a.id,a.order_no orderNo,b.contract_no contractNo,a.corporate_name corporateName,c.nickname,
|
|
|
@@ -397,8 +190,11 @@
|
|
|
<if test="aid != null">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
+ <if test="mergeStatus != null">
|
|
|
+ and merge_status = #{mergeStatus}
|
|
|
+ </if>
|
|
|
<if test="contractNo != null">
|
|
|
- b.contract_no like concat('%',#{contractNo},'%')
|
|
|
+ and b.contract_no like concat('%',#{contractNo},'%')
|
|
|
</if>
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no = #{orderNo}
|
|
|
@@ -439,8 +235,11 @@
|
|
|
<if test="aid != null">
|
|
|
and a.aid= #{aid}
|
|
|
</if>
|
|
|
+ <if test="mergeStatus != null">
|
|
|
+ and merge_status = #{mergeStatus}
|
|
|
+ </if>
|
|
|
<if test="contractNo != null">
|
|
|
- b.contract_no like concat('%',#{contractNo},'%')
|
|
|
+ and b.contract_no like concat('%',#{contractNo},'%')
|
|
|
</if>
|
|
|
<if test="orderNo != null">
|
|
|
and a.order_no = #{orderNo}
|
|
|
@@ -492,6 +291,9 @@
|
|
|
<if test="corporateName != null">
|
|
|
and a.corporate_name like concat('%',#{corporateName},'%')
|
|
|
</if>
|
|
|
+ <if test="mergeStatus != null">
|
|
|
+ and a.merge_status = #{mergeStatus}
|
|
|
+ </if>
|
|
|
<if test="orderDeps != null">
|
|
|
and b.order_dep in
|
|
|
<foreach close=")" collection="orderDeps" item="depId" open="(" separator=",">
|
|
|
@@ -532,6 +334,9 @@
|
|
|
<if test="corporateName != null">
|
|
|
and a.corporate_name like concat('%',#{corporateName},'%')
|
|
|
</if>
|
|
|
+ <if test="mergeStatus != null">
|
|
|
+ and a.merge_status = #{mergeStatus}
|
|
|
+ </if>
|
|
|
<if test="orderDeps != null">
|
|
|
and b.order_dep in
|
|
|
<foreach close=")" collection="orderDeps" item="depId" open="(" separator=",">
|
|
|
@@ -577,4 +382,12 @@
|
|
|
and a.transaction_amount= #{amount}
|
|
|
and a.financial_pay_time= #{receivablesTime}
|
|
|
</select>
|
|
|
+ <select id="waitngMerge">
|
|
|
+ update temporary_receivables
|
|
|
+ set merge_Status=1
|
|
|
+ where id in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
</mapper>
|