| | |
| | | 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; |
| | |
| | | apply.setCount(dr.getDepcodes().size()); |
| | | apply.setDescr(dr.getDescr()); |
| | | apply.setCreateUser(ue.getId()); |
| | | apply.setDepcode(dr.getDepcode()); |
| | | apply.setDircodes(dr.getDirs()); |
| | | apply.setGids(StringHelper.join(dr.getIds(), ",")); |
| | | apply.setFilters(dr.getFilter()); |
| | | |
| | | return apply; |
| | | } |
| | |
| | | */ |
| | | 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()); |
| | | |
| | | dataLibService.createZipFile(ue, entities, null, null, entity.getWkt(), pwd); |
| | | DownloadReqEntity dr = new DownloadReqEntity(); |
| | | dr.setEntities(entities); |
| | | dr.setWkt(dr.getWkt()); |
| | | dr.setPwd(pwd); |
| | | dr.setDepcode(entity.getDepcode()); |
| | | dr.setDirs(entity.getDircodes()); |
| | | dr.setIds(getIds(entity)); |
| | | dr.setFilter(entity.getFilters()); |
| | | |
| | | 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; |
| | | } |
| | | } |