| @@ -333,7 +333,7 @@ public class WxCUserBasicInfoController extends BaseController { | |||||
| if (!targetFile.exists()) { | if (!targetFile.exists()) { | ||||
| targetFile.mkdirs(); | targetFile.mkdirs(); | ||||
| } | } | ||||
| String fileName = "1.xls"; | |||||
| String fileName = "1.xlsx"; | |||||
| int dot = mFile.getOriginalFilename().lastIndexOf('.'); | int dot = mFile.getOriginalFilename().lastIndexOf('.'); | ||||
| fileName = fileName + mFile.getOriginalFilename().substring(dot, mFile.getOriginalFilename().length()); | fileName = fileName + mFile.getOriginalFilename().substring(dot, mFile.getOriginalFilename().length()); | ||||
| @@ -144,7 +144,7 @@ public class WxBillDailyController extends BaseController { | |||||
| if (!targetFile.exists()) { | if (!targetFile.exists()) { | ||||
| targetFile.mkdirs(); | targetFile.mkdirs(); | ||||
| } | } | ||||
| String fileName = "bill_daily.xls"; | |||||
| String fileName = "bill_daily.xlsx"; | |||||
| int dot = mFile.getOriginalFilename().lastIndexOf('.'); | int dot = mFile.getOriginalFilename().lastIndexOf('.'); | ||||
| fileName = fileName + mFile.getOriginalFilename().substring(dot, mFile.getOriginalFilename().length()); | fileName = fileName + mFile.getOriginalFilename().substring(dot, mFile.getOriginalFilename().length()); | ||||
| @@ -33,12 +33,13 @@ public class ExcelService { | |||||
| { | { | ||||
| ExportParams exportParams = new ExportParams(title, sheetName); | ExportParams exportParams = new ExportParams(title, sheetName); | ||||
| exportParams.setCreateHeadRows(isCreateHeader); | exportParams.setCreateHeadRows(isCreateHeader); | ||||
| exportParams.setType(ExcelType.XSSF); | |||||
| defaultExport(list, pojoClass, fileName, response, exportParams); | defaultExport(list, pojoClass, fileName, response, exportParams); | ||||
| } | } | ||||
| public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass,String fileName, HttpServletResponse response) | public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass,String fileName, HttpServletResponse response) | ||||
| { | { | ||||
| defaultExport(list, pojoClass, fileName, response, new ExportParams(title, sheetName)); | |||||
| defaultExport(list, pojoClass, fileName, response, new ExportParams(title, sheetName, ExcelType.XSSF)); | |||||
| } | } | ||||
| public static void exportExcel(List<Map<String, Object>> list, String fileName, HttpServletResponse response) | public static void exportExcel(List<Map<String, Object>> list, String fileName, HttpServletResponse response) | ||||
| @@ -56,7 +57,7 @@ public class ExcelService { | |||||
| private static void defaultExport(List<Map<String, Object>> list, String fileName, HttpServletResponse response) | private static void defaultExport(List<Map<String, Object>> list, String fileName, HttpServletResponse response) | ||||
| { | { | ||||
| Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF); | |||||
| Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.XSSF); | |||||
| if (workbook != null); | if (workbook != null); | ||||
| downLoadExcel(fileName, response, workbook); | downLoadExcel(fileName, response, workbook); | ||||
| } | } | ||||
| @@ -248,7 +248,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| list.add(map); | list.add(map); | ||||
| } | } | ||||
| excelService.exportExcel(list, "账单数据.xls", response); | |||||
| excelService.exportExcel(list, "账单数据.xlsx", response); | |||||
| } | } | ||||
| private int updateBillOtherDeposit(Map<String, Object> bill) { | private int updateBillOtherDeposit(Map<String, Object> bill) { | ||||
| @@ -789,7 +789,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| list.add(oweMerchantVo); | list.add(oweMerchantVo); | ||||
| } | } | ||||
| String name = "欠缴商户列表"; | String name = "欠缴商户列表"; | ||||
| excelService.exportExcel(list,null, name, OweMerchantVo.class,name+".xls",response); | |||||
| excelService.exportExcel(list,null, name, OweMerchantVo.class,name+".xlsx",response); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -812,6 +812,6 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| list.add(oweMerchantVo); | list.add(oweMerchantVo); | ||||
| } | } | ||||
| String name = "待缴商户列表"; | String name = "待缴商户列表"; | ||||
| excelService.exportExcel(list,null, name, WaitMerchantVo.class,name+".xls",response); | |||||
| excelService.exportExcel(list,null, name, WaitMerchantVo.class,name+".xlsx",response); | |||||
| } | } | ||||
| } | } | ||||
| @@ -238,7 +238,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||||
| v2.setExpiredDay(0L); | v2.setExpiredDay(0L); | ||||
| list.add(v2); | list.add(v2); | ||||
| excelService.exportExcel(list, null, "水电费模板", WxBillDailyVo.class, "水电费模板.xls", response); | |||||
| excelService.exportExcel(list, null, "水电费模板", WxBillDailyVo.class, "水电费模板.xlsx", response); | |||||
| } | } | ||||
| @@ -500,7 +500,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { | |||||
| String tagNames = StringUtils.join(ids.stream().map(id->tagMap.get(id)).collect(Collectors.toList()),"/"); | String tagNames = StringUtils.join(ids.stream().map(id->tagMap.get(id)).collect(Collectors.toList()),"/"); | ||||
| u.setTagNames(tagNames); | u.setTagNames(tagNames); | ||||
| }); | }); | ||||
| excelService.exportExcel(list,null,"会员信息",WxCUserBasicInfoVo.class,"会员信息数据.xls",response); | |||||
| excelService.exportExcel(list,null,"会员信息",WxCUserBasicInfoVo.class,"会员信息数据.xlsx",response); | |||||
| } | } | ||||
| public void exportTemplate(HttpServletRequest request, HttpServletResponse response, String tenantId) { | public void exportTemplate(HttpServletRequest request, HttpServletResponse response, String tenantId) { | ||||
| @@ -575,7 +575,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { | |||||
| list.add(u2); | list.add(u2); | ||||
| list.add(u3); | list.add(u3); | ||||
| excelService.exportExcel(list,null,"会员信息模板",WxCUserBasicInfoVo.class,"会员信息模板.xls",response); | |||||
| excelService.exportExcel(list,null,"会员信息模板",WxCUserBasicInfoVo.class,"会员信息模板.xlsx",response); | |||||
| } | } | ||||
| @@ -826,7 +826,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { | |||||
| public void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response) { | public void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response) { | ||||
| List<WxCarPayRecord> list = wxCarPayRecordMapper.findCarPayList(record); | List<WxCarPayRecord> list = wxCarPayRecordMapper.findCarPayList(record); | ||||
| String sheetName = (record.getIsPay()!=null && 1==record.getIsPay())?"线上缴费车辆列表":"进出车辆列表"; | String sheetName = (record.getIsPay()!=null && 1==record.getIsPay())?"线上缴费车辆列表":"进出车辆列表"; | ||||
| excelService.exportExcel(list,null,sheetName,WxCarPayRecord.class,sheetName+".xls",response); | |||||
| excelService.exportExcel(list,null,sheetName,WxCarPayRecord.class,sheetName+".xlsx",response); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -499,7 +499,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService { | |||||
| @Override | @Override | ||||
| public void exportData(WxCardSpendVo wxCardSpendVo, HttpServletRequest request, HttpServletResponse response) { | public void exportData(WxCardSpendVo wxCardSpendVo, HttpServletRequest request, HttpServletResponse response) { | ||||
| List<WxCardSpendVo> list = wxCardSpendMapper.findCardSpendVoList(wxCardSpendVo); | List<WxCardSpendVo> list = wxCardSpendMapper.findCardSpendVoList(wxCardSpendVo); | ||||
| excelService.exportExcel(list,null,"消费记录",WxCardSpendVo.class,"消费记录.xls",response); | |||||
| excelService.exportExcel(list,null,"消费记录",WxCardSpendVo.class,"消费记录.xlsx",response); | |||||
| } | } | ||||
| } | } | ||||
| @@ -271,7 +271,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| wxMall = wxMallMapper.findList(wxMall).get(0); | wxMall = wxMallMapper.findList(wxMall).get(0); | ||||
| String filename = wxMall.getName() + DateUtils.getSystemTime("yyyyMMDDHHmmss"); | String filename = wxMall.getName() + DateUtils.getSystemTime("yyyyMMDDHHmmss"); | ||||
| List<WxCouponOrderBVo> list = wxCouponOrderMapper.findListOfAdmin(wxCouponOrder); | List<WxCouponOrderBVo> list = wxCouponOrderMapper.findListOfAdmin(wxCouponOrder); | ||||
| excelService.exportExcel(list, null, filename, WxCouponOrderBVo.class, filename + ".xls", response); | |||||
| excelService.exportExcel(list, null, filename, WxCouponOrderBVo.class, filename + ".xlsx", response); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -634,7 +634,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| } | } | ||||
| }); | }); | ||||
| excelService.exportExcel(list,null,"商户信息",WxMerchant.class,"商户信息数据.xls",response); | |||||
| excelService.exportExcel(list,null,"商户信息",WxMerchant.class,"商户信息数据.xlsx",response); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -82,7 +82,7 @@ public class WxMerchantSubsidyServiceImpl implements WxMerchantSubsidyService { | |||||
| @Override | @Override | ||||
| public void exportData(WxMerchantSubsidy wxMerchantSubsidy, HttpServletRequest request, HttpServletResponse response) { | public void exportData(WxMerchantSubsidy wxMerchantSubsidy, HttpServletRequest request, HttpServletResponse response) { | ||||
| List<WxMerchantSubsidyVo> list = wxMerchantSubsidyMapper.findVoList(wxMerchantSubsidy); | List<WxMerchantSubsidyVo> list = wxMerchantSubsidyMapper.findVoList(wxMerchantSubsidy); | ||||
| excelService.exportExcel(list,null,"补贴记录",WxMerchantSubsidyVo.class,"补贴记录.xls",response); | |||||
| excelService.exportExcel(list,null,"补贴记录",WxMerchantSubsidyVo.class,"补贴记录.xlsx",response); | |||||
| } | } | ||||
| @@ -161,7 +161,7 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| public void exportShop(WxShop wxShop, HttpServletRequest request, HttpServletResponse response) { | public void exportShop(WxShop wxShop, HttpServletRequest request, HttpServletResponse response) { | ||||
| List<WxShopVo> list = wxShopMapper.findListWithMerchantMap(wxShop); | List<WxShopVo> list = wxShopMapper.findListWithMerchantMap(wxShop); | ||||
| String name = EnumRentShopType.SHOP.getCode().equals(wxShop.getType())?"店铺列表":"多经点位列表"; | String name = EnumRentShopType.SHOP.getCode().equals(wxShop.getType())?"店铺列表":"多经点位列表"; | ||||
| excelService.exportExcel(list,null, name, WxShopVo.class,name+".xls",response); | |||||
| excelService.exportExcel(list,null, name, WxShopVo.class,name+".xlsx",response); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -184,6 +184,6 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| notRentShopVoList.add(notRentShopVo); | notRentShopVoList.add(notRentShopVo); | ||||
| } | } | ||||
| String name = "未出租商铺列表"; | String name = "未出租商铺列表"; | ||||
| excelService.exportExcel(notRentShopVoList,null, name, WxNotRentShopVo.class,name+".xls",response); | |||||
| excelService.exportExcel(notRentShopVoList,null, name, WxNotRentShopVo.class,name+".xlsx",response); | |||||
| } | } | ||||
| } | } | ||||