|
|
@ -5,8 +5,6 @@ import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.enums.DictTypeEnum; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |
|
|
|
import com.epmet.commons.tools.utils.ExcelUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.commons.tools.validator.AssertUtils; |
|
|
@ -99,16 +97,16 @@ public class PovertyManageController { |
|
|
|
public void exportExcelByEasyExcel(@RequestBody PovertyManageFormDto formDTO, HttpServletResponse response) throws Exception { |
|
|
|
formDTO.setPageNo(NumConstant.ONE); |
|
|
|
formDTO.setPageSize(NumConstant.TEN_THOUSAND); |
|
|
|
AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(userRemoteService.getLoginUserDetails().getAgencyId()); |
|
|
|
String agencyName = agency.getOrganizationName(); |
|
|
|
// AgencyInfoCache agency = CustomerOrgRedis.getAgencyInfo(userRemoteService.getLoginUserDetails().getAgencyId());
|
|
|
|
// String agencyName = agency.getOrganizationName();
|
|
|
|
PageData<PovertyManageDTO> data = povertyManageService.search(formDTO); |
|
|
|
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE); |
|
|
|
if (null != data && data.getList().size() > 0) { |
|
|
|
buildData(data.getList()); |
|
|
|
for (PovertyManageDTO dto : data.getList()) { |
|
|
|
dto.setAgencyId(agencyName); |
|
|
|
dto.setGridId(CustomerOrgRedis.getGridInfo(dto.getGridId()).getGridName()); |
|
|
|
} |
|
|
|
// for (PovertyManageDTO dto : data.getList()) {
|
|
|
|
// dto.setAgencyId(agencyName);
|
|
|
|
// dto.setGridId(CustomerOrgRedis.getGridInfo(dto.getGridId()).getGridName());
|
|
|
|
// }
|
|
|
|
} |
|
|
|
ExcelUtils.exportExcelToTarget(response, "贫困人员名单.xls", data.getList(), PovertyManageExcel.class); |
|
|
|
} |
|
|
|