| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.corba.framework.data.FuncOperationInfo; |
| | | import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; |
| | | import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI; |
| | | import com.vci.pagemodel.MenuVO; |
| | |
| | | @PostMapping("/addModel") |
| | | public BaseResult addModel(@RequestBody MenuVO menuVO) { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.addModule(menuVO),"模块增加成功"); |
| | | return BaseResult.success(hmSysModConfigService.addModule(menuVO),"模块增加成功!"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "增加模块时出现错误,原因:"+ VciBaseUtil.getExceptionMessage(e); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 删除模块下关联的操作类型 |
| | | * @param funcOperationInfo |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delFuncOperation") |
| | | public BaseResult delFuncOperation(@RequestBody FuncOperationInfo funcOperationInfo) { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.delFuncOperation(funcOperationInfo),"模块下操作类型删除成功"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "模块下操作类型删除时出现错误,原因:"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 管理功能模块、业务功能模块下的叶子节点—修改操作别名接口 |
| | | * @param menuVO |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 添加操作类型 |
| | | * @param menuVOList |
| | | * @param funcOperationInfoList |
| | | * @return |
| | | */ |
| | | @PostMapping("/addOperationType") |
| | | public BaseResult addOperationType(@RequestBody List<MenuVO> menuVOList) { |
| | | public BaseResult addOperationType(@RequestBody List<FuncOperationInfo> funcOperationInfoList) { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.addOperationType(menuVOList),"操作类型添加成功"); |
| | | return BaseResult.success(hmSysModConfigService.addOperationType(funcOperationInfoList),"操作类型添加成功"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "删除模块时出现错误,原因:"+ VciBaseUtil.getExceptionMessage(e); |
| | |
| | | * 导入模块 |
| | | * @return |
| | | */ |
| | | @GetMapping("/importModule") |
| | | @PostMapping("/importModule") |
| | | public BaseResult importModule(@RequestParam("files") List<MultipartFile> files) { |
| | | LinkedList<File> fileList = new LinkedList<>(); |
| | | try { |
| | |
| | | file.transferTo(file1); |
| | | fileList.add(file1); |
| | | } |
| | | if(Func.isEmpty(fileList)){ |
| | | if(Func.isNotEmpty(fileList)){ |
| | | return hmSysModConfigService.importModule(fileList); |
| | | } else { |
| | | return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"无导入的文件"}); |