|
@@ -43,36 +43,75 @@
|
|
|
<select id="queryOrderAndCostData" resultMap="OrderAndCostDataMap">
|
|
<select id="queryOrderAndCostData" resultMap="OrderAndCostDataMap">
|
|
|
|
|
|
|
|
SELECT
|
|
SELECT
|
|
|
- ''institution,
|
|
|
|
|
- <if test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
- p.deptname,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.teamCode == null || reportReqVo.teamCode == ''">
|
|
|
|
|
- ''deptname,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
|
|
|
- p.username,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.userId == null || reportReqVo.userId == ''">
|
|
|
|
|
- ''username,
|
|
|
|
|
|
|
+ <!--下钻查询时拼接-->
|
|
|
|
|
+ <if test="reportReqVo.isDrilling != null and reportReqVo.isDrilling == '1'.toString()">
|
|
|
|
|
+ <!--按团队下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '1'.toString()">
|
|
|
|
|
+ p.`username`,p.userid userId,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--按机构下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '0'.toString()">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--下钻的是五级机构时,下钻到团队-->
|
|
|
|
|
+ <when test="reportReqVo.drilFlag != null and reportReqVo.drilFlag == '0'.toString()">
|
|
|
|
|
+ p.deptid,
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--下钻的非五级机构时,下钻到下级机构-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ substr(p.deptid,1,#{reportReqVo.drilFlag}) institutionId,
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
p.`risk_name` risk_name,
|
|
p.`risk_name` risk_name,
|
|
|
- count(1) policy_count,
|
|
|
|
|
|
|
+ count(distinct policyno) policy_count,
|
|
|
SUM(p.`sumpremium`) sumpremium,
|
|
SUM(p.`sumpremium`) sumpremium,
|
|
|
SUM(p.`supervise_costs_premiums`) supervise_costs_premiums,
|
|
SUM(p.`supervise_costs_premiums`) supervise_costs_premiums,
|
|
|
SUM(p.`other_costs_premiums`) other_costs_premiums,
|
|
SUM(p.`other_costs_premiums`) other_costs_premiums,
|
|
|
SUM(p.`sum_costs_premiums`) sum_costs_premiums
|
|
SUM(p.`sum_costs_premiums`) sum_costs_premiums
|
|
|
FROM
|
|
FROM
|
|
|
report_insurance_policy p WHERE 1=1
|
|
report_insurance_policy p WHERE 1=1
|
|
|
- <if test="reportReqVo.deptId != null and reportReqVo.deptId != ''">
|
|
|
|
|
- and p.deptid like #{reportReqVo.deptId}"%"
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
- and p.deptid = #{reportReqVo.teamCode}
|
|
|
|
|
|
|
+ <!--下钻查询时拼接-->
|
|
|
|
|
+ <if test="reportReqVo.isDrilling != null and reportReqVo.isDrilling == '1'.toString()">
|
|
|
|
|
+ <!--按团队下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '1'.toString()">
|
|
|
|
|
+ <if test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
+ and p.deptid = #{reportReqVo.teamCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--按机构下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '0'.toString()">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--下钻的是五级机构时,下钻到团队-->
|
|
|
|
|
+ <when test="reportReqVo.drilFlag != null and reportReqVo.drilFlag == '0'.toString()">
|
|
|
|
|
+ and p.deptid in (SELECT id FROM `sys_dept` WHERE parent_id= #{reportReqVo.deptId} )
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--下钻的非五级机构时,下钻到下级机构-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ and substr(p.deptid,1,#{reportReqVo.drilFlag}) in (SELECT id FROM `sys_dept` WHERE parent_id= #{reportReqVo.deptId} )
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
|
|
|
- and p.userid = #{reportReqVo.userId}
|
|
|
|
|
|
|
+ <!--非下钻查询时拼接-->
|
|
|
|
|
+ <if test="reportReqVo.isDrilling != null and reportReqVo.isDrilling == '0'.toString()">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--条件中团队不为空时,直接拼接团队-->
|
|
|
|
|
+ <when test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
+ and p.deptid = #{reportReqVo.teamCode}
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--条件中团队为空时,使用机构模糊查询-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ <if test="reportReqVo.deptId != null and reportReqVo.deptId != ''">
|
|
|
|
|
+ and p.deptid like #{reportReqVo.deptId}"%"
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ <if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
|
|
|
+ and p.userid = #{reportReqVo.userId}
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <!--通用查询条件拼接-->
|
|
|
<if test="reportReqVo.insCompany != null and reportReqVo.insCompany != ''">
|
|
<if test="reportReqVo.insCompany != null and reportReqVo.insCompany != ''">
|
|
|
and p.company_id = #{reportReqVo.insCompany}
|
|
and p.company_id = #{reportReqVo.insCompany}
|
|
|
</if>
|
|
</if>
|
|
@@ -85,11 +124,25 @@
|
|
|
and p.inside_pay_time between #{reportReqVo.quoteStartDate} AND #{reportReqVo.quoteEndDate}
|
|
and p.inside_pay_time between #{reportReqVo.quoteStartDate} AND #{reportReqVo.quoteEndDate}
|
|
|
</if>
|
|
</if>
|
|
|
GROUP BY p.`risk_name`
|
|
GROUP BY p.`risk_name`
|
|
|
- <if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
|
|
|
- ,p.username
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
- ,p.deptname
|
|
|
|
|
|
|
+ <!--下钻查询时拼接-->
|
|
|
|
|
+ <if test="reportReqVo.isDrilling != null and reportReqVo.isDrilling == '1'.toString()">
|
|
|
|
|
+ <!--按团队下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '1'.toString()">
|
|
|
|
|
+ ,p.`username`,p.userid order by p.`username`,p.`risk_name`
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--按机构下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '0'.toString()">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--下钻的是五级机构时,下钻到团队-->
|
|
|
|
|
+ <when test="reportReqVo.drilFlag != null and reportReqVo.drilFlag == '0'.toString()">
|
|
|
|
|
+ ,p.deptid order by p.deptid,p.`risk_name`
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--下钻的非五级机构时,下钻到下级机构-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ ,substr(p.deptid,1,#{reportReqVo.drilFlag}) order by substr(p.deptid,1,#{reportReqVo.drilFlag}),p.`risk_name`
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
@@ -109,36 +162,75 @@
|
|
|
count(1)
|
|
count(1)
|
|
|
from (
|
|
from (
|
|
|
SELECT
|
|
SELECT
|
|
|
- ''institution,
|
|
|
|
|
- <if test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
- p.deptname,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.teamCode == null || reportReqVo.teamCode == ''">
|
|
|
|
|
- ''deptname,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
|
|
|
- p.username,
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.userId == null || reportReqVo.userId == ''">
|
|
|
|
|
- ''username,
|
|
|
|
|
|
|
+ <!--下钻查询时拼接-->
|
|
|
|
|
+ <if test="reportReqVo.isDrilling != null and reportReqVo.isDrilling == '1'.toString()">
|
|
|
|
|
+ <!--按团队下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '1'.toString()">
|
|
|
|
|
+ p.`username`,p.userid userId,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--按机构下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '0'.toString()">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--下钻的是五级机构时,下钻到团队-->
|
|
|
|
|
+ <when test="reportReqVo.drilFlag != null and reportReqVo.drilFlag == '0'.toString()">
|
|
|
|
|
+ p.deptid,
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--下钻的非五级机构时,下钻到下级机构-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ substr(p.deptid,1,#{reportReqVo.drilFlag}) institutionId,
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
p.`risk_name` risk_name,
|
|
p.`risk_name` risk_name,
|
|
|
- count(1) policy_count,
|
|
|
|
|
|
|
+ count(distinct policyno) policy_count,
|
|
|
SUM(p.`sumpremium`) sumpremium,
|
|
SUM(p.`sumpremium`) sumpremium,
|
|
|
SUM(p.`supervise_costs_premiums`) supervise_costs_premiums,
|
|
SUM(p.`supervise_costs_premiums`) supervise_costs_premiums,
|
|
|
SUM(p.`other_costs_premiums`) other_costs_premiums,
|
|
SUM(p.`other_costs_premiums`) other_costs_premiums,
|
|
|
SUM(p.`sum_costs_premiums`) sum_costs_premiums
|
|
SUM(p.`sum_costs_premiums`) sum_costs_premiums
|
|
|
FROM
|
|
FROM
|
|
|
report_insurance_policy p WHERE 1=1
|
|
report_insurance_policy p WHERE 1=1
|
|
|
- <if test="reportReqVo.deptId != null and reportReqVo.deptId != ''">
|
|
|
|
|
- and p.deptid like #{reportReqVo.deptId}"%"
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
- and p.deptid = #{reportReqVo.teamCode}
|
|
|
|
|
|
|
+ <!--下钻查询时拼接-->
|
|
|
|
|
+ <if test="reportReqVo.isDrilling != null and reportReqVo.isDrilling == '1'.toString()">
|
|
|
|
|
+ <!--按团队下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '1'.toString()">
|
|
|
|
|
+ <if test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
+ and p.deptid = #{reportReqVo.teamCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--按机构下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '0'.toString()">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--下钻的是五级机构时,下钻到团队-->
|
|
|
|
|
+ <when test="reportReqVo.drilFlag != null and reportReqVo.drilFlag == '0'.toString()">
|
|
|
|
|
+ and p.deptid in (SELECT id FROM `sys_dept` WHERE parent_id= #{reportReqVo.deptId} )
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--下钻的非五级机构时,下钻到下级机构-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ and substr(p.deptid,1,#{reportReqVo.drilFlag}) in (SELECT id FROM `sys_dept` WHERE parent_id= #{reportReqVo.deptId} )
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
|
|
|
- and p.userid = #{reportReqVo.userId}
|
|
|
|
|
|
|
+ <!--非下钻查询时拼接-->
|
|
|
|
|
+ <if test="reportReqVo.isDrilling != null and reportReqVo.isDrilling == '0'.toString()">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--条件中团队不为空时,直接拼接团队-->
|
|
|
|
|
+ <when test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
+ and p.deptid = #{reportReqVo.teamCode}
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--条件中团队为空时,使用机构模糊查询-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ <if test="reportReqVo.deptId != null and reportReqVo.deptId != ''">
|
|
|
|
|
+ and p.deptid like #{reportReqVo.deptId}"%"
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ <if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
|
|
|
+ and p.userid = #{reportReqVo.userId}
|
|
|
|
|
+ </if>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <!--通用查询条件拼接-->
|
|
|
<if test="reportReqVo.insCompany != null and reportReqVo.insCompany != ''">
|
|
<if test="reportReqVo.insCompany != null and reportReqVo.insCompany != ''">
|
|
|
and p.company_id = #{reportReqVo.insCompany}
|
|
and p.company_id = #{reportReqVo.insCompany}
|
|
|
</if>
|
|
</if>
|
|
@@ -151,12 +243,115 @@
|
|
|
and p.inside_pay_time between #{reportReqVo.quoteStartDate} AND #{reportReqVo.quoteEndDate}
|
|
and p.inside_pay_time between #{reportReqVo.quoteStartDate} AND #{reportReqVo.quoteEndDate}
|
|
|
</if>
|
|
</if>
|
|
|
GROUP BY p.`risk_name`
|
|
GROUP BY p.`risk_name`
|
|
|
|
|
+ <!--下钻查询时拼接-->
|
|
|
|
|
+ <if test="reportReqVo.isDrilling != null and reportReqVo.isDrilling == '1'.toString()">
|
|
|
|
|
+ <!--按团队下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '1'.toString()">
|
|
|
|
|
+ ,p.`username`,p.userid order by p.`username`,p.`risk_name`
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--按机构下钻时-->
|
|
|
|
|
+ <if test="reportReqVo.drilType != null and reportReqVo.drilType == '0'.toString()">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--下钻的是五级机构时,下钻到团队-->
|
|
|
|
|
+ <when test="reportReqVo.drilFlag != null and reportReqVo.drilFlag == '0'.toString()">
|
|
|
|
|
+ ,p.deptid order by p.deptid,p.`risk_name`
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--下钻的非五级机构时,下钻到下级机构-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ ,substr(p.deptid,1,#{reportReqVo.drilFlag}) order by substr(p.deptid,1,#{reportReqVo.drilFlag}),p.`risk_name`
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ ) as s
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="OrderVolumeAndCostStatisticsListResMap" type="com.ydtech.modules.report.model.vo.OrderVolumeAndCostStatisticsListResVo">
|
|
|
|
|
+ <result property="insCompany" column="ins_company" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="agreementName" column="agreement_name" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="policyno" column="policyno" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="insidePayTime" column="inside_pay_time" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="startDate" column="start_date" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="endDate" column="end_date" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="riskName" column="risk_name" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="sumpremium" column="sumpremium" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result property="taxpremium" column="taxpremium" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result property="taxLaterPremium" column="tax_later_premium" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result property="insuranceSubAmount" column="insurance_sub_amount" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="frameno" column="frameno" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="licenseno" column="licenseno" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="vehicleUse" column="vehicle_use" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="powerType" column="power_type" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="cimodelclass" column="cimodelclass" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="limitLoad" column="limit_load" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="appliName" column="appli_name" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="insureName" column="insure_name" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="deptname" column="deptname" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="username" column="username" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="product" column="product" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="sumCostsPremiums" column="sum_costs_premiums" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result property="superviseCostsPremiums" column="supervise_costs_premiums" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result property="otherCostsPremiums" column="other_costs_premiums" jdbcType="DECIMAL"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="queryOrderAndCostList" resultMap="OrderVolumeAndCostStatisticsListResMap">
|
|
|
|
|
+
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ ins_company,
|
|
|
|
|
+ agreement_name,
|
|
|
|
|
+ policyno,
|
|
|
|
|
+ DATE_FORMAT(inside_pay_time, '%Y-%m-%d') inside_pay_time,
|
|
|
|
|
+ DATE_FORMAT(start_date, '%Y-%m-%d') start_date,
|
|
|
|
|
+ DATE_FORMAT(end_date, '%Y-%m-%d') end_date,
|
|
|
|
|
+ risk_name,
|
|
|
|
|
+ sumpremium,
|
|
|
|
|
+ taxpremium,
|
|
|
|
|
+ tax_later_premium,
|
|
|
|
|
+ insurance_sub_amount,
|
|
|
|
|
+ frameno,
|
|
|
|
|
+ licenseno,
|
|
|
|
|
+ vehicle_use,
|
|
|
|
|
+ power_type,
|
|
|
|
|
+ cimodelclass,
|
|
|
|
|
+ limit_load,
|
|
|
|
|
+ appli_name,
|
|
|
|
|
+ insure_name,
|
|
|
|
|
+ deptname,
|
|
|
|
|
+ username,
|
|
|
|
|
+ product,
|
|
|
|
|
+ sum_costs_premiums,
|
|
|
|
|
+ supervise_costs_premiums,
|
|
|
|
|
+ other_costs_premiums
|
|
|
|
|
+ FROM
|
|
|
|
|
+ report_insurance_policy p WHERE 1=1
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <!--条件中团队不为空时,直接拼接团队-->
|
|
|
|
|
+ <when test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
+ and p.deptid = #{reportReqVo.teamCode}
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <!--条件中团队为空时,使用机构模糊查询-->
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ <if test="reportReqVo.deptId != null and reportReqVo.deptId != ''">
|
|
|
|
|
+ and p.deptid like #{reportReqVo.deptId}"%"
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
<if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
<if test="reportReqVo.userId != null and reportReqVo.userId != ''">
|
|
|
- ,p.username
|
|
|
|
|
|
|
+ and p.userid = #{reportReqVo.userId}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="reportReqVo.teamCode != null and reportReqVo.teamCode != ''">
|
|
|
|
|
- ,p.deptname
|
|
|
|
|
|
|
+ <!--通用查询条件拼接-->
|
|
|
|
|
+ <if test="reportReqVo.insCompany != null and reportReqVo.insCompany != ''">
|
|
|
|
|
+ and p.company_id = #{reportReqVo.insCompany}
|
|
|
</if>
|
|
</if>
|
|
|
- ) as s
|
|
|
|
|
|
|
+ <if test="reportReqVo.riskCode != null and reportReqVo.riskCode != ''">
|
|
|
|
|
+ <if test="reportReqVo.riskCode!='ALL'.toString()">
|
|
|
|
|
+ and p.risk_code = #{reportReqVo.riskCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="reportReqVo.quoteStartDate != null and reportReqVo.quoteEndDate != null">
|
|
|
|
|
+ and p.inside_pay_time between #{reportReqVo.quoteStartDate} AND #{reportReqVo.quoteEndDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
</select>
|
|
</select>
|
|
|
</mapper>
|
|
</mapper>
|