ludc
2024-09-26 085df90e488067783759dcd63cdb5fb43a51ff1f
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定义下拉查询(templateType为UI定义时的选择对象下拉查询)
     * @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);
        }
    }
    //页面设计下配置按钮相关接口
    /**
     * 获取页签区域按钮配置信息