package com.cloud.user.controller;
|
|
import com.cloud.model.sys.GloDict;
|
import com.cloud.user.service.GolDictService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.http.MediaType;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
*全局字典控制层
|
*/
|
@Slf4j
|
@Api(value = "GolDictController", description = "学校组织机构全局字典控制层")
|
@RequestMapping("data/api-u")
|
@RestController
|
public class GolDictController {
|
|
@Autowired
|
private GolDictService golDictService;
|
|
/**
|
* 获取组织机构下的教师合同种类
|
* @param params
|
* @return
|
*/
|
@ApiOperation(value = "获取组织机构下的教师合同种类",response = Map.class, responseContainer = "Map", notes = "获取组织机构下的教师合同种类", httpMethod = "GET", produces = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "orgId", value = "学校orgId", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "type", value = "字典类型", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "id", value = "字典id", required = false, dataType = "String", paramType = "query")
|
})
|
@RequestMapping("/glo/getTeacherPact")
|
public List<Map<String,Object>> getTeacherPact(@RequestParam Map<String,Object> params){
|
|
return golDictService.getTeacherPact(params);
|
}
|
|
/**
|
* 获取组织机构下的人员类型
|
* @param params
|
* @return
|
*/
|
@ApiOperation(value = "获取组织机构下的人员类型", notes = "获取组织机构下的人员类型", httpMethod = "GET", produces = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "orgId", value = "学校id或登录人orgId", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "type", value = "字典类型", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "id", value = "字典id", required = false, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "module", value = "模块类型", required = false, dataType = "String", paramType = "query")
|
})
|
@RequestMapping("/glo/getPeoType")
|
public Map<String,Object> getPeoType(@RequestParam Map<String,Object> params){
|
|
return golDictService.getPeoType(params);
|
}
|
|
/**
|
* 获取全局学校组织类型字典
|
* @param
|
* @return
|
*/
|
@ApiOperation(value = "获取全局学校组织类型字典", notes = "获取全局学校组织类型字典", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
@RequestMapping("/glo/getOrgType")
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "id", value = "字典id", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "type", value = "字典类型", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "module", value = "模块类型", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "value", value = "值", required = true, dataType = "String", paramType = "query")
|
})
|
public Map<String,Object> getOrgType(@RequestParam Map<String,Object> params){
|
|
return golDictService.getOrgType(params);
|
}
|
|
|
/**
|
* 查询全局字典集合
|
* @param params
|
* @return
|
*/
|
@ApiOperation(value = "查询全局字典集合", notes = "查询全局字典集合", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "orgId", value = "组织orgId", required = false, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "id", value = "字典id", required = false, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "type", value = "字典类型(行为规则:ACTION)", required = true, dataType = "String", paramType = "query"),
|
})
|
@RequestMapping("/glo/getGloDicts")
|
public Map<String,Object> getGloDicts(@RequestParam Map<String,Object> params){
|
|
return golDictService.getGloDicts(params);
|
}
|
|
/**
|
* 全局字典集合添加
|
* @param params
|
* @return
|
*/
|
@ApiOperation(value = "全局字典集合添加", notes = "全局字典集合添加", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "orgId", value = "学校orgId", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "id", value = "字典id", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "type", value = "字典类型", required = true, dataType = "String", paramType = "query")
|
})
|
@PostMapping("/glo/GloDicts/save")
|
public Map<String,Object> saveGloDict(@RequestBody Map<String,Object> params){
|
|
return golDictService.saveGloDicts(params);
|
}
|
|
/**
|
* 全局字典修改
|
* @param params
|
* @return
|
*/
|
@ApiOperation(value = "全局字典修改", notes = "全局字典修改", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "orgId", value = "学校orgId", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "id", value = "字典id", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "type", value = "字典类型", required = true, dataType = "String", paramType = "query"),
|
@ApiImplicitParam(name = "module", value = "字典所属模块", required = true, dataType = "String", paramType = "query")
|
})
|
@PostMapping("/glo/GloDicts/update")
|
public Map<String,Object> updateGloDict(@RequestBody Map<String,Object> params){
|
|
return golDictService.updateGloDicts(params);
|
}
|
|
/**
|
* 全局字典删除
|
* @param id
|
* @return
|
*/
|
@ApiOperation(value = "全局字典删除", notes = "全局字典删除", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "id", value = "字典id", required = true, dataType = "String", paramType = "query"),
|
})
|
@GetMapping("/glo/GloDicts/delete")
|
public Map<String,Object> deleteGloDict(@RequestParam("id") Integer id){
|
|
return golDictService.deleteGloDicts(id);
|
}
|
}
|