| | |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="plaintiffs" column="plaintiffs"/> |
| | | <result property="defendants" column="defendants"/> |
| | | <result property="queCityName" column="que_city_name"/> |
| | | <result property="queAreaName" column="que_area_name"/> |
| | | <result property="queRoadName" column="que_road_name"/> |
| | | <result property="caseTypeFirst" column="case_type_first"/> |
| | | <result property="caseTypeFirstName" column="case_type_first_name"/> |
| | | <result property="caseTaskId" column="caseTaskId"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_case_info</sql> |
| | |
| | | a.create_time, |
| | | a.plaintiffs, |
| | | a.defendants, |
| | | a.que_city_name, |
| | | a.que_area_name, |
| | | a.que_road_name, |
| | | a.case_type_first, |
| | | a.case_type_first_name, |
| | | b.medi_result, |
| | | b.medi_result_name, |
| | | b.mediate_unit_id, |
| | |
| | | b.close_time, |
| | | b.agree_type, |
| | | b.agree_type_name, |
| | | b.agree_content |
| | | b.agree_content, |
| | | c.id as caseTaskId |
| | | </sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | |
| | | </if> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.partyShow != null and terms.partyShow !=''"> |
| | | and party_show = #{terms.partyShow} |
| | | </if> |
| | | <if test="terms.caseTitle != null and terms.caseTitle !=''"> |
| | | and case_title = #{terms.caseTitle} |
| | |
| | | <sql id="where-register-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.inputUnitName != null and terms.inputUnitName !=''"> |
| | | and t1.input_unit_mame = #{inputUnitName} |
| | | <if test="terms.inputUnitId != null and terms.inputUnitId !=''"> |
| | | and t1.input_unit_id = #{terms.inputUnitId} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | |
| | | <if test="terms.caseTypeFirstName != null and terms.caseTypeFirstName !=''"> |
| | | and t1.case_type_first_name = #{caseTypeFirstName} |
| | | </if> |
| | | <if test="terms.caseTypeName != null and terms.caseTypeName !=''"> |
| | | and t1.case_type_name = #{terms.caseTypeName} |
| | | <if test="terms.caseType != null and terms.caseType !=''"> |
| | | and t1.case_type = #{terms.caseType} |
| | | </if> |
| | | <if test="terms.canal != null and terms.canal !=''"> |
| | | and t1.canal = #{canal} |
| | | and t1.canal = #{terms.canal} |
| | | </if> |
| | | <if test="terms.canalName != null and terms.canalName !=''"> |
| | | and t1.canal_name = #{canalName} |
| | | and t1.canal_name = #{terms.canalName} |
| | | </if> |
| | | <if test="terms.plaintiffs != null and terms.plaintiffs !=''"> |
| | | and t1.plaintiffs = #{terms.plaintiffs} |
| | |
| | | <if test="terms.defendants != null and terms.defendants !=''"> |
| | | and t1.defendants = #{terms.defendants} |
| | | </if> |
| | | <if test="terms.status != null and terms.status !=''"> |
| | | and t1.status = #{terms.status} |
| | | </if> |
| | | <if test="terms.statusName != null and terms.statusName !=''"> |
| | | and t1.statusName = #{terms.statusName} |
| | | and t1.status_name = #{terms.statusName} |
| | | </if> |
| | | <if test="terms.mediResultName != null and terms.mediResultName !=''"> |
| | | and t2.medi_result_name = #{terms.mediResultName} |
| | |
| | | dyh_case_info t1 |
| | | left join dyh_case_info_unfold t2 on t1.id = t2.id |
| | | left join (select count(*) as number ,case_id from dyh_case_supervise group by case_id) t3 on t3.case_id=t1.id |
| | | left join (select id ,case_id from dyh_case_task limit 1) t4 on t1.id = t4.case_id |
| | | left join (select id ,case_id from dyh_case_task group by case_id) t4 on t1.id = t4.case_id |
| | | <include refid="where-register-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | |
| | | FROM |
| | | dyh_case_info t1 |
| | | left join dyh_case_info_unfold t2 on t1.id = t2.id |
| | | left join dyh_case_task t4 on t1.id = t4.case_id |
| | | <include refid="where-register-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | |
| | | <include refid="column-part-all"/> |
| | | FROM |
| | | dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.id |
| | | left join (select id ,case_id from dyh_case_task group by case_id) c on a.id = c.case_id |
| | | <include refid="where-part-all"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | |
| | | count(1) as caseNum, |
| | | sum(case when b.medi_result = '22_00025-1' then 1 else 0 end) as resolveNum, |
| | | sum(case when b.medi_result is null and a.info_process <![CDATA[ < ]]> 4 then 1 else 0 end) as resolveingNum, |
| | | sum(case when b.medi_result = '22_00025-2' then 1 else 0 end) as unResolveNum |
| | | sum(case when b.medi_result = '22_00025-2' then 1 else 0 end) as unResolveNum, |
| | | sum(case when a.info_process = 4 then 1 else 0 end) as rejectNum |
| | | FROM |
| | | dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.id |
| | | <include refid="where-part-all"/> |