|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
package com.xydl.cac.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.xydl.cac.entity.IedDlConfig;
|
|
|
|
|
import com.xydl.cac.entity.IedDlRecord;
|
|
|
|
|
import com.xydl.cac.repository.IedDlRecordRepository;
|
|
|
|
|
import com.xydl.cac.service.IedDlConfigService;
|
|
|
|
|
import com.xydl.cac.service.IedDlRecordService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
@ -22,6 +24,8 @@ public class IedDlRecordServiceImpl implements IedDlRecordService {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
IedDlRecordRepository repository;
|
|
|
|
|
@Resource
|
|
|
|
|
IedDlConfigService configService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Page<IedDlRecord> list(Integer configId, int pageNum, int pageSize) throws Exception {
|
|
|
|
@ -35,6 +39,17 @@ public class IedDlRecordServiceImpl implements IedDlRecordService {
|
|
|
|
|
return predicate;
|
|
|
|
|
};
|
|
|
|
|
Page<IedDlRecord> result = repository.findAll(specification, request);
|
|
|
|
|
if (CollectionUtils.isEmpty(result.getContent())) {
|
|
|
|
|
List<IedDlConfig> configList = configService.listAll();
|
|
|
|
|
for (IedDlRecord item : result.getContent()) {
|
|
|
|
|
for (IedDlConfig config : configList) {
|
|
|
|
|
if (item.getConfigId().intValue() == config.getId().intValue()) {
|
|
|
|
|
item.setConfig(config);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|