|
|
@@ -411,7 +411,12 @@
|
|
|
SELECT a.`inscompany` AS insCompany,
|
|
|
(SELECT agreement_name FROM ptl_agreement t WHERE t.`id`= a.`agreement_id`) AS agreementName,
|
|
|
a.`jqpolicyno` AS policyNo,
|
|
|
- getValidDate(a.`orderno`,a.`id`) AS quoteDate,
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayDate'">
|
|
|
+ a.pay_date AS quoteDate,
|
|
|
+ </if>
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayTime'">
|
|
|
+ a.inside_pay_time AS quoteDate,
|
|
|
+ </if>
|
|
|
a.`jq_start_date` AS policyStartDate,
|
|
|
'交强险' AS riskName,
|
|
|
a.`jqpremium` AS sumPremium,
|
|
|
@@ -454,7 +459,12 @@
|
|
|
and a.operatorid = #{policyReqVo.operatorId}
|
|
|
</if>
|
|
|
<if test="policyReqVo.quoteStartDate != null and policyReqVo.quoteEndDate != null">
|
|
|
- and getValidDate(a.`orderno`,a.`id`) between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayDate'">
|
|
|
+ and a.pay_date between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ </if>
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayTime'">
|
|
|
+ and a.inside_pay_time between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="policyReqVo.policyStartDate != null and policyReqVo.policyEndDate != null">
|
|
|
and a.jq_start_date between #{policyReqVo.policyStartDate} AND #{policyReqVo.policyEndDate}
|
|
|
@@ -464,7 +474,12 @@
|
|
|
SELECT a.`inscompany` AS insCompany,
|
|
|
(SELECT agreement_name FROM ptl_agreement t WHERE t.`id`= a.`agreement_id`) AS agreementName,
|
|
|
a.`sypolicyno` AS policyNo,
|
|
|
- getValidDate(a.`orderno`,a.`id`) AS quoteDate,
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayDate'">
|
|
|
+ a.pay_date AS quoteDate,
|
|
|
+ </if>
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayTime'">
|
|
|
+ a.inside_pay_time AS quoteDate,
|
|
|
+ </if>
|
|
|
a.`sy_start_date` AS policyStartDate,
|
|
|
'商业险' AS riskName,
|
|
|
a.`sypremium` AS sumPremium,
|
|
|
@@ -507,7 +522,12 @@
|
|
|
and a.operatorid = #{policyReqVo.operatorId}
|
|
|
</if>
|
|
|
<if test="policyReqVo.quoteStartDate != null and policyReqVo.quoteEndDate != null">
|
|
|
- and getValidDate(a.`orderno`,a.`id`) between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayDate'">
|
|
|
+ and a.pay_date between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ </if>
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayTime'">
|
|
|
+ and a.inside_pay_time between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="policyReqVo.policyStartDate != null and policyReqVo.policyEndDate != null">
|
|
|
and a.sy_start_date between #{policyReqVo.policyStartDate} AND #{policyReqVo.policyEndDate}
|
|
|
@@ -521,7 +541,12 @@
|
|
|
SELECT a.`inscompany` AS insCompany,
|
|
|
(SELECT agreement_name FROM ptl_agreement t WHERE t.`id`= a.`agreement_id`) AS agreementName,
|
|
|
a.`jqpolicyno` AS policyNo,
|
|
|
- getValidDate(a.`orderno`,a.`id`) AS quoteDate,
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayDate'">
|
|
|
+ a.pay_date AS quoteDate,
|
|
|
+ </if>
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayTime'">
|
|
|
+ a.inside_pay_time AS quoteDate,
|
|
|
+ </if>
|
|
|
a.`jq_start_date` AS policyStartDate,
|
|
|
'交强险' AS riskName,
|
|
|
a.`jqpremium` AS sumPremium,
|
|
|
@@ -564,7 +589,12 @@
|
|
|
and a.operatorid = #{policyReqVo.operatorId}
|
|
|
</if>
|
|
|
<if test="policyReqVo.quoteStartDate != null and policyReqVo.quoteEndDate != null">
|
|
|
- and getValidDate(a.`orderno`,a.`id`) between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayDate'">
|
|
|
+ and a.pay_date between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ </if>
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayTime'">
|
|
|
+ and a.inside_pay_time between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="policyReqVo.policyStartDate != null and policyReqVo.policyEndDate != null">
|
|
|
and a.jq_start_date between #{policyReqVo.policyStartDate} AND #{policyReqVo.policyEndDate}
|
|
|
@@ -574,7 +604,12 @@
|
|
|
SELECT a.`inscompany` AS insCompany,
|
|
|
(SELECT agreement_name FROM ptl_agreement t WHERE t.`id`= a.`agreement_id`) AS agreementName,
|
|
|
a.`sypolicyno` AS policyNo,
|
|
|
- getValidDate(a.`orderno`,a.`id`) AS quoteDate,
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayDate'">
|
|
|
+ a.pay_date AS quoteDate,
|
|
|
+ </if>
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayTime'">
|
|
|
+ a.inside_pay_time AS quoteDate,
|
|
|
+ </if>
|
|
|
a.`sy_start_date` AS policyStartDate,
|
|
|
'商业险' AS riskName,
|
|
|
a.`sypremium` AS sumPremium,
|
|
|
@@ -617,7 +652,12 @@
|
|
|
and a.operatorid = #{policyReqVo.operatorId}
|
|
|
</if>
|
|
|
<if test="policyReqVo.quoteStartDate != null and policyReqVo.quoteEndDate != null">
|
|
|
- and getValidDate(a.`orderno`,a.`id`) between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayDate'">
|
|
|
+ and a.pay_date between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ </if>
|
|
|
+ <if test="policyReqVo.queryFlag='queryPayTime'">
|
|
|
+ and a.inside_pay_time between #{policyReqVo.quoteStartDate} AND #{policyReqVo.quoteEndDate}
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="policyReqVo.policyStartDate != null and policyReqVo.policyEndDate != null">
|
|
|
and a.sy_start_date between #{policyReqVo.policyStartDate} AND #{policyReqVo.policyEndDate}
|