|
@@ -3009,8 +3009,9 @@
|
|
|
<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 != ''">
|
|
<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 DATE_FORMAT( #{taskStatisticsVo.beginDate}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.endDate}, '%Y-%m-%d')
|
|
|
|
|
|
|
+ AND DATE_FORMAT( iac.createtime, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{taskStatisticsVo.beginDate}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.endDate}, '%Y-%m-%d')
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
<if test="taskStatisticsVo.deptIds != null and taskStatisticsVo.deptIds != '' and taskStatisticsVo.deptIds.size() > 0">
|
|
<if test="taskStatisticsVo.deptIds != null and taskStatisticsVo.deptIds != '' and taskStatisticsVo.deptIds.size() > 0">
|
|
@@ -3876,4 +3877,71 @@
|
|
|
) a
|
|
) a
|
|
|
group by a.companyId,a.insuranceCompanyName,a.parterCompanyId,a.partnerCompaniesName,a.logo,a.dockingPerson,a.dockingPhone,a.agreementType
|
|
group by a.companyId,a.insuranceCompanyName,a.parterCompanyId,a.partnerCompaniesName,a.logo,a.dockingPerson,a.dockingPhone,a.agreementType
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="costReviewer" resultType="com.ydtech.modules.admin.model.dto.TaskStatisticsDto">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ ifa.audituser as "audituser",
|
|
|
|
|
+ su.name as "audituserName",
|
|
|
|
|
+ COUNT( CASE WHEN ifa.auditstatus = 1 THEN 1 END ) AS "auditstatusOrders",
|
|
|
|
|
+ COUNT( CASE WHEN ifa.auditstatus = 0 THEN 1 END ) AS "auditOrder",
|
|
|
|
|
+ COUNT( CASE WHEN ifa.auditstatus = 1 and ifa.audituser != '自动审核' THEN 1 END ) AS "persionAudit",
|
|
|
|
|
+ COUNT( CASE WHEN ifa.audituser = '自动审核' THEN 1 END ) AS "automaticAudit"
|
|
|
|
|
+ FROM
|
|
|
|
|
+ ins_fee_audit ifa
|
|
|
|
|
+ LEFT JOIN ins_orders io ON io.orderno = ifa.orderno
|
|
|
|
|
+ LEFT JOIN ins_area_company iac ON iac.orderno = io.orderno
|
|
|
|
|
+ LEFT JOIN ptl_agreement pa ON pa.id = iac.agreement_id
|
|
|
|
|
+ LEFT JOIN esm_ins_company eic ON eic.id = pa.partner_companies_id
|
|
|
|
|
+ left join sys_user su on su.id =ifa.audituser
|
|
|
|
|
+ <where>
|
|
|
|
|
+ 1=1
|
|
|
|
|
+ and iac.id = ifa.ins_order_no
|
|
|
|
|
+ and iac.orderstatus = 3
|
|
|
|
|
+ and (iac.del_flag = '1' or io.del_flag IS NULL or io.del_flag = 1)
|
|
|
|
|
+ <if test="taskStatisticsVo.reviewer !=null and taskStatisticsVo.reviewer !=''">
|
|
|
|
|
+ and su.name =#{taskStatisticsVo.reviewer}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.audittime !=null and taskStatisticsVo.audittime !=''">
|
|
|
|
|
+ and ifa.audittime =#{taskStatisticsVo.audittime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.companyId !=null and taskStatisticsVo.companyId !=''">
|
|
|
|
|
+ and iac.company_id =#{taskStatisticsVo.companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
|
|
|
+ AND DATE_FORMAT( iac.signing_time, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{taskStatisticsVo.createtimeStart}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.createtimeEnd}, '%Y-%m-%d')
|
|
|
|
|
+ </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 DATE_FORMAT( #{taskStatisticsVo.beginDate}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.endDate}, '%Y-%m-%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.auditTimeStart !=null and taskStatisticsVo.auditTimeEnd != '' and taskStatisticsVo.auditTimeStart !=null and taskStatisticsVo.auditTimeEnd != ''">
|
|
|
|
|
+ AND DATE_FORMAT( ifa.audittime, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{taskStatisticsVo.auditTimeStart}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.auditTimeEnd}, '%Y-%m-%d')
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.deptIds != null and taskStatisticsVo.deptIds != '' and taskStatisticsVo.deptIds.size() > 0">
|
|
|
|
|
+ AND io.deptid in
|
|
|
|
|
+ <foreach collection="taskStatisticsVo.deptIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.userIds != null and taskStatisticsVo.userIds != '' and taskStatisticsVo.userIds.size() > 0">
|
|
|
|
|
+ AND su.id in
|
|
|
|
|
+ <foreach collection="taskStatisticsVo.userIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test="taskStatisticsVo.riskCode != null and taskStatisticsVo.riskCode != '' and taskStatisticsVo.riskCode != 'all' ">
|
|
|
|
|
+ and iac.product = #{taskStatisticsVo.riskCode}
|
|
|
|
|
+ </when>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ GROUP BY
|
|
|
|
|
+ ifa.audituser
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|