优化计费列表展示逻辑,新增 prc_income_bill 过滤条件
This commit is contained in:
@@ -165,7 +165,7 @@
|
||||
from prc_label_product_version
|
||||
where price_set_id = #{priceSetId}
|
||||
group by price_set_id, version_no
|
||||
order by version_no desc
|
||||
order by (min(effective_start) is null) desc, min(effective_start) desc, version_no desc
|
||||
</select>
|
||||
|
||||
<insert id="insertWeightBand" useGeneratedKeys="true" keyProperty="bandId">
|
||||
@@ -329,4 +329,24 @@
|
||||
and version_no <> #{versionNo}
|
||||
and status = '1'
|
||||
</update>
|
||||
|
||||
<update id="reopenVersionRows">
|
||||
update prc_label_product_version
|
||||
set status = '1',
|
||||
effective_end = null,
|
||||
updated_by = #{operator},
|
||||
update_time = sysdate()
|
||||
where price_set_id = #{priceSetId}
|
||||
and version_no = #{versionNo}
|
||||
</update>
|
||||
|
||||
<update id="updateVersionWindowBySetAndNo">
|
||||
update prc_label_product_version
|
||||
set effective_end = #{effectiveEnd},
|
||||
status = #{status},
|
||||
updated_by = #{operator},
|
||||
update_time = sysdate()
|
||||
where price_set_id = #{priceSetId}
|
||||
and version_no = #{versionNo}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -516,6 +516,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{bfs}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="requireIncomeBill != null and requireIncomeBill">
|
||||
AND EXISTS (
|
||||
SELECT 1 FROM prc_income_bill i WHERE i.bill_id = p.bill_id
|
||||
)
|
||||
</if>
|
||||
<if test="refundStatus != null and refundStatus != ''">
|
||||
AND p.refund_status = #{refundStatus}
|
||||
</if>
|
||||
|
||||
@@ -80,7 +80,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="setCategory != null and setCategory != ''">
|
||||
AND ifnull(s.set_category, 'PACKAGE') = #{setCategory}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
<if test="statuses != null and statuses.size() > 0">
|
||||
AND s.status in
|
||||
<foreach collection="statuses" item="st" open="(" separator="," close=")">
|
||||
#{st}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="(statuses == null or statuses.size() == 0) and status != null and status != ''">
|
||||
AND s.status = #{status}
|
||||
</if>
|
||||
<if test="tmsId != null">
|
||||
|
||||
Reference in New Issue
Block a user