package com.gkhy.safePlatform.targetDuty.repository;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.gkhy.safePlatform.targetDuty.entity.TargetMng;
|
import org.apache.ibatis.annotations.Select;
|
import org.springframework.stereotype.Repository;
|
|
import java.util.Map;
|
|
/**
|
* 目标指标(TargetMng)表数据库访问层
|
*
|
* @author xurui
|
* @since 2022-07-20 11:49:22
|
*/
|
@Repository
|
public interface TargetMngRepository extends BaseMapper<TargetMng> {
|
@Select("<script>select COUNT(1) from target_mng where 1=1 " +
|
"<if test =\"divideStatus !='' and divideStatus !=null\">and divide_status = #{divideStatus}</if> " +
|
"<if test =\"targetType !='' and targetType !=null\">and target_type = #{targetType}</if>" +
|
"<if test =\"qName !='' and qName !=null\">and q_name = #{qName}</if>" +
|
"<if test =\"indexNum !='' and indexNum !=null\">and index_num = #{indexNum}</if>" +
|
"</script> ")
|
Integer selectTotal(Map<String, Object> beanToMap);
|
|
@Select("<script>select COUNT(target_id) from target_divide_detail a INNER JOIN target_mng b on a.target_id = b.id \n" +
|
"WHERE a.id not in (select target_divide_detail_id from target_examine where examine_result = 1)\n" +
|
"<if test =\"divideStatus !='' and divideStatus !=null\">and b.divide_status = #{divideStatus}</if> " +
|
"<if test =\"targetType !='' and targetType !=null\">and b.target_type = #{targetType}</if>" +
|
"<if test =\"qName !='' and qName !=null\">and b.q_name = #{qName}</if>" +
|
"<if test =\"indexNum !='' and indexNum !=null\">and b.index_num = #{indexNum}</if>" +
|
"GROUP BY a.target_id</script> ")
|
Integer selectNoComplete(Map<String, Object> beanToMap);
|
}
|