|
|
|
@ -33,13 +33,17 @@
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectMaxIndex" resultType="java.lang.Integer">
|
|
|
|
|
select ifnull(max(index_num), 0) from model_case where data_status = '1'
|
|
|
|
|
select ifnull(max(index_num), 0)
|
|
|
|
|
from model_case
|
|
|
|
|
where data_status = '1'
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getIndexDetail" resultType="com.supervision.police.dto.IndexDetail">
|
|
|
|
|
select mi.name as indexName, mi.index_score as score, mir.index_result, mir.atomic_ids
|
|
|
|
|
from model_index mi
|
|
|
|
|
left join model_index_result mir on mi.id = mir.index_id
|
|
|
|
|
WHERE mi.data_status = '1' and mir.case_id = #{caseId} and mi.index_type = #{indexType}
|
|
|
|
|
left join model_index_result mir on mi.id = mir.index_id
|
|
|
|
|
WHERE mi.data_status = '1'
|
|
|
|
|
and mir.case_id = #{caseId}
|
|
|
|
|
and mi.index_type = #{indexType}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getAtomicDetail" resultType="com.supervision.police.dto.AtomicIndexDTO">
|
|
|
|
|
select mai.name as indexName,
|
|
|
|
@ -47,7 +51,7 @@
|
|
|
|
|
concat(nrs.question, nrs.answer) as record
|
|
|
|
|
from model_atomic_result mar
|
|
|
|
|
left join model_atomic_index mai on mar.atomic_id = mai.id
|
|
|
|
|
left join note_record_split nrs on mar.record_id = nrs.id
|
|
|
|
|
left join note_record_split nrs on mar.record_split_id = nrs.id
|
|
|
|
|
where mar.case_id = #{caseId} and mar.atomic_id in
|
|
|
|
|
<foreach collection="atomicIds" item="item" open="(" close=")" separator=",">
|
|
|
|
|
#{item}
|
|
|
|
|