| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.portal.data.PLPageDefination; |
| | | import com.vci.corba.portal.data.PLTabPage; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.dto.RoleRightDTO; |
| | | import com.vci.dto.UIAuthorDTO; |
| | | import com.vci.starter.web.pagemodel.Tree; |
| | | import com.vci.pagemodel.PLDefinationVO; |
| | | import com.vci.pagemodel.PLUILayoutCloneVO; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.UIManagerServiceI; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.xml.crypto.Data; |
| | | import java.io.IOException; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping( "/getTabByContextIdAndType") |
| | | @VciBusinessLog(operateName = "根据上下文ID和区域类型,按顺序获取当前区域的tab页") |
| | | public BaseResult<List<PLTabPage>> getTabByContextIdAndType(String contextId, int areaType){ |
| | | public BaseResult<DataGrid> getTabByContextIdAndType(String contextId, int areaType){ |
| | | try { |
| | | return BaseResult.dataList(uiManagerService.getTabByContextIdAndType(contextId,areaType)); |
| | | return BaseResult.dataGrid(uiManagerService.getTabByContextIdAndType(contextId,areaType)); |
| | | }catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "根据上下文ID和区域类型,按顺序获取当前区域的tab时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * 删除区域定义数据 |
| | | * @param oids |
| | | * @return |
| | | */ |
| | |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "删除时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | //页面设计相关接口 |
| | | /** |
| | | * 查询页面设计定义 |
| | | * @param pageContextOId |
| | | * @return |
| | | */ |
| | | @GetMapping( "/getPLPageDefinations") |
| | | @VciBusinessLog(operateName = "查询页面设计定义") |
| | | public BaseResult<DataGrid> getPLPageDefinations(String pageContextOId){ |
| | | try { |
| | | return BaseResult.dataGrid(uiManagerService.getPLPageDefinations(pageContextOId)); |
| | | }catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "查询页面设计定义时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加页面定义 |
| | | * @param pdVO |
| | | * @return 保存结果 |
| | | */ |
| | | @PostMapping("/addPageDefination") |
| | | public BaseResult addPageDefination(@RequestBody PLDefinationVO pdVO){ |
| | | try { |
| | | return uiManagerService.addPageDefination(pdVO) ? BaseResult.success("页面定义添加成功!"):BaseResult.fail("页面定义添加失败!"); |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "页面定义添加时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改页面定义数据 |
| | | * @param pdVO |
| | | * @return 修改结果 |
| | | */ |
| | | @PutMapping("/updatePageDefination") |
| | | public BaseResult updatePageDefination(@RequestBody PLDefinationVO pdVO){ |
| | | try { |
| | | return uiManagerService.updatePageDefination(pdVO) ? BaseResult.success("修改页面定义成功!"):BaseResult.fail("修改页面定义失败!"); |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "修改页面定义时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除页面定义数据 |
| | | * @param oids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delPageDefination") |
| | | public BaseResult delPageDefination(String[] oids){ |
| | | try { |
| | | return uiManagerService.delPageDefination(oids) ? BaseResult.success("删除页面定义成功!"):BaseResult.fail("删除页面定义数据失败!"); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "删除页面定义数据时出现错误,原因:" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | |
| | | } |
| | | |
| | | /*** |
| | | * @param selectTreeList 勾选的需要保存的数据对象 |
| | | * @param uiAuthorDTO 勾选的需要保存的数据对象 |
| | | * @return |
| | | */ |
| | | @PostMapping( "/authorizedUI") |