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<>(); List<LawsDto> data = new ArrayList<>();
if (CollectionUtils.isEmpty(standExcelVo.getIds())){ if (CollectionUtils.isEmpty(standExcelVo.getIds())){
List<String> list= sarLawsAttrDetailedListDao.selectLawsId2(standExcelVo.getId()); List<String> list= sarLawsAttrDetailedListDao.selectLawsId2(standExcelVo.getId());
if (CollectionUtils.isEmpty(list)) return; if (!CollectionUtils.isEmpty(list)) {
data = sarLawsAttrDetailedListDao.selectLawsByIdE(list); data = sarLawsAttrDetailedListDao.selectLawsByIdE(list);
}
}else { }else {
data=sarLawsAttrDetailedListDao.selectLawsByIdE(standExcelVo.getIds()); data=sarLawsAttrDetailedListDao.selectLawsByIdE(standExcelVo.getIds());
} }
if (!CollectionUtils.isEmpty(data)) {
if ("1".equals(type)) { if ("1".equals(type)) {
List<String> lawsIds = new ArrayList<>(); List<String> lawsIds = new ArrayList<>();
SarFindDto sarFindDto = new SarFindDto(); SarFindDto sarFindDto = new SarFindDto();
sarFindDto.setId(standExcelVo.getId()); 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); List<LawsDto> list = sarLawsAttrDetailedListDao.selectLawsById(lawsIds, sarFindDto);
for (LawsDto lawsDto : data) { for (LawsDto lawsDto : data) {
if (StringUtils.isNoneEmpty(lawsDto.getApplyArctic())) { if (StringUtils.isNoneEmpty(lawsDto.getApplyArctic())) {
@@ -288,6 +292,7 @@ public class SarLawsAttrDetailedListController extends BaseController<SarLawsAtt
} }
} }
} }
}
try { try {
EasyExcel.write(response.getOutputStream(), LawsDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1") EasyExcel.write(response.getOutputStream(), LawsDto.class).useDefaultStyle(false).autoCloseStream(Boolean.FALSE).sheet("sheet1")
.doWrite(data); .doWrite(data);