From 4e811ec71dba161e13592828a6035e9316b1548e Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 30 八月 2024 17:15:29 +0800
Subject: [PATCH] 链接类型查询模板
---
Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java | 195 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 190 insertions(+), 5 deletions(-)
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java
index 8202ace..c2032a4 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java
@@ -3,6 +3,7 @@
import com.vci.corba.common.PLException;
import com.vci.corba.omd.ltm.LinkType;
import com.vci.corba.omd.qtm.QTD;
+import com.vci.dto.QTInfoDTO;
import com.vci.pagemodel.OsBtmTypeAttributeVO;
import com.vci.pagemodel.OsBtmTypeVO;
import com.vci.pagemodel.OsLinkTypeAttributeVO;
@@ -123,7 +124,7 @@
/**
* 鏌ヨ鏉′欢鐨勬煡璇㈡寜閽煡璇is鍒楄〃
- * @param dataMap 浼犺緭鐨勬暟鎹璞★細
+ * @param qtInfoDTO 浼犺緭鐨勬暟鎹璞★細
* linkTypeName 閾炬帴绫诲瀷鍚嶇О銆�
* rdPositive 鏂瑰悜锛宼rue姝e悜锛宖alse鍙嶅悜
* btmName 涓氬姟绫诲瀷鍚嶇О
@@ -133,10 +134,43 @@
* level 瀛愯妭鐐瑰眰鏁�
* @return 鏌ヨ缁撴灉
*/
- @GetMapping("/getCriteria")
- public BaseResult getCriteria(@RequestBody HashMap<String,Object> dataMap){
+ @PostMapping("/getCriteria")
+ public BaseResult getCriteria(@RequestBody QTInfoDTO qtInfoDTO){
try {
- return quereyTemplateServiceI.getCriteria(dataMap);
+ return quereyTemplateServiceI.getCriteria(qtInfoDTO);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘涓嬬殑鏌ヨ鏉′欢鐨勬煡璇㈡寜閽煡璇ist鍒楄〃
+ * @param qtInfoDTO
+ * @return 鏌ヨ缁撴灉
+ */
+ @PostMapping("/getCriteriaBtm")
+ public BaseResult getCriteriaBtm(@RequestBody QTInfoDTO qtInfoDTO){
+ try {
+ return quereyTemplateServiceI.getCriteriaBtm(qtInfoDTO);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 鏌ヨ鏉′欢涓嬬殑閫夋嫨鏌ヨ妯℃澘瀵硅瘽妗嗭紙鏌ヨ鍏ㄩ儴妯℃澘鍜屾墍瀵瑰簲鐨勪笟鍔$被鍨嬫垨閾炬帴绫诲瀷鍚嶏級
+ * @return
+ */
+ @GetMapping("/getAllQTs")
+ public BaseResult getAllQTs(){
+ try {
+ return quereyTemplateServiceI.getAllQTs();
} catch (PLException e) {
BaseResult objectBaseResult = new BaseResult<>();
objectBaseResult.setCode(Integer.parseInt(e.code));
@@ -160,7 +194,11 @@
objectBaseResult.setMsg(Arrays.toString(e.messages));
return objectBaseResult;
} catch (DocumentException e) {
- throw new RuntimeException(e);
+ e.printStackTrace();
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(500);
+ objectBaseResult.setMsg(Arrays.toString(e.getMessage().toCharArray()));
+ return objectBaseResult;
}
}
@@ -180,4 +218,151 @@
return objectBaseResult;
}
}
+
+ /**
+ * 閾炬帴绫诲瀷鏌ヨ妯℃澘淇濆瓨
+ * @param qtInfoDTO 淇濆瓨浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ @PostMapping("/linkSave")
+ public BaseResult linkSave(@RequestBody QTInfoDTO qtInfoDTO){
+ try {
+ return quereyTemplateServiceI.linkSave(qtInfoDTO);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 閾炬帴绫诲瀷鏌ヨ妯℃澘鏍戞煡璇紝鐢ㄤ簬鐣岄潰鐨勫鍑哄姛鑳�
+ * @return 鏌ヨ缁撴灉
+ */
+ @GetMapping("/getLinkTree")
+ public BaseResult getLinkTree(){
+ try {
+ return quereyTemplateServiceI.getLinkTree();
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+ /**
+ * 瀵煎嚭閾炬帴绫诲瀷鏌ヨ妯℃澘
+ * names 鏌ヨ妯℃澘鍚�
+ * @return
+ */
+ @PostMapping("/expLinkTemplate")
+ public void expLinkTemplate(@RequestBody List<String> names,HttpServletResponse response) throws PLException, IOException {
+ quereyTemplateServiceI.expLinkTemplate(names, response);
+ }
+
+ /**
+ * 瀵煎叆閾炬帴绫诲瀷鏌ヨ妯℃澘
+ * @param file 涓婁紶鐨勬枃浠�
+ * @return 瀵煎叆缁撴灉
+ */
+ @PostMapping("/impLinkTemplate")
+ public BaseResult impLinkTemplate(MultipartFile file){
+ try {
+ return quereyTemplateServiceI.impLinkTemplate(file);
+ }catch (Throwable e) {
+ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
+ }
+ }
+
+ /**
+ * 鏌ヨ鏂规鍒犻櫎
+ * @param templateNames 鏌ヨ鏂规鍚�
+ * @return 鎿嶄綔缁撴灉
+ */
+ @DeleteMapping("/deleteLinkTemplate")
+ public BaseResult deleteLinkTemplate(@RequestBody List<String> templateNames){
+ try {
+ return quereyTemplateServiceI.deleteLinkTemplate(templateNames);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘淇濆瓨
+ * @param qtInfoDTO 淇濆瓨浼犺緭瀵硅薄
+ * @return 淇濆瓨缁撴灉
+ */
+ @PostMapping("/btmSave")
+ public BaseResult btmSave(@RequestBody QTInfoDTO qtInfoDTO){
+ try {
+ return quereyTemplateServiceI.btmSave(qtInfoDTO);
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 鏇存柊鏁版嵁搴撶粨鏋�
+ * @return 鏇存柊缁撴灉
+ */
+ @PostMapping("/updateDBStructure")
+ public BaseResult btmSave(){
+ try {
+ return quereyTemplateServiceI.updateDBStructure();
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 涓氬姟绫诲瀷鏌ヨ妯℃澘鏍戞煡璇紝鐢ㄤ簬鐣岄潰鐨勫鍑哄姛鑳�
+ * @return 鏌ヨ缁撴灉
+ */
+ @GetMapping("/getBtmQtTree")
+ public BaseResult getBtmQtTree(){
+ try {
+ return quereyTemplateServiceI.getBtmQtTree();
+ } catch (PLException e) {
+ BaseResult objectBaseResult = new BaseResult<>();
+ objectBaseResult.setCode(Integer.parseInt(e.code));
+ objectBaseResult.setMsg(Arrays.toString(e.messages));
+ return objectBaseResult;
+ }
+ }
+
+ /**
+ * 瀵煎嚭涓氬姟绫诲瀷鏌ヨ妯℃澘
+ * names 鏌ヨ妯℃澘鍚�
+ * @return
+ */
+ @PostMapping("/expBtmQTTemplate")
+ public void expBtmQTTemplate(@RequestBody List<String> names,HttpServletResponse response) throws PLException, IOException {
+ quereyTemplateServiceI.expBtmQTTemplate(names, response);
+ }
+
+ /**
+ * 瀵煎叆涓氬姟绫诲瀷鏌ヨ妯℃澘
+ * @param file 涓婁紶鐨勬枃浠�
+ * @return 瀵煎叆缁撴灉
+ */
+ @PostMapping("/impBtmTemplate")
+ public BaseResult impBtmTemplate(MultipartFile file){
+ try {
+ return quereyTemplateServiceI.impBtmTemplate(file);
+ }catch (Throwable e) {
+ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
+ }
+ }
+
}
--
Gitblit v1.9.3