Merge remote-tracking branch 'origin/dev' into dev
commit
e117360f40
|
@ -32,6 +32,11 @@
|
||||||
<artifactId>mapstruct-processor</artifactId>
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
<version>1.5.0.Beta1</version>
|
<version>1.5.0.Beta1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-jdk8</artifactId>
|
||||||
|
<version>1.5.0.Beta1</version>
|
||||||
|
</dependency>
|
||||||
<!--使用log42j-->
|
<!--使用log42j-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|
|
@ -11,9 +11,9 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
* @Author : FJJ
|
* @Author : FJJ
|
||||||
* @Date: 2023-12-20 11:16
|
* @Date: 2023-12-20 11:16
|
||||||
*/
|
*/
|
||||||
|
@EnableFeignClients
|
||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
|
||||||
public class GovernanceApplication {
|
public class GovernanceApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(GovernanceApplication.class, args);
|
SpringApplication.run(GovernanceApplication.class, args);
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
package net.srt;
|
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @BelongsProject: Default (Template) Project
|
|
||||||
* @BelongsPackage: net.srt
|
|
||||||
* @Author: jpz
|
|
||||||
* @CreateTime: 2023/12/19 22:05
|
|
||||||
*/
|
|
||||||
@EnableFeignClients
|
|
||||||
@EnableDiscoveryClient
|
|
||||||
@SpringBootApplication
|
|
||||||
@EnableScheduling
|
|
||||||
@EnableAsync
|
|
||||||
public class QualittRule {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(QualittRule.class);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
package net.srt.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.convert.DatastandardConvert;
|
||||||
|
import net.srt.entity.DatastandardEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.common.utils.Result;
|
||||||
|
import net.srt.query.StandardManagementQuery;
|
||||||
|
import net.srt.service.DatastandardService;
|
||||||
|
import net.srt.vo.StandardManagementVo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DatastandardController
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-20 20:36
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/data-standard")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DatastandardController {
|
||||||
|
@Autowired
|
||||||
|
DatastandardService datastandardService;
|
||||||
|
|
||||||
|
@GetMapping("page")
|
||||||
|
@Operation(summary = "分页")
|
||||||
|
public Result<PageResult<StandardManagementVo>> page(@Valid StandardManagementQuery query){
|
||||||
|
PageResult<StandardManagementVo> page = datastandardService.page(query);
|
||||||
|
return Result.ok(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("{id}")
|
||||||
|
@Operation(summary ="信息")
|
||||||
|
public Result<StandardManagementVo> get(@PathVariable("id") Integer categoryId) {
|
||||||
|
DatastandardEntity entity = datastandardService.getById(categoryId);
|
||||||
|
return Result.ok(DatastandardConvert.INSTANCE.convert(entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/table-code/list")
|
||||||
|
@Operation(summary = "查询表编码")
|
||||||
|
public Result<List<DatastandardEntity>> getTableCode(){
|
||||||
|
List<DatastandardEntity> list= datastandardService.getTableCode();
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Operation(summary = "保存")
|
||||||
|
public Result<String> save(@RequestBody DatastandardEntity entity) {
|
||||||
|
datastandardService.save(entity);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package net.srt.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tags;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.convert.MetamodelConvert;
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
import net.srt.framework.common.utils.Result;
|
||||||
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
|
import net.srt.service.MetamodelService;
|
||||||
|
import net.srt.vo.MetamodelVO;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/metamodel")
|
||||||
|
@Tag(name = "数据治理-元模型")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class MetamodelController {
|
||||||
|
private final MetamodelService metamodelService;
|
||||||
|
|
||||||
|
@GetMapping("list-tree")
|
||||||
|
@Operation(summary = "获取元模型列表")
|
||||||
|
public Result<List<TreeNodeVo>> listTree(){
|
||||||
|
List<TreeNodeVo> TreeNodeVos = metamodelService.listTree();
|
||||||
|
return Result.ok(TreeNodeVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("{id}")
|
||||||
|
@Operation(summary = "信息")
|
||||||
|
public Result<MetamodelVO> get(@PathVariable("id") Long id){
|
||||||
|
MetamodelEntity entity = metamodelService.getById(id);
|
||||||
|
return Result.ok(MetamodelConvert.INSTANCE.convert(entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Operation(summary = "保存")
|
||||||
|
public Result<String> save(@RequestBody MetamodelVO vo){
|
||||||
|
metamodelService.save(vo);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Operation(summary = "修改")
|
||||||
|
public Result<String> update(@RequestBody MetamodelVO vo){
|
||||||
|
metamodelService.update(vo);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
public Result<String> delete(@PathVariable Long id){
|
||||||
|
metamodelService.delete(id);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
package net.srt.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.convert.MetamodelPropertyConvert;
|
||||||
|
import net.srt.entity.MetamodelPropertyEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.common.utils.Result;
|
||||||
|
import net.srt.query.MetamodelpropertyQuery;
|
||||||
|
import net.srt.service.MetamodelPropertyService;
|
||||||
|
import net.srt.vo.MetamodelPropertyVO;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("metamodel-property")
|
||||||
|
@Tag(name = "数据治理-元模型属性")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class MetamodelPropertyController {
|
||||||
|
private final MetamodelPropertyService metamodelPropertyService;
|
||||||
|
|
||||||
|
@GetMapping("/properties/{metaModelId}")
|
||||||
|
@Operation(summary = "根据id获取属性列表")
|
||||||
|
public Result<List<MetamodelPropertyVO>> properties(@PathVariable Long id){
|
||||||
|
List<MetamodelPropertyVO> properties = metamodelPropertyService.properties(id);
|
||||||
|
return Result.ok(properties);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("page")
|
||||||
|
@Operation(summary = "分页")
|
||||||
|
public Result<PageResult<MetamodelPropertyVO>> page(@Valid MetamodelpropertyQuery query){
|
||||||
|
PageResult<MetamodelPropertyVO> page = metamodelPropertyService.page(query);
|
||||||
|
return Result.ok(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@Operation(summary = "信息")
|
||||||
|
public Result<MetamodelPropertyVO> get(@PathVariable("id") Long id){
|
||||||
|
MetamodelPropertyEntity entity = metamodelPropertyService.getById(id);
|
||||||
|
return Result.ok(MetamodelPropertyConvert.INSTANCE.convert(entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Operation(summary = "保存")
|
||||||
|
public Result<String> save(@RequestBody MetamodelPropertyVO vo){
|
||||||
|
metamodelPropertyService.save(vo);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Operation(summary = "修改")
|
||||||
|
public Result<String> update(@RequestBody MetamodelPropertyVO vo){
|
||||||
|
metamodelPropertyService.update(vo);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
public Result<String> delete(@RequestBody List<Long> idList){
|
||||||
|
metamodelPropertyService.delete(idList);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,18 +1,21 @@
|
||||||
package net.srt.controller;
|
package net.srt.controller;
|
||||||
|
|
||||||
|
import cn.hutool.db.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.convert.QualityRuleConvert;
|
||||||
|
import net.srt.entity.QualityQueryEntity;
|
||||||
import net.srt.framework.common.page.PageResult;
|
import net.srt.framework.common.page.PageResult;
|
||||||
import net.srt.framework.common.utils.Result;
|
import net.srt.framework.common.utils.Result;
|
||||||
import net.srt.query.QualityRuleQuery;
|
import net.srt.query.QualityRuleQuery;
|
||||||
import net.srt.service.QualityRuleService;
|
import net.srt.service.QualityRuleService;
|
||||||
import net.srt.vo.QualityRuleVo;
|
import net.srt.vo.QualityRuleVo;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import oracle.ucp.proxy.annotation.Post;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @BelongsProject: srt_cloud
|
* @BelongsProject: srt_cloud
|
||||||
|
@ -26,9 +29,24 @@ import javax.validation.Valid;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class QualityRuleController {
|
public class QualityRuleController {
|
||||||
private final QualityRuleService dataGovernanceQualityRuleService;
|
private final QualityRuleService dataGovernanceQualityRuleService;
|
||||||
|
@GetMapping("list")
|
||||||
|
@Operation(summary = "查询列表")
|
||||||
|
public Result<List<QualityRuleVo>> list(){
|
||||||
|
List<QualityQueryEntity> list=dataGovernanceQualityRuleService.list();
|
||||||
|
return Result.ok(QualityRuleConvert.INSTANCE.convertList(list));
|
||||||
|
|
||||||
|
}
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@Operation(summary = "分页")
|
@Operation(summary = "分页")
|
||||||
public Result<PageResult<QualityRuleVo>> page(@Valid QualityRuleQuery query){
|
public Result<PageResult<QualityRuleVo>> page(@Valid QualityRuleQuery query){
|
||||||
return Result.ok(dataGovernanceQualityRuleService.pagea(query));
|
PageResult<QualityRuleVo> page=dataGovernanceQualityRuleService.page(query);
|
||||||
|
return Result.ok(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Operation(summary = "报存")
|
||||||
|
public Result<String> save(@RequestBody QualityRuleVo vo){
|
||||||
|
dataGovernanceQualityRuleService.save(vo);
|
||||||
|
return Result.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
package net.srt.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tags;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.convert.QualityTaskConvert;
|
||||||
|
import net.srt.entity.QualityTaskEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.common.utils.Result;
|
||||||
|
import net.srt.query.QualityTaskQuery;
|
||||||
|
import net.srt.service.QualityTaskService;
|
||||||
|
import net.srt.vo.QualityTaskVo;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.controller
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/21 11:29
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/quality-task")
|
||||||
|
@Tag(name = "数据治理-数据质量")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class QualityTaskController {
|
||||||
|
private final QualityTaskService qualityTaskService;
|
||||||
|
@GetMapping("page")
|
||||||
|
@Operation(summary = "分页")
|
||||||
|
public Result<PageResult<QualityTaskVo>> page(@Valid QualityTaskQuery query){
|
||||||
|
return Result.ok(qualityTaskService.pagea(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("{id}")
|
||||||
|
@Operation(summary = "信息")
|
||||||
|
public Result<QualityTaskVo> get(@PathVariable("id") Long id){
|
||||||
|
QualityTaskEntity entity=qualityTaskService.getById(id);
|
||||||
|
return Result.ok(QualityTaskConvert.INSTANCE.covert(entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,48 @@
|
||||||
|
package net.srt.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import net.srt.entity.StandardEntity;
|
||||||
|
import net.srt.framework.common.utils.BeanUtil;
|
||||||
|
import net.srt.framework.common.utils.Result;
|
||||||
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
|
import net.srt.service.StandardService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : StandardController
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-20 11:30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/standard-category")
|
||||||
|
@Tag(name = "标准管理列表")
|
||||||
|
public class StandardController {
|
||||||
|
@Autowired
|
||||||
|
private StandardService standardService;
|
||||||
|
@GetMapping("list-tree")
|
||||||
|
@Operation(summary = "查询文件分组树")
|
||||||
|
public Result<List<TreeNodeVo>> listTree() {
|
||||||
|
return Result.ok(standardService.listTree());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@Operation(summary = "根据id获取")
|
||||||
|
public Result<TreeNodeVo> getById(@PathVariable Integer id) {
|
||||||
|
StandardEntity entity = standardService.getById(id);
|
||||||
|
TreeNodeVo nodeVo = BeanUtil.copyProperties(entity, TreeNodeVo::new);
|
||||||
|
nodeVo.setLabel(entity.getName());
|
||||||
|
nodeVo.setParentPath(entity.getPath().contains("/") ? entity.getPath().substring(0, entity.getPath().lastIndexOf("/")) : null);
|
||||||
|
return Result.ok(nodeVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package net.srt.convert;
|
||||||
|
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
import net.srt.vo.MetamodelVO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
@Mapper
|
||||||
|
public interface MetamodelConvert {
|
||||||
|
MetamodelConvert INSTANCE = Mappers.getMapper(MetamodelConvert.class);
|
||||||
|
|
||||||
|
MetamodelEntity convert(MetamodelVO vo);
|
||||||
|
|
||||||
|
MetamodelVO convert(MetamodelEntity entity);
|
||||||
|
|
||||||
|
List<MetamodelVO> convertList(List<MetamodelEntity> list);
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
package net.srt.convert;
|
||||||
|
|
||||||
|
import net.srt.entity.MetamodelPropertyEntity;
|
||||||
|
import net.srt.vo.MetamodelPropertyVO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface MetamodelPropertyConvert {
|
||||||
|
MetamodelPropertyConvert INSTANCE = Mappers.getMapper(MetamodelPropertyConvert.class);
|
||||||
|
|
||||||
|
MetamodelPropertyEntity convert(MetamodelPropertyVO vo);
|
||||||
|
|
||||||
|
MetamodelPropertyVO convert(MetamodelPropertyEntity entity);
|
||||||
|
|
||||||
|
List<MetamodelPropertyVO> convertList(List<MetamodelPropertyEntity> list);
|
||||||
|
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import net.srt.entity.QualityQueryEntity;
|
||||||
import net.srt.vo.QualityRuleVo;
|
import net.srt.vo.QualityRuleVo;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -19,4 +20,7 @@ public interface QualityRuleConvert {
|
||||||
|
|
||||||
|
|
||||||
List<QualityRuleVo> convertList(List<QualityQueryEntity> list);
|
List<QualityRuleVo> convertList(List<QualityQueryEntity> list);
|
||||||
|
|
||||||
|
QualityQueryEntity conver(QualityRuleVo vo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package net.srt.convert;
|
||||||
|
|
||||||
|
import net.srt.controller.QualityTaskController;
|
||||||
|
import net.srt.entity.QualityTaskEntity;
|
||||||
|
import net.srt.vo.QualityTaskVo;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.convert
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/21 11:42
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface QualityTaskConvert {
|
||||||
|
|
||||||
|
|
||||||
|
QualityTaskConvert INSTANCE = Mappers.getMapper(QualityTaskConvert.class);
|
||||||
|
|
||||||
|
List<QualityTaskVo> covertList(List<QualityTaskEntity> list);
|
||||||
|
|
||||||
|
QualityTaskVo covert(QualityTaskEntity entity);
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package net.srt.dao;
|
||||||
|
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
import net.srt.framework.mybatis.dao.BaseDao;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface MetamodelDao extends BaseDao<MetamodelEntity> {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package net.srt.dao;
|
||||||
|
|
||||||
|
import net.srt.entity.MetamodelPropertyEntity;
|
||||||
|
import net.srt.framework.mybatis.dao.BaseDao;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface MetamodelPropertyDao extends BaseDao<MetamodelPropertyEntity> {
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package net.srt.dao;
|
||||||
|
|
||||||
|
import net.srt.entity.QualityTaskEntity;
|
||||||
|
import net.srt.framework.mybatis.dao.BaseDao;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.dao
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/21 11:38
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface QualityTaskDao extends BaseDao<QualityTaskEntity> {
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
package net.srt.standard.mapper;
|
package net.srt.dao;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
import net.srt.entity.StandardEntity;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,5 +11,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
* @Date: 2023-12-20 11:30
|
* @Date: 2023-12-20 11:30
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StandardMapper extends BaseMapper<DatagovernanceEntity> {
|
public interface StandardDao extends BaseMapper<StandardEntity> {
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package net.srt.standard.domain.entity;
|
package net.srt.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
|
@ -0,0 +1,64 @@
|
||||||
|
package net.srt.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Data
|
||||||
|
@TableName("data_governance_metamodel")
|
||||||
|
public class MetamodelEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父id(顶级为0)
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 路径
|
||||||
|
*/
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否内置元模型 0-否,1-是
|
||||||
|
*/
|
||||||
|
private Integer builtin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图标
|
||||||
|
*/
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是目录 0-否 1-是
|
||||||
|
*/
|
||||||
|
private Integer ifLeaf;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id(租户id)
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer orderNo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,70 @@
|
||||||
|
package net.srt.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Data
|
||||||
|
@TableName("data_governance_metamodel_property")
|
||||||
|
public class MetamodelPropertyEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 元模型id
|
||||||
|
*/
|
||||||
|
private Integer metamodelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性代码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型 1-数字 2-字符串
|
||||||
|
*/
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据长度
|
||||||
|
*/
|
||||||
|
private Integer dataLength;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输入控件,1-文本框
|
||||||
|
*/
|
||||||
|
private Integer inputType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 允许为空 0-否 1-是
|
||||||
|
*/
|
||||||
|
private Integer nullable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否内置 0-否 1-是
|
||||||
|
*/
|
||||||
|
private Integer builtin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id(租户id)
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注释
|
||||||
|
*/
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 序号
|
||||||
|
*/
|
||||||
|
private Integer orderNo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@TableName(value = "data_governance_quality_rule", autoResultMap = true)
|
@TableName(value = "data_governance_quality_rule",autoResultMap=true)
|
||||||
public class QualityQueryEntity extends BaseEntity {
|
public class QualityQueryEntity extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 名称
|
* 名称
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
package net.srt.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.entity
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/21 10:46
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Data
|
||||||
|
@TableName(value = "data_governance_quality_task", autoResultMap = true)
|
||||||
|
public class QualityTaskEntity {
|
||||||
|
//id
|
||||||
|
private Long id;
|
||||||
|
//规则配置
|
||||||
|
private Integer qualityConfigId;
|
||||||
|
//名称
|
||||||
|
private String name;
|
||||||
|
//运行状态(1-等待中 2-运行中 3-正常结束 4-异常异常)
|
||||||
|
private Integer status;
|
||||||
|
//检测条数
|
||||||
|
private Integer checkCount;
|
||||||
|
//检测通过条数
|
||||||
|
private Integer passCount;
|
||||||
|
//未通过条数
|
||||||
|
private Integer notPassCount;
|
||||||
|
//开始时间
|
||||||
|
private Date startTime;
|
||||||
|
//结束时间
|
||||||
|
private Date endTime;
|
||||||
|
//错误日志
|
||||||
|
private String errorLog;
|
||||||
|
//项目id
|
||||||
|
private Integer projectId;
|
||||||
|
//版本号
|
||||||
|
private Integer version;
|
||||||
|
//删除标识 0:正常 1:删除
|
||||||
|
private Integer deleted;
|
||||||
|
//创建者
|
||||||
|
private Integer creator;
|
||||||
|
//创建时间
|
||||||
|
private Date createTime;
|
||||||
|
//更新者
|
||||||
|
private Integer updater;
|
||||||
|
//更新时间
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package net.srt.query;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import net.srt.framework.common.query.Query;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Schema(description = "数据治理-元模型属性查询")
|
||||||
|
public class MetamodelpropertyQuery extends Query {
|
||||||
|
private String name;
|
||||||
|
private String code;
|
||||||
|
private Long metamodelId;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package net.srt.query;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import net.srt.framework.common.query.Query;
|
||||||
|
import net.srt.framework.common.utils.DateUtils;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.query
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/21 11:33
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Schema(description = "数据治理任务查询")
|
||||||
|
public class QualityTaskQuery extends Query {
|
||||||
|
private String name;
|
||||||
|
private Integer status;
|
||||||
|
@DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date startTime;
|
||||||
|
@DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
package net.srt.query;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import net.srt.framework.common.query.Query;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : StandardManagementQuery
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-20 14:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Schema (description = "标准管理列表")
|
||||||
|
public class StandardManagementQuery extends Query {
|
||||||
|
private Integer categoryId;
|
||||||
|
private String t;
|
||||||
|
private String cnName;
|
||||||
|
private String engName;
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package net.srt.service;
|
||||||
|
|
||||||
|
import net.srt.entity.MetamodelPropertyEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.mybatis.service.BaseService;
|
||||||
|
import net.srt.query.MetamodelpropertyQuery;
|
||||||
|
import net.srt.vo.MetamodelPropertyVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MetamodelPropertyService extends BaseService<MetamodelPropertyEntity> {
|
||||||
|
List<MetamodelPropertyVO> properties(Long id);
|
||||||
|
|
||||||
|
PageResult<MetamodelPropertyVO> page(MetamodelpropertyQuery query);
|
||||||
|
|
||||||
|
void save(MetamodelPropertyVO vo);
|
||||||
|
|
||||||
|
void delete(List<Long> idList);
|
||||||
|
|
||||||
|
void update(MetamodelPropertyVO vo);
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package net.srt.service;
|
||||||
|
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
|
import net.srt.framework.mybatis.service.BaseService;
|
||||||
|
import net.srt.vo.MetamodelVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface MetamodelService extends BaseService<MetamodelEntity> {
|
||||||
|
List<TreeNodeVo> listTree();
|
||||||
|
|
||||||
|
void save(MetamodelVO vo);
|
||||||
|
|
||||||
|
void update(MetamodelVO vo);
|
||||||
|
|
||||||
|
void delete(Long id);
|
||||||
|
}
|
|
@ -13,5 +13,7 @@ import net.srt.vo.QualityRuleVo;
|
||||||
* @CreateTime: 2023/12/20 19:53
|
* @CreateTime: 2023/12/20 19:53
|
||||||
*/
|
*/
|
||||||
public interface QualityRuleService extends BaseService<QualityQueryEntity> {
|
public interface QualityRuleService extends BaseService<QualityQueryEntity> {
|
||||||
PageResult<QualityRuleVo> pagea(QualityRuleQuery query);
|
PageResult<QualityRuleVo> page(QualityRuleQuery query);
|
||||||
|
|
||||||
|
void save(QualityRuleVo vo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package net.srt.service;
|
||||||
|
|
||||||
|
import net.srt.entity.QualityTaskEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.mybatis.service.BaseService;
|
||||||
|
import net.srt.query.QualityTaskQuery;
|
||||||
|
import net.srt.vo.QualityTaskVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.service
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/21 11:36
|
||||||
|
*/
|
||||||
|
public interface QualityTaskService extends BaseService<QualityTaskEntity> {
|
||||||
|
PageResult<QualityTaskVo> pagea(QualityTaskQuery query);
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package net.srt.service;
|
||||||
|
|
||||||
|
import net.srt.entity.StandardEntity;
|
||||||
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
|
import net.srt.framework.mybatis.service.BaseService;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : StandardService
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-20 11:31
|
||||||
|
*/
|
||||||
|
public interface StandardService extends BaseService<StandardEntity> {
|
||||||
|
|
||||||
|
List<TreeNodeVo> listTree();
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
package net.srt.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import net.srt.convert.MetamodelPropertyConvert;
|
||||||
|
import net.srt.dao.MetamodelPropertyDao;
|
||||||
|
import net.srt.entity.MetamodelPropertyEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
|
import net.srt.query.MetamodelpropertyQuery;
|
||||||
|
import net.srt.service.MetamodelPropertyService;
|
||||||
|
import net.srt.vo.MetamodelPropertyVO;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class MetamodelPropertyServiceImpl extends BaseServiceImpl<MetamodelPropertyDao, MetamodelPropertyEntity> implements MetamodelPropertyService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MetamodelPropertyVO> properties(Long id) {
|
||||||
|
LambdaQueryWrapper<MetamodelPropertyEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(MetamodelPropertyEntity::getMetamodelId, id).orderByAsc(MetamodelPropertyEntity::getOrderNo);
|
||||||
|
return MetamodelPropertyConvert.INSTANCE.convertList(baseMapper.selectList(wrapper));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<MetamodelPropertyVO> page(MetamodelpropertyQuery query) {
|
||||||
|
IPage<MetamodelPropertyEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||||
|
return new PageResult<>(MetamodelPropertyConvert.INSTANCE.convertList(page.getRecords()),page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<MetamodelPropertyEntity> getWrapper(MetamodelpropertyQuery query) {
|
||||||
|
LambdaQueryWrapper<MetamodelPropertyEntity> wrapper = Wrappers.lambdaQuery();
|
||||||
|
wrapper.eq(MetamodelPropertyEntity::getMetamodelId, query.getMetamodelId())
|
||||||
|
.like(StringUtil.isBlank(query.getName()),MetamodelPropertyEntity::getName,query.getName())
|
||||||
|
.like(StringUtil.isBlank(query.getCode()),MetamodelPropertyEntity::getCode,query.getCode())
|
||||||
|
.orderByAsc(MetamodelPropertyEntity::getOrderNo);
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save(MetamodelPropertyVO vo) {
|
||||||
|
MetamodelPropertyEntity entity = MetamodelPropertyConvert.INSTANCE.convert(vo);
|
||||||
|
entity.setBuiltin(0);
|
||||||
|
entity.setProjectId(getProjectId());
|
||||||
|
baseMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(MetamodelPropertyVO vo) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(List<Long> idList) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
package net.srt.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import net.srt.convert.MetamodelConvert;
|
||||||
|
import net.srt.dao.MetamodelDao;
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
import net.srt.framework.common.exception.ServerException;
|
||||||
|
import net.srt.framework.common.utils.BeanUtil;
|
||||||
|
import net.srt.framework.common.utils.BuildTreeUtils;
|
||||||
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
|
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
|
import net.srt.service.MetamodelService;
|
||||||
|
import net.srt.vo.MetamodelVO;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
@Service
|
||||||
|
public class MetamodelServiceImpl extends BaseServiceImpl<MetamodelDao, MetamodelEntity> implements MetamodelService {
|
||||||
|
@Override
|
||||||
|
public List<TreeNodeVo> listTree() {
|
||||||
|
LambdaQueryWrapper<MetamodelEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
//查询当前项目下的元模型和公共的元模型
|
||||||
|
wrapper.eq(MetamodelEntity::getProjectId, getProjectId())
|
||||||
|
.or()
|
||||||
|
.eq(MetamodelEntity::getProjectId, 0)
|
||||||
|
.orderByAsc(MetamodelEntity::getOrderNo);
|
||||||
|
List<MetamodelEntity> dataGovernanceMetamodelEntities = baseMapper.selectList(wrapper);
|
||||||
|
List<TreeNodeVo> treeNodeVos = BeanUtil.copyListProperties(dataGovernanceMetamodelEntities, TreeNodeVo::new, (oldItem, newItem) -> {
|
||||||
|
newItem.setLabel(oldItem.getName());
|
||||||
|
newItem.setValue(oldItem.getId());
|
||||||
|
newItem.setDisabled(oldItem.getIfLeaf() == 1);
|
||||||
|
if (newItem.getPath().contains("/")) {
|
||||||
|
newItem.setParentPath(newItem.getPath().substring(0, newItem.getPath().lastIndexOf("/")));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return BuildTreeUtils.buildTree(treeNodeVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save(MetamodelVO vo) {
|
||||||
|
MetamodelEntity entity = MetamodelConvert.INSTANCE.convert(vo);
|
||||||
|
entity.setPath(recursionPath(entity,null));
|
||||||
|
entity.setProjectId(getProjectId());
|
||||||
|
entity.setBuiltin(0);
|
||||||
|
buildField(entity);
|
||||||
|
baseMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(MetamodelVO vo) {
|
||||||
|
MetamodelEntity entity = MetamodelConvert.INSTANCE.convert(vo);
|
||||||
|
entity.setPath(recursionPath(entity,null));
|
||||||
|
entity.setProjectId(getProjectId());
|
||||||
|
entity.setBuiltin(0);
|
||||||
|
buildField(entity);
|
||||||
|
updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(Long id) {
|
||||||
|
LambdaQueryWrapper<MetamodelEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(MetamodelEntity::getParentId,id).last("limit 1");
|
||||||
|
if(baseMapper.selectOne(wrapper)!=null){
|
||||||
|
throw new ServerException("存在子节点,不可删除!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buildField(MetamodelEntity entity) {
|
||||||
|
if(entity.getIfLeaf() == 0){
|
||||||
|
entity.setIcon("/src/assets/model.png");
|
||||||
|
}else {
|
||||||
|
entity.setIcon("/src/assets/folder.png");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String recursionPath(MetamodelEntity metamodelEntity,String path){
|
||||||
|
if(StringUtil.isBlank(path)){
|
||||||
|
path = metamodelEntity.getName();
|
||||||
|
}
|
||||||
|
if(metamodelEntity.getParentId()!=0){
|
||||||
|
MetamodelEntity parent = getById(metamodelEntity.getParentId());
|
||||||
|
path = parent.getName() + "/" + path;
|
||||||
|
return recursionPath(parent,path);
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -26,21 +26,23 @@ import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class QualityRuleServiceimpl extends BaseServiceImpl<QualityRuleDao, QualityQueryEntity> implements QualityRuleService {
|
public class QualityRuleServiceimpl extends BaseServiceImpl<QualityRuleDao, QualityQueryEntity> implements QualityRuleService {
|
||||||
@Override
|
@Override
|
||||||
public PageResult<QualityRuleVo> pagea(QualityRuleQuery query) {
|
public PageResult<QualityRuleVo> page(QualityRuleQuery query) {
|
||||||
//查询分页
|
IPage<QualityQueryEntity> page=baseMapper.selectPage(getPage(query),getWrapper(query));
|
||||||
IPage<QualityQueryEntity> page =baseMapper.selectPage(getPage(query),getWrapper(query));
|
|
||||||
//转换vo
|
|
||||||
return new PageResult<>(QualityRuleConvert.INSTANCE.convertList(page.getRecords()),page.getTotal());
|
return new PageResult<>(QualityRuleConvert.INSTANCE.convertList(page.getRecords()),page.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save(QualityRuleVo vo) {
|
||||||
|
QualityQueryEntity entity=QualityRuleConvert.INSTANCE.conver(vo);
|
||||||
|
entity.setProjectId(getProjectId());
|
||||||
|
baseMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
private LambdaQueryWrapper<QualityQueryEntity> getWrapper(QualityRuleQuery query) {
|
private LambdaQueryWrapper<QualityQueryEntity> getWrapper(QualityRuleQuery query) {
|
||||||
if (query!=null){
|
LambdaQueryWrapper<QualityQueryEntity> wrapper=Wrappers.lambdaQuery();
|
||||||
LambdaQueryWrapper<QualityQueryEntity> wrapper = Wrappers.lambdaQuery();
|
wrapper.like(StringUtil.isNotBlank(query.getName()),QualityQueryEntity::getName,query.getName())
|
||||||
wrapper.like(StringUtil.isNotBlank(query.getName()), QualityQueryEntity::getName, query.getName())
|
.like(StringUtil.isNotBlank(query.getEngName()),QualityQueryEntity::getEngName,query.getName());
|
||||||
.like(StringUtil.isNotBlank(query.getEngName()), QualityQueryEntity::getEngName, query.getEngName());
|
return wrapper;
|
||||||
return wrapper;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
package net.srt.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
|
||||||
|
import net.srt.convert.QualityRuleConvert;
|
||||||
|
import net.srt.convert.QualityTaskConvert;
|
||||||
|
import net.srt.dao.QualityTaskDao;
|
||||||
|
import net.srt.entity.QualityQueryEntity;
|
||||||
|
import net.srt.entity.QualityTaskEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
|
import net.srt.query.QualityTaskQuery;
|
||||||
|
import net.srt.service.QualityTaskService;
|
||||||
|
import net.srt.vo.QualityTaskVo;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.service.impl
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/21 11:38
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class QualityTaskServiceimpl extends BaseServiceImpl<QualityTaskDao, QualityTaskEntity> implements QualityTaskService {
|
||||||
|
@Override
|
||||||
|
public PageResult<QualityTaskVo> pagea(QualityTaskQuery query) {
|
||||||
|
//查询分页
|
||||||
|
IPage<QualityTaskEntity> page =baseMapper.selectPage(getPage(query),getWrapper(query));
|
||||||
|
return new PageResult<>(QualityTaskConvert.INSTANCE.covertList(page.getRecords()),page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<QualityTaskEntity> getWrapper(QualityTaskQuery query) {
|
||||||
|
LambdaQueryWrapper<QualityTaskEntity> wrapper= Wrappers.lambdaQuery();
|
||||||
|
wrapper.like(StringUtil.isNotBlank(query.getName()),QualityTaskEntity::getName,query.getName())
|
||||||
|
.eq(query.getStatus()!=null,QualityTaskEntity::getQualityConfigId,query.getStatus())
|
||||||
|
.eq(query.getStartTime()!=null,QualityTaskEntity::getStartTime,query.getStartTime())
|
||||||
|
.eq(query.getEndTime()!=null,QualityTaskEntity::getEndTime,query.getEndTime())
|
||||||
|
.orderByDesc(QualityTaskEntity::getId);
|
||||||
|
dataScopeWithOrgId(wrapper);
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
package net.srt.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.dao.StandardDao;
|
||||||
|
import net.srt.entity.StandardEntity;
|
||||||
|
import net.srt.framework.common.utils.BeanUtil;
|
||||||
|
import net.srt.framework.common.utils.BuildTreeUtils;
|
||||||
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
|
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
|
import net.srt.service.StandardService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : StandardServiceImpl
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-20 11:31
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class StandardServiceImpl extends BaseServiceImpl<StandardDao, StandardEntity> implements StandardService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TreeNodeVo> listTree() {
|
||||||
|
LambdaQueryWrapper<StandardEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
dataScopeWithoutOrgId(wrapper);
|
||||||
|
wrapper.orderByAsc(StandardEntity::getOrderNo);
|
||||||
|
List<StandardEntity> dataFileCategoryEntities = baseMapper.selectList(wrapper);
|
||||||
|
List<TreeNodeVo> treeNodeVos = BeanUtil.copyListProperties(dataFileCategoryEntities, TreeNodeVo::new, (oldItem, newItem) -> {
|
||||||
|
newItem.setLabel(oldItem.getName());
|
||||||
|
newItem.setValue(oldItem.getId());
|
||||||
|
newItem.setDisabled(oldItem.getType() == 0);
|
||||||
|
if (newItem.getPath().contains("/")) {
|
||||||
|
newItem.setParentPath(newItem.getPath().substring(0, newItem.getPath().lastIndexOf("/")));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return BuildTreeUtils.buildTree(treeNodeVos);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,60 +0,0 @@
|
||||||
package net.srt.standard.controller;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import net.srt.framework.common.page.PageResult;
|
|
||||||
import net.srt.framework.common.utils.BeanUtil;
|
|
||||||
import net.srt.framework.common.utils.Result;
|
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
|
||||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
|
||||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
|
||||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
|
||||||
import net.srt.standard.service.StandardService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName : DatastandardController
|
|
||||||
* @Description :
|
|
||||||
* @Author : FJJ
|
|
||||||
* @Date: 2023-12-20 20:36
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/data-standard")
|
|
||||||
public class DatastandardController {
|
|
||||||
@Autowired
|
|
||||||
private StandardService standardService;
|
|
||||||
@GetMapping("page")
|
|
||||||
@Operation(summary = "分页")
|
|
||||||
public Result<PageResult<StandardManagementVo>> page(@Valid StandardManagementRequest query){
|
|
||||||
return Result.ok(standardService.pagea(query));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping
|
|
||||||
@Operation(summary = "保存")
|
|
||||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:save')")
|
|
||||||
public Result<String > add(@RequestBody StandardManagementVo standardManagementVo){
|
|
||||||
standardService.addStand(standardManagementVo);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostMapping
|
|
||||||
@Operation(summary = "修改")
|
|
||||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:update')")
|
|
||||||
public Result<String > update(@RequestBody @Valid StandardManagementVo standardManagementVo){
|
|
||||||
standardService.updateStand(standardManagementVo);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@DeleteMapping
|
|
||||||
@Operation(summary = "删除")
|
|
||||||
@PreAuthorize("hasAuthority('data-standard:fileCategory:delete')")
|
|
||||||
public Result<String > delete(Long id){
|
|
||||||
standardService.delete(id);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
package net.srt.standard.controller;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import net.srt.framework.common.utils.BeanUtil;
|
|
||||||
import net.srt.framework.common.utils.Result;
|
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
|
||||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
|
||||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
|
||||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
|
||||||
import net.srt.standard.service.StandardService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName : StandardController
|
|
||||||
* @Description :
|
|
||||||
* @Author : FJJ
|
|
||||||
* @Date: 2023-12-20 11:30
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/standard-category")
|
|
||||||
@Tag(name = "标准管理列表")
|
|
||||||
public class StandardController {
|
|
||||||
@Autowired
|
|
||||||
private StandardService standardService;
|
|
||||||
@GetMapping("list-tree")
|
|
||||||
@Operation(summary = "查询文件分组树")
|
|
||||||
public Result<List<TreeNodeVo>> listTree() {
|
|
||||||
return Result.ok(standardService.listTree());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package net.srt.standard.domain.dto;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import net.srt.standard.domain.query.Query;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName : StandardManagementRequest
|
|
||||||
* @Description :
|
|
||||||
* @Author : FJJ
|
|
||||||
* @Date: 2023-12-20 14:40
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class StandardManagementRequest extends Query {
|
|
||||||
private String cnName;
|
|
||||||
private String engName;
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
package net.srt.standard.domain.query;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.hibernate.validator.constraints.Range;
|
|
||||||
|
|
||||||
import javax.validation.constraints.Min;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName : Query
|
|
||||||
* @Description :
|
|
||||||
* @Author : FJJ
|
|
||||||
* @Date: 2023-12-20 21:46
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class Query {
|
|
||||||
@NotNull(message = "页码不能为空")
|
|
||||||
@Min(value = 1, message = "页码最小值为 1")
|
|
||||||
@Schema(description = "当前页码", required = true)
|
|
||||||
Integer page;
|
|
||||||
|
|
||||||
@NotNull(message = "每页条数不能为空")
|
|
||||||
@Range(min = 1, max = 1000, message = "每页条数,取值范围 1-1000")
|
|
||||||
@Schema(description = "每页条数", required = true)
|
|
||||||
Integer limit;
|
|
||||||
|
|
||||||
@Schema(description = "排序字段")
|
|
||||||
String order;
|
|
||||||
|
|
||||||
@Schema(description = "是否升序")
|
|
||||||
boolean asc;
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
package net.srt.standard.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import net.srt.framework.common.page.PageResult;
|
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
|
||||||
import net.srt.framework.mybatis.service.BaseService;
|
|
||||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
|
||||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
|
||||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName : StandardService
|
|
||||||
* @Description :
|
|
||||||
* @Author : FJJ
|
|
||||||
* @Date: 2023-12-20 11:31
|
|
||||||
*/
|
|
||||||
public interface StandardService extends BaseService<DatagovernanceEntity> {
|
|
||||||
// Page<StandardManagementVo> listpage(StandardManagementRequest standardManagementRequest);
|
|
||||||
|
|
||||||
List<TreeNodeVo> listTree();
|
|
||||||
|
|
||||||
void addStand(StandardManagementVo standardManagementVo);
|
|
||||||
|
|
||||||
void updateStand(StandardManagementVo standardManagementVo);
|
|
||||||
|
|
||||||
void delete(Long id);
|
|
||||||
|
|
||||||
PageResult<StandardManagementVo> pagea(StandardManagementRequest query);
|
|
||||||
|
|
||||||
// PageResult<StandardManagementVo> list(StandardManagementRequest standardManagementRequest);
|
|
||||||
//
|
|
||||||
// void add(StandardManagementVo standardManagement);
|
|
||||||
}
|
|
|
@ -1,79 +0,0 @@
|
||||||
package net.srt.standard.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import net.srt.framework.common.page.PageResult;
|
|
||||||
import net.srt.framework.common.utils.BeanUtil;
|
|
||||||
import net.srt.framework.common.utils.BuildTreeUtils;
|
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
|
||||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
|
||||||
import net.srt.standard.domain.vo.StandardManagementVo;
|
|
||||||
import net.srt.standard.domain.entity.DatagovernanceEntity;
|
|
||||||
import net.srt.standard.domain.dto.StandardManagementRequest;
|
|
||||||
import net.srt.standard.mapper.StandardMapper;
|
|
||||||
import net.srt.standard.service.StandardService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName : StandardServiceImpl
|
|
||||||
* @Description :
|
|
||||||
* @Author : FJJ
|
|
||||||
* @Date: 2023-12-20 11:31
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class StandardServiceImpl extends BaseServiceImpl<StandardMapper, DatagovernanceEntity> implements StandardService {
|
|
||||||
@Autowired
|
|
||||||
private StandardMapper standardMapper;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<TreeNodeVo> listTree() {
|
|
||||||
LambdaQueryWrapper<DatagovernanceEntity> wrapper = new LambdaQueryWrapper<>();
|
|
||||||
dataScopeWithoutOrgId(wrapper);
|
|
||||||
wrapper.orderByAsc(DatagovernanceEntity::getOrderNo);
|
|
||||||
List<DatagovernanceEntity> dataFileCategoryEntities = baseMapper.selectList(wrapper);
|
|
||||||
List<TreeNodeVo> treeNodeVos = BeanUtil.copyListProperties(dataFileCategoryEntities, TreeNodeVo::new, (oldItem, newItem) -> {
|
|
||||||
newItem.setLabel(oldItem.getName());
|
|
||||||
newItem.setValue(oldItem.getId());
|
|
||||||
newItem.setDisabled(oldItem.getType() == 0);
|
|
||||||
if (newItem.getPath().contains("/")) {
|
|
||||||
newItem.setParentPath(newItem.getPath().substring(0, newItem.getPath().lastIndexOf("/")));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return BuildTreeUtils.buildTree(treeNodeVos);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addStand(StandardManagementVo standardManagementVo) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateStand(StandardManagementVo standardManagementVo) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void delete(Long id) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageResult<StandardManagementVo> pagea(StandardManagementRequest query) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// @Override
|
|
||||||
// public void add(StandardManagementVo standardManagement) {
|
|
||||||
// UserDetail user = getUser();
|
|
||||||
// standardManagement.setCreator(user.getUsername());
|
|
||||||
// standardManagement.setCreateTime(new Date());
|
|
||||||
// standardMapper.insert(standardManagement);
|
|
||||||
// }
|
|
||||||
}
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
package net.srt.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import net.srt.framework.common.utils.DateUtils;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "数据治理-元数据属性值")
|
||||||
|
public class MetadataPropertyVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "属性id")
|
||||||
|
private Long metamodelPropertyId;
|
||||||
|
|
||||||
|
@Schema(description = "元数据id")
|
||||||
|
private Long metadataId;
|
||||||
|
|
||||||
|
@Schema(description = "属性值")
|
||||||
|
private String property;
|
||||||
|
|
||||||
|
@Schema(description = "项目id(租户id)")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
@Schema(description = "版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@Schema(description = "创建者")
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新者")
|
||||||
|
private Long updater;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
package net.srt.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import net.srt.framework.common.utils.DateUtils;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "数据治理-元模型属性")
|
||||||
|
public class MetamodelPropertyVO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "元模型id")
|
||||||
|
private Integer metamodelId;
|
||||||
|
|
||||||
|
@Schema(description = "属性名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "属性代码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型 1-数字 2-字符串")
|
||||||
|
private Integer dataType;
|
||||||
|
|
||||||
|
@Schema(description = "数据长度")
|
||||||
|
private Integer dataLength;
|
||||||
|
|
||||||
|
@Schema(description = "输入控件,1-文本框")
|
||||||
|
private Integer inputType;
|
||||||
|
|
||||||
|
@Schema(description = "允许为空 0-否 1-是")
|
||||||
|
private Integer nullable;
|
||||||
|
|
||||||
|
@Schema(description = "是否内置 0-否 1-是")
|
||||||
|
private Integer builtin;
|
||||||
|
|
||||||
|
@Schema(description = "项目id(租户id)")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
@Schema(description = "注释")
|
||||||
|
private String comment;
|
||||||
|
|
||||||
|
@Schema(description = "序号")
|
||||||
|
private Integer orderNo;
|
||||||
|
|
||||||
|
@Schema(description = "版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@Schema(description = "创建者")
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新者")
|
||||||
|
private Long updater;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@Schema(description = "元模型属性id")
|
||||||
|
private Long metamodelPropertyId;
|
||||||
|
@Schema(description = "元数据的属性值")
|
||||||
|
private String value;
|
||||||
|
@Schema(description = "元数据属性的主键id")
|
||||||
|
private Long metadataPropertyId;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
package net.srt.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import net.srt.framework.common.utils.DateUtils;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "数据治理-元模型")
|
||||||
|
public class MetamodelVO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "父id(顶级为0)")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@Schema(description = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "代码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "路径")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@Schema(description = "是否内置元模型 0-否,1-是")
|
||||||
|
private Integer builtin;
|
||||||
|
|
||||||
|
@Schema(description = "图标")
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
@Schema(description = "是否是目录 0-否 1-是")
|
||||||
|
private Integer ifLeaf;
|
||||||
|
|
||||||
|
@Schema(description = "描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Schema(description = "项目id(租户id)")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
private Integer orderNo;
|
||||||
|
|
||||||
|
@Schema(description = "版本号")
|
||||||
|
private Integer version;
|
||||||
|
|
||||||
|
@Schema(description = "删除标识 0:正常 1:已删除")
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@Schema(description = "创建者")
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新者")
|
||||||
|
private Long updater;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -3,7 +3,6 @@ package net.srt.vo;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.srt.QualittRule;
|
|
||||||
import net.srt.framework.common.utils.DateUtils;
|
import net.srt.framework.common.utils.DateUtils;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
@ -18,7 +17,7 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "数据质量")
|
@Schema(description = "数据质量")
|
||||||
public class QualityRuleVo implements Serializable {
|
public class QualityRuleVo implements Serializable{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Schema(description = "主键id")
|
@Schema(description = "主键id")
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
package net.srt.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import net.srt.framework.common.utils.DateUtils;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.vo
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/21 10:43
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "数据治理-质量任务")
|
||||||
|
public class QualityTaskVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "主键id")
|
||||||
|
private Long id;
|
||||||
|
@Schema(description = "规则配置id")
|
||||||
|
private Integer qualityConfigId;
|
||||||
|
@Schema(description = "名称")
|
||||||
|
private String name;
|
||||||
|
@Schema(description = "运行状态(1-等待中 2-运行中 3-正常结束 4-异常结束)")
|
||||||
|
private Integer status;
|
||||||
|
@Schema(description = "检测条数")
|
||||||
|
private Integer checkCount;
|
||||||
|
@Schema(description = "检测通过条数")
|
||||||
|
private Integer passCount;
|
||||||
|
@Schema(description = "未通过条数")
|
||||||
|
private Integer notPassCount;
|
||||||
|
@Schema(description = "开始时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date startTime;
|
||||||
|
@Schema(description = "结束时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date endTime;
|
||||||
|
@Schema(description = "错误日志")
|
||||||
|
private String errorLog;
|
||||||
|
@Schema(description = "项目id")
|
||||||
|
private Integer projectId;
|
||||||
|
@Schema(description = "版本号")
|
||||||
|
private Integer version;
|
||||||
|
@Schema(description = "删除标识 0:正常 1:删除")
|
||||||
|
private Integer deleted;
|
||||||
|
@Schema(description = "创建者")
|
||||||
|
private Integer creator;
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date createTime;
|
||||||
|
@Schema(description = "更新者")
|
||||||
|
private Integer updater;
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,12 +1,12 @@
|
||||||
package net.srt.standard.domain.vo;
|
package net.srt.vo;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,8 +17,7 @@ import java.util.Date;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Schema(description = "标准管理查询")
|
@Schema(description = "标准管理查询")
|
||||||
@TableName(value = "standard_management")
|
public class StandardManagementVo implements Serializable {
|
||||||
public class StandardManagementVo {
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@TableId("id")
|
@TableId("id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
@ -46,4 +45,5 @@ public class StandardManagementVo {
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
private Integer ifStandardRel;
|
private Integer ifStandardRel;
|
||||||
|
private String group;
|
||||||
}
|
}
|
|
@ -15,7 +15,7 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
# 命名空间,默认:public
|
# 命名空间,默认:public
|
||||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
service: ${spring.application.name}
|
service: ${spring.application.name}
|
||||||
group: srt2.0
|
group: srt2.0
|
||||||
config:
|
config:
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="net.srt.standard.mapper.StandardMapper">
|
|
||||||
<!-- <select id="selectPage" resultType="net.srt.standard.domain.StandardManagementVoVo">-->
|
|
||||||
<!-- select *-->
|
|
||||||
<!-- from standard_management-->
|
|
||||||
<!-- <where>-->
|
|
||||||
<!-- <if test="cnName!= null">-->
|
|
||||||
<!-- and cnName like concat('%', #{cnName}, '%')-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="engName!= null">-->
|
|
||||||
<!-- and engName like concat('%', #{engName}, '%')-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- </where>-->
|
|
||||||
<!-- </select>-->
|
|
||||||
</mapper>
|
|
|
@ -15,7 +15,7 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
# 命名空间,默认:public
|
# 命名空间,默认:public
|
||||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
service: ${spring.application.name}
|
service: ${spring.application.name}
|
||||||
group: srt2.0
|
group: srt2.0
|
||||||
config:
|
config:
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -95,7 +95,7 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
# 命名空间,默认:public
|
# 命名空间,默认:public
|
||||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
service: ${spring.application.name}
|
service: ${spring.application.name}
|
||||||
group: srt2.0
|
group: srt2.0
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
# 命名空间,默认:public
|
# 命名空间,默认:public
|
||||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
service: ${spring.application.name}
|
service: ${spring.application.name}
|
||||||
group: srt2.0
|
group: srt2.0
|
||||||
config:
|
config:
|
||||||
|
|
|
@ -11,7 +11,7 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
# 命名空间,默认:public
|
# 命名空间,默认:public
|
||||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
service: ${spring.application.name}
|
service: ${spring.application.name}
|
||||||
group: srt2.0
|
group: srt2.0
|
||||||
config:
|
config:
|
||||||
|
|
|
@ -11,7 +11,7 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
# 命名空间,默认:public
|
# 命名空间,默认:public
|
||||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
service: ${spring.application.name}
|
service: ${spring.application.name}
|
||||||
group: srt2.0
|
group: srt2.0
|
||||||
config:
|
config:
|
||||||
|
|
|
@ -11,7 +11,7 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
# 命名空间,默认:public
|
# 命名空间,默认:public
|
||||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
service: ${spring.application.name}
|
service: ${spring.application.name}
|
||||||
group: srt2.0
|
group: srt2.0
|
||||||
config:
|
config:
|
||||||
|
|
|
@ -14,7 +14,7 @@ spring:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 101.34.77.101:8848
|
server-addr: 101.34.77.101:8848
|
||||||
# 命名空间,默认:public
|
# 命名空间,默认:public
|
||||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
namespace: 7e34f104-f333-4828-b36a-02146e521c9a
|
||||||
service: ${spring.application.name}
|
service: ${spring.application.name}
|
||||||
group: srt2.0
|
group: srt2.0
|
||||||
config:
|
config:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
server:
|
server:
|
||||||
port: 8093
|
port: 8094
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
mvc:
|
mvc:
|
||||||
|
|
Loading…
Reference in New Issue