150 lines
4.2 KiB
Plaintext
150 lines
4.2 KiB
Plaintext
package com.securityControl.system.controller;
|
|
|
|
|
|
import com.securityControl.common.core.utils.aes.Aes;
|
|
import com.securityControl.common.core.utils.aes.StringHelper;
|
|
import com.securityControl.common.core.web.domain.AjaxResult;
|
|
import com.securityControl.common.log.annotation.Log;
|
|
import com.securityControl.common.log.enums.BusinessType;
|
|
import com.securityControl.system.domain.vo.SelectedEntity;
|
|
import com.securityControl.system.service.SysSelectedService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 系统下拉选统一查询接口
|
|
*/
|
|
@RestController
|
|
@RequestMapping(value = "/sys/selected/")
|
|
@Slf4j
|
|
public class SysSelectedController {
|
|
|
|
|
|
@Autowired
|
|
private SysSelectedService service;
|
|
|
|
/**
|
|
* 组织机构下拉选
|
|
*
|
|
* @param
|
|
* @return
|
|
*/
|
|
@PostMapping("getOrgSelected")
|
|
public List<SelectedEntity> getOrgSelected(String params) {
|
|
try {
|
|
// String param = Aes.aesDecrypt(params);//解密
|
|
if (StringHelper.isNotEmpty(params)) {
|
|
List<SelectedEntity> list = service.getOrgSelected(params);
|
|
return list;
|
|
}
|
|
} catch (Exception e) {
|
|
// log.error(e.toString(),e);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 组织机构下拉选
|
|
*
|
|
* @param params
|
|
* @return
|
|
*/
|
|
@PostMapping("getRoleSelected")
|
|
public List<SelectedEntity> getRoleSelected(String params) {
|
|
try {
|
|
// String param = Aes.aesDecrypt(params);//解密
|
|
if (StringHelper.isNotEmpty(params)) {
|
|
List<SelectedEntity> list = service.getRoleSelected(params);
|
|
return list;
|
|
}
|
|
} catch (Exception e) {
|
|
// log.error(e.toString(),e);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 菜单下拉选
|
|
*
|
|
* @param params
|
|
* @return
|
|
*/
|
|
@PostMapping("getMenuSelected")
|
|
public List<SelectedEntity> getMenuSelected(String params) {
|
|
try {
|
|
// String param = Aes.aesDecrypt(params);//解密
|
|
if (StringHelper.isNotEmpty(params)) {
|
|
List<SelectedEntity> list = service.getMenuSelected(params);
|
|
return list;
|
|
}
|
|
} catch (Exception e) {
|
|
// log.error(e.toString(),e);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 设备类型下拉选
|
|
*
|
|
* @param params
|
|
* @return
|
|
*/
|
|
@PostMapping("getDeviceTypeSelected")
|
|
public List<SelectedEntity> getDeviceTypeSelected(String params) {
|
|
try {
|
|
// String param = Aes.aesDecrypt(param);//解密
|
|
if (StringHelper.isNotEmpty(params)) {
|
|
List<SelectedEntity> list = service.getDeviceTypeSelected(params);
|
|
return list;
|
|
}
|
|
} catch (Exception e) {
|
|
// log.error(e.toString(),e);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* 字典表下拉选
|
|
*
|
|
* @param params
|
|
* @return
|
|
*/
|
|
@PostMapping("getDictSelected")
|
|
public List<SelectedEntity> getDictSelected(String params) {
|
|
try {
|
|
// String param = Aes.aesDecrypt(params);//解密
|
|
if (StringHelper.isNotEmpty(params)) {
|
|
List<SelectedEntity> list = service.getDictSelected(params);
|
|
return list;
|
|
}
|
|
} catch (Exception e) {
|
|
// log.error(e.toString(),e);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* @return com.securityControl.common.core.web.domain.AjaxResult
|
|
* @author cw chen
|
|
* @description 工程/标段工程下拉选
|
|
* @Param params
|
|
* @date 2023-01-12 14:58
|
|
*/
|
|
@PostMapping("getProSelected")
|
|
public AjaxResult getProSelected(String params) {
|
|
// String param = Aes.aesDecrypt(params);//解密
|
|
try {
|
|
List<SelectedEntity> list = service.getProSelected(params);
|
|
return AjaxResult.success("success", list);
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
return AjaxResult.success("error", null);
|
|
}
|
|
}
|
|
}
|