| | |
| | | } |
| | | return BaseResult.success(); |
| | | } |
| | | /** |
| | | * 查询Action参数列表数据 |
| | | * actionOid 参数主键 |
| | | * @return 保存结果 |
| | | */ |
| | | @Override |
| | | public BaseResult getPLActionParam(String actionOid) throws PLException { |
| | | if (StringUtils.isBlank(actionOid)){ |
| | | throw new PLException("500", new String[]{"Action主键不能为空!"}); |
| | | } |
| | | PLActionParam[] paramArrays = platformClientUtil.getUIService().getPLActionParamArrayByActionId(actionOid); |
| | | List<PLActionParamDTO> dtos = new ArrayList<>(); |
| | | for (PLActionParam paramArray : paramArrays) { |
| | | PLActionParamDTO dto = new PLActionParamDTO(); |
| | | dto.setAction(paramArray.action); |
| | | dto.setOid(paramArray.oid); |
| | | dto.setName(paramArray.name); |
| | | dto.setDescription(paramArray.description); |
| | | dto.setDefaultValue(paramArray.defaultValue); |
| | | dtos.add(dto); |
| | | } |
| | | return BaseResult.dataList(dtos); |
| | | } |
| | | |
| | | /** |
| | | * 删除分类 |
| | | * @param dto 分类对象 |
| | | * @return 处理结果 |
| | | * @throws PLException |
| | | */ |
| | | @Override |
| | | public BaseResult deleteActionCls(PLActionClsDTO dto) throws PLException { |
| | | PLActionCls[] clses = platformClientUtil.getUIService().getPLActionClsArray(); |
| | | // 将所有分类父分类保存 |
| | | HashSet<String> clsPids = new HashSet<String>(); |
| | | for (PLActionCls plActionCls : clses) { |
| | | clsPids.add(plActionCls.pid); |
| | | } |
| | | if (dto.getName().equals("未分类")) { |
| | | throw new PLException("500", new String[]{"未分类不能删除!"}); |
| | | } |
| | | if (clsPids.contains(dto.getId())) { |
| | | throw new PLException("500", new String[]{"该分类下存在子分类不能删除!\n请删除此分类下的子分类!"}); |
| | | } |
| | | // 执行删除操作 |
| | | String message = platformClientUtil.getUIService().deletePLActionClsById(dto.getId()); |
| | | if (message.startsWith("0")) { |
| | | throw new PLException("500", new String[]{"删除分类失败!" + message.substring(1)}); |
| | | } |
| | | return BaseResult.success("分类删除成功!" + message.substring(1)); |
| | | } |
| | | |
| | | public boolean isValidPageForamt(PLActionExpDTO plActionExpDTO) throws PLException { |
| | | |