|
|
@@ -736,6 +736,7 @@
|
|
|
order by create_time desc
|
|
|
</select>
|
|
|
|
|
|
+ <!--查询车险报价订单 modify by lipf 2026年4月28日09:22:46 -->
|
|
|
<select id="queryOrderList" resultType="com.jzg.commons.entity.orders.vo.OrderListVo">
|
|
|
SELECT
|
|
|
io.id as order_no,
|
|
|
@@ -811,122 +812,123 @@
|
|
|
FROM ins_order_adjust t where t.status = 2 and t.is_delete = 0
|
|
|
) x WHERE x.rn = 1
|
|
|
) ioa1 ON io.id = ioa1.order_no
|
|
|
- where
|
|
|
- 1=1
|
|
|
-
|
|
|
- <if test="insOrdersParam.orderNo != null and insOrdersParam.orderNo != ''">
|
|
|
- AND io.id = #{insOrdersParam.orderNo}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.parentId == 0 ">
|
|
|
- AND io.parent_id = 0
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.parentId == 1 ">
|
|
|
- AND io.parent_id != 0
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.licenseNo != null and insOrdersParam.licenseNo != ''">
|
|
|
- AND ioci.license_no = #{insOrdersParam.licenseNo}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.orderStatus!= null and insOrdersParam.orderStatus!= ''">
|
|
|
- AND io.order_status = #{insOrdersParam.orderStatus}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.adjustStatus!= null and insOrdersParam.adjustStatus!= ''">
|
|
|
- AND ioa.status = #{insOrdersParam.adjustStatus}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.salesman!= null">
|
|
|
- AND io.real_quote_user_id = #{insOrdersParam.salesman}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.companyId != null and insOrdersParam.companyId != ''">
|
|
|
- AND io.company_id = #{insOrdersParam.companyId}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.startDate != null and insOrdersParam.startDate != ''and insOrdersParam.endDate != null and insOrdersParam.endDate != ''">
|
|
|
- AND io.create_time BETWEEN #{insOrdersParam.startDate} and #{insOrdersParam.endDate}
|
|
|
- </if>
|
|
|
-
|
|
|
- <if test="insOrdersParam.companyName != null and insOrdersParam.companyName != ''">
|
|
|
- AND io.company_name = #{insOrdersParam.companyName}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.productCode != null and insOrdersParam.productCode != ''">
|
|
|
- AND io.product_id = #{insOrdersParam.productCode}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.productName != null and insOrdersParam.productName != ''">
|
|
|
- AND io.product_name = #{insOrdersParam.productName}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.vinNo != null and insOrdersParam.vinNo != ''">
|
|
|
- AND ioci.vin_no = #{insOrdersParam.vinNo}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.ownerName != null and insOrdersParam.ownerName != ''">
|
|
|
- AND owner_u.name = #{insOrdersParam.ownerName}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.ownerMobile != null and insOrdersParam.ownerMobile != ''">
|
|
|
- AND owner_u.mobile = #{insOrdersParam.ownerMobile}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.policyName != null and insOrdersParam.policyName != ''">
|
|
|
- AND policy_u.name = #{insOrdersParam.policyName}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.policyMobile != null and insOrdersParam.policyMobile != ''">
|
|
|
- AND policy_u.mobile = #{insOrdersParam.policyMobile}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.insurName != null and insOrdersParam.insurName != ''">
|
|
|
- AND insur_u.name = #{insOrdersParam.insurName}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.insurMobile != null and insOrdersParam.insurMobile != ''">
|
|
|
- AND insur_u.mobile = #{insOrdersParam.insurMobile}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.ciStartDate != null">
|
|
|
- AND iorci.start_date = #{insOrdersParam.ciStartDate}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.biStartDate != null">
|
|
|
- AND iorbi.start_date = #{insOrdersParam.biStartDate}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.sumPremium != null">
|
|
|
- AND iorco.sum_premium = #{insOrdersParam.sumPremium}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.ciPremium != null">
|
|
|
- AND iorco.jq_premium = #{insOrdersParam.ciPremium}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.biPremium != null">
|
|
|
- AND iorco.sy_premium = #{insOrdersParam.biPremium}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.niPremium != null">
|
|
|
- AND iorco.jy_premium = #{insOrdersParam.niPremium}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.vvTax != null">
|
|
|
- AND iorco.tax_premium = #{insOrdersParam.vvTax}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.recorder != null and insOrdersParam.recorder != ''">
|
|
|
- AND su.username = #{insOrdersParam.recorder}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.salesmanInfo != null and insOrdersParam.salesmanInfo != ''">
|
|
|
- AND suji.name = #{insOrdersParam.salesmanInfo}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.salesmanType != null and insOrdersParam.salesmanType != ''">
|
|
|
- AND suji.type_attr = #{insOrdersParam.salesmanType}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.agreementName != null and insOrdersParam.agreementName != ''">
|
|
|
- AND pa.agreement_name = #{insOrdersParam.agreementName}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.deptId != null and insOrdersParam.deptId != ''">
|
|
|
- AND sd.id = #{insOrdersParam.deptId}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.deptName != null and insOrdersParam.deptName != ''">
|
|
|
- AND sd.name = #{insOrdersParam.deptName}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.paymentLink != null and insOrdersParam.paymentLink != ''">
|
|
|
- AND io.pay_link = #{insOrdersParam.paymentLink}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.adjustId != null">
|
|
|
- AND ioa.id = #{insOrdersParam.adjustId}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.adjustPremium != null">
|
|
|
- AND ioa1.after_premium = #{insOrdersParam.adjustPremium}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.startSigningTime != null and insOrdersParam.startSigningTime != ''and insOrdersParam.endSigningTime != null and insOrdersParam.endSigningTime != ''">
|
|
|
- AND io.signing_time BETWEEN #{insOrdersParam.startSigningTime} and #{insOrdersParam.endSigningTime}
|
|
|
- </if>
|
|
|
- <if test="insOrdersParam.startPayTime != null and insOrdersParam.startPayTime != ''and insOrdersParam.endPayTime != null and insOrdersParam.endPayTime != ''">
|
|
|
- AND io.pay_time BETWEEN #{insOrdersParam.startPayTime} and #{insOrdersParam.endPayTime}
|
|
|
- </if>
|
|
|
+ <where>
|
|
|
+ io.is_delete = 0
|
|
|
+ <if test="insOrdersParam.jzgInfoId != null and insOrdersParam.jzgInfoId != ''">
|
|
|
+ and io.real_quote_user_id in (select username from sys_user bbb where bbb.id in (
|
|
|
+ select ss.user_id from sys_user_jzg_info ss where ss.leader_id = #{insOrdersParam.jzgInfoId}
|
|
|
+ ) )
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.orderNo != null and insOrdersParam.orderNo != ''">
|
|
|
+ AND io.id = #{insOrdersParam.orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.parentId == 0 ">
|
|
|
+ AND io.parent_id = 0
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.parentId == 1 ">
|
|
|
+ AND io.parent_id != 0
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.licenseNo != null and insOrdersParam.licenseNo != ''">
|
|
|
+ AND ioci.license_no = #{insOrdersParam.licenseNo}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.orderStatus!= null and insOrdersParam.orderStatus!= ''">
|
|
|
+ AND io.order_status = #{insOrdersParam.orderStatus}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.adjustStatus!= null and insOrdersParam.adjustStatus!= ''">
|
|
|
+ AND ioa.status = #{insOrdersParam.adjustStatus}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.salesman!= null">
|
|
|
+ AND io.real_quote_user_id = #{insOrdersParam.salesman}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.companyId != null and insOrdersParam.companyId != ''">
|
|
|
+ AND io.company_id = #{insOrdersParam.companyId}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.startDate != null and insOrdersParam.startDate != ''and insOrdersParam.endDate != null and insOrdersParam.endDate != ''">
|
|
|
+ AND io.create_time BETWEEN #{insOrdersParam.startDate} and #{insOrdersParam.endDate}
|
|
|
+ </if>
|
|
|
|
|
|
+ <if test="insOrdersParam.companyName != null and insOrdersParam.companyName != ''">
|
|
|
+ AND io.company_name = #{insOrdersParam.companyName}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.productCode != null and insOrdersParam.productCode != ''">
|
|
|
+ AND io.product_id = #{insOrdersParam.productCode}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.productName != null and insOrdersParam.productName != ''">
|
|
|
+ AND io.product_name = #{insOrdersParam.productName}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.vinNo != null and insOrdersParam.vinNo != ''">
|
|
|
+ AND ioci.vin_no = #{insOrdersParam.vinNo}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.ownerName != null and insOrdersParam.ownerName != ''">
|
|
|
+ AND owner_u.name = #{insOrdersParam.ownerName}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.ownerMobile != null and insOrdersParam.ownerMobile != ''">
|
|
|
+ AND owner_u.mobile = #{insOrdersParam.ownerMobile}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.policyName != null and insOrdersParam.policyName != ''">
|
|
|
+ AND policy_u.name = #{insOrdersParam.policyName}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.policyMobile != null and insOrdersParam.policyMobile != ''">
|
|
|
+ AND policy_u.mobile = #{insOrdersParam.policyMobile}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.insurName != null and insOrdersParam.insurName != ''">
|
|
|
+ AND insur_u.name = #{insOrdersParam.insurName}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.insurMobile != null and insOrdersParam.insurMobile != ''">
|
|
|
+ AND insur_u.mobile = #{insOrdersParam.insurMobile}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.ciStartDate != null">
|
|
|
+ AND iorci.start_date = #{insOrdersParam.ciStartDate}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.biStartDate != null">
|
|
|
+ AND iorbi.start_date = #{insOrdersParam.biStartDate}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.sumPremium != null">
|
|
|
+ AND iorco.sum_premium = #{insOrdersParam.sumPremium}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.ciPremium != null">
|
|
|
+ AND iorco.jq_premium = #{insOrdersParam.ciPremium}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.biPremium != null">
|
|
|
+ AND iorco.sy_premium = #{insOrdersParam.biPremium}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.niPremium != null">
|
|
|
+ AND iorco.jy_premium = #{insOrdersParam.niPremium}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.vvTax != null">
|
|
|
+ AND iorco.tax_premium = #{insOrdersParam.vvTax}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.salesmanInfo != null and insOrdersParam.salesmanInfo != ''">
|
|
|
+ AND su.username = #{insOrdersParam.salesmanInfo}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.salesmanType != null and insOrdersParam.salesmanType != ''">
|
|
|
+ AND suji.type_attr = #{insOrdersParam.salesmanType}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.agreementName != null and insOrdersParam.agreementName != ''">
|
|
|
+ AND pa.agreement_name = #{insOrdersParam.agreementName}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.deptId != null and insOrdersParam.deptId != ''">
|
|
|
+ AND sd.id = #{insOrdersParam.deptId}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.deptName != null and insOrdersParam.deptName != ''">
|
|
|
+ AND sd.name = #{insOrdersParam.deptName}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.paymentLink != null and insOrdersParam.paymentLink != ''">
|
|
|
+ AND io.pay_link = #{insOrdersParam.paymentLink}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.adjustId != null">
|
|
|
+ AND ioa.id = #{insOrdersParam.adjustId}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.adjustPremium != null">
|
|
|
+ AND ioa1.after_premium = #{insOrdersParam.adjustPremium}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.startSigningTime != null and insOrdersParam.startSigningTime != ''and insOrdersParam.endSigningTime != null and insOrdersParam.endSigningTime != ''">
|
|
|
+ AND io.signing_time BETWEEN #{insOrdersParam.startSigningTime} and #{insOrdersParam.endSigningTime}
|
|
|
+ </if>
|
|
|
+ <if test="insOrdersParam.startPayTime != null and insOrdersParam.startPayTime != ''and insOrdersParam.endPayTime != null and insOrdersParam.endPayTime != ''">
|
|
|
+ AND io.pay_time BETWEEN #{insOrdersParam.startPayTime} and #{insOrdersParam.endPayTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
order by io.create_time desc
|
|
|
</select>
|
|
|
|