From 7c09284ee1588d079717f43909266492f137fed0 Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Wed, 25 Sep 2024 14:27:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9F=A5=E8=AF=A2=E5=AD=90=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/manager/CheckReportManager.java | 8 ++------ .../com/ruoyi/system/service/ISysDictDataService.java | 8 ++++++++ .../ruoyi/system/service/impl/SysDictDataServiceImpl.java | 5 +++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CheckReportManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CheckReportManager.java index 36c39b8..261eadf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CheckReportManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CheckReportManager.java @@ -79,9 +79,7 @@ public class CheckReportManager { public List getCheckTypeDTO(String checkType,String typeName) { List checkTypeItemDTOList =new ArrayList<>(); - SysDictData dictData = new SysDictData(); - dictData.setDictType(checkType); - List dataList = dictDataService.selectDictDataList(dictData); + List dataList = dictDataService.selectDictDataByType(checkType); dataList.forEach(sysDictData2 -> checkTypeItemDTOList.add(CheckTypeItemDTO.builder() .typeName(typeName) .checkType(checkType) @@ -97,9 +95,7 @@ public class CheckReportManager { public List getCheckTypeDtoParent(String type) { List checkTypeDtoS = new ArrayList<>(); - SysDictData sysDictData =new SysDictData(); - sysDictData.setDictType(type); - List list = dictDataService.selectDictDataList(sysDictData); + List list = dictDataService.selectDictDataByType(type); list.forEach(sysDictData1 -> checkTypeDtoS.add(CheckTypeDTO.builder() .typeName(sysDictData1.getDictLabel()) .checkType(sysDictData1.getDictValue()).build())); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java index efb6bdd..1f88e5c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java @@ -57,4 +57,12 @@ public interface ISysDictDataService * @return 结果 */ public int updateDictData(SysDictData dictData); + + /** + * 根据字典类型查询字典数据 + * + * @param dictType 字典类型 + * @return 字典数据集合信息 + */ + public List selectDictDataByType(String dictType); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java index bf9e6e5..f144fbe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java @@ -110,4 +110,9 @@ public class SysDictDataServiceImpl implements ISysDictDataService } return row; } + + @Override + public List selectDictDataByType(String dictType) { + return dictDataMapper.selectDictDataByType(dictType); + } }