| | |
| | | import com.lf.server.entity.all.PermsAuthEntity; |
| | | import com.lf.server.entity.all.ResAuthEntity; |
| | | import com.lf.server.entity.bd.DlgagnpEntity; |
| | | import com.lf.server.entity.ctrl.CountEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.md.MdzxcgEntity; |
| | |
| | | List<PermsAuthEntity> pauList = permsService.selectPermsEntity("admin"); |
| | | List<PermsAuthEntity> pauList2 = permsService.selectPermsEntity("admin"); |
| | | |
| | | permsService.clearResCache(); |
| | | // permsService.clearResCache() |
| | | permsService.clearPermsCache(); |
| | | |
| | | raeList = permsService.selectRes("admin"); |
| | |
| | | // |
| | | } |
| | | } |
| | | |
| | | public void testWord() { |
| | | String inputFile = "C:\\Users\\Administrator\\Desktop\\ts\\项目数据分类统计.docx"; |
| | | String outPutFile = "C:\\Users\\Administrator\\Desktop\\ts\\NewWord.docx"; |
| | | |
| | | Map<String, String> textMap = new HashMap<>(1); |
| | | textMap.put("title", "深圳液化天然气应急调峰站外输管道工程(XQ03T04)"); |
| | | |
| | | List<String[]> tableList = new ArrayList<>(); |
| | | tableList.add(new String[]{"" + 1, "数字线划图", "123.54平方米"}); |
| | | tableList.add(new String[]{"" + 2, "地灾点", "120个"}); |
| | | |
| | | WordHelper.generateWord(inputFile, outPutFile, textMap, tableList); |
| | | } |
| | | |
| | | public void testExcel() { |
| | | String source = "C:\\Users\\Administrator\\Desktop\\ts\\项目数据分类统计.xlsx"; |
| | | String target = "C:\\Users\\Administrator\\Desktop\\ts\\NewWord.xlsx"; |
| | | |
| | | List<CountEntity> list = new ArrayList<>(); |
| | | CountEntity c1 = new CountEntity(); |
| | | c1.setNo(1); |
| | | c1.setM1("数字线划图"); |
| | | c1.setM2("123.54平方米"); |
| | | list.add(c1); |
| | | |
| | | CountEntity c2 = new CountEntity(); |
| | | c2.setNo(2); |
| | | c2.setM1("地灾点"); |
| | | c2.setM2("120个"); |
| | | list.add(c2); |
| | | |
| | | Map<String, Object> map = new HashMap<>(1); |
| | | map.put("title", "深圳液化天然气应急调峰站外输管道工程(XQ03T04)"); |
| | | |
| | | Map<String, List<CountEntity>> listMap = new HashMap<>(1); |
| | | listMap.put("data", list); |
| | | |
| | | ExcelHelper.writeToTemplate(source, target, map, listMap); |
| | | } |
| | | } |