fix:查询子项

pg_adapter
wangxy 6 months ago
parent 283cf3f4f5
commit 7c09284ee1

@ -79,9 +79,7 @@ public class CheckReportManager {
public List<CheckTypeItemDTO> getCheckTypeDTO(String checkType,String typeName) { public List<CheckTypeItemDTO> getCheckTypeDTO(String checkType,String typeName) {
List<CheckTypeItemDTO> checkTypeItemDTOList =new ArrayList<>(); List<CheckTypeItemDTO> checkTypeItemDTOList =new ArrayList<>();
SysDictData dictData = new SysDictData(); List<SysDictData> dataList = dictDataService.selectDictDataByType(checkType);
dictData.setDictType(checkType);
List<SysDictData> dataList = dictDataService.selectDictDataList(dictData);
dataList.forEach(sysDictData2 -> checkTypeItemDTOList.add(CheckTypeItemDTO.builder() dataList.forEach(sysDictData2 -> checkTypeItemDTOList.add(CheckTypeItemDTO.builder()
.typeName(typeName) .typeName(typeName)
.checkType(checkType) .checkType(checkType)
@ -97,9 +95,7 @@ public class CheckReportManager {
public List<CheckTypeDTO> getCheckTypeDtoParent(String type) { public List<CheckTypeDTO> getCheckTypeDtoParent(String type) {
List<CheckTypeDTO> checkTypeDtoS = new ArrayList<>(); List<CheckTypeDTO> checkTypeDtoS = new ArrayList<>();
SysDictData sysDictData =new SysDictData(); List<SysDictData> list = dictDataService.selectDictDataByType(type);
sysDictData.setDictType(type);
List<SysDictData> list = dictDataService.selectDictDataList(sysDictData);
list.forEach(sysDictData1 -> checkTypeDtoS.add(CheckTypeDTO.builder() list.forEach(sysDictData1 -> checkTypeDtoS.add(CheckTypeDTO.builder()
.typeName(sysDictData1.getDictLabel()) .typeName(sysDictData1.getDictLabel())
.checkType(sysDictData1.getDictValue()).build())); .checkType(sysDictData1.getDictValue()).build()));

@ -57,4 +57,12 @@ public interface ISysDictDataService
* @return * @return
*/ */
public int updateDictData(SysDictData dictData); public int updateDictData(SysDictData dictData);
/**
*
*
* @param dictType
* @return
*/
public List<SysDictData> selectDictDataByType(String dictType);
} }

@ -110,4 +110,9 @@ public class SysDictDataServiceImpl implements ISysDictDataService
} }
return row; return row;
} }
@Override
public List<SysDictData> selectDictDataByType(String dictType) {
return dictDataMapper.selectDictDataByType(dictType);
}
} }

Loading…
Cancel
Save