| | |
| | | package com.lf.server.service.show; |
| | | |
| | | import com.lf.server.entity.all.StaticData; |
| | | import com.lf.server.entity.ctrl.DownloadReqEntity; |
| | | import com.lf.server.entity.show.ApplyEntity; |
| | | import com.lf.server.entity.show.FlowEntity; |
| | |
| | | */ |
| | | public void zipDbData(UserEntity ue, ApplyEntity entity) { |
| | | try { |
| | | List<String> entities = Arrays.asList(entity.getEntities().split(",")); |
| | | List<String> entities = Arrays.asList(entity.getEntities().split(StaticData.COMMA)); |
| | | String pwd = AesHelper.decrypt(entity.getPwd()); |
| | | |
| | | DownloadReqEntity dr = new DownloadReqEntity(); |
| | | dr.setEntities(entities); |
| | | dr.setWkt(dr.getWkt()); |
| | | dr.setPwd(pwd); |
| | | dr.setIds(null); |
| | | dr.setDirs(null); |
| | | dr.setFilter(null); |
| | | dr.setDepcodes(null); |
| | | dr.setIds(getIds(entity)); |
| | | dr.setDirs(entity.getDircodes()); |
| | | dr.setFilter(entity.getFilters()); |
| | | dr.setDepcode(entity.getDepcode()); |
| | | |
| | | dataLibService.downloadDbReq4Wkt(ue, dr); |
| | | dataLibService.downloadDbReq(ue, dr); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取ID集合 |
| | | */ |
| | | private List<Integer> getIds(ApplyEntity entity) { |
| | | List<Integer> list = new ArrayList<>(); |
| | | for (String str : entity.getGids().split(StaticData.COMMA)) { |
| | | list.add(Integer.parseInt(str)); |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | } |