Commit a4cd4349 authored by 李灿灿's avatar 李灿灿

feat:保单维护时间搜索条件优化

parent b4d73df9
......@@ -35,12 +35,18 @@
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != ''">
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null">
AND DATE(POLICY_START) <![CDATA[ >= ]]> #{param.policyStart}
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != ''">
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null">
AND DATE(POLICY_END) <![CDATA[ <= ]]> #{param.policyEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(DATE(POLICY_START) <![CDATA[ >= ]]> #{param.policyStart} and DATE(POLICY_START) <![CDATA[ <= ]]> #{param.policyEnd}) OR
(DATE(POLICY_END) <![CDATA[ >= ]]> #{param.policyStart} and DATE(POLICY_END) <![CDATA[ <= ]]> #{param.policyEnd})
)
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
......@@ -61,12 +67,18 @@
<if test="param.policyNo != null and param.policyNo.trim() != ''">
and POLICY_NO like concat('%',replace(replace(#{param.policyNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.policyStart != null and param.policyStart.trim() != ''">
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd == null">
AND DATE(POLICY_START) <![CDATA[ >= ]]> #{param.policyStart}
</if>
<if test="param.policyEnd != null and param.policyEnd.trim() != ''">
<if test="param.policyEnd != null and param.policyEnd.trim() != '' and param.policyStart == null">
AND DATE(POLICY_END) <![CDATA[ <= ]]> #{param.policyEnd}
</if>
<if test="param.policyStart != null and param.policyStart.trim() != '' and param.policyEnd != null and param.policyEnd.trim() != ''">
and (
(DATE(POLICY_START) <![CDATA[ >= ]]> #{param.policyStart} and DATE(POLICY_START) <![CDATA[ <= ]]> #{param.policyEnd}) OR
(DATE(POLICY_END) <![CDATA[ >= ]]> #{param.policyStart} and DATE(POLICY_END) <![CDATA[ <= ]]> #{param.policyEnd})
)
</if>
<if test="param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''">
and INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment