From 759bbb8ee99665382a689fa90277a9b2279238da Mon Sep 17 00:00:00 2001 From: songhuangfeng123 <shf18767906695@163.com> Date: 星期五, 19 八月 2022 19:04:02 +0800 Subject: [PATCH] Merge branches 'genchuang' and 'master' of https://sinanoaq.cn:8888/r/safePlatform-out into master --- goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/TargetMngRepository.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/TargetMngRepository.java b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/TargetMngRepository.java index 424f49b..45d375e 100644 --- a/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/TargetMngRepository.java +++ b/goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/repository/TargetMngRepository.java @@ -2,7 +2,10 @@ 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)表数据库访问层 @@ -12,5 +15,20 @@ */ @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); } \ No newline at end of file -- Gitblit v1.9.2