|
|
@@ -884,6 +884,9 @@
|
|
|
<if test="vo.managementSource != null and vo.managementSource!=''">
|
|
|
AND sd.management_source =#{vo.managementSource}
|
|
|
</if>
|
|
|
+ <if test="vo.userId != null and vo.userId !=''">
|
|
|
+ AND io.userid =#{vo.userId}
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
agree.insurance_company,
|
|
|
iac.company_id,
|
|
|
@@ -906,6 +909,9 @@
|
|
|
<if test="vo.parterCompanyId != null and vo.parterCompanyId!='' ">
|
|
|
AND agree.partner_companies_id = #{vo.parterCompanyId}
|
|
|
</if>
|
|
|
+ <if test="vo.userId != null and vo.userId!=''">
|
|
|
+ AND iace.user_id =#{vo.userId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
|
|
|
</select>
|
|
|
@@ -937,6 +943,9 @@
|
|
|
<if test="vo.managementSource != null and vo.managementSource!=''">
|
|
|
AND sd.management_source =#{vo.managementSource}
|
|
|
</if>
|
|
|
+ <if test="vo.userId != null and vo.userId !=''">
|
|
|
+ AND io.userid =#{vo.userId}
|
|
|
+ </if>
|
|
|
GROUP BY
|
|
|
agree.partner_companies_id
|
|
|
) a
|
|
|
@@ -1008,6 +1017,10 @@
|
|
|
and io.deptid like "${taskStatisticsVo.houseId}%"
|
|
|
</if>
|
|
|
|
|
|
+ <if test="taskStatisticsVo.userId != null and taskStatisticsVo.userId != ''">
|
|
|
+ and io.userid =#{taskStatisticsVo.userId}
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
|
</if>
|
|
|
@@ -1073,6 +1086,10 @@
|
|
|
and iac.createtime >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
</if>
|
|
|
|
|
|
+ <if test="taskStatisticsVo.userId != null and taskStatisticsVo.userId != ''">
|
|
|
+ and io.userid =#{taskStatisticsVo.userId}
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
<choose>
|
|
|
<when test="taskStatisticsVo.days =='1'">
|
|
|
@@ -1232,6 +1249,9 @@
|
|
|
<if test="taskStatisticsVo.houseId != null and taskStatisticsVo.houseId != ''">
|
|
|
and io.deptid like "${taskStatisticsVo.houseId}%"
|
|
|
</if>
|
|
|
+ <if test="taskStatisticsVo.userId !=null and taskStatisticsVo.userId!='' ">
|
|
|
+ and io.userid =#{taskStatisticsVo.userId}
|
|
|
+ </if>
|
|
|
|
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
|
@@ -1562,6 +1582,9 @@
|
|
|
a.averagePremium as "averagePremium",
|
|
|
a.userNumber as "userNumber",
|
|
|
a.perCapitaAmount as "perCapitaAmount",
|
|
|
+ c.docking_person as "dockingPerson",
|
|
|
+ c.docking_phone as "dockingPhone",
|
|
|
+ c.agreement_type as "agreementType",
|
|
|
b.logo as "logo"
|
|
|
from (
|
|
|
SELECT
|
|
|
@@ -1569,6 +1592,7 @@
|
|
|
agree.insurance_company AS "insuranceCompanyName",
|
|
|
agree.partner_companies_id AS "parterCompanyId",
|
|
|
ins.namesimple AS "partnerCompaniesName",
|
|
|
+ agree.id as "agreeId",
|
|
|
IFNULL(sum(iac.jqpremium),0) + IFNULL(sum(iac.sypremium),0) +IFNULL(sum(iac.jypremium),0) as "totalPremium",
|
|
|
COUNT(0 ) AS "qutationInsureCount",
|
|
|
IFNULL(sum(iac.jqpremium),0) + IFNULL(sum(iac.sypremium),0) +IFNULL(sum(iac.jypremium),0) / COUNT(0 ) AS "averagePremium",
|
|
|
@@ -1609,7 +1633,8 @@
|
|
|
GROUP BY
|
|
|
agree.insurance_company_id,
|
|
|
agree.insurance_company,
|
|
|
- agree.partner_companies_id
|
|
|
+ agree.partner_companies_id,
|
|
|
+ agree.id
|
|
|
<choose>
|
|
|
<when test="vo.orderSort != null and vo.orderSort != '' and vo.userNumberSort == null ">
|
|
|
order by
|
|
|
@@ -1626,6 +1651,7 @@
|
|
|
</choose>
|
|
|
) a
|
|
|
left join esm_ins_company b on b.id =a.companyId
|
|
|
+ left join ptl_agreement c on c.id =a.agreeId
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@@ -1742,7 +1768,7 @@
|
|
|
</if>
|
|
|
|
|
|
<if test="vo.userId != null and vo.userId!='' ">
|
|
|
- AND io.userId =#{vo.userId}
|
|
|
+ AND io.userid =#{vo.userId}
|
|
|
</if>
|
|
|
|
|
|
<if test="vo.userName != null and vo.userName!='' ">
|
|
|
@@ -1831,7 +1857,7 @@
|
|
|
</if>
|
|
|
|
|
|
<if test="vo.userId != null and vo.userId!='' ">
|
|
|
- AND io.userId =#{vo.userId}
|
|
|
+ AND io.userid =#{vo.userId}
|
|
|
</if>
|
|
|
|
|
|
<if test="vo.userName != null and vo.userName!='' ">
|
|
|
@@ -1874,7 +1900,7 @@
|
|
|
</if>
|
|
|
|
|
|
<if test="vo.userId != null and vo.userId!='' ">
|
|
|
- AND io.userId =#{vo.userId}
|
|
|
+ AND io.userid =#{vo.userId}
|
|
|
</if>
|
|
|
|
|
|
<if test="vo.userName != null and vo.userName!='' ">
|