mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
机台授权 统一归类
This commit is contained in:
+2
-2
@@ -39,7 +39,7 @@ public class DataSourceController {
|
||||
@Resource
|
||||
private DataSourceService dataSourceService;
|
||||
|
||||
@PostMapping("/create")
|
||||
/* @PostMapping("/create")
|
||||
@Operation(summary = "创建系统数据源")
|
||||
@PreAuthorize("@ss.hasPermission('system:data-source:create')")
|
||||
public CommonResult<Long> createDataSource(@Valid @RequestBody DataSourceSaveReqVO createReqVO) {
|
||||
@@ -78,7 +78,7 @@ public class DataSourceController {
|
||||
public CommonResult<PageResult<DataSourceRespVO>> getDataSourcePage(@Valid DataSourcePageReqVO pageReqVO) {
|
||||
PageResult<DataSourceDO> pageResult = dataSourceService.getDataSourcePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DataSourceRespVO.class));
|
||||
}
|
||||
}*/
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得系统数据源列表")
|
||||
|
||||
+4
@@ -1,5 +1,6 @@
|
||||
package com.cf.imes.module.system.controller.admin.datasource.vo;
|
||||
|
||||
import com.cf.imes.module.system.dal.dataobject.datasource.DataSourceFiledDO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@@ -33,4 +34,7 @@ public class DataSourceRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "字段列表")
|
||||
private List<DataSourceFiledDO> filedList;
|
||||
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.cf.imes.module.system.controller.admin.machine;
|
||||
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.module.system.controller.admin.machine.vo.*;
|
||||
import com.cf.imes.module.system.dal.dataobject.machinetemplate.MachineTemplateDO;
|
||||
import com.cf.imes.module.system.service.machine.MachineTemplateService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
import static com.cf.imes.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* @author Beal
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "机台模板授权")
|
||||
public class MachineAuthController {
|
||||
|
||||
@Resource
|
||||
private MachineTemplateService machineTemplateService;
|
||||
|
||||
@PostMapping("organ-auth-template")
|
||||
@Operation(summary = "组织模板授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<Boolean> auth(@RequestBody MachineOrgAuthReq vo) {
|
||||
return success(machineTemplateService.auth(vo));
|
||||
}
|
||||
|
||||
@GetMapping("organ-template-page")
|
||||
@Operation(summary = "组织模板授权分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<PageResult<OrganTemplateResp>> organTemplatePage(OrganTemplatePage page) {
|
||||
return success(machineTemplateService.organTemplatePage(page));
|
||||
}
|
||||
|
||||
@GetMapping("organ-template-by-organId")
|
||||
@Operation(summary = "根据组织id查询组织模板授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@Parameter(name = "organId", description = "组织id", required = true, example = "1")
|
||||
public CommonResult<OrganTemplateResp> organTemplateByOrganId(@RequestParam Long organId ) {
|
||||
return success(machineTemplateService.organTemplateByOrganId(organId));
|
||||
}
|
||||
|
||||
@GetMapping("page-template-machine-auth")
|
||||
@Operation(summary = "授权机台模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<PageResult<TemplateAutoResp>> pageTemplateAuth(MachinePageReqVO pageParam) {
|
||||
PageResult<MachineTemplateDO> page = machineTemplateService.page(pageParam);
|
||||
List<TemplateAutoResp> list = BeanUtils.toBean(page.getList(), TemplateAutoResp.class);
|
||||
return success(new PageResult<TemplateAutoResp>(list, page.getTotal()));
|
||||
}
|
||||
}
|
||||
-42
@@ -119,50 +119,8 @@ public class MachineTemplateController {
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("auth-template")
|
||||
@Operation(summary = "用户模板授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<Boolean> auth(@RequestBody MachineAuthVO vo) {
|
||||
return success(machineTemplateService.auth(vo));
|
||||
}
|
||||
|
||||
@GetMapping("auth-template-page")
|
||||
@Operation(summary = "用户模板授权分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<PageResult<AuthTemplateResp>> authTemplatePage(AuthTemplatePage page) {
|
||||
return success(machineTemplateService.authTemplatePage(page));
|
||||
}
|
||||
|
||||
@PostMapping("organ-auth-template")
|
||||
@Operation(summary = "组织模板授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<Boolean> auth(@RequestBody MachineOrgAuthReq vo) {
|
||||
return success(machineTemplateService.auth(vo));
|
||||
}
|
||||
|
||||
@GetMapping("organ-template-page")
|
||||
@Operation(summary = "组织模板授权分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<PageResult<OrganTemplateResp>> organTemplatePage(OrganTemplatePage page) {
|
||||
return success(machineTemplateService.organTemplatePage(page));
|
||||
}
|
||||
|
||||
@GetMapping("organ-template-by-organId")
|
||||
@Operation(summary = "根据组织id查询组织模板授权")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
@Parameter(name = "organId", description = "组织id", required = true, example = "1")
|
||||
public CommonResult<OrganTemplateResp> organTemplateByOrganId(@RequestParam Long organId ) {
|
||||
return success(machineTemplateService.organTemplateByOrganId(organId));
|
||||
}
|
||||
|
||||
@GetMapping("page-template-machine-auth")
|
||||
@Operation(summary = "授权机台模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('machine-template::query')")
|
||||
public CommonResult<PageResult<TemplateAutoResp>> pageTemplateAuth(MachinePageReqVO pageParam) {
|
||||
PageResult<MachineTemplateDO> page = machineTemplateService.page(pageParam);
|
||||
List<TemplateAutoResp> list = BeanUtils.toBean(page.getList(), TemplateAutoResp.class);
|
||||
return success(new PageResult<TemplateAutoResp>(list, page.getTotal()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.cf.imes.module.system.dal.dataobject.datasource;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Beal
|
||||
*/
|
||||
@Data
|
||||
@TableName("system_data_source_field")
|
||||
public class DataSourceFiledDO {
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
private Long sourceId;
|
||||
|
||||
private String name;
|
||||
|
||||
private String key;
|
||||
}
|
||||
Reference in New Issue
Block a user