|
@@ -10,8 +10,7 @@
|
|
|
left join price_change_record c on p.id=c.order_id
|
|
|
left join transaction_record t on p.id=t.order_id
|
|
|
WHERE
|
|
|
- p.comp_id = #{compId}
|
|
|
- and p.delete_flag = '0'
|
|
|
+ p.delete_flag = '0'
|
|
|
<if test="searchType != null and searchType != ''">
|
|
|
<if test="searchType == 1">
|
|
|
AND p.status_flag = '1'
|
|
@@ -24,6 +23,14 @@
|
|
|
AND p.status_flag = '7'
|
|
|
</if>
|
|
|
</if>
|
|
|
+ <if test="pcFlag != null and pcFlag != ''">
|
|
|
+ <if test="pcFlag == 0">
|
|
|
+ AND common_id = #{commonId}
|
|
|
+ </if>
|
|
|
+ <if test="pcFlag == 1">
|
|
|
+ AND comp_id = #{compId}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
AND (lower(p.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
OR lower(p.customer) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
@@ -63,8 +70,7 @@
|
|
|
left join price_change_record c on p.id=c.order_id
|
|
|
left join transaction_record t on p.id=t.order_id
|
|
|
WHERE
|
|
|
- p.comp_id = #{compId}
|
|
|
- and p.delete_flag = '0'
|
|
|
+ p.delete_flag = '0'
|
|
|
<if test="searchType != null and searchType != ''">
|
|
|
<if test="searchType == 1">
|
|
|
AND p.status_flag = '1'
|
|
@@ -81,6 +87,14 @@
|
|
|
AND (lower(p.contract_no) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
OR lower(p.customer) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
</if>
|
|
|
+ <if test="pcFlag != null and pcFlag != ''">
|
|
|
+ <if test="pcFlag == 0">
|
|
|
+ AND common_id = #{commonId}
|
|
|
+ </if>
|
|
|
+ <if test="pcFlag == 1">
|
|
|
+ AND comp_id = #{compId}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
ORDER BY p.update_date DESC
|
|
|
<if test="currentPage != null and currentPage != ''">
|
|
|
LIMIT ${startRecord}, ${pageSize}
|