/*
 * *********************************************************************************************************************
 *
 *          !!
 *        .F88X
 *        X8888Y
 *      .}888888N;
 *        i888888N;        .:!              .I$WI:
 *          R888888I      .'N88~            i8}+8Y&8"l8i$8>8W~'>W8}8]KW+8IIN"8&
 *          .R888888I    .;N8888~          .X8'  "8I.!,/8"  !%NY8`"8I8~~8>,88I
 *            +888888N;  .8888888Y                                  "&&8Y.}8,
 *            ./888888N;  .R888888Y        .'}~    .>}'.`+>  i}!    "i'  +/'  .'i~  !11,.:">,  .~]!  .i}i
 *              ~888888%:  .I888888l      .]88~`1/iY88Ii+1'.R$8$8]"888888888>  Y8$  W8E  X8E  W8888'188Il}Y88$*
 *              18888888    E8888881    .]W%8$`R8X'&8%++N8i,8N%N8+l8%`  .}8N:.R$RE%N88N%N$K$R  188,FE$8%~Y88I
 *            .E888888I  .i8888888'      .:$8I;88+`E8R:/8N,.>881.`$8E/1/]N8X.Y8N`"KF&&FK!'88*."88K./$88%RN888+~
 *            8888888I  .,N888888~        ~88i"8W,!N8*.I88.}888%F,i$88"F88"  888:E8X.>88!i88>`888*.}Fl1]*}1YKi'
 *          i888888N'      I888Y          ]88;/EX*IFKFK88X  K8R  .l8W  88Y  ~88}'88E&%8W.X8N``]88!.$8K  .:W8I
 *        .i888888N;        I8Y          .&8$  .X88!  i881.:%888>I88  ;88]  +88+.';;;;:.Y88X  18N.,88l  .+88/
 *      .:R888888I
 *      .&888888I                                          Copyright (c) 2009-2020.  博锐尚格科技股份有限公司
 *        ~8888'
 *        .!88~                                                                     All rights reserved.
 *
 * *********************************************************************************************************************
 */

package com.persagy.server.syn.controllers.dict

import com.persagy.server.syn.services.dict.DClassDefService
import com.persagy.service.models.responses.SBaseResponse
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController

/**
 * 字典
 *
 * @author  wx
 * @date  2020/9/10 10:00
 */
@Tag(name = "0001、字典-手动导入字典")
@RestController
@RequestMapping("/dict")
class DictControllers {

    /**
     * 集团数据-存入数据中心
     */
    @Operation(summary = "001、集团数据-存入数据中心", description = "",tags = ["001"])
    @GetMapping(value = ["/group-info"])
    fun groupInfo(): SBaseResponse {
        return DClassDefService.groupQuerys()
    } // Fun groupInfo()

    /**
     * 集团下项目-存入数据中心
     */
    @Operation(summary = "002、集团下项目-存入数据中心", description = "",tags = ["002"])
    @GetMapping(value = ["/dict-project"])
    fun dictProject(): SBaseResponse{
        return DClassDefService.dictProject()
    } // Fun dictProject()

    /**
     * 平台字典
     */
    @Operation(summary = "003、平台字典对象类型-存入数据中心", description = "")
    @GetMapping(value = ["/dict-platform"])
    fun dictPlatform(): SBaseResponse{
        return DClassDefService.dictPlatform()
    } // Fun dictPlatform()

    /**
     * 平台字典 详细信息点
     */
    @Operation(summary = "004、平台字典对象信息点-存入数据中心", description = "")
    @GetMapping(value = ["/dict-platform-info"])
    fun dictPlatformInfo(): SBaseResponse {
        return DClassDefService.dictPlatformInfo()
    } // Fun dictPlatform()

    /**
     * 平台字典 专业
     */
    @Operation(summary = "005、平台字典专业-存入数据中心", description = "")
    @GetMapping(value = ["/dict-platform-major"])
    fun dictPlatformajor(): SBaseResponse {
        return DClassDefService.dictMajor()
    } // Fun dictPlatform()

    /**
     * 集团方案
     */
    @Operation(summary = "006、集团方案-存入数据中心", description = "")
    @GetMapping(value = ["/dict-scheme"])
    fun dictScheme(): SBaseResponse {
        return DClassDefService.dictGroupScheme()
    } // Fun dictPlatform()

    /**
     * 集团方案对象类型
     */
    @Operation(summary = "007、集团方案对象类型-存入数据中心", description = "")
    @GetMapping(value = ["/dict-scheme-category"])
    fun dictSchemeCategoty(): SBaseResponse {
        return DClassDefService.dictSchemeCategoty()
    } // Fun dictSchemeCategoty()

    /**
     * 集团方案对象类型
     */
    @Operation(summary = "008、集团方案对象的信息点-存入数据中心", description = "")
    @GetMapping(value = ["/dict-scheme-category-info"])
    fun dictSchemeCategotyInfo(): SBaseResponse {
        return DClassDefService.dictSchemeCategotyInfo()
    } // Fun dictSchemeCategoty()

    /**
     * 查询项目和方案的关系
     */
    @Operation(summary = "009、项目和方案的关系-存入数据中心", description = "")
    @GetMapping(value = ["/dict-scheme-project"])
    fun dictSchemeAndProject(): SBaseResponse{
        return DClassDefService.dictSchemeAndProject()
    } // Fun dictSchemeAndProject()

    /**
     * 集团字典-对象类型
     */
    @Operation(summary = "010、集团字典对象类型-存入数据中心", description = "")
    @GetMapping(value = ["/dict-group-category"])
    fun dictGroup(): SBaseResponse{
        return DClassDefService.dictGroup()
    } // Fun dictGroup()

    /**
     * 集团字典-对象信息点
     */
    @Operation(summary = "011、集团字典-对象信息点-存入数据中心", description = "")
    @GetMapping(value = ["/dict-group-info"])
    fun dictGroupInfo(): SBaseResponse {
        return DClassDefService.dictGroupInfo()
    } // Fun dictGroupInfo()

    /**
     * 项目字典-对象类型
     */
    @Operation(summary = "012、项目字典-对象类型-存入数据中心", description = "")
    @GetMapping(value = ["/dict-project-category"])
    fun dictProjectType(projectId: String?): SBaseResponse {
        return DClassDefService.dictProjectType(projectId)
    }

    /**
     * 项目字典-对象信息点
     */
    @Operation(summary = "011、项目字典-对象信息点-存入数据中心", description = "")
    @GetMapping(value = ["/dict-project-info"])
    fun dictProjectInfo(projectId: String): SBaseResponse {
        return DClassDefService.dictProjectInfo(projectId)
    } // Fun dictGroupInfo()

    /**
     * 集团字典-对象信息点
     */
    @Operation(summary = "011、所有项目字典-对象信息点-存入数据中心", description = "")
    @GetMapping(value = ["/dict-project-info-all"])
    fun dictProjectInfoAll(): SBaseResponse {
        return DClassDefService.projectAllInfo()
    } // Fun dictGroupInfo()

    /**
     * 项目字典的类型以及信息点
     */
    /**
     * 集团字典-对象信息点
     */
    @Operation(summary = "011、所有项目字典-对象信息点-存入数据中心-多线程", description = "switch false  是所有项目，默认老师true 当前项目")
    @GetMapping(value = ["/dict-project-type-info-all"])
    fun dictProjectTypeInfoAll(@RequestParam projectId: String,@RequestParam switch: Boolean = true): SBaseResponse {
        return DClassDefService.dictProjectTypeInfoAll(projectId,switch)
    } // Fun dictGroupInfo()



} // Class DictControllers