This commit is contained in:
yuezhihang
2022-07-19 14:00:05 +08:00
parent 71d0b5cb74
commit 147d9e9fbb
@@ -136,16 +136,20 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
List<LawsDto> data = new ArrayList<>();
if (CollectionUtils.isEmpty(standExcelVo.getIds())){
List<String> list= sarLawsAttrDetailedListDao.selectLawsId2(standExcelVo.getId());
if (CollectionUtils.isEmpty(list)) return;
if (!CollectionUtils.isEmpty(list)) {
data = sarLawsAttrDetailedListDao.selectLawsByIdE(list);
}
}else {
data=sarLawsAttrDetailedListDao.selectLawsByIdE(standExcelVo.getIds());
}
if (!CollectionUtils.isEmpty(data)) {
if ("1".equals(type)) {
List<String> lawsIds = new ArrayList<>();
SarFindDto sarFindDto = new SarFindDto();
sarFindDto.setId(standExcelVo.getId());
data.forEach(lawsDto -> {lawsIds.add(lawsDto.getId());});
data.forEach(lawsDto -> {
lawsIds.add(lawsDto.getId());
});
List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds, sarFindDto);
for (LawsDto lawsDto : data) {
if (StringUtils.isNoneEmpty(lawsDto.getApplyArctic())) {
@@ -288,6 +292,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
}
}
}
}
try {
EasyExcel.write(response.getOutputStream(), LawsDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1")
.doWrite(data);