|
|
@@ -151,6 +151,7 @@ public class DataExpertTemplateController {
|
|
|
List<String> titleList = new ArrayList<>();
|
|
|
List<DataExpertTemplateFieldVo> fieldList = dto.getFieldList();
|
|
|
DataExpertSource expertSource;
|
|
|
+ String conditions = "";
|
|
|
if(dto.getDataExpertSourceId() != null){
|
|
|
expertSource = dataExpertSourceService.getById(dto.getDataExpertSourceId());
|
|
|
for (int i = 0; i < fieldList.size(); i ++){
|
|
|
@@ -175,9 +176,18 @@ public class DataExpertTemplateController {
|
|
|
i ++;
|
|
|
}
|
|
|
}
|
|
|
+ if(dto.getIds() != null && !dto.getIds().isEmpty()){
|
|
|
+ String ids = dto.getIds().toString();
|
|
|
+ conditions += " and id in (" + ids.substring(1, ids.length() - 1) + ")";
|
|
|
+ }
|
|
|
+ if(dto.getConditions() != null && !dto.getConditions().isEmpty()){
|
|
|
+ for (String key : dto.getConditions().keySet()) {
|
|
|
+ conditions += " and " + key + " like '%" + dto.getConditions().get(key) + "%'";
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//查出导出的数据并进行组装
|
|
|
- List<String[]> dataList = dataExpertTemplateService.getDataList(fields.toString().substring(1, fields.toString().length() - 1), expertSource.getViewName());
|
|
|
+ List<String[]> dataList = dataExpertTemplateService.getDataList(fields.toString().substring(1, fields.toString().length() - 1), expertSource.getViewName(), conditions);
|
|
|
|
|
|
List<String[]> allDataList = new ArrayList<>();
|
|
|
allDataList.add(titleList.toArray(new String[titleList.size()]));
|