|
|
@ -32,6 +32,7 @@ import com.epmet.commons.tools.constant.Constant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|
|
|
import com.epmet.commons.tools.dto.form.IcExportTemplateSaveFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.form.mq.MqBaseFormDTO; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.dto.result.OptionDataResultDTO; |
|
|
@ -551,11 +552,47 @@ public class IcResiUserController implements ResultDataResolver { |
|
|
|
* @date 2021/11/19 4:24 下午 |
|
|
|
* @remark 用于报表调用的接口 试试 |
|
|
|
*/ |
|
|
|
@ReportRequest |
|
|
|
@NoRepeatSubmit |
|
|
|
@RequestMapping(value = "/exportExcelCustomData") |
|
|
|
public Result<List<Map<String, Object>>> exportExcelCustomData(@LoginUser TokenDto tokenDto, @RequestBody ExportResiUserFormDTO pageFormDTO, HttpServletResponse response) throws Exception { |
|
|
|
public Map<String, Object> exportExcelCustomData(@LoginUser TokenDto tokenDto, @RequestParam("templateId") String templateId, |
|
|
|
@RequestBody ExportResiUserFormDTO pageFormDTO) throws Exception { |
|
|
|
log.warn("templateId=【"+templateId+"】"); |
|
|
|
log.warn("pageFormDTO入参【"+JSON.toJSONString(pageFormDTO)+"】"); |
|
|
|
pageFormDTO.setTemplateId(templateId); |
|
|
|
if (null == pageFormDTO.getSearchForm()) { |
|
|
|
IcResiUserPageFormDTO searchForm = new IcResiUserPageFormDTO(); |
|
|
|
searchForm.setFormCode("resi_base_info"); |
|
|
|
searchForm.setCustomerId(tokenDto.getCustomerId()); |
|
|
|
searchForm.setStaffId(tokenDto.getUserId()); |
|
|
|
// searchForm.setPageNo(pageFormDTO.getPageNo());
|
|
|
|
// searchForm.setPageSize(pageFormDTO.getPageSize());
|
|
|
|
List<ResiUserQueryValueDTO> conditions=new ArrayList<>(); |
|
|
|
// ResiUserQueryValueDTO temp=new ResiUserQueryValueDTO();
|
|
|
|
// temp.setColumnName("");
|
|
|
|
// temp.setColumnValue(Arrays.asList("IS_UNEMPLOYED"));
|
|
|
|
// temp.setQueryType("resi_category");
|
|
|
|
// temp.setTableName("ic_resi_user");
|
|
|
|
// conditions.add(temp);
|
|
|
|
searchForm.setConditions(conditions); |
|
|
|
pageFormDTO.setSearchForm(searchForm); |
|
|
|
} |
|
|
|
pageFormDTO.getSearchForm().setPageNo(pageFormDTO.getPageNo()); |
|
|
|
pageFormDTO.getSearchForm().setPageSize(pageFormDTO.getPageSize()); |
|
|
|
if (null == pageFormDTO.getExportConfig()) { |
|
|
|
IcExportTemplateSaveFormDTO exportTemplateSaveFormDTO = new IcExportTemplateSaveFormDTO(); |
|
|
|
exportTemplateSaveFormDTO.setFormCode("resi_base_info"); |
|
|
|
exportTemplateSaveFormDTO.setIsSaveTemp(false); |
|
|
|
pageFormDTO.setExportConfig(exportTemplateSaveFormDTO); |
|
|
|
} |
|
|
|
//固定通用客户Id
|
|
|
|
pageFormDTO.setCustomerId("jmreport_resi_default"); |
|
|
|
Page<Map<String, Object>> maps = icResiUserExportService.exportIcResiUser(tokenDto, pageFormDTO, null, true); |
|
|
|
return new Result<List<Map<String, Object>>>().ok(maps.getResult()); |
|
|
|
Map<String,Object> result = new HashMap<>(); |
|
|
|
result.put("total",maps.getPages()); |
|
|
|
result.put("count",maps.getTotal()); |
|
|
|
result.put("data",maps.getResult()); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|