Browse Source

fix:[试验管理][物质列表]

master
HanLong 1 day ago
parent
commit
e48c899de8
4 changed files with 6 additions and 4 deletions
  1. +2
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java
  2. +2
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java
  3. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml
  4. +1
    -1
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/CellMapper.xml

+ 2
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java View File

@ -59,7 +59,8 @@ public class BacteriaServiceImpl extends ServiceImpl i
QueryWrapper<Bacteria> 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());

+ 2
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java View File

@ -59,7 +59,8 @@ public class CellServiceImpl extends ServiceImpl implements IC
QueryWrapper<Cell> 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());

+ 1
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml View File

@ -10,7 +10,7 @@
</foreach>
</update>
<select id="queryStudyList" resultType="com.hxhq.business.domain.Bacteria">
SELECT b.*, s.name AS studyName
SELECT distinct b.id, b.*, s.name AS studyName
FROM `t_bacteria` b
LEFT JOIN `t_study_bacteria` sb ON b.id=sb.resource_id
LEFT JOIN `t_study` s ON s.id = b.study_id

+ 1
- 1
hxhq-modules/hxhq-system/src/main/resources/mapper/business/CellMapper.xml View File

@ -10,7 +10,7 @@
</foreach>
</update>
<select id="queryStudyList" resultType="com.hxhq.business.domain.Cell">
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

Loading…
Cancel
Save