From 99dda6d4254e062f386976e0d66c8379020d3944 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 06 九月 2024 16:34:18 +0800
Subject: [PATCH] 查询模板导出导入
---
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.10.0