From 085df90e488067783759dcd63cdb5fb43a51ff1f Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 26 九月 2024 12:44:04 +0800 Subject: [PATCH] 添加记录当前在线用户人数查询接口 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java | 96 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 90 insertions(+), 6 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java index 5fbd6bc..547d42d 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/UIManagerController.java @@ -216,13 +216,17 @@ * @param selectBtm 閫夋嫨瀵煎叆鍒扮殑涓氬姟绫诲瀷 * @return */ - @PostMapping("/impUiContextData") + @PostMapping("/impUIContextData") public BaseResult impUIContextData(MultipartFile file, boolean isCovered,String selectBtm){ - String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); - File file1 = new File(excelFileName); + File file1 = null; try { - file.transferTo(new File(excelFileName)); - if (file != null) { + //瑕嗙洊锛屼笉闇�瑕佷紶file + if(!isCovered){ + String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); + file1 = new File(excelFileName); + file.transferTo(new File(excelFileName)); + } + if (file != null || isCovered) { return uiManagerService.impUIContextData(file1, isCovered,selectBtm); } else { return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"鏃犲鍏ョ殑鏂囦欢"}); @@ -230,7 +234,9 @@ }catch (Throwable e) { throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e); }finally { - file1.delete(); + if(!isCovered){ + file1.delete(); + } } } @@ -391,6 +397,84 @@ } } + + /** + * 涓氬姟绫诲瀷涓嬫媺鏌ヨ + * @param baseQueryObject selectBtmType 閫夋嫨鐨勬簮瀵硅薄,甯﹀垎椤典俊鎭� + * @return + * @throws PLException + */ + @GetMapping( "/getBtmDatasByPage") + @VciBusinessLog(operateName = "涓氬姟绫诲瀷涓嬫媺鏌ヨ") + public BaseResult getBtmDatasByPage(BaseQueryObject baseQueryObject){ + try { + return BaseResult.dataGrid(uiManagerService.getBtmDatasByPage(baseQueryObject)); + }catch (Throwable e) { + e.printStackTrace(); + String exceptionMessage = "涓氬姟绫诲瀷涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); + } + } + + /** + * UI瀹氫箟涓嬫媺鏌ヨ锛坱emplateType涓篣I瀹氫箟鏃剁殑閫夋嫨瀵硅薄涓嬫媺鏌ヨ锛� + * @param baseQueryObject selectBtmType 閫夋嫨鐨勬簮瀵硅薄,甯﹀垎椤典俊鎭� + * @return + * @throws PLException + */ + @GetMapping( "/getUILayoutDatasByPage") + @VciBusinessLog(operateName = "UI瀹氫箟涓嬫媺鏌ヨ") + public BaseResult getUILayoutDatasByPage(BaseQueryObject baseQueryObject){ + try { + return BaseResult.dataGrid(uiManagerService.getUILayoutDatasByPage(baseQueryObject)); + }catch (Throwable e) { + e.printStackTrace(); + String exceptionMessage = "UI瀹氫箟涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); + } + } + + /** + * 閫夋嫨妯℃澘涓嬫媺鏌ヨ + * @param baseQueryObject + * @return + * @throws PLException + */ + @GetMapping( "/getPortalVIDatasByPage") + @VciBusinessLog(operateName = "閫夋嫨妯℃澘涓嬫媺鏌ヨ") + public BaseResult getPortalVIDatasByPage(BaseQueryObject baseQueryObject){ + try { + return BaseResult.dataGrid(uiManagerService.getPortalVIDatasByPage(baseQueryObject)); + }catch (Throwable e) { + e.printStackTrace(); + String exceptionMessage = "閫夋嫨妯℃澘涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); + } + } + + /** + * 鏌ヨ妯℃澘涓嬫媺鏌ヨ + * @param baseQueryObject + * @return + * @throws PLException + */ + @GetMapping( "/getQTInfoDatasByPage") + @VciBusinessLog(operateName = "鏌ヨ妯℃澘涓嬫媺鏌ヨ") + public BaseResult getQTInfoDatasByPage(BaseQueryObject baseQueryObject){ + try { + return BaseResult.dataGrid(uiManagerService.getQTInfoDatasByPage(baseQueryObject)); + }catch (Throwable e) { + e.printStackTrace(); + String exceptionMessage = "鏌ヨ妯℃澘涓嬫媺鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); + } + } + + //椤甸潰璁捐涓嬮厤缃寜閽浉鍏虫帴鍙� /** * 鑾峰彇椤电鍖哄煙鎸夐挳閰嶇疆淇℃伅 -- Gitblit v1.9.3