From 0b393384a97d3f9133cc34d325c9daa0c19f239a Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期四, 29 八月 2024 15:45:44 +0800 Subject: [PATCH] 1、增加链接类型查询模板设置排序的下拉框数据接口。 2、保存Action参数数据接口。 3、修改Action参数数据接口。 4、删除Action参数数据接口。 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java | 72 +++++++++++++++++++++++++++++++++-- 1 files changed, 67 insertions(+), 5 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java index 8d8e922..fd3d7b9 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java @@ -6,11 +6,7 @@ import com.vci.corba.portal.data.PLAction; import com.vci.corba.portal.data.PLActionCls; import com.vci.corba.portal.data.PLActionParam; -import com.vci.dto.PLActionClsDTO; -import com.vci.dto.PLActionDTO; -import com.vci.dto.PLActionExpDTO; -import com.vci.dto.PLActionQueryDTO; -import com.vci.pagemodel.OsAttributeVO; +import com.vci.dto.*; import com.vci.starter.poi.bo.WriteExcelData; import com.vci.starter.poi.bo.WriteExcelOption; import com.vci.starter.poi.util.ExcelUtil; @@ -503,6 +499,72 @@ ControllerUtil.writeFileToResponse(response,excelPath); FileUtil.del(defaultTempFolder + File.separator); } + /** + * 淇濆瓨Action鍙傛暟鏁版嵁 + * dto action浼犺緭瀵硅薄 + * @return 淇濆瓨缁撴灉 + */ + @Override + public BaseResult savePLActionParam(PLActionParamDTO dto) throws PLException { + if(dto.getName() == null || dto.getName().equals("")) { + throw new PLException("500",new String[]{"鍙傛暟鍚嶇О涓嶈兘涓虹┖"}); + } + PLActionParam param = new PLActionParam(); + param.oid = ""; + param.name = dto.getName(); + param.defaultValue = dto.getDefaultValue(); + param.description = dto.getDescription(); + param.action = dto.getAction(); + String message = platformClientUtil.getUIService().createPLActionParam(param); + + if(message.startsWith("0")) { + if(message.equals("01")) { + throw new PLException("500",new String[]{"鍙傛暟鍚嶅凡缁忓瓨鍦紒"}); + } else { + throw new PLException("500",new String[]{"娣诲姞鎸夐挳鍙傛暟鏃跺彂鐢熷紓甯革細" + message.substring(1)}); + } + } + return BaseResult.success(); + } + + @Override + public BaseResult updatePLActionParam(PLActionParamDTO dto) throws PLException { + if(dto.getName() == null || dto.getName().equals("")) { + throw new PLException("500",new String[]{"鍙傛暟鍚嶇О涓嶈兘涓虹┖"}); + } + PLActionParam param = new PLActionParam(); + param.oid = dto.getOid(); + param.name = dto.getName(); + param.defaultValue = dto.getDefaultValue(); + param.description = dto.getDescription(); + param.action = dto.getAction(); + String message = platformClientUtil.getUIService().editPLActionParam(param); + + if(message.startsWith("0")) { + if(message.equals("01")) { + throw new PLException("500",new String[]{"鍙傛暟鍚嶅凡缁忓瓨鍦紒"}); + } else { + throw new PLException("500",new String[]{"娣诲姞鎸夐挳鍙傛暟鏃跺彂鐢熷紓甯革細" + message.substring(1)}); + } + } + return BaseResult.success(); + } + /** + * 鍒犻櫎Action鍙傛暟鏁版嵁 + * oid 鍙傛暟涓婚敭 + * @return 淇濆瓨缁撴灉 + */ + @Override + public BaseResult deletePLActionParam(String oid) throws PLException { + if(StringUtils.isBlank(oid)){ + throw new PLException("500", new String[]{"鍙傛暟涓婚敭涓嶈兘涓虹┖"}); + } + String message = platformClientUtil.getUIService().deletePLActionParam(oid); + if (message.startsWith("0")) { + throw new PLException("500", new String[]{"鍒犻櫎鎸夐挳鍙傛暟鏃跺彂鐢熷紓甯革細" + message.substring(1)}); + } + return BaseResult.success(); + } public boolean isValidPageForamt(PLActionExpDTO plActionExpDTO) throws PLException { -- Gitblit v1.9.3