|
|
@ -104,7 +104,7 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
|
WriteSheet writeSheet = null; |
|
|
|
try { |
|
|
|
//获取用户配置的导出条件
|
|
|
|
Result<IcCustomExportResultDTO> exportConfigResult = this.getIcCustomExportConfig(searchForm.getCustomerId(), templateId, exportResiUserFormDTO.getExportConfig()); |
|
|
|
Result<IcCustomExportResultDTO> exportConfigResult = this.getIcCustomExportConfig(exportResiUserFormDTO.getCustomerId(), templateId, exportResiUserFormDTO.getExportConfig()); |
|
|
|
|
|
|
|
Map<String, ExportResiUserItemDTO> itemOriginMap = getItemMap(searchForm.getCustomerId()); |
|
|
|
IcCustomExportResultDTO exportConfigData = exportConfigResult.getData(); |
|
|
@ -120,6 +120,8 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
|
|
|
|
|
|
|
|
|
if (!onlyGetData){ |
|
|
|
searchForm.setIsPage(false); |
|
|
|
searchForm.setPageSize(NumConstant.TEN_THOUSAND); |
|
|
|
|
|
|
|
//需要合并的列
|
|
|
|
List<Integer> mergeColumnIndexList = new ArrayList<>(); |
|
|
@ -165,7 +167,9 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
|
mapListPage = PageHelper.startPage(searchForm.getPageNo(), searchForm.getPageSize(), searchForm.getIsPage()).doSelectPage(() -> { |
|
|
|
icResiUserService.dynamicQuery(searchForm.getCustomerId(), searchForm.getFormCode(), IcResiUserConstant.IC_RESI_USER, allShowColumns, searchForm.getConditions(), staffInfoCacheResult.getAgencyId(), finalStaffOrgPath); |
|
|
|
}); |
|
|
|
if (!searchForm.getIsPage()){ |
|
|
|
searchForm.setPageNo(searchForm.getPageNo() + NumConstant.ONE); |
|
|
|
} |
|
|
|
|
|
|
|
List<Map<String, Object>> result = mapListPage.getResult(); |
|
|
|
|
|
|
@ -179,7 +183,7 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
|
if (!onlyGetData){ |
|
|
|
excelWriter.write(resultData, writeSheet); |
|
|
|
} |
|
|
|
} while (mapListPage.getResult().size() == searchForm.getPageSize()); |
|
|
|
} while (!searchForm.getIsPage() && mapListPage.getResult().size() == searchForm.getPageSize()); |
|
|
|
} catch (IOException e) { |
|
|
|
log.error("exportIcResiUser exception", e); |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getMessage(), "导出失败"); |
|
|
@ -240,11 +244,14 @@ public class IcResiUserExportServiceImpl implements IcResiUserExportService { |
|
|
|
*/ |
|
|
|
public void validateSearchForm(TokenDto tokenDto, ExportResiUserFormDTO exportResiUserFormDTO) { |
|
|
|
IcResiUserPageFormDTO searchForm = exportResiUserFormDTO.getSearchForm(); |
|
|
|
if (StringUtils.isNotBlank(exportResiUserFormDTO.getCustomerId())){ |
|
|
|
searchForm.setCustomerId(exportResiUserFormDTO.getCustomerId()); |
|
|
|
}else{ |
|
|
|
searchForm.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
} |
|
|
|
|
|
|
|
searchForm.setStaffId(tokenDto.getUserId()); |
|
|
|
ValidatorUtils.validateEntity(searchForm, IcResiUserPageFormDTO.AddUserInternalGroup.class); |
|
|
|
searchForm.setIsPage(false); |
|
|
|
searchForm.setPageSize(NumConstant.TEN_THOUSAND); |
|
|
|
} |
|
|
|
|
|
|
|
@Nullable |
|
|
|