diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java index e5d83d0..4534c3e 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java @@ -9,6 +9,7 @@ import com.hxhq.business.dto.sj.SjListDto; import com.hxhq.business.enums.NormalEnum; import com.hxhq.business.enums.SnTypeEnum; import com.hxhq.business.form.common.SignForm; +import com.hxhq.business.form.gsp.GspSearchListForm; import com.hxhq.business.form.gyzj.SearchForm; import com.hxhq.business.form.sj.SjSearchListForm; import com.hxhq.business.form.yq.YqSearchForm; @@ -61,6 +62,8 @@ public class PublicController extends BaseController { public IYqService yqService; @Autowired public IGyzjService gyzjService; + @Autowired + public IGspService gspService; /** * 获取编号 @@ -193,10 +196,10 @@ public class PublicController extends BaseController { } /** - * 查询试剂列表 + * 查询仪器列表 */ @GetMapping("/yqList") - public TableDataInfo list(YqSearchForm form) + public TableDataInfo yqList(YqSearchForm form) { startPage(); List list = yqService.queryList(form); @@ -214,4 +217,14 @@ public class PublicController extends BaseController { return getDataTable(list); } + /** + * 查询供试品列表 + */ + @GetMapping("/gspList") + public TableDataInfo gspList(GspSearchListForm form) + { + startPage(); + List list = gspService.queryList(form); + return getDataTable(list); + } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java index b87e3f1..8c87daf 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/gsp/GspSearchListForm.java @@ -12,6 +12,9 @@ import java.util.Date; */ public class GspSearchListForm { + /** 试验id */ + private Long studyId; + /** 名称/代号 */ private String mc; @@ -47,9 +50,6 @@ public class GspSearchListForm { /** 有效期结束日期 */ private String endDate; - /** 试验id */ - private Long studyId; - /** 是否是档案 1-是 */ private Integer archive; @@ -65,6 +65,8 @@ public class GspSearchListForm { /** 出库日期结束 */ private String endDateCk; + + public Long getMdId() { return mdId; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java index f1a5795..11a88d6 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/GspServiceImpl.java @@ -2,6 +2,7 @@ package com.hxhq.business.service.impl; import java.math.BigDecimal; import java.util.*; +import java.util.function.Consumer; import java.util.stream.Collectors; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -89,6 +90,9 @@ public class GspServiceImpl extends ServiceImpl implements IGspS if(form.getZjzt() != null) { queryWrapper.eq("zjzt", form.getZjzt()); } + if(form.getStudyId() != null) { + queryWrapper.and(p -> p.apply("find_in_set(md_ids, {0})", form.getStudyId())); + } if(form.getArchive() != null && form.getArchive() == DaztEnum.ygd.getValue()) { queryWrapper.in("zjzt", ZjztEnum.dgd.getValue(), ZjztEnum.gd.getValue(), ZjztEnum.djd.getValue()); }