|
|
@@ -185,4 +185,32 @@
|
|
|
ORDER BY violationTotal DESC
|
|
|
</select>
|
|
|
|
|
|
+ <select id="afterViolateRuleTypePageList"
|
|
|
+ resultType="org.jeecg.modules.medical.common.bo.mid.response.MidAuditDetailResponse">
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ medical_ins_rule_info_name
|
|
|
+ ,medical_ins_rule_info_code
|
|
|
+ ,project_type
|
|
|
+ ,(select IFNULL(count(amount), 0) from mid_incident_audit_detail WHERE medical_ins_rule_info_code = m.medical_ins_rule_info_code ) as violationTotal -- 违规总数
|
|
|
+ ,sum(amount) as errorAmountTotal -- 异常金额总和
|
|
|
+ FROM afterwards_audit_detail as m
|
|
|
+ <where>
|
|
|
+ <if test="medicalInsRuleInfoName != null and medicalInsRuleInfoName != ''">
|
|
|
+ AND medical_ins_rule_info_name = #{medicalInsRuleInfoName}
|
|
|
+ </if>
|
|
|
+ <if test="projectType != null and projectType != ''">
|
|
|
+ AND project_type = #{projectType}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and startTime != ''">
|
|
|
+ and <![CDATA[ create_time >= #{startTime} ]]>
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
+ and <![CDATA[ create_time <= #{endTime} ]]>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </where>
|
|
|
+ GROUP BY medical_ins_rule_info_code
|
|
|
+ ORDER BY violationTotal DESC
|
|
|
+ </select>
|
|
|
</mapper>
|