| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.pagemodel.UIContentVO; |
| | | import com.vci.pagemodel.UIFormDefineVO; |
| | | import com.vci.pagemodel.UITableDefineVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.UIEngineServiceI; |
| | | import com.vci.web.service.impl.WebInitServiceImpl; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | private UIEngineServiceI uiService; |
| | | |
| | | /** |
| | | * 初始化 |
| | | * 日志 |
| | | */ |
| | | @Autowired |
| | | private WebInitServiceImpl initService; |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * 获取UI上下文的定义 |
| | |
| | | */ |
| | | @GetMapping("/getUIContentByBtmTypeAndId") |
| | | @VciUnCheckRight |
| | | public UIContentVO getUIContentByBtmTypeAndId(String btmType,String id){ |
| | | return uiService.getUIContentByBtmTypeAndId(btmType,id); |
| | | public BaseResult getUIContentByBtmTypeAndId(String btmType,String id){ |
| | | try { |
| | | return BaseResult.success(uiService.getUIContentByBtmTypeAndId(btmType,id)); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "获取UI上下文的定义时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | @GetMapping("/getTableDefineById") |
| | | public UITableDefineVO getTableDefineById(String btmType,String id) throws PLException { |
| | | return uiService.getTableById(btmType,id); |
| | | } |
| | | |
| | | /** |
| | | * 清除缓存 |
| | | * @return 执行结果 |
| | | */ |
| | | @GetMapping("/clearCache") |
| | | public BaseResult clearCache(){ |
| | | //服务端那个,一言难尽 |
| | | initService.clearAllCache(); |
| | | initService.initServerCache(); |
| | | return BaseResult.success(); |
| | | } |
| | | |
| | | |