///*
// * ********************************************************************************************************************
// *
// *                     :*$@@%$*:                         ;:                ;;    ;;
// *                   :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
// *                  :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
// *                  =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
// *                  =@*                                  %!              @ $= % %@=   =%@!      %=
// *             *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
// *           %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
// *         ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
// *         $@*   ;@@@%=!:                *@*
// *         =@$    ;;;!=%@@@@=!           =@!
// *          %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2019.  北京上格云技术有限公司
// *           ;%@@$=$@@%*       *@@@$=%@@%;
// *              ::;::             ::;::                                              All rights reserved.
// *
// * ********************************************************************************************************************
// */
//
//package com.persagy.server.controllers.graphtype
//
//import com.persagy.database.SFilter
//import com.persagy.server.datacenter.models.entities.graphtype.GraphicType
//import com.persagy.server.datacenter.models.entities.graphtype.RelationTypeProject
//import com.persagy.server.datacenter.models.entities.graphtype.block.ConnectedBlockResponse
//import com.persagy.server.datacenter.models.entities.graphtype.block.ConnectedBlockSource
//import com.persagy.server.datacenter.models.entities.graphtype.block.ConnectedBlockSourceRequest
//import com.persagy.server.services.graphtype.*
//import com.persagy.service.SObjectService
//import com.persagy.service.SPageContext
//import com.persagy.service.models.enums.SResponseType
//import com.persagy.service.models.requests.SQueryRequest
//import com.persagy.service.models.responses.SBaseResponse
//import com.persagy.service.models.responses.SCreateResponse
//import com.persagy.service.models.responses.SQueryResponse
//import io.swagger.v3.oas.annotations.Operation
//import io.swagger.v3.oas.annotations.tags.Tag
//import org.slf4j.LoggerFactory
//import org.springframework.beans.factory.annotation.Autowired
//import org.springframework.http.MediaType
//import org.springframework.web.bind.annotation.*
//import org.springframework.web.multipart.MultipartFile
//import javax.servlet.http.HttpServletResponse
//
//
///**
// * 关系总览
// *
// * @author  邓婷婷
// */
//@Tag(name = "关系总览")
//@RestController
//@RequestMapping("/graphic")
//open class GraphicTypeController {
//    companion object {
//        // 日志
//        private val logger = LoggerFactory.getLogger(GraphicTypeController::class.java)
//    } // Companion object
//
//    /** 实例化 mapper 对象 */
//    @Autowired
//    lateinit var graphicTypeMapperService: GraphicTypeMapperService
//
//    /**
//     * 查询关系总览
//     */
//    @Operation(summary = "查询关系总览")
//    @PostMapping(value = ["/overview"])
//    fun overview(): SQueryResponse<GraphicType> {
//        return GraphicTypeService.overview()
//    } // Function tree()
//
//    /**
//     * 查询数量
//     */
//    @Operation(summary = "查询总览数量", description = "")
//    @PostMapping(value = ["/query-count"])
//    fun queryCount(): SQueryResponse<GraphicType> {
//        return graphicTypeMapperService.queryCounts()
//    } /* Fun pageQuery() */
//
//    /**
//     * 下载模板
//     */
//    @Operation(summary="下载模板", description= "")
//    @GetMapping(value = ["/template-downloads"])
//    fun templateDownloads(@RequestBody response: HttpServletResponse) {
//        RelationTypeProjectService.templateDownloads(response)
//    } // Fun templateDownloads
//
//    /**
//     * 导出关系
//     */
//    @Operation(summary="导出关系*", description="")
//    @GetMapping(value = ["/export"])
//    fun exportExcel( response: HttpServletResponse, @RequestParam projectId: String,@RequestParam relType: String,@RequestParam code: String = "对象ID", @RequestParam zoneType: String? = null) {
//        RelationTypeProjectService.exportExcel(response, projectId,relType, code, zoneType)
//    } // Fun exportExcel
//
//    /**
//     * 导入excel
//     *
//     * @param   file            导入的excel文件
//     * @return  导入状态
//     */
//    @Operation(summary = "导入excel", description = "")
//    @PostMapping("/import",consumes = [MediaType.MULTIPART_FORM_DATA_VALUE])
//    fun importExcel(@RequestPart("file") file: MultipartFile, @RequestParam relType: String, @RequestParam zoneType: String? = null) : SBaseResponse {
//        try {
//            RelationTypeProjectService.importExcel(file, relType, zoneType)
//        }catch (e : Exception){
//            return SBaseResponse(SResponseType.failure,"error:" + e.message)
//        }
//        return SBaseResponse(SResponseType.success, "")
//    } // Fun importExcel()
//
//    /**
//     * 下载报告
//     */
//    @Operation(summary="下载报告", description ="")
//    @GetMapping(value = ["/report-downloads"])
//    fun reportDownloads(@RequestBody response: HttpServletResponse, @RequestParam relType: String, @RequestParam zoneType: String? = null) {
//        RelationTypeProjectService.reportDownloads(response, relType, zoneType)
//    } // Fun reportDownloads()
//
//    /**
//     * 获取源末端
//     */
//    @Operation(summary="获取源末端", description ="plx")
//    @PostMapping(value = ["/connected-block-query"])
//    fun connectedBlockQuery(@RequestBody request: SQueryRequest): SQueryResponse<ConnectedBlockResponse> {
//        return ConnectedBlockService.getConnectedBlock(request);
//    } // Fun connectedBlockQuery()
//
//    /**
//     * 覆盖源末端
//     */
//    @Operation(summary="覆盖源末端", description ="plx")
//    @PostMapping(value = ["/replace-connected-block-source"])
//    fun replaceConnectedBlockSource(@RequestBody request: ConnectedBlockSourceRequest): SCreateResponse<ConnectedBlockSource> {
//        return ConnectedBlockSourceService.replaceConnectedBlockSource(request)
//    } // Fun replaceConnectedBlockSource()
//
//
//    /**
//     * 项目关系类型查询
//     */
//    @Operation(summary="项目关系类型查询", description ="")
//    @PostMapping(value = ["/relation_type_project"])
//    fun relationTypeProject(@RequestBody request: SQueryRequest): SQueryResponse<RelationTypeProject> {
//        val service = SObjectService(RelationTypeProject::class.java)
//        return service.pageQuery(request, arrayListOf(SFilter.eq("projectId", SPageContext.getHeader("ProjectId").toString())))
//    } // Fun replaceConnectedBlockSource()
//} // Class EquipScanTaskController