From 2d014981bfa74a5653456349dc6dcd229f18c7a2 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期二, 06 八月 2024 11:54:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java        |   50 ++++++++++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java      |   24 ++++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java      |   32 ++++++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java                |    8 +
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsQueryTemplateController.java |   38 +++++++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java           |    7 +
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java     |   39 +++++++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java     |   14 ++
 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java   |   60 ++++++++++++
 9 files changed, 269 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..044c644 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);
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 447ebd1..a346399 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
@@ -4,9 +4,11 @@
 import com.vci.corba.omd.ltm.LinkType;
 import com.vci.corba.omd.qtm.QTD;
 import com.vci.pagemodel.OsBtmTypeAttributeVO;
+import com.vci.pagemodel.OsBtmTypeVO;
 import com.vci.pagemodel.OsLinkTypeAttributeVO;
 import com.vci.pagemodel.OsLinkTypeVO;
 import com.vci.starter.web.annotation.controller.VciUnCheckRight;
+import com.vci.starter.web.annotation.log.VciBusinessLog;
 import com.vci.starter.web.exception.VciBaseException;
 import com.vci.starter.web.pagemodel.BaseQueryObject;
 import com.vci.starter.web.pagemodel.BaseResult;
@@ -67,7 +69,7 @@
     }
 
     /**
-     * 鏌ヨ妯℃澘
+     * 淇濆瓨鏌ヨ妯℃澘
      * @param qtd 鏌ヨ妯℃澘瀹炰綋绫�
      * @return 淇濆瓨缁撴灉
      */
@@ -82,4 +84,38 @@
             return objectBaseResult;
         }
     }
+
+    /**
+     * 淇敼鏌ヨ妯℃澘
+     * @param qtd 鏌ヨ妯℃澘瀹炰綋绫�
+     * @return 淇濆瓨缁撴灉
+     */
+    @PostMapping("/updateTemplate")
+    public BaseResult updateTemplate(@RequestBody QTD qtd){
+        try {
+            return quereyTemplateServiceI.updateTemplate(qtd);
+        } catch (PLException e) {
+            BaseResult objectBaseResult = new BaseResult<>();
+            objectBaseResult.setCode(Integer.parseInt(e.code));
+            objectBaseResult.setMsg(Arrays.toString(e.messages));
+            return objectBaseResult;
+        }
+    }
+
+    /**
+     * 鍒犻櫎鏌ヨ妯℃澘
+     * @param name 鏌ヨ妯℃澘鍚�
+     * @return 淇濆瓨缁撴灉
+     */
+    @DeleteMapping("/deleteTemplate")
+    public BaseResult deleteTemplate(String name){
+        try {
+            return quereyTemplateServiceI.deleteTemplate(name);
+        } catch (PLException e) {
+            BaseResult objectBaseResult = new BaseResult<>();
+            objectBaseResult.setCode(Integer.parseInt(e.code));
+            objectBaseResult.setMsg(Arrays.toString(e.messages));
+            return objectBaseResult;
+        }
+    }
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
index e460f8f..ff9459a 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebBtmTypeController.java
@@ -8,6 +8,7 @@
 import com.vci.starter.web.pagemodel.BaseQueryObject;
 import com.vci.starter.web.pagemodel.BaseResult;
 import com.vci.starter.web.pagemodel.DataGrid;
+import com.vci.starter.web.pagemodel.Tree;
 import com.vci.starter.web.util.BeanUtil;
 import com.vci.starter.web.util.ControllerUtil;
 import com.vci.starter.web.util.LangBaseUtil;
@@ -100,6 +101,37 @@
         }
     }
 
+
+    /**
+     * 鑾峰彇鎵�鏈変笟鍔$被鍨嬶紙鏍戝舰缁撴瀯锛�
+     * @return 鏌ヨ缁撴灉
+     */
+    @GetMapping( "/getTreeBizTypes")
+    @VciBusinessLog(operateName = "鑾峰彇鎵�鏈変笟鍔$被鍨嬶紙鏍戝舰缁撴瀯锛�")
+    @VciUnCheckRight
+    public BaseResult<List<Tree>> getTreeBizTypes(){
+        try {
+            return btmService.getTreeBizTypes();
+        }catch (Exception e) {
+            e.printStackTrace();
+            String exceptionMessage = "鑾峰彇涓氬姟绫诲瀷鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e);
+            logger.error(exceptionMessage);
+            return BaseResult.fail(exceptionMessage);
+        }
+    }
+
+    /**
+     * 鑾峰彇涓氬姟绫诲瀷鍖呭惈鐨勫睘鎬�
+     * @param btmId 涓氬姟绫诲瀷鍚嶇О
+     * @return 灞炴�х殑淇℃伅
+     */
+    @GetMapping(value = "/getAllAttributesByBtmId")
+    @VciBusinessLog(operateName = "鏌ョ湅涓氬姟绫诲瀷鐨勫睘鎬�")
+    public BaseResult<List<OsBtmTypeAttributeVO>> getAllAttributesByBtmId(String btmId){
+        List<OsBtmTypeAttributeVO> osBtmTypeAttributeVOS = btmService.listAttributeByBtmIdHasDefault(btmId);
+        return BaseResult.dataList(osBtmTypeAttributeVOS);
+    }
+
     /**
      * 鍙傜収鐨勪笟鍔$被鍨�
      * @param baseQueryObject 鏌ヨ鏉′欢
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
index 141ddf0..e1c77c4 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsBtmServiceI.java
@@ -6,8 +6,10 @@
 import com.vci.pagemodel.OsBtmTypeVO;
 import com.vci.pagemodel.OsERVO;
 import com.vci.pagemodel.OsUsedAttributeVO;
+import com.vci.starter.web.pagemodel.BaseResult;
 import com.vci.starter.web.pagemodel.DataGrid;
 import com.vci.starter.web.pagemodel.PageHelper;
+import com.vci.starter.web.pagemodel.Tree;
 
 import java.util.Collection;
 import java.util.List;
@@ -150,4 +152,10 @@
      * @return 鎵ц缁撴灉
      */
     OsERVO createERUsed(String btmId);
+
+    /**
+     * 鑾峰彇鎵�鏈変笟鍔$被鍨嬶紙鏍戝舰缁撴瀯锛�
+     * @return 鏌ヨ缁撴灉
+     */
+    BaseResult<List<Tree>> getTreeBizTypes() throws PLException;
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
index d81d452..5169a30 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
@@ -12,6 +12,7 @@
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.text.ParseException;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -159,4 +160,10 @@
      * @return
      */
     BaseResult impData(MultipartFile file) throws Exception;
+    /**
+     * 鑾峰彇閾炬帴绫诲瀷鍖呭惈鐨勫睘鎬�
+     * @param name 閾炬帴绫诲瀷鐨勭紪鍙�
+     * @return 灞炴�х殑淇℃伅
+     */
+    List<OsLinkTypeAttributeVO> getAllAttributeByLink(String name) throws PLException, ParseException;
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java
index c4458c0..c966f1c 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsQuereyTemplateServiceI.java
@@ -31,9 +31,21 @@
      */
     BaseResult queryTemplateList(String btmName, Boolean linkFlag) throws PLException;
     /**
-     * 鏌ヨ妯℃澘
+     * 淇濆瓨鏌ヨ妯℃澘
      * @param qtd 鏌ヨ妯℃澘瀹炰綋绫�
      * @return 淇濆瓨缁撴灉
      */
     BaseResult saveTemplate(QTD qtd) throws PLException;
+    /**
+     * 淇敼鏌ヨ妯℃澘
+     * @param qtd 鏌ヨ妯℃澘瀹炰綋绫�
+     * @return 淇濆瓨缁撴灉
+     */
+    BaseResult updateTemplate(QTD qtd) throws PLException;
+    /**
+     * 鍒犻櫎鏌ヨ妯℃澘
+     * @param name 鏌ヨ妯℃澘鍚�
+     * @return 淇濆瓨缁撴灉
+     */
+    BaseResult deleteTemplate(String name) throws PLException;
 }
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
index ef49c4b..b20f4bc 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsBtmServiceImpl.java
@@ -8,8 +8,10 @@
 import com.vci.starter.web.annotation.log.VciUnLog;
 import com.vci.starter.web.enumpck.BooleanEnum;
 import com.vci.starter.web.exception.VciBaseException;
+import com.vci.starter.web.pagemodel.BaseResult;
 import com.vci.starter.web.pagemodel.DataGrid;
 import com.vci.starter.web.pagemodel.PageHelper;
+import com.vci.starter.web.pagemodel.Tree;
 import com.vci.starter.web.util.BeanUtil;
 import com.vci.starter.web.util.VciBaseUtil;
 import com.vci.starter.web.util.VciDateUtil;
@@ -17,6 +19,7 @@
 import com.vci.web.util.ConcurrentDateFormat;
 import com.vci.web.util.Func;
 import com.vci.web.util.PlatformClientUtil;
+import com.vci.web.util.WebUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -522,6 +525,53 @@
         ervo.setTabRelViewList(relationVOList);
         return ervo;
     }
+    /**
+     * 鑾峰彇鎵�鏈変笟鍔$被鍨嬶紙鏍戝舰缁撴瀯锛�
+     * @return 鏌ヨ缁撴灉
+     */
+    @Override
+    public BaseResult<List<Tree>> getTreeBizTypes() throws PLException {
+        List<Tree> rootTreeList = new ArrayList<>();
+        BizType[] bizTypes = getBizTypes("");
+        BizType btItem = null;
+        for(int i = 0; i < bizTypes.length; i++){
+            btItem = bizTypes[i];
+            if(btItem.fName.equals("")){
+                Tree tree = new Tree();
+                tree.setOid(btItem.oid);
+                tree.setParentName(null);
+                tree.setParentId(null);
+                tree.setLeaf(true);
+                tree.setText(btItem.description);
+                tree.setAttributes(WebUtil.objectToMapString(btItem));
+                tree.setChildren(getChildren(bizTypes,btItem));
+                rootTreeList.add(tree);
+            }
+        }
+
+        return BaseResult.success(rootTreeList);
+    }
+
+    private List<Tree> getChildren(BizType[] bizTypes,BizType parentBIzType){
+        List<Tree> trees= new ArrayList<>();
+        for (BizType bizType : bizTypes) {
+            if(StringUtils.isBlank(bizType.fName)){
+                continue;
+            }
+            if(bizType.fName.equals(parentBIzType.name)){
+                Tree tree = new Tree();
+                tree.setOid(bizType.oid);
+                tree.setParentName(parentBIzType.fName);
+                tree.setParentId(parentBIzType.oid);
+                tree.setLeaf(true);
+                tree.setText(bizType.description);
+                tree.setAttributes(WebUtil.objectToMapString(bizType));
+                tree.setChildren(getChildren(bizTypes,bizType));
+                trees.add(tree);
+            }
+        }
+        return trees;
+    }
 
     /**
      * 灏嗕笟鍔$被鍨嬫嫾鎺son
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
index 58a4810..2c23e3f 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -12,6 +12,7 @@
 import com.vci.corba.omd.ltm.LinkType;
 import com.vci.corba.omd.ltm.LinkTypeServicePrx;
 import com.vci.dto.OsAttributeDTO;
+import com.vci.omd.constants.AttributeConstants;
 import com.vci.omd.constants.LinkTypeConstants;
 import com.vci.omd.utils.ObjectTool;
 import com.vci.pagemodel.*;
@@ -47,7 +48,10 @@
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -692,6 +696,62 @@
         FileUtil.del(defaultTempFolder + File.separator);
         return BaseResult.success("閾炬帴绫诲瀷瀵煎叆鎴愬姛锛�");
     }
+    /**
+     * 鑾峰彇閾炬帴绫诲瀷鍖呭惈鐨勫睘鎬�
+     * @param name 閾炬帴绫诲瀷鐨勭紪鍙�
+     * @return 灞炴�х殑淇℃伅
+     */
+    @Override
+    public List<OsLinkTypeAttributeVO> getAllAttributeByLink(String name) throws PLException, ParseException {
+        AttributeDef[] attributes = platformClientUtil.getLinkTypeService().getAttributes(name);
+        Map<String, AttributeDef> collect = Arrays.stream(platformClientUtil.getLinkTypeService().getSysAttributeDefs())
+                .collect(Collectors.toMap(str -> str.name, str -> str));
+
+        List<OsLinkTypeAttributeVO> links = new ArrayList<>();
+        String[] sysAttibutes = { "OID", "Creator", "CreateTime", "LastModifier", "LASTMODIFYTIME", "F_OID",
+                "F_REVISIONOID", "F_NAMEOID", "F_BtwName", "T_OID", "T_REVISIONOID", "T_NAMEOID", "T_BtwName", "TS" };
+        for (String sysname : sysAttibutes) {
+            AttributeDef sysAttributeDef = collect.get(sysname.toLowerCase());
+            OsLinkTypeAttributeVO vo = new OsLinkTypeAttributeVO();
+            vo.setOid(sysAttributeDef.oid);
+            vo.setAttrDataType(sysAttributeDef.vtDataType);
+            vo.setPkLinkType(name);
+            vo.setCreateTime(new Date(sysAttributeDef.createTime));
+            vo.setCreator(sysAttributeDef.creator);
+            vo.setDefaultValue(sysAttributeDef.defValue);
+            vo.setDescription(sysAttributeDef.description);
+            vo.setRange(sysAttributeDef.rage);
+            vo.setId(sysname);
+            vo.setName(sysAttributeDef.label);
+            vo.setLastModifier(sysAttributeDef.modifier);
+            vo.setLastModifyTime(new Date(sysAttributeDef.modifyTime));
+            links.add(vo);
+        }
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        for (AttributeDef attribute : attributes) {
+            OsLinkTypeAttributeVO vo = new OsLinkTypeAttributeVO();
+            vo.setOid(attribute.oid);
+            vo.setAttrDataType(attribute.vtDataType);
+            vo.setPkLinkType(name);
+            vo.setCreateTime(new Date(attribute.createTime));
+            vo.setCreator(attribute.creator);
+            vo.setDefaultValue(attribute.defValue);
+            vo.setDescription(attribute.description);
+            vo.setRange(attribute.rage);
+            vo.setId(attribute.name);
+            vo.setName(attribute.label);
+            vo.setTs(formatter.parse(attribute.ts));
+            vo.setLastModifier(attribute.modifier);
+            vo.setOwner(attribute.creator);
+            vo.setLastModifyTime(new Date(attribute.modifyTime));
+            String maxLength = AttributeConstants.getOtherValueByType(attribute.other, AttributeConstants.LENGTH);
+            if(StringUtils.isNotBlank(maxLength)){
+                vo.setAttributeLength(Integer.valueOf(maxLength));
+            }
+            links.add(vo);
+        }
+        return links;
+    }
 
     /**
      * 淇閾炬帴绫诲瀷鐨剎ml鏂囦欢
diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
index 7b577ba..50b8418 100644
--- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
+++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsQueryTemplateImpl.java
@@ -99,6 +99,45 @@
             throw new PLException("500", new String[]{"澧炲姞涓氬姟绫诲瀷鏌ヨ妯℃澘澶辫触"});
         }
     }
+    /**
+     * 淇敼鏌ヨ妯℃澘
+     * @param qtd 鏌ヨ妯℃澘瀹炰綋绫�
+     * @return 淇濆瓨缁撴灉
+     */
+    @Override
+    public BaseResult updateTemplate(QTD qtd) throws PLException {
+        //鏍¢獙鍙傛暟
+        if (qtd.name.equals("")) {
+            throw new PLException("500", new String[]{"璇疯緭鍏ユā鏉垮畾涔夊悕"});
+        }
+        if (!qtd.name.matches("[a-z A-Z]*")) {
+            throw new PLException("500", new String[]{"妯℃澘瀹氫箟鍚嶅彧鑳戒负鑻辨枃瀛楁瘝"});
+        }
+        qtd.createTime = System.currentTimeMillis();
+        boolean updateFlag = false;
+        //杩涜淇濆瓨
+        updateFlag = platformClientUtil.getQTDService().modifyQTD(qtd);
+        if (updateFlag) {
+            return BaseResult.success("淇敼涓氬姟绫诲瀷鏌ヨ妯℃澘鎴愬姛");
+        } else {
+            throw new PLException("500", new String[]{"淇敼涓氬姟绫诲瀷鏌ヨ妯℃澘澶辫触"});
+        }
+    }
+    /**
+     * 鍒犻櫎鏌ヨ妯℃澘
+     * @param name 鏌ヨ妯℃澘鍚�
+     * @return 淇濆瓨缁撴灉
+     */
+    @Override
+    public BaseResult deleteTemplate(String name) throws PLException {
+        boolean flag = false;
+        flag = platformClientUtil.getQTDService().deleteQTD(name);
+        if (flag) {
+            return BaseResult.success("鍒犻櫎鏌ヨ妯℃澘鎴愬姛");
+        } else {
+            return BaseResult.fail("鍒犻櫎鏌ヨ妯℃澘澶辫触");
+        }
+    }
 
     /**
      * 鏍¢獙鍙傛暟

--
Gitblit v1.9.3