From 762ba3d007e66a985bc05dde8149949d30a1e3be Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期四, 17 十一月 2022 16:32:12 +0800 Subject: [PATCH] 资源表 --- src/main/java/com/lf/server/config/InitConfig.java | 41 +++++++++++++++++++++++++++++++++++++---- 1 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/lf/server/config/InitConfig.java b/src/main/java/com/lf/server/config/InitConfig.java index 8119598..72d543f 100644 --- a/src/main/java/com/lf/server/config/InitConfig.java +++ b/src/main/java/com/lf/server/config/InitConfig.java @@ -8,11 +8,12 @@ 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.helper.AesHelper; -import com.lf.server.helper.PathHelper; -import com.lf.server.helper.StringHelper; +import com.lf.server.entity.md.*; +import com.lf.server.helper.*; import com.lf.server.mapper.bd.DlgAgnpMapper; +import com.lf.server.service.all.BaseQueryService; import com.lf.server.service.all.PermsService; +import com.lf.server.service.show.LocateService; import com.lf.server.service.sys.ArgsService; import com.lf.server.service.sys.BlacklistService; import org.apache.commons.logging.Log; @@ -32,6 +33,7 @@ * @author WWW */ @Component +@SuppressWarnings("AlibabaRemoveCommentedCode") public class InitConfig implements ApplicationRunner { private final static Log log = LogFactory.getLog(InitConfig.class); @@ -50,6 +52,12 @@ @Autowired BlacklistService blacklistService; + @Autowired + BaseQueryService baseQueryService; + + @Autowired + LocateService locateService; + @Override public void run(ApplicationArguments args) { // noinspection AlibabaRemoveCommentedCode @@ -65,6 +73,8 @@ //testAes(); //testPerms(); //testBlacklist(); + //FloatServerController.test(); + //testReadExcel(); //boolean f1 = ZipHelper.unzip("D:\\LF\\data\\resources.zip", "D:\\LF\\data\\unzip"); //boolean f2 = ZipHelper.zip("D:\\LF\\data\\res.zip", "D:\\LF\\data\\unzip\\resources"); @@ -72,6 +82,7 @@ //boolean f4 = Zip4jHelper.unzip("D:\\LF\\data\\zip\\resources.zip", "D:\\LF\\data\\zip\\res", "12345"); // 鍒濆鍖� + GdalHelper.init(); pathHelper.init(); argsService.initSettingData(); @@ -82,8 +93,13 @@ } private void testMybatisPlus() { + String s1 = locateService.selectWktById(1); + + String tabName = baseQueryService.getTabName(dlgAgnpMapper); + List<String> list0 = dlgAgnpMapper.selectFieldFuzzy(tabName, "name", "%鍘�%"); + DlgAgnpEntity dlg = dlgAgnpMapper.selectById(1); - String wkt = dlgAgnpMapper.selectWktById(2); + String wkt = dlgAgnpMapper.selectWktById(tabName, 2); Map<String, Object> map = new HashMap<String, Object>(3); map.put("gid", 2); @@ -170,4 +186,21 @@ blacklistService.clearCache(); List<String> list5 = blacklistService.selectIpList(1); } + + private void testReadExcel() { + List<MdZxcgEntity> listMdZxcg = ExcelHelper.readExcel(MdZxcgEntity.class, "D:\\LF\\data\\xls\\娴嬬粯\\1-椤圭洰鎴愭灉-瑗夸笁涓璡\1-1涓嚎鎴愭灉琛╘\娴峰師鍘夸腑绾挎垚鏋滆〃.xlsx"); + int r1 = listMdZxcg.size(); + + //List<MdGdcgEntity> listGdcg = ExcelHelper.readExcel(MdGdcgEntity.class, "D:\\LF\\data\\xls\\娴嬬粯\\2-鍦颁笅绠$嚎鎺㈡祴鎴愭灉\\2-2 绠$嚎鎴愭灉琛�.xlsx"); + //int r2 = listGdcg.size(); + + String entityName = "Gxcg"; + String xls = "D:\\LF\\data\\xls\\娴嬬粯\\2-鍦颁笅绠$嚎鎺㈡祴鎴愭灉\\2-2 绠$嚎鎴愭灉琛�.xlsx"; + + String className = "com.lf.server.entity.bs." + entityName; + Object obj = ClassHelper.createInstance(className); + + List<?> list = ExcelHelper.readExcel(obj.getClass(), xls); + int r3 = list.size(); + } } -- Gitblit v1.9.3