网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

大数据中如何实现导入

这篇文章将为大家详细讲解有关大数据中如何实现导入,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

为新源等地区用户提供了全套网页设计制作服务,及新源网站建设行业解决方案。主营业务为成都网站设计、成都网站制作、新源网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

   
    @PostConstruct
    public void init(){
        format = new SimpleDateFormat(CollectChargeEnum.DATEFORMAT.getName());
        headers = new String[]{"停车场名称", "车牌号", "支付方式", "账号类型", "交易号", "支付金额", "支付时间", "平帐状态"};
        exportFields = new String[]{"stoppingPlaceName", "vehicleNo", "payTypeName", "chargeType", "transactionNo", "payCharge", "payTime", "flatAccountStatusName"};
        setMethodName = new String[]{"setStoppingPlaceId", "setVehicleNo", "setPayType", "setChargeType", "setTransactionNo", "setPayCharge", "setPayTime", "setFlatAccountStatus"};
        intFileIndex = Arrays.asList(new Integer[]{2,7});
    }




@Override
    public boolean importExcel(MultipartFile importFile) throws BizException{
        List listFlatAccountInfo = new ArrayList(100);
        // 解析Excel importFile文件, 0 sheet页
        List> readExcel = ExcelUtil.readExcel(importFile, 0);
        // 获取当期时间

        // 获取用户信息
        net.sf.json.JSONObject userInfo = CurrentUserInfoUtil.getCurrentUserInfo(redisTemplate);
        // 获取用户名
        String userName = userInfo.get("userName").toString();
        // 获取小区id
        String stoppingPlaceId = currloginInfoService.getCurrLoginStoppingPlaceId();
        // 获取停车场name
        StoppingPlaceInfomationEntity stoppingPlaceInfomation = stoppingPlaceInfomationService.getById(stoppingPlaceId);
        String stoppingPlaceName = StringUtils.EMPTY;
        if(stoppingPlaceInfomation!=null) {
            stoppingPlaceName = stoppingPlaceInfomation.getStoppingPlaceName();
        }
        // 循环获取数据
        for (Map map : readExcel) {
            FlatAccoutEntity accoutEntity = new FlatAccoutEntity();
            // 判断是否是该停车场
            if(StringUtils.isNotEmpty(map.get("停车场名称")) && stoppingPlaceName.equals(map.get("停车场名称"))) {
            }else {
                throw new BizException("10003","该数据不是当前停车场");
            }
            // 设置停车场
            accoutEntity.setStoppingPlaceId(stoppingPlaceId);
            // excel中第1列是停车场名称,不需要取
            for(int i=1;i

关于“大数据中如何实现导入”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。


文章标题:大数据中如何实现导入
文章源于:http://bjjierui.cn/article/ppsceg.html

其他资讯