diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java index eade86f..9866875 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java @@ -59,7 +59,8 @@ public class BacteriaServiceImpl extends ServiceImpl i QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("b.del_flag", 0); if(form.getStudyId() != null) { - queryWrapper.eq("b.study_id", form.getStudyId()); + queryWrapper.eq("b.study_id", form.getStudyId()) + .eq("sb.study_id", form.getStudyId()); } if(StringUtils.isNotEmpty(form.getMc())) { queryWrapper.like("b.mc", form.getMc()); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java index 8a74743..6be687a 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java @@ -59,7 +59,8 @@ public class CellServiceImpl extends ServiceImpl implements IC QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("c.del_flag", 0); if (form.getStudyId() != null) { - queryWrapper.eq("c.study_id", form.getStudyId()); + queryWrapper.eq("c.study_id", form.getStudyId()) + .eq("sc.study_id", form.getStudyId()); } if (StringUtils.isNotEmpty(form.getMc())) { queryWrapper.like("c.mc", form.getMc()); diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml index 8162473..e54bf72 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml @@ -10,7 +10,7 @@ - SELECT c.*, s.name as studyName + SELECT distinct c.id, c.*, s.name as studyName FROM `t_cell` c LEFT JOIN `t_study_cell` sc on c.id=sc.resource_id LEFT JOIN `t_study` s on s.id = c.study_id