| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.dto.PLActionClsDTO; |
| | | import com.vci.dto.PLActionDTO; |
| | | import com.vci.dto.PLActionExpDTO; |
| | | import com.vci.dto.PLActionQueryDTO; |
| | | import com.vci.dto.*; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | |
| | | public BaseResult getActionTree(boolean isExp){ |
| | | try { |
| | | return osActionServiceI.getActionTree(isExp); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除分类 |
| | | * @param dto 分类对象 |
| | | * @return 处理结果 |
| | | * @throws PLException |
| | | */ |
| | | @DeleteMapping("/deleteActionCls") |
| | | public BaseResult deleteActionCls(@RequestBody PLActionClsDTO dto){ |
| | | try { |
| | | return osActionServiceI.deleteActionCls(dto); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | |
| | | osActionServiceI.exportAction(plActionExpDTO, response); |
| | | }catch (Throwable e) { |
| | | throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存Action参数数据 |
| | | * dto action传输对象 |
| | | * @return 保存结果 |
| | | */ |
| | | @PostMapping("/savePLActionParam") |
| | | public BaseResult savePLActionParam(@RequestBody PLActionParamDTO dto){ |
| | | try { |
| | | return osActionServiceI.savePLActionParam(dto); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改Action参数数据 |
| | | * dto action传输对象 |
| | | * @return 保存结果 |
| | | */ |
| | | @PostMapping("/updatePLActionParam") |
| | | public BaseResult updatePLActionParam(@RequestBody PLActionParamDTO dto){ |
| | | try { |
| | | return osActionServiceI.updatePLActionParam(dto); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | /** |
| | | * 删除Action参数数据 |
| | | * oid 参数主键 |
| | | * @return 保存结果 |
| | | */ |
| | | @DeleteMapping("/deletePLActionParam") |
| | | public BaseResult deletePLActionParam(String oid){ |
| | | try { |
| | | return osActionServiceI.deletePLActionParam(oid); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | /** |
| | | * 查询Action参数列表数据 |
| | | * actionOid 参数主键 |
| | | * @return 保存结果 |
| | | */ |
| | | @GetMapping("/getPLActionParam") |
| | | public BaseResult getPLActionParam(String actionOid){ |
| | | try { |
| | | return osActionServiceI.getPLActionParam(actionOid); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | } |