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 @@
    /**
     * 查询条件的查询按钮查询lis列表
     * @param dataMap 传输的数据对象:
     * @param qtInfoDTO 传输的数据对象:
     *                linkTypeName 链接类型名称、
     *                rdPositive 方向,true正向,false反向
     *                btmName 业务类型名称
@@ -133,10 +134,10 @@
     *                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));
@@ -160,7 +161,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 +185,77 @@
            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;
        }
    }
}