|
@@ -2,9 +2,13 @@ package com.pdaaphm.biz.controller;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.pdaaphm.biz.dto.AlgorithmDTO;
|
|
|
+import com.pdaaphm.common.core.domain.entity.SysDictData;
|
|
|
+import com.pdaaphm.common.utils.StringUtils;
|
|
|
+import com.pdaaphm.system.service.ISysDictTypeService;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -37,6 +41,9 @@ public class AlgorithmController extends BaseController
|
|
|
@Autowired
|
|
|
private IAlgorithmService algorithmService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysDictTypeService sysDictTypeService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询算法列表
|
|
|
*/
|
|
@@ -45,6 +52,10 @@ public class AlgorithmController extends BaseController
|
|
|
public TableDataInfo list(Algorithm algorithm)
|
|
|
{
|
|
|
startPage();
|
|
|
+ if (StringUtils.isNotEmpty(algorithm.getDictType())){
|
|
|
+ List<SysDictData> sysDictDataList = sysDictTypeService.selectDictDataByType(algorithm.getDictType());
|
|
|
+ algorithm.setTypes(sysDictDataList.stream().map(SysDictData::getDictValue).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
List<Algorithm> list = algorithmService.selectAlgorithmList(algorithm);
|
|
|
return getDataTable(list);
|
|
|
}
|