|
@@ -876,9 +876,6 @@
|
|
|
<if test="vo.managementSource != null and vo.managementSource!=''">
|
|
<if test="vo.managementSource != null and vo.managementSource!=''">
|
|
|
AND sd.management_source =#{vo.managementSource}
|
|
AND sd.management_source =#{vo.managementSource}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="vo.days !=null and vo.days !='' ">
|
|
|
|
|
- and iac.signing_time >= DATE_SUB(NOW(), INTERVAL #{vo.days} DAY)
|
|
|
|
|
- </if>
|
|
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
agree.insurance_company_id,
|
|
agree.insurance_company_id,
|
|
|
agree.insurance_company,
|
|
agree.insurance_company,
|
|
@@ -955,6 +952,12 @@
|
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
<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}
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="taskStatisticsVo.beginDate !=null and taskStatisticsVo.beginDate != '' and taskStatisticsVo.endDate !=null and taskStatisticsVo.endDate != ''">
|
|
|
|
|
+ AND DATE_FORMAT( iac.signing_time, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.beginDate} AND #{taskStatisticsVo.endDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
|
|
+ and iac.signing_time >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
<choose>
|
|
<choose>
|
|
@@ -1031,7 +1034,7 @@
|
|
|
<select id="insuranceCompanyQueryPage" resultType="com.ydtech.modules.admin.model.dto.TaskStatisticsDto">
|
|
<select id="insuranceCompanyQueryPage" resultType="com.ydtech.modules.admin.model.dto.TaskStatisticsDto">
|
|
|
SELECT
|
|
SELECT
|
|
|
a.*,
|
|
a.*,
|
|
|
- ( SELECT eic.namesimple FROM esm_ins_company eic WHERE eic.id = a.partner_companies_id ) AS "namesimple"
|
|
|
|
|
|
|
+ ( SELECT eic.namesimple FROM esm_ins_company eic WHERE eic.id = a.partner_companies_id ) AS "partnerCompaniesName"
|
|
|
FROM
|
|
FROM
|
|
|
(
|
|
(
|
|
|
SELECT
|
|
SELECT
|
|
@@ -1068,21 +1071,12 @@
|
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
<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}
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="taskStatisticsVo.beginDate !=null and taskStatisticsVo.beginDate != '' and taskStatisticsVo.endDate !=null and taskStatisticsVo.endDate != ''">
|
|
|
|
|
+ AND DATE_FORMAT( iac.signing_time, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.beginDate} AND #{taskStatisticsVo.endDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- <choose>
|
|
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
-
|
|
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
-
|
|
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
- </choose>
|
|
|
|
|
|
|
+ and iac.signing_time >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY
|
|
GROUP BY
|
|
@@ -1121,21 +1115,12 @@
|
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
<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}
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="taskStatisticsVo.beginDate !=null and taskStatisticsVo.beginDate != '' and taskStatisticsVo.endDate !=null and taskStatisticsVo.endDate != ''">
|
|
|
|
|
+ AND DATE_FORMAT( iac.signing_time, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.beginDate} AND #{taskStatisticsVo.endDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- <choose>
|
|
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
-
|
|
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
-
|
|
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
- </choose>
|
|
|
|
|
|
|
+ and iac.signing_time >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
</if>
|
|
</if>
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY
|
|
GROUP BY
|
|
@@ -1183,6 +1168,14 @@
|
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
|
|
+ <if test="taskStatisticsVo.beginDate !=null and taskStatisticsVo.beginDate != '' and taskStatisticsVo.endDate !=null and taskStatisticsVo.endDate != ''">
|
|
|
|
|
+ AND DATE_FORMAT( iac.signing_time, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.beginDate} AND #{taskStatisticsVo.endDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
|
|
+ and iac.signing_time >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
<if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
<choose>
|
|
<choose>
|
|
|
<when test="taskStatisticsVo.days =='1'">
|
|
<when test="taskStatisticsVo.days =='1'">
|
|
@@ -1221,26 +1214,21 @@
|
|
|
AND DATE_FORMAT( ifa.audittime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
AND DATE_FORMAT( ifa.audittime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
|
|
- <choose>
|
|
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
|
|
- and ifa.audittime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
-
|
|
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
|
|
- and ifa.audittime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
-
|
|
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
|
|
- and ifa.audittime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
|
|
- </when>
|
|
|
|
|
- </choose>
|
|
|
|
|
|
|
+ <if test="taskStatisticsVo.beginDate !=null and taskStatisticsVo.beginDate != '' and taskStatisticsVo.endDate !=null and taskStatisticsVo.endDate != ''">
|
|
|
|
|
+ AND DATE_FORMAT( iac.signing_time, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.beginDate} AND #{taskStatisticsVo.endDate}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
- <if test="taskStatisticsVo.riskCode != null and taskStatisticsVo.riskCode != ''">
|
|
|
|
|
- and iac.product = #{taskStatisticsVo.riskCode}
|
|
|
|
|
|
|
+ <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
|
|
+ and iac.signing_time >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test="taskStatisticsVo.riskCode != null and taskStatisticsVo.riskCode != '' and taskStatisticsVo.riskCode != 'all' ">
|
|
|
|
|
+ and iac.product = #{taskStatisticsVo.riskCode}
|
|
|
|
|
+ </when>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</where>
|
|
</where>
|
|
|
GROUP BY
|
|
GROUP BY
|
|
|
iac.company_id,
|
|
iac.company_id,
|