|
@@ -24,15 +24,27 @@
|
|
|
|
|
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<select id="getByPage" resultType="com.kxs.product.api.vo.kxsapp.gd.GdReportListVO">
|
|
<select id="getByPage" resultType="com.kxs.product.api.vo.kxsapp.gd.GdReportListVO">
|
|
|
- select id, create_time, put_name, put_mobile, gd_sn, gd_mobile, status
|
|
|
|
|
- from kxs_gd_report
|
|
|
|
|
|
|
+ select a.id, a.create_time, a.put_name, a.put_mobile, a.gd_sn, a.gd_mobile, a.status, a.is_check, o.status as gd_status,
|
|
|
|
|
+ o.erp_name, o.erp_no
|
|
|
|
|
+ from kxs_gd_report a
|
|
|
|
|
+ left join kxs_gd_order o on a.put_name = o.receive_name and a.put_mobile = o.receive_mobile
|
|
|
<where>
|
|
<where>
|
|
|
- and del_flag = 0
|
|
|
|
|
- and user_id = #{userId}
|
|
|
|
|
- and status = #{status}
|
|
|
|
|
- and put_type = #{putType}
|
|
|
|
|
|
|
+ and a.del_flag = 0
|
|
|
|
|
+ and a.user_id = #{userId}
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test="status == 2">
|
|
|
|
|
+ and a.status = 1 and a.is_check = 1
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ and a.status = #{status}
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
<if test="keyword != null and keyword != ''">
|
|
<if test="keyword != null and keyword != ''">
|
|
|
- and (put_name = #{keyword} or put_mobile = #{keyword} or gd_mobile = #{keyword})
|
|
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ and a.put_type = #{putType}
|
|
|
|
|
+ <if test="keyword != null and keyword != ''">
|
|
|
|
|
+ and (a.put_name = #{keyword} or a.put_mobile = #{keyword} or a.gd_mobile = #{keyword})
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
order by id desc
|
|
order by id desc
|