From e937d0111a52e2c13c50bbc3386d20a12d125899 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 06 九月 2024 10:54:54 +0800
Subject: [PATCH] 链接类型查询模板
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java | 52 +++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
index eededfb..9bbe900 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
@@ -25,6 +25,7 @@
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
+import java.text.ParseException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@@ -109,6 +110,27 @@
}
/**
+ * 鑾峰彇閾炬帴绫诲瀷鍖呭惈鐨勫睘鎬�
+ * @param name 閾炬帴绫诲瀷鐨勭紪鍙�
+ * @return 灞炴�х殑淇℃伅
+ */
+ @GetMapping("/getAllAttributeByLink")
+ public BaseResult<List<OsLinkTypeAttributeVO>> getAllAttributeByLink(String name){
+
+ try {
+ List<OsLinkTypeAttributeVO> osLinkTypeAttributeVOS = linkTypeService.getAllAttributeByLink(name);
+ return BaseResult.dataList(osLinkTypeAttributeVOS);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ } catch (ParseException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
* 妫�鏌ラ摼鎺ョ被鍨嬩腑鍏宠仈鐨勪笟鍔$被鍨嬬殑灞炴�ф湁涓嶅悓鐨勫唴瀹�
* @param linkTypeOid 閾炬帴绫诲瀷鐨勪富閿�
* @return 宸紓鐨勫睘鎬�
@@ -152,7 +174,7 @@
* addFlag 鏄惁涓烘柊澧� true鏂板锛宖alse淇敼
* @return 淇濆瓨缁撴灉
*/
- @GetMapping("/addAndEditLink")
+ @PostMapping("/addAndEditLink")
public BaseResult addAndEditLink(@RequestBody LinkType linkType, Boolean addFlag){
try {
return linkTypeService.addAndEditLink(linkType, addFlag);
@@ -250,11 +272,35 @@
* @return
*/
@PostMapping("/impData")
- @VciUnCheckRight
- public BaseResult impData(MultipartFile file){try {
+ public BaseResult impData(MultipartFile file){
+ try {
return linkTypeService.impData(file);
}catch (Throwable e) {
throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
}
}
+
+
+ /**
+ * 鑾峰彇璁剧疆鎺掑簭瀛楁鐨勬帓搴忓瓧娈�
+ * @param linkType 閾炬帴绫诲瀷鐨勭紪鍙�
+ * @param btmType 涓氬姟绫诲瀷鐨勭紪鍙�
+ * @param direction 姝�/鍙嶅悜
+ * @return 灞炴�х殑淇℃伅
+ */
+ @GetMapping("/getAllOrderbyAttributeByLink")
+ public BaseResult<List<String>> getAllOrderbyAttributeByLink(String linkType, String btmType, String direction){
+
+ try {
+ List<String> osLinkTypeAttributes = linkTypeService.getAllOrderbyAttributeByLink(linkType, btmType, direction);
+ return BaseResult.dataList(osLinkTypeAttributes);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ } catch (ParseException e) {
+ throw new RuntimeException(e);
+ }
+ }
}
--
Gitblit v1.9.3