| @@ -1,15 +1,18 @@ | |||
| package com.iformall.service.excel; | |||
| import java.lang.reflect.InvocationTargetException; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.commons.beanutils.BeanUtils; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.WxCouponStatisVo; | |||
| import com.iformall.domain.vo.excel.WxCardData; | |||
| import com.iformall.mapper.WxCouponMapper; | |||
| import cn.afterturn.easypoi.handler.inter.IExcelExportServer; | |||
| @@ -38,9 +41,22 @@ public class WxCardDataExporter implements IExcelExportServer { | |||
| List<WxCouponStatisVo> list = wxCouponMapper.findCountData((List<TenantEntity>)map.get("tenantEntitys"),record); | |||
| if (null != list && list.size() > 0 ) { | |||
| List<Object> retList = new ArrayList<Object>(); | |||
| retList.addAll(list); | |||
| return retList; | |||
| List<WxCardData> cardList = new ArrayList<WxCardData>(); | |||
| for (WxCouponStatisVo v : list) { | |||
| WxCardData d = new WxCardData(); | |||
| try { | |||
| BeanUtils.copyProperties(d, v); | |||
| cardList.add(d); | |||
| } catch (IllegalAccessException e) { | |||
| e.printStackTrace(); | |||
| } catch (InvocationTargetException e) { | |||
| e.printStackTrace(); | |||
| } | |||
| } | |||
| List<Object> retList = new ArrayList<Object>(); | |||
| retList.addAll(cardList); | |||
| return retList; | |||
| } | |||
| return null; | |||
| @@ -1,15 +1,18 @@ | |||
| package com.iformall.service.excel; | |||
| import java.lang.reflect.InvocationTargetException; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.commons.beanutils.BeanUtils; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.WxCouponStatisVo; | |||
| import com.iformall.domain.vo.excel.WxCouponData; | |||
| import com.iformall.mapper.WxCouponMapper; | |||
| import cn.afterturn.easypoi.handler.inter.IExcelExportServer; | |||
| @@ -38,8 +41,21 @@ public class WxCouponDataExporter implements IExcelExportServer { | |||
| List<WxCouponStatisVo> list = wxCouponMapper.findCouponData((List<TenantEntity>)map.get("tenantEntitys"),record); | |||
| if (null != list && list.size() > 0 ) { | |||
| List<WxCouponData> cardList = new ArrayList<WxCouponData>(); | |||
| for (WxCouponStatisVo v : list) { | |||
| WxCouponData d = new WxCouponData(); | |||
| try { | |||
| BeanUtils.copyProperties(d, v); | |||
| cardList.add(d); | |||
| } catch (IllegalAccessException e) { | |||
| e.printStackTrace(); | |||
| } catch (InvocationTargetException e) { | |||
| e.printStackTrace(); | |||
| } | |||
| } | |||
| List<Object> retList = new ArrayList<Object>(); | |||
| retList.addAll(list); | |||
| retList.addAll(cardList); | |||
| return retList; | |||
| } | |||
| @@ -1,15 +1,19 @@ | |||
| package com.iformall.service.excel; | |||
| import java.lang.reflect.InvocationTargetException; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import org.apache.commons.beanutils.BeanUtils; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.WxCouponStatisVo; | |||
| import com.iformall.domain.vo.excel.WxCouponData; | |||
| import com.iformall.domain.vo.excel.WxPressData; | |||
| import com.iformall.mapper.WxCouponMapper; | |||
| import cn.afterturn.easypoi.handler.inter.IExcelExportServer; | |||
| @@ -38,8 +42,21 @@ public class WxPressDataExporter implements IExcelExportServer { | |||
| List<WxCouponStatisVo> list = wxCouponMapper.findPressData((List<TenantEntity>)map.get("tenantEntitys"),record); | |||
| if (null != list && list.size() > 0 ) { | |||
| List<WxPressData> cardList = new ArrayList<WxPressData>(); | |||
| for (WxCouponStatisVo v : list) { | |||
| WxPressData d = new WxPressData(); | |||
| try { | |||
| BeanUtils.copyProperties(d, v); | |||
| cardList.add(d); | |||
| } catch (IllegalAccessException e) { | |||
| e.printStackTrace(); | |||
| } catch (InvocationTargetException e) { | |||
| e.printStackTrace(); | |||
| } | |||
| } | |||
| List<Object> retList = new ArrayList<Object>(); | |||
| retList.addAll(list); | |||
| retList.addAll(cardList); | |||
| return retList; | |||
| } | |||