You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
3.6 KiB
XML
84 lines
3.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.supervision.police.mapper.ModelAtomicIndexMapper">
|
|
|
|
|
|
<select id="selectAll" resultType="com.supervision.police.domain.ModelAtomicIndex">
|
|
select mai.*,np.name as promptName from model_atomic_index mai
|
|
left join note_prompt np on mai.prompt_id = np.id
|
|
where mai.data_status = '1'
|
|
<if test="index.name != null and index.name != ''">
|
|
and mai.name like concat('%',#{index.name},'%')
|
|
</if>
|
|
<if test="index.remark != null and index.remark != ''">
|
|
and mai.remark = #{index.remark}
|
|
</if>
|
|
<if test="index.caseType != null and index.caseType != ''">
|
|
and mai.case_type = #{index.caseType}
|
|
</if>
|
|
<if test="index.indexSource != null and index.indexSource != ''">
|
|
and mai.index_source = #{index.indexSource}
|
|
</if>
|
|
<if test="index.recordType != null and index.recordType != ''">
|
|
and mai.record_type = #{index.recordType}
|
|
</if>
|
|
<if test="index.updateStartTime != null">
|
|
and DATE_FORMAT(mai.update_time, '%Y-%m-%d') >= DATE_FORMAT(#{index.updateStartTime}, '%Y-%m-%d')
|
|
</if>
|
|
<if test="index.updateEndTime != null">
|
|
and DATE_FORMAT(mai.update_time, '%Y-%m-%d') <= DATE_FORMAT(#{index.updateEndTime}, '%Y-%m-%d')
|
|
</if>
|
|
order by mai.update_time desc
|
|
</select>
|
|
|
|
|
|
<select id="selectByCaseType" resultType="com.supervision.police.domain.ModelAtomicIndex">
|
|
select * from model_atomic_index where data_status = '1' and case_type = #{caseType}
|
|
</select>
|
|
<select id="listCaseAtomicIndex" resultType="com.supervision.police.domain.ModelAtomicIndex">
|
|
select mai.id,
|
|
mai.name,
|
|
mai.remark,
|
|
mi.case_type,
|
|
mai.index_source,
|
|
mai.connect_status,
|
|
mai.judge_result,
|
|
mai.query_lang,
|
|
mai.prompt_id,
|
|
mai.properties,
|
|
mai.category_id,
|
|
mai.record_type,
|
|
mai.prompt,
|
|
mai.data_status
|
|
from model_atomic_index mai
|
|
left join model_index_atomic_relation miar on mai.id = miar.atomic_index_id
|
|
left join model_index mi on miar.model_index_id = mi.id
|
|
where mai.data_status = '1'
|
|
<if test="indexIdList != null and indexIdList.size() > 0">
|
|
and mai.id in
|
|
<foreach collection="indexIdList" item="indexId" open="(" separator="," close=")">
|
|
#{indexId}
|
|
</foreach>
|
|
</if>
|
|
<if test="caseType != null and caseType != ''">
|
|
and mi.case_type = #{caseType}
|
|
</if>
|
|
<if test="indexSource != null and indexSource != ''">
|
|
and mai.index_source = #{indexSource}
|
|
</if>
|
|
</select>
|
|
<select id="atomicUsed" resultType="com.supervision.police.dto.AtomicIndexUsedDTO">
|
|
select mai.id as atomic_index_id,
|
|
mai.name as atomic_index_name,
|
|
mi.id as index_id,
|
|
mi.name as index_name,
|
|
smi.model_name,
|
|
smi.id as model_id
|
|
from model_atomic_index mai
|
|
left join model_index_atomic_relation miar on mai.id = miar.atomic_index_id
|
|
left join model_index mi on miar.model_index_id = mi.id
|
|
left join scoring_model_info smi on smi.id = mi.case_type
|
|
where mai.data_status = '1'
|
|
and mi.data_status = '1' and mai.id = #{atomicIndexId}
|
|
</select>
|
|
</mapper> |