|
@@ -812,7 +812,7 @@
|
|
|
<select id="ptTotalAmount" resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
|
|
<select id="ptTotalAmount" resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
|
|
|
SELECT
|
|
SELECT
|
|
|
SUM(IFNULL(a.commission_feevalue ,0 ) + IFNULL(a.other_feevalue ,0 )) AS commissionFeevalue,
|
|
SUM(IFNULL(a.commission_feevalue ,0 ) + IFNULL(a.other_feevalue ,0 )) AS commissionFeevalue,
|
|
|
- SUM( CASE WHEN a.handling_fees_status = '0' THEN IFNULL(a.commission_feevalue ,0 ) + IFNULL(a.other_feevalue ,0 ) ELSE 0 END ) AS "noInvoicCommissionFeevalue",
|
|
|
|
|
|
|
+ SUM(CASE WHEN a.handling_fees_status = '0' THEN IFNULL(a.commission_feevalue ,0 ) + IFNULL(a.other_feevalue ,0 ) ELSE 0 END ) AS "noInvoicCommissionFeevalue",
|
|
|
SUM(CASE WHEN a.handling_fees_status = '1' THEN IFNULL(a.commission_feevalue ,0 ) + IFNULL(a.other_feevalue ,0 ) ELSE 0 END) AS "readyCommissionFeevalue"
|
|
SUM(CASE WHEN a.handling_fees_status = '1' THEN IFNULL(a.commission_feevalue ,0 ) + IFNULL(a.other_feevalue ,0 ) ELSE 0 END) AS "readyCommissionFeevalue"
|
|
|
FROM
|
|
FROM
|
|
|
ins_ply_income a
|
|
ins_ply_income a
|
|
@@ -1518,6 +1518,8 @@
|
|
|
<if test="isNotCar !=null and isNotCar !=''">
|
|
<if test="isNotCar !=null and isNotCar !=''">
|
|
|
and a.is_not_car =#{isNotCar}
|
|
and a.is_not_car =#{isNotCar}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<if test="handlingFeesStatus !=null and handlingFeesStatus !=''">
|
|
<if test="handlingFeesStatus !=null and handlingFeesStatus !=''">
|
|
|
and a.handling_fees_status =#{handlingFeesStatus}
|
|
and a.handling_fees_status =#{handlingFeesStatus}
|
|
|
</if>
|
|
</if>
|
|
@@ -1762,4 +1764,396 @@
|
|
|
group by a.settlement_time
|
|
group by a.settlement_time
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="getTotalPtReceivables" resultType="com.ydtech.modules.fnc.entity.InsPlyIncome">
|
|
|
|
|
+ select
|
|
|
|
|
+ pa.agreement_type as "agreementType",
|
|
|
|
|
+ sum(a.all_fee_value) as "allFeeValue"
|
|
|
|
|
+ from ins_ply_income a
|
|
|
|
|
+ LEFT JOIN ptl_agreement pa on a.agreement_id = pa.id
|
|
|
|
|
+ LEFT JOIN sys_user su on su.id=a.user_id
|
|
|
|
|
+ LEFT JOIN sys_user su1 on su1.id=a.settlement_user_id
|
|
|
|
|
+ LEFT JOIN sys_user su2 on su2.id=a.update_user_id
|
|
|
|
|
+ LEFT JOIN ins_upload_files upf on a.settlement_image_id=upf.id
|
|
|
|
|
+ LEFT JOIN esm_ins_company eic on eic.id=a.partner_companies_id
|
|
|
|
|
+ LEFT JOIN sys_dept b on pa.dept_id=b.id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="startDate !=null and startDate!='' and endDate !=null and endDate !=''">
|
|
|
|
|
+ and DATE_FORMAT( a.signdate, '%Y-%m-%d') between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="agreementType !=null and agreementType !=''">
|
|
|
|
|
+ and pa.agreement_type =#{agreementType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="signDateEnd !=null and signDateEnd!='' and signDateStart !=null and signDateStart !=''">
|
|
|
|
|
+ and a.signdate between #{signDateStart} and #{signDateEnd}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="handlingFeesStatus !=null and handlingFeesStatus !=''">
|
|
|
|
|
+ and a.handling_fees_status =#{handlingFeesStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="jqReceivableProportion !=null and jqReceivableProportion !=''">
|
|
|
|
|
+ and a.jq_receivable_proportion =#{jqReceivableProportion}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="syReceivableProportion !=null and syReceivableProportion !=''">
|
|
|
|
|
+ and a.sy_receivable_proportion =#{syReceivableProportion}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="noReceivableProportion !=null and noReceivableProportion !=''">
|
|
|
|
|
+ and a.no_receivable_proportion =#{noReceivableProportion}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="id !=null and id !=''">
|
|
|
|
|
+ and a.id =#{id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="allPartnerCompaniesId !=null and allPartnerCompaniesId !=''">
|
|
|
|
|
+ AND eic.parent_id LIKE CONCAT(#{allPartnerCompaniesId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="provincePartnerCompaniesId !=null and provincePartnerCompaniesId !=''">
|
|
|
|
|
+ and eic.parent_id LIKE CONCAT(#{provincePartnerCompaniesId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="dockingPerson !=null and dockingPerson !=''">
|
|
|
|
|
+ and pa.docking_person =#{dockingPerson}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="provinceId != null and provinceId != ''">
|
|
|
|
|
+ and pa.dept_id LIKE CONCAT(#{provinceId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="cityId != null and cityId != ''">
|
|
|
|
|
+ and pa.dept_id LIKE CONCAT(#{cityId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="createTimeQuery != null and createTimeQuery != ''">
|
|
|
|
|
+ and DATE_FORMAT( a.create_time, '%Y-%m-%d') =#{createTimeQuery}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="countyId != null and countyId != ''">
|
|
|
|
|
+ and pa.dept_id LIKE CONCAT(#{countyId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="taskId != null and taskId != ''">
|
|
|
|
|
+ and a.task_id = #{taskId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="orderno !=null and orderno !=''">
|
|
|
|
|
+ and a.orderno =#{orderno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyName !=null and companyName !=''">
|
|
|
|
|
+ and a.company_id =#{companyName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="policyno !=null and policyno !=''">
|
|
|
|
|
+ and a.policyno =#{policyno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="documentaryFeesStatus !=null and documentaryFeesStatus !=''">
|
|
|
|
|
+ and a.documentary_fees_status =#{documentaryFeesStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="isNotCar !=null and isNotCar !=''">
|
|
|
|
|
+ and a.is_not_car =#{isNotCar}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="deptId !=null and deptId !=''">
|
|
|
|
|
+ and pa.dept_id =#{deptId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <if test="ids != null and ids != '' and ids.length > 0">
|
|
|
|
|
+ and a.id in
|
|
|
|
|
+ <foreach collection="ids" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="incomeIds != null and incomeIds != '' and incomeIds.size() > 0">
|
|
|
|
|
+ and a.id in
|
|
|
|
|
+ <foreach collection="incomeIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="selectIds != null and selectIds != '' and selectIds.size() > 0">
|
|
|
|
|
+ and a.id in
|
|
|
|
|
+ <foreach collection="selectIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="partnerCompaniesIdList != null and partnerCompaniesIdList != '' and partnerCompaniesIdList.size() > 0">
|
|
|
|
|
+ and a.partner_companies_id in
|
|
|
|
|
+ <foreach collection="partnerCompaniesIdList" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="isOther !=null and isOther !=''">
|
|
|
|
|
+ and a.is_not_documentary =#{isOther}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="licenseno != null and licenseno != ''">
|
|
|
|
|
+ and a.licenseno =#{licenseno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="syPolicyno != null and syPolicyno != ''">
|
|
|
|
|
+ and a.sy_policyno =#{syPolicyno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="noPolicyno != null and noPolicyno != ''">
|
|
|
|
|
+ and a.no_policyno =#{noPolicyno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="signdate !=null and signdate !=''">
|
|
|
|
|
+ AND a.signdate =#{signdate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="partnerCompaniesId !=null and partnerCompaniesId !=''">
|
|
|
|
|
+ AND a.partner_companies_id =#{partnerCompaniesId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="partnerCompaniesName !=null and partnerCompaniesName !=''">
|
|
|
|
|
+ AND a.partner_companies_name =#{partnerCompaniesName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="createTime !=null and createTime !=''">
|
|
|
|
|
+ AND a.create_time =#{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="settlementTime !=null and settlementTime !=''">
|
|
|
|
|
+ AND a.settlement_time =#{settlementTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="settlementDate !=null and settlementDate !=''">
|
|
|
|
|
+ AND a.settlement_time =#{settlementDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="userId !=null and userId !=''">
|
|
|
|
|
+ and a.userId =#{userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyId !=null and companyId !=''">
|
|
|
|
|
+ and a.company_id =#{companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="riskcode !=null and riskcode !=''">
|
|
|
|
|
+ and a.riskcode =#{riskcode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="year !=null and year !=''">
|
|
|
|
|
+ AND YEAR(a.signdate) =#{year}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="month !=null and month !=''">
|
|
|
|
|
+ AND month(a.signdate) =#{month}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="day !=null and day !=''">
|
|
|
|
|
+ AND day(a.signdate) =#{day}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insuredName !=null and insuredName !=''">
|
|
|
|
|
+ AND a.insured_name =#{insuredName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="jqStartDate !=null and jqStartDate != '' and jqEndDate != null and jqEndDate !=''">
|
|
|
|
|
+ AND DATE(a.jq_start_date) BETWEEN #{jqStartDate} AND #{jqEndDate}
|
|
|
|
|
+
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="syStartDate !=null and syStartDate != '' and syEndDate != null and syEndDate !=''">
|
|
|
|
|
+ AND DATE(a.sy_start_date) BETWEEN #{syStartDate} AND #{syEndDate}
|
|
|
|
|
+
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="yearStrat !=null and yearStrat != '' and yearEnd != null and yearEnd !=''">
|
|
|
|
|
+ AND DATE(a.signdate) BETWEEN #{yearStrat} AND #{yearEnd}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ group by pa.agreement_type
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="ptSumGroupByMonth" resultType="java.util.HashMap">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ DATE_FORMAT( a.signdate, '%m') as "month",
|
|
|
|
|
+ sum(a.all_fee_value) as "commissionFeevalue"
|
|
|
|
|
+ FROM
|
|
|
|
|
+ ins_ply_income a
|
|
|
|
|
+ LEFT JOIN ptl_agreement pa ON a.agreement_id = pa.id
|
|
|
|
|
+ LEFT JOIN sys_user su ON su.id = a.user_id
|
|
|
|
|
+ LEFT JOIN sys_user su1 ON su1.id = a.settlement_user_id
|
|
|
|
|
+ LEFT JOIN sys_user su2 ON su2.id = a.update_user_id
|
|
|
|
|
+ LEFT JOIN ins_upload_files upf ON a.settlement_image_id = upf.id
|
|
|
|
|
+ LEFT JOIN esm_ins_company eic ON eic.id = a.partner_companies_id
|
|
|
|
|
+ LEFT JOIN sys_dept b ON pa.dept_id = b.id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ 1=1
|
|
|
|
|
+ <if test="startDate !=null and startDate!='' and endDate !=null and endDate !=''">
|
|
|
|
|
+ and DATE_FORMAT( a.signdate, '%Y-%m-%d') between DATE_FORMAT(#{startDate}, '%Y-%m-%d') and DATE_FORMAT(#{endDate}, '%Y-%m-%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="agreementType !=null and agreementType !=''">
|
|
|
|
|
+ and pa.agreement_type =#{agreementType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="signDateEnd !=null and signDateEnd!='' and signDateStart !=null and signDateStart !=''">
|
|
|
|
|
+ and a.signdate between #{signDateStart} and #{signDateEnd}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="handlingFeesStatus !=null and handlingFeesStatus !=''">
|
|
|
|
|
+ and a.handling_fees_status =#{handlingFeesStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="jqReceivableProportion !=null and jqReceivableProportion !=''">
|
|
|
|
|
+ and a.jq_receivable_proportion =#{jqReceivableProportion}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="syReceivableProportion !=null and syReceivableProportion !=''">
|
|
|
|
|
+ and a.sy_receivable_proportion =#{syReceivableProportion}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="noReceivableProportion !=null and noReceivableProportion !=''">
|
|
|
|
|
+ and a.no_receivable_proportion =#{noReceivableProportion}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="id !=null and id !=''">
|
|
|
|
|
+ and a.id =#{id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="allPartnerCompaniesId !=null and allPartnerCompaniesId !=''">
|
|
|
|
|
+ AND eic.parent_id LIKE CONCAT(#{allPartnerCompaniesId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="provincePartnerCompaniesId !=null and provincePartnerCompaniesId !=''">
|
|
|
|
|
+ and eic.parent_id LIKE CONCAT(#{provincePartnerCompaniesId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="dockingPerson !=null and dockingPerson !=''">
|
|
|
|
|
+ and pa.docking_person =#{dockingPerson}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="provinceId != null and provinceId != ''">
|
|
|
|
|
+ and pa.dept_id LIKE CONCAT(#{provinceId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="cityId != null and cityId != ''">
|
|
|
|
|
+ and pa.dept_id LIKE CONCAT(#{cityId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="createTimeQuery != null and createTimeQuery != ''">
|
|
|
|
|
+ and DATE_FORMAT( a.create_time, '%Y-%m-%d') =#{createTimeQuery}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="countyId != null and countyId != ''">
|
|
|
|
|
+ and pa.dept_id LIKE CONCAT(#{countyId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="taskId != null and taskId != ''">
|
|
|
|
|
+ and a.task_id = #{taskId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="orderno !=null and orderno !=''">
|
|
|
|
|
+ and a.orderno =#{orderno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyName !=null and companyName !=''">
|
|
|
|
|
+ and a.company_id =#{companyName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="policyno !=null and policyno !=''">
|
|
|
|
|
+ and a.policyno =#{policyno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="documentaryFeesStatus !=null and documentaryFeesStatus !=''">
|
|
|
|
|
+ and a.documentary_fees_status =#{documentaryFeesStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="isNotCar !=null and isNotCar !=''">
|
|
|
|
|
+ and a.is_not_car =#{isNotCar}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="deptId !=null and deptId !=''">
|
|
|
|
|
+ and pa.dept_id =#{deptId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <if test="ids != null and ids != '' and ids.length > 0">
|
|
|
|
|
+ and a.id in
|
|
|
|
|
+ <foreach collection="ids" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="incomeIds != null and incomeIds != '' and incomeIds.size() > 0">
|
|
|
|
|
+ and a.id in
|
|
|
|
|
+ <foreach collection="incomeIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="selectIds != null and selectIds != '' and selectIds.size() > 0">
|
|
|
|
|
+ and a.id in
|
|
|
|
|
+ <foreach collection="selectIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="partnerCompaniesIdList != null and partnerCompaniesIdList != '' and partnerCompaniesIdList.size() > 0">
|
|
|
|
|
+ and a.partner_companies_id in
|
|
|
|
|
+ <foreach collection="partnerCompaniesIdList" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="isOther !=null and isOther !=''">
|
|
|
|
|
+ and a.is_not_documentary =#{isOther}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="licenseno != null and licenseno != ''">
|
|
|
|
|
+ and a.licenseno =#{licenseno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="syPolicyno != null and syPolicyno != ''">
|
|
|
|
|
+ and a.sy_policyno =#{syPolicyno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="noPolicyno != null and noPolicyno != ''">
|
|
|
|
|
+ and a.no_policyno =#{noPolicyno}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="signdate !=null and signdate !=''">
|
|
|
|
|
+ AND a.signdate =#{signdate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="partnerCompaniesId !=null and partnerCompaniesId !=''">
|
|
|
|
|
+ AND a.partner_companies_id =#{partnerCompaniesId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="partnerCompaniesName !=null and partnerCompaniesName !=''">
|
|
|
|
|
+ AND a.partner_companies_name =#{partnerCompaniesName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="createTime !=null and createTime !=''">
|
|
|
|
|
+ AND a.create_time =#{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="settlementTime !=null and settlementTime !=''">
|
|
|
|
|
+ AND a.settlement_time =#{settlementTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="settlementDate !=null and settlementDate !=''">
|
|
|
|
|
+ AND a.settlement_time =#{settlementDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="userId !=null and userId !=''">
|
|
|
|
|
+ and a.userId =#{userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyId !=null and companyId !=''">
|
|
|
|
|
+ and a.company_id =#{companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="riskcode !=null and riskcode !=''">
|
|
|
|
|
+ and a.riskcode =#{riskcode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="year !=null and year !=''">
|
|
|
|
|
+ AND YEAR(a.signdate) =#{year}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="month !=null and month !=''">
|
|
|
|
|
+ AND month(a.signdate) =#{month}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="day !=null and day !=''">
|
|
|
|
|
+ AND day(a.signdate) =#{day}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="insuredName !=null and insuredName !=''">
|
|
|
|
|
+ AND a.insured_name =#{insuredName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="jqStartDate !=null and jqStartDate != '' and jqEndDate != null and jqEndDate !=''">
|
|
|
|
|
+ AND DATE(a.jq_start_date) BETWEEN #{jqStartDate} AND #{jqEndDate}
|
|
|
|
|
+
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="syStartDate !=null and syStartDate != '' and syEndDate != null and syEndDate !=''">
|
|
|
|
|
+ AND DATE(a.sy_start_date) BETWEEN #{syStartDate} AND #{syEndDate}
|
|
|
|
|
+
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="yearStrat !=null and yearStrat != '' and yearEnd != null and yearEnd !=''">
|
|
|
|
|
+ AND DATE(a.signdate) BETWEEN #{yearStrat} AND #{yearEnd}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ GROUP BY
|
|
|
|
|
+ DATE_FORMAT( a.signdate, '%m')
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|