Merge remote-tracking branch 'origin/dev' into dev
commit
5095d6caf1
|
@ -12,31 +12,11 @@
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!--<dependency>
|
|
||||||
<groupId>net.srt</groupId>
|
|
||||||
<artifactId>srt-cloud-data-lineage</artifactId>
|
|
||||||
<version>2.0.0</version>
|
|
||||||
</dependency>-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.srt</groupId>
|
<groupId>net.srt</groupId>
|
||||||
<artifactId>srt-cloud-api</artifactId>
|
<artifactId>srt-cloud-api</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>2.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.mapstruct</groupId>
|
|
||||||
<artifactId>mapstruct</artifactId>
|
|
||||||
<version>1.5.0.Beta1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.mapstruct</groupId>
|
|
||||||
<artifactId>mapstruct-processor</artifactId>
|
|
||||||
<version>1.5.0.Beta1</version>
|
|
||||||
</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>
|
||||||
|
@ -48,24 +28,15 @@
|
||||||
<version>2.0.0</version>
|
<version>2.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.srt</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>srt-cloud-dbswitch</artifactId>
|
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||||
<version>2.0.0</version>
|
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
|
||||||
<artifactId>jsqlparser</artifactId>
|
|
||||||
<groupId>com.github.jsqlparser</groupId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>spring-boot-starter-logging</artifactId>
|
<artifactId>spring-boot-starter-logging</artifactId>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
@ -74,24 +45,33 @@
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.whvcse</groupId>
|
||||||
|
<artifactId>easy-captcha</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
<artifactId>knife4j-springdoc-ui</artifactId>
|
<artifactId>knife4j-springdoc-ui</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
<groupId>com.aliyun.oss</groupId>
|
||||||
<artifactId>quartz</artifactId>
|
<artifactId>aliyun-sdk-oss</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>com.qcloud</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>cos_api</artifactId>
|
||||||
<scope>test</scope>
|
</dependency>
|
||||||
<exclusions>
|
<dependency>
|
||||||
<exclusion>
|
<groupId>com.qiniu</groupId>
|
||||||
<artifactId>spring-boot-starter-logging</artifactId>
|
<artifactId>qiniu-java-sdk</artifactId>
|
||||||
<groupId>org.springframework.boot</groupId>
|
</dependency>
|
||||||
</exclusion>
|
<dependency>
|
||||||
</exclusions>
|
<groupId>com.huaweicloud</groupId>
|
||||||
|
<artifactId>esdk-obs-java-bundle</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.minio</groupId>
|
||||||
|
<artifactId>minio</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,10 @@ 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.StandardManagementQuery;
|
import net.srt.query.StandardManagementQuery;
|
||||||
import net.srt.service.DatastandardService;
|
import net.srt.service.DatastandardService;
|
||||||
|
import net.srt.vo.MetamodelPropertyVO;
|
||||||
import net.srt.vo.StandardManagementVo;
|
import net.srt.vo.StandardManagementVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
@ -44,6 +46,7 @@ public class DatastandardController {
|
||||||
return Result.ok(DatastandardConvert.INSTANCE.convert(entity));
|
return Result.ok(DatastandardConvert.INSTANCE.convert(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/table-code/list")
|
@GetMapping("/table-code/list")
|
||||||
@Operation(summary = "查询表编码")
|
@Operation(summary = "查询表编码")
|
||||||
public Result<List<DatastandardEntity>> getTableCode(){
|
public Result<List<DatastandardEntity>> getTableCode(){
|
||||||
|
@ -59,6 +62,23 @@ public class DatastandardController {
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Operation(summary = "修改")
|
||||||
|
public Result<String> update(@RequestBody @Valid DatastandardEntity datastandardEntity){
|
||||||
|
datastandardService.update1(datastandardEntity);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
public Result<String> delete(@RequestBody List<Long> idList) {
|
||||||
|
datastandardService.delete(idList);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package net.srt.controller;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.service.MetadataCollectService;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("metadata-collect")
|
||||||
|
@Tag(name = "数据治理-元数据采集")
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class MetadataCollectController {
|
||||||
|
private final MetadataCollectService metadataCollectService;
|
||||||
|
|
||||||
|
}
|
|
@ -21,14 +21,25 @@ import java.util.List;
|
||||||
public class MetamodelController {
|
public class MetamodelController {
|
||||||
private final MetamodelService metamodelService;
|
private final MetamodelService metamodelService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取元模型列表
|
||||||
|
*/
|
||||||
@GetMapping("list-tree")
|
@GetMapping("list-tree")
|
||||||
@Operation(summary = "获取元模型列表")
|
@Operation(summary = "获取元模型列表")
|
||||||
public Result<List<TreeNodeVo>> listTree(){
|
public Result<List<TreeNodeVo>> listTree(){
|
||||||
|
// 调用metamodelService的listTree方法获取元模型列表
|
||||||
List<TreeNodeVo> TreeNodeVos = metamodelService.listTree();
|
List<TreeNodeVo> TreeNodeVos = metamodelService.listTree();
|
||||||
|
// 将元模型列表返回给客户端
|
||||||
return Result.ok(TreeNodeVos);
|
return Result.ok(TreeNodeVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取信息
|
||||||
|
* @param id ID值
|
||||||
|
* @return 信息的Result对象
|
||||||
|
*/
|
||||||
@GetMapping("{id}")
|
@GetMapping("{id}")
|
||||||
@Operation(summary = "信息")
|
@Operation(summary = "信息")
|
||||||
public Result<MetamodelVO> get(@PathVariable("id") Long id){
|
public Result<MetamodelVO> get(@PathVariable("id") Long id){
|
||||||
|
@ -36,6 +47,13 @@ public class MetamodelController {
|
||||||
return Result.ok(MetamodelConvert.INSTANCE.convert(entity));
|
return Result.ok(MetamodelConvert.INSTANCE.convert(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存功能
|
||||||
|
*
|
||||||
|
* @param vo 要保存的信息
|
||||||
|
* @return 保存结果
|
||||||
|
*/
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Operation(summary = "保存")
|
@Operation(summary = "保存")
|
||||||
public Result<String> save(@RequestBody MetamodelVO vo){
|
public Result<String> save(@RequestBody MetamodelVO vo){
|
||||||
|
@ -43,6 +61,13 @@ public class MetamodelController {
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改操作
|
||||||
|
*
|
||||||
|
* @param vo 修改参数
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public Result<String> update(@RequestBody MetamodelVO vo){
|
public Result<String> update(@RequestBody MetamodelVO vo){
|
||||||
|
@ -50,10 +75,17 @@ public class MetamodelController {
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据指定的ID删除数据
|
||||||
|
* @param id 要删除的数据的ID
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
@Operation(summary = "删除")
|
@Operation(summary = "删除")
|
||||||
public Result<String> delete(@PathVariable Long id){
|
public Result<String> delete(@PathVariable Long id){
|
||||||
metamodelService.delete(id);
|
metamodelService.delete(id);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,11 @@ import java.util.List;
|
||||||
public class MetamodelPropertyController {
|
public class MetamodelPropertyController {
|
||||||
private final MetamodelPropertyService metamodelPropertyService;
|
private final MetamodelPropertyService metamodelPropertyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id获取属性列表
|
||||||
|
* @param id 属性id
|
||||||
|
* @return 属性列表
|
||||||
|
*/
|
||||||
@GetMapping("/properties/{metaModelId}")
|
@GetMapping("/properties/{metaModelId}")
|
||||||
@Operation(summary = "根据id获取属性列表")
|
@Operation(summary = "根据id获取属性列表")
|
||||||
public Result<List<MetamodelPropertyVO>> properties(@PathVariable Long id){
|
public Result<List<MetamodelPropertyVO>> properties(@PathVariable Long id){
|
||||||
|
@ -29,6 +34,12 @@ public class MetamodelPropertyController {
|
||||||
return Result.ok(properties);
|
return Result.ok(properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询属性
|
||||||
|
* @param query 属性查询对象
|
||||||
|
* @return 分页结果
|
||||||
|
*/
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@Operation(summary = "分页")
|
@Operation(summary = "分页")
|
||||||
public Result<PageResult<MetamodelPropertyVO>> page(@Valid MetamodelpropertyQuery query){
|
public Result<PageResult<MetamodelPropertyVO>> page(@Valid MetamodelpropertyQuery query){
|
||||||
|
@ -36,6 +47,13 @@ public class MetamodelPropertyController {
|
||||||
return Result.ok(page);
|
return Result.ok(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取信息
|
||||||
|
*
|
||||||
|
* @param id ID值
|
||||||
|
* @return 信息的Result对象
|
||||||
|
*/
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
@Operation(summary = "信息")
|
@Operation(summary = "信息")
|
||||||
public Result<MetamodelPropertyVO> get(@PathVariable("id") Long id){
|
public Result<MetamodelPropertyVO> get(@PathVariable("id") Long id){
|
||||||
|
@ -43,6 +61,13 @@ public class MetamodelPropertyController {
|
||||||
return Result.ok(MetamodelPropertyConvert.INSTANCE.convert(entity));
|
return Result.ok(MetamodelPropertyConvert.INSTANCE.convert(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存功能
|
||||||
|
*
|
||||||
|
* @param vo 要保存的数据
|
||||||
|
* @return 保存结果
|
||||||
|
*/
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Operation(summary = "保存")
|
@Operation(summary = "保存")
|
||||||
public Result<String> save(@RequestBody MetamodelPropertyVO vo){
|
public Result<String> save(@RequestBody MetamodelPropertyVO vo){
|
||||||
|
@ -50,6 +75,13 @@ public class MetamodelPropertyController {
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*
|
||||||
|
* @param vo 要修改的数据
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Operation(summary = "修改")
|
@Operation(summary = "修改")
|
||||||
public Result<String> update(@RequestBody MetamodelPropertyVO vo){
|
public Result<String> update(@RequestBody MetamodelPropertyVO vo){
|
||||||
|
@ -57,10 +89,18 @@ public class MetamodelPropertyController {
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除功能
|
||||||
|
*
|
||||||
|
* @param idList 要删除的数据ID列表
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
@Operation(summary = "删除")
|
@Operation(summary = "删除")
|
||||||
public Result<String> delete(@RequestBody List<Long> idList){
|
public Result<String> delete(@RequestBody List<Long> idList){
|
||||||
metamodelPropertyService.delete(idList);
|
metamodelPropertyService.delete(idList);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ 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 oracle.ucp.proxy.annotation.Post;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
|
@ -2,16 +2,15 @@ package net.srt.controller;
|
||||||
|
|
||||||
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 net.srt.entity.DatastandardEntity;
|
||||||
import net.srt.entity.StandardEntity;
|
import net.srt.entity.StandardEntity;
|
||||||
import net.srt.framework.common.utils.BeanUtil;
|
import net.srt.framework.common.utils.BeanUtil;
|
||||||
import net.srt.framework.common.utils.Result;
|
import net.srt.framework.common.utils.Result;
|
||||||
import net.srt.framework.common.utils.TreeNodeVo;
|
import net.srt.framework.common.utils.TreeNodeVo;
|
||||||
import net.srt.service.StandardService;
|
import net.srt.service.StandardService;
|
||||||
|
import net.srt.vo.StandardManagementVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
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;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -44,5 +43,24 @@ public class StandardController {
|
||||||
return Result.ok(nodeVo);
|
return Result.ok(nodeVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Operation(summary = "保存")
|
||||||
|
public Result<String > save(@RequestBody StandardEntity standardEntity){
|
||||||
|
standardService.save1(standardEntity);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Operation(summary = "修改")
|
||||||
|
public Result<String > update(@RequestBody StandardEntity standardEntity){
|
||||||
|
standardService.update1(standardEntity);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
@DeleteMapping("/id")
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
public Result<String > del(@PathVariable Long id){
|
||||||
|
standardService.del(id);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package net.srt.convert;
|
||||||
|
|
||||||
|
import net.srt.entity.DatastandardEntity;
|
||||||
|
import net.srt.vo.StandardManagementVo;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.convert
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/20 19:50
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface DatastandardConvert {
|
||||||
|
DatastandardConvert INSTANCE = Mappers.getMapper(DatastandardConvert.class);
|
||||||
|
|
||||||
|
|
||||||
|
List<StandardManagementVo> convertList(List<DatastandardEntity> list);
|
||||||
|
|
||||||
|
StandardManagementVo convert(DatastandardEntity entity);
|
||||||
|
|
||||||
|
}
|
|
@ -4,7 +4,6 @@ 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;
|
||||||
|
|
||||||
|
@ -16,6 +15,8 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface QualityRuleConvert {
|
public interface QualityRuleConvert {
|
||||||
|
|
||||||
|
|
||||||
QualityRuleConvert INSTANCE = Mappers.getMapper(QualityRuleConvert.class);
|
QualityRuleConvert INSTANCE = Mappers.getMapper(QualityRuleConvert.class);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
package net.srt.dao;
|
||||||
|
|
||||||
|
import net.srt.entity.DatastandardEntity;
|
||||||
|
import net.srt.framework.mybatis.dao.BaseDao;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DatastandardDao
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-21 11:09
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface DatastandardDao extends BaseDao<DatastandardEntity> {
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package net.srt.dao;
|
||||||
|
|
||||||
|
import net.srt.entity.MetadataCollectEntity;
|
||||||
|
import net.srt.framework.mybatis.dao.BaseDao;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface MetadataCollectDao extends BaseDao<MetadataCollectEntity> {
|
||||||
|
}
|
|
@ -2,7 +2,7 @@ package net.srt.dao;
|
||||||
|
|
||||||
import net.srt.entity.MetamodelPropertyEntity;
|
import net.srt.entity.MetamodelPropertyEntity;
|
||||||
import net.srt.framework.mybatis.dao.BaseDao;
|
import net.srt.framework.mybatis.dao.BaseDao;
|
||||||
import org.mapstruct.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface MetamodelPropertyDao extends BaseDao<MetamodelPropertyEntity> {
|
public interface MetamodelPropertyDao extends BaseDao<MetamodelPropertyEntity> {
|
||||||
|
|
|
@ -12,4 +12,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface StandardDao extends BaseMapper<StandardEntity> {
|
public interface StandardDao extends BaseMapper<StandardEntity> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
package net.srt.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DatastandardEntity
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-21 11:09
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Data
|
||||||
|
@TableName("standard_management")
|
||||||
|
public class DatastandardEntity extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@TableId("id")
|
||||||
|
private Long id;
|
||||||
|
private Integer categoryId;
|
||||||
|
private String engName;
|
||||||
|
private String cnName;
|
||||||
|
private Integer codeNum;
|
||||||
|
private String dataType;
|
||||||
|
private Integer dataLength;
|
||||||
|
private Integer dataPrecision;
|
||||||
|
private Integer nullable;
|
||||||
|
private Integer standardCodeId;
|
||||||
|
private Integer type;
|
||||||
|
private String note;
|
||||||
|
private Integer projectId;
|
||||||
|
private Integer status;
|
||||||
|
private Integer version;
|
||||||
|
private Integer deleted;
|
||||||
|
private Integer ifStandardRel;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
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_metadata_collect")
|
||||||
|
public class MetadataCollectEntity extends BaseEntity {
|
||||||
|
|
||||||
|
}
|
|
@ -3,11 +3,12 @@ package net.srt.entity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||||
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Data
|
@Data
|
||||||
@TableName("data_governance_metamodel_property")
|
@TableName("data_governance_metamodel_property")
|
||||||
public class MetamodelPropertyEntity {
|
public class MetamodelPropertyEntity extends BaseEntity {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 元模型id
|
* 元模型id
|
||||||
|
|
|
@ -3,8 +3,11 @@ package net.srt.entity;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import net.srt.framework.mybatis.entity.BaseEntity;
|
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||||
import net.srt.vo.QualityParam;
|
import net.srt.vo.QualityParam;
|
||||||
|
|
||||||
|
@ -16,9 +19,12 @@ import java.util.List;
|
||||||
* @Author: jpz
|
* @Author: jpz
|
||||||
* @CreateTime: 2023/12/20 19:51
|
* @CreateTime: 2023/12/20 19:51
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@SuperBuilder
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@AllArgsConstructor
|
||||||
@TableName(value = "data_governance_quality_rule",autoResultMap=true)
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "data_governance_quality_rule")
|
||||||
public class QualityQueryEntity extends BaseEntity {
|
public class QualityQueryEntity extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 名称
|
* 名称
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
package net.srt.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件分组表
|
||||||
|
*
|
||||||
|
* @author zrx 985134801@qq.com
|
||||||
|
* @since 1.0.0 2022-11-12
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@SuperBuilder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName("data_file_category")
|
||||||
|
public class StandardEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父级id(顶级为0)
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组序号
|
||||||
|
*/
|
||||||
|
private Integer orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组路径
|
||||||
|
*/
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package net.srt.service;
|
||||||
|
|
||||||
|
import net.srt.entity.DatastandardEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.mybatis.service.BaseService;
|
||||||
|
import net.srt.query.StandardManagementQuery;
|
||||||
|
import net.srt.vo.StandardManagementVo;
|
||||||
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DatastandardService
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-21 11:21
|
||||||
|
*/
|
||||||
|
@MapperScan("net.srt.service.DatastandardService")
|
||||||
|
public interface DatastandardService extends BaseService<DatastandardEntity> {
|
||||||
|
PageResult<StandardManagementVo> page(StandardManagementQuery query);
|
||||||
|
|
||||||
|
List<DatastandardEntity> getTableCode();
|
||||||
|
|
||||||
|
void update1(DatastandardEntity datastandardEntity);
|
||||||
|
|
||||||
|
void delete(List<Long> idList);
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package net.srt.service;
|
||||||
|
|
||||||
|
import net.srt.entity.MetadataCollectEntity;
|
||||||
|
import net.srt.framework.mybatis.service.BaseService;
|
||||||
|
|
||||||
|
public interface MetadataCollectService extends BaseService<MetadataCollectEntity> {
|
||||||
|
|
||||||
|
}
|
|
@ -15,4 +15,11 @@ import java.util.List;
|
||||||
public interface StandardService extends BaseService<StandardEntity> {
|
public interface StandardService extends BaseService<StandardEntity> {
|
||||||
|
|
||||||
List<TreeNodeVo> listTree();
|
List<TreeNodeVo> listTree();
|
||||||
|
|
||||||
|
void save1(StandardEntity standardEntity);
|
||||||
|
|
||||||
|
void update1(StandardEntity standardEntity);
|
||||||
|
|
||||||
|
void del(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
package net.srt.service.impl;
|
||||||
|
|
||||||
|
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.DatastandardConvert;
|
||||||
|
import net.srt.convert.MetamodelConvert;
|
||||||
|
import net.srt.dao.DatastandardDao;
|
||||||
|
import net.srt.entity.DatastandardEntity;
|
||||||
|
import net.srt.entity.MetamodelEntity;
|
||||||
|
import net.srt.framework.common.page.PageResult;
|
||||||
|
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
|
import net.srt.query.StandardManagementQuery;
|
||||||
|
import net.srt.service.DatastandardService;
|
||||||
|
import net.srt.vo.StandardManagementVo;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DatastandardServiceImpl
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-21 11:21
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DatastandardServiceImpl extends BaseServiceImpl<DatastandardDao, DatastandardEntity> implements DatastandardService {
|
||||||
|
private final DatastandardDao datastandardDao;
|
||||||
|
@Override
|
||||||
|
public PageResult<StandardManagementVo> page(StandardManagementQuery query) {
|
||||||
|
IPage<DatastandardEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||||
|
return new PageResult<>(DatastandardConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DatastandardEntity> getTableCode() {
|
||||||
|
List<DatastandardEntity> list= datastandardDao.selectList(Wrappers.lambdaQuery());
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update1(DatastandardEntity datastandardEntity) {
|
||||||
|
StandardManagementVo standardManagementVo=DatastandardConvert.INSTANCE.convert(datastandardEntity);
|
||||||
|
standardManagementVo.setProjectId(getProjectId());
|
||||||
|
updateById(datastandardEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(List<Long> idList) {
|
||||||
|
removeByIds(idList);
|
||||||
|
//删除
|
||||||
|
for (Long id : idList) {
|
||||||
|
LambdaQueryWrapper<DatastandardEntity> wrapper=Wrappers.lambdaQuery();
|
||||||
|
wrapper.eq(DatastandardEntity::getCategoryId,id);
|
||||||
|
datastandardDao.delete(wrapper);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private LambdaQueryWrapper<DatastandardEntity> getWrapper(StandardManagementQuery query) {
|
||||||
|
LambdaQueryWrapper<DatastandardEntity> wrapper = Wrappers.lambdaQuery();
|
||||||
|
wrapper.like(StringUtil.isNotBlank(query.getCnName()), DatastandardEntity::getCnName, query.getCnName());
|
||||||
|
wrapper.like(StringUtil.isNotBlank(query.getEngName()), DatastandardEntity::getEngName, query.getEngName());
|
||||||
|
wrapper.eq(query.getCategoryId() != null, DatastandardEntity::getCategoryId, query.getCategoryId());
|
||||||
|
dataScopeWithOrgId(wrapper);
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package net.srt.service.impl;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.dao.MetadataCollectDao;
|
||||||
|
import net.srt.entity.MetadataCollectEntity;
|
||||||
|
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
|
import net.srt.service.MetadataCollectService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class MetadataCollectServiceImpl extends BaseServiceImpl<MetadataCollectDao, MetadataCollectEntity> implements MetadataCollectService {
|
||||||
|
}
|
|
@ -13,6 +13,7 @@ import net.srt.query.MetamodelpropertyQuery;
|
||||||
import net.srt.service.MetamodelPropertyService;
|
import net.srt.service.MetamodelPropertyService;
|
||||||
import net.srt.vo.MetamodelPropertyVO;
|
import net.srt.vo.MetamodelPropertyVO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -20,45 +21,92 @@ import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
public class MetamodelPropertyServiceImpl extends BaseServiceImpl<MetamodelPropertyDao, MetamodelPropertyEntity> implements MetamodelPropertyService {
|
public class MetamodelPropertyServiceImpl extends BaseServiceImpl<MetamodelPropertyDao, MetamodelPropertyEntity> implements MetamodelPropertyService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据元模型ID获取属性列表
|
||||||
|
*
|
||||||
|
* @param id 元模型ID
|
||||||
|
* @return 属性列表
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MetamodelPropertyVO> properties(Long id) {
|
public List<MetamodelPropertyVO> properties(Long id) {
|
||||||
LambdaQueryWrapper<MetamodelPropertyEntity> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<MetamodelPropertyEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(MetamodelPropertyEntity::getMetamodelId, id).orderByAsc(MetamodelPropertyEntity::getOrderNo);
|
wrapper.eq(MetamodelPropertyEntity::getMetamodelId, id)
|
||||||
|
.orderByAsc(MetamodelPropertyEntity::getOrderNo);
|
||||||
return MetamodelPropertyConvert.INSTANCE.convertList(baseMapper.selectList(wrapper));
|
return MetamodelPropertyConvert.INSTANCE.convertList(baseMapper.selectList(wrapper));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询元模型属性
|
||||||
|
*
|
||||||
|
* @param query 查询条件
|
||||||
|
* @return 分页结果
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PageResult<MetamodelPropertyVO> page(MetamodelpropertyQuery query) {
|
public PageResult<MetamodelPropertyVO> page(MetamodelpropertyQuery query) {
|
||||||
IPage<MetamodelPropertyEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
IPage<MetamodelPropertyEntity> page = baseMapper.selectPage(getPage(query), getWrapper(query));
|
||||||
return new PageResult<>(MetamodelPropertyConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
return new PageResult<>(MetamodelPropertyConvert.INSTANCE.convertList(page.getRecords()), page.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成LambdaQueryWrapper对象,用于查询元模型属性
|
||||||
|
* @param query 元模型属性查询对象
|
||||||
|
* @return LambdaQueryWrapper<MetamodelPropertyEntity> 查询对象
|
||||||
|
*/
|
||||||
private LambdaQueryWrapper<MetamodelPropertyEntity> getWrapper(MetamodelpropertyQuery query) {
|
private LambdaQueryWrapper<MetamodelPropertyEntity> getWrapper(MetamodelpropertyQuery query) {
|
||||||
LambdaQueryWrapper<MetamodelPropertyEntity> wrapper = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<MetamodelPropertyEntity> wrapper = Wrappers.lambdaQuery();
|
||||||
wrapper.eq(MetamodelPropertyEntity::getMetamodelId, query.getMetamodelId())
|
wrapper.eq(MetamodelPropertyEntity::getMetamodelId, query.getMetamodelId())
|
||||||
.like(StringUtil.isBlank(query.getName()),MetamodelPropertyEntity::getName,query.getName())
|
.like(StringUtil.isNotBlank(query.getName()), MetamodelPropertyEntity::getName, query.getName())
|
||||||
.like(StringUtil.isBlank(query.getCode()),MetamodelPropertyEntity::getCode,query.getCode())
|
.like(StringUtil.isNotBlank(query.getCode()), MetamodelPropertyEntity::getCode, query.getCode())
|
||||||
.orderByAsc(MetamodelPropertyEntity::getOrderNo);
|
.orderByAsc(MetamodelPropertyEntity::getOrderNo);
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(MetamodelPropertyVO vo) {
|
public void save(MetamodelPropertyVO vo) {
|
||||||
|
// 将MetamodelPropertyVO对象转换为MetamodelPropertyEntity对象
|
||||||
MetamodelPropertyEntity entity = MetamodelPropertyConvert.INSTANCE.convert(vo);
|
MetamodelPropertyEntity entity = MetamodelPropertyConvert.INSTANCE.convert(vo);
|
||||||
|
|
||||||
|
// 设置Builtin为0
|
||||||
entity.setBuiltin(0);
|
entity.setBuiltin(0);
|
||||||
|
|
||||||
|
// 设置ProjectId为当前项目Id
|
||||||
entity.setProjectId(getProjectId());
|
entity.setProjectId(getProjectId());
|
||||||
|
|
||||||
|
// 将MetamodelPropertyEntity对象插入数据库
|
||||||
baseMapper.insert(entity);
|
baseMapper.insert(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(MetamodelPropertyVO vo) {
|
public void update(MetamodelPropertyVO vo) {
|
||||||
|
// 将MetamodelPropertyVO对象转换为MetamodelPropertyEntity对象
|
||||||
|
MetamodelPropertyEntity entity = MetamodelPropertyConvert.INSTANCE.convert(vo);
|
||||||
|
|
||||||
|
// 设置Builtin为0
|
||||||
|
entity.setBuiltin(0);
|
||||||
|
|
||||||
|
// 设置ProjectId为当前项目Id
|
||||||
|
entity.setProjectId(getProjectId());
|
||||||
|
|
||||||
|
// 根据id更新MetamodelPropertyEntity对象信息
|
||||||
|
updateById(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除指定id列表的数据
|
||||||
|
*
|
||||||
|
* @param idList 要删除的数据id列表
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void delete(List<Long> idList) {
|
public void delete(List<Long> idList) {
|
||||||
|
removeByIds(idList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,10 @@ import srt.cloud.framework.dbswitch.common.util.StringUtil;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@Service
|
@Service
|
||||||
public class MetamodelServiceImpl extends BaseServiceImpl<MetamodelDao, MetamodelEntity> implements MetamodelService {
|
public class MetamodelServiceImpl extends BaseServiceImpl<MetamodelDao, MetamodelEntity> implements MetamodelService {
|
||||||
|
/**
|
||||||
|
* 重写父类方法,查询并返回当前项目下的元模型和公共的元模型的树结构列表
|
||||||
|
* @return List<TreeNodeVo> 树结构列表
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<TreeNodeVo> listTree() {
|
public List<TreeNodeVo> listTree() {
|
||||||
LambdaQueryWrapper<MetamodelEntity> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<MetamodelEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
@ -25,65 +29,117 @@ public class MetamodelServiceImpl extends BaseServiceImpl<MetamodelDao, Metamode
|
||||||
.or()
|
.or()
|
||||||
.eq(MetamodelEntity::getProjectId, 0)
|
.eq(MetamodelEntity::getProjectId, 0)
|
||||||
.orderByAsc(MetamodelEntity::getOrderNo);
|
.orderByAsc(MetamodelEntity::getOrderNo);
|
||||||
|
|
||||||
|
//查询元模型实体列表
|
||||||
List<MetamodelEntity> dataGovernanceMetamodelEntities = baseMapper.selectList(wrapper);
|
List<MetamodelEntity> dataGovernanceMetamodelEntities = baseMapper.selectList(wrapper);
|
||||||
|
|
||||||
|
//将元模型实体列表转换为TreeNodeVo列表
|
||||||
List<TreeNodeVo> treeNodeVos = BeanUtil.copyListProperties(dataGovernanceMetamodelEntities, TreeNodeVo::new, (oldItem, newItem) -> {
|
List<TreeNodeVo> treeNodeVos = BeanUtil.copyListProperties(dataGovernanceMetamodelEntities, TreeNodeVo::new, (oldItem, newItem) -> {
|
||||||
newItem.setLabel(oldItem.getName());
|
newItem.setLabel(oldItem.getName()); //设置树节点的显示文本
|
||||||
newItem.setValue(oldItem.getId());
|
newItem.setValue(oldItem.getId()); //设置树节点的值
|
||||||
newItem.setDisabled(oldItem.getIfLeaf() == 1);
|
newItem.setDisabled(oldItem.getIfLeaf() == 1); //设置树节点是否禁用
|
||||||
if (newItem.getPath().contains("/")) {
|
if (newItem.getPath().contains("/")) {
|
||||||
newItem.setParentPath(newItem.getPath().substring(0, newItem.getPath().lastIndexOf("/")));
|
newItem.setParentPath(newItem.getPath().substring(0, newItem.getPath().lastIndexOf("/"))); //设置树节点的父级路径
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//构建树结构
|
||||||
return BuildTreeUtils.buildTree(treeNodeVos);
|
return BuildTreeUtils.buildTree(treeNodeVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存MetamodelVO对象
|
||||||
|
*
|
||||||
|
* @param vo MetamodelVO对象
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void save(MetamodelVO vo) {
|
public void save(MetamodelVO vo) {
|
||||||
|
// 将MetamodelVO对象转换为MetamodelEntity对象
|
||||||
MetamodelEntity entity = MetamodelConvert.INSTANCE.convert(vo);
|
MetamodelEntity entity = MetamodelConvert.INSTANCE.convert(vo);
|
||||||
|
// 设置MetamodelEntity对象的路径
|
||||||
entity.setPath(recursionPath(entity, null));
|
entity.setPath(recursionPath(entity, null));
|
||||||
|
// 设置MetamodelEntity对象的项目ID
|
||||||
entity.setProjectId(getProjectId());
|
entity.setProjectId(getProjectId());
|
||||||
|
// 设置MetamodelEntity对象的内置属性为0
|
||||||
entity.setBuiltin(0);
|
entity.setBuiltin(0);
|
||||||
|
// 构建MetamodelEntity对象的字段
|
||||||
buildField(entity);
|
buildField(entity);
|
||||||
|
// 将MetamodelEntity对象插入数据库
|
||||||
baseMapper.insert(entity);
|
baseMapper.insert(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(MetamodelVO vo) {
|
public void update(MetamodelVO vo) {
|
||||||
|
// 将 MetamodelVO 对象转换为 MetamodelEntity 对象
|
||||||
MetamodelEntity entity = MetamodelConvert.INSTANCE.convert(vo);
|
MetamodelEntity entity = MetamodelConvert.INSTANCE.convert(vo);
|
||||||
|
|
||||||
|
// 设置 recursionPath 方法返回的路径为当前 entity 对象的路径
|
||||||
entity.setPath(recursionPath(entity, null));
|
entity.setPath(recursionPath(entity, null));
|
||||||
|
|
||||||
|
// 设置当前 entity 对象的项目 ID 为当前类实例的项目 ID
|
||||||
entity.setProjectId(getProjectId());
|
entity.setProjectId(getProjectId());
|
||||||
|
|
||||||
|
// 设置当前 entity 对象的 builtin 属性为 0
|
||||||
entity.setBuiltin(0);
|
entity.setBuiltin(0);
|
||||||
|
|
||||||
|
// 构建当前 entity 对象的字段信息
|
||||||
buildField(entity);
|
buildField(entity);
|
||||||
|
|
||||||
|
// 根据当前 entity 对象的 ID 更新实体信息
|
||||||
updateById(entity);
|
updateById(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(Long id) {
|
public void delete(Long id) {
|
||||||
|
// 创建一个LambdaQueryWrapper对象,用于构建查询条件
|
||||||
LambdaQueryWrapper<MetamodelEntity> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<MetamodelEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
// 设置查询条件,查找ParentId等于给定id的记录,一次只查询一条记录
|
||||||
wrapper.eq(MetamodelEntity::getParentId, id).last("limit 1");
|
wrapper.eq(MetamodelEntity::getParentId, id).last("limit 1");
|
||||||
|
// 如果根据查询条件查到的记录不为空,则抛出异常
|
||||||
if (baseMapper.selectOne(wrapper) != null) {
|
if (baseMapper.selectOne(wrapper) != null) {
|
||||||
throw new ServerException("存在子节点,不可删除!");
|
throw new ServerException("存在子节点,不可删除!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void buildField(MetamodelEntity entity) {
|
private void buildField(MetamodelEntity entity) {
|
||||||
|
// 根据实体类的ifLeaf属性判断该实体是叶子节点还是文件夹节点
|
||||||
if(entity.getIfLeaf() == 0){
|
if(entity.getIfLeaf() == 0){
|
||||||
|
// 如果是叶子节点,则设置图标为模型图片
|
||||||
entity.setIcon("/src/assets/model.png");
|
entity.setIcon("/src/assets/model.png");
|
||||||
}else {
|
}else {
|
||||||
|
// 如果是文件夹节点,则设置图标为文件夹图片
|
||||||
entity.setIcon("/src/assets/folder.png");
|
entity.setIcon("/src/assets/folder.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归生成实体类的路径
|
||||||
|
* @param metamodelEntity 实体类对象
|
||||||
|
* @param path 当前路径
|
||||||
|
* @return 生成的路径
|
||||||
|
*/
|
||||||
private String recursionPath(MetamodelEntity metamodelEntity, String path){
|
private String recursionPath(MetamodelEntity metamodelEntity, String path){
|
||||||
|
// 如果路径为空,则将路径设置为实体类的名称
|
||||||
if(StringUtil.isBlank(path)){
|
if(StringUtil.isBlank(path)){
|
||||||
path = metamodelEntity.getName();
|
path = metamodelEntity.getName();
|
||||||
}
|
}
|
||||||
|
// 如果实体类的父ID不为0,即存在父类
|
||||||
if(metamodelEntity.getParentId()!=0){
|
if(metamodelEntity.getParentId()!=0){
|
||||||
|
// 获取父类实体对象
|
||||||
MetamodelEntity parent = getById(metamodelEntity.getParentId());
|
MetamodelEntity parent = getById(metamodelEntity.getParentId());
|
||||||
|
// 将父类名称加上斜杠以及当前路径,生成新的路径
|
||||||
path = parent.getName() + "/" + path;
|
path = parent.getName() + "/" + path;
|
||||||
|
// 递归调用本方法,传入父类对象以及新的路径
|
||||||
return recursionPath(parent, path);
|
return recursionPath(parent, path);
|
||||||
}
|
}
|
||||||
|
// 返回生成的路径
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@ import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static net.srt.framework.security.user.SecurityUser.getUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName : StandardServiceImpl
|
* @ClassName : StandardServiceImpl
|
||||||
* @Description :
|
* @Description :
|
||||||
|
@ -40,5 +42,45 @@ public class StandardServiceImpl extends BaseServiceImpl<StandardDao, StandardEn
|
||||||
return BuildTreeUtils.buildTree(treeNodeVos);
|
return BuildTreeUtils.buildTree(treeNodeVos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save1(StandardEntity standardEntity) {
|
||||||
|
if (standardEntity.getId() == null) {
|
||||||
|
standardEntity.setCreateTime(new java.util.Date());
|
||||||
|
standardEntity.setUpdateTime(new java.util.Date());
|
||||||
|
standardEntity.setDeleted(0);
|
||||||
|
standardEntity.setVersion(0);
|
||||||
|
standardEntity.setCreator(getUserId());
|
||||||
|
standardEntity.setUpdater(getUserId());
|
||||||
|
baseMapper.insert(standardEntity);
|
||||||
|
} else {
|
||||||
|
standardEntity.setUpdateTime(new java.util.Date());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update1(StandardEntity standardEntity) {
|
||||||
|
if (standardEntity.getId()!= null) {
|
||||||
|
standardEntity.setUpdateTime(new java.util.Date());
|
||||||
|
standardEntity.setUpdater(getUserId());
|
||||||
|
baseMapper.updateById(standardEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void del(Long id) {
|
||||||
|
//判断是否有子节点
|
||||||
|
LambdaQueryWrapper<StandardEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(StandardEntity::getParentId,id).last("limit 1");
|
||||||
|
if(baseMapper.selectCount(wrapper)!=null){
|
||||||
|
throw new RuntimeException("请先删除子节点");
|
||||||
|
}
|
||||||
|
removeById(id);
|
||||||
|
//删除属性
|
||||||
|
LambdaQueryWrapper<StandardEntity> wrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
wrapper1.eq(StandardEntity::getParentId,id);
|
||||||
|
baseMapper.delete(wrapper1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class StandardManagementVo implements Serializable {
|
||||||
private Integer standardCodeId;
|
private Integer standardCodeId;
|
||||||
private Integer type;
|
private Integer type;
|
||||||
private String note;
|
private String note;
|
||||||
private Integer projectId;
|
private Long projectId;
|
||||||
private Integer status;
|
private Integer status;
|
||||||
private Integer version;
|
private Integer version;
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/libraries/
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### Eclipse ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
|
@ -0,0 +1,220 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>net.srt</groupId>
|
||||||
|
<artifactId>srt-cloud</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>srt-cloud-data-service</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.srt</groupId>
|
||||||
|
<artifactId>srt-cloud-api</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!--使用log42j-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.srt</groupId>
|
||||||
|
<artifactId>srt-cloud-mybatis</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>spring-boot-starter-logging</artifactId>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.whvcse</groupId>
|
||||||
|
<artifactId>easy-captcha</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-springdoc-ui</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun.oss</groupId>
|
||||||
|
<artifactId>aliyun-sdk-oss</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.qcloud</groupId>
|
||||||
|
<artifactId>cos_api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.qiniu</groupId>
|
||||||
|
<artifactId>qiniu-java-sdk</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.huaweicloud</groupId>
|
||||||
|
<artifactId>esdk-obs-java-bundle</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.minio</groupId>
|
||||||
|
<artifactId>minio</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<!--<finalName>${project.artifactId}</finalName>-->
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>appassembler-maven-plugin</artifactId>
|
||||||
|
<version>2.1.0</version>
|
||||||
|
<!-- 如果不配置 generate-daemons,则打包命令为 mvn clean package appassembler:assemble -->
|
||||||
|
<!-- 如果配置了 generate-daemons,打包命令可以是 mvn clean package 也可以是 mvn clean package appassembler:assemble -->
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>generate-jsw-scripts</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>generate-daemons</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
|
||||||
|
<configuration>
|
||||||
|
<!-- flat与lib共同决定将项目用的的所有jar包复制到lib目录下 -->
|
||||||
|
<repositoryLayout>flat</repositoryLayout>
|
||||||
|
<!--从哪里copy配置文件-->
|
||||||
|
<configurationSourceDirectory>src/main/resources</configurationSourceDirectory>
|
||||||
|
<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
|
||||||
|
<!--是否copy配置文件-->
|
||||||
|
<copyConfigurationDirectory>true</copyConfigurationDirectory>
|
||||||
|
<!--配置文件存放在conf目录路径-->
|
||||||
|
<configurationDirectory>conf</configurationDirectory>
|
||||||
|
<!-- 打包的jar,以及maven依赖的jar放到这个目录里面 -->
|
||||||
|
<repositoryName>lib</repositoryName>
|
||||||
|
<!-- 可执行脚本的目录 -->
|
||||||
|
<binFolder>bin</binFolder>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<logsDirectory>logs</logsDirectory>
|
||||||
|
|
||||||
|
<daemons>
|
||||||
|
<daemon>
|
||||||
|
<id>${project.artifactId}</id>
|
||||||
|
<mainClass>net.srt.SystemApplication</mainClass>
|
||||||
|
<platforms>
|
||||||
|
<platform>jsw</platform>
|
||||||
|
</platforms>
|
||||||
|
<generatorConfigurations>
|
||||||
|
<generatorConfiguration>
|
||||||
|
<generator>jsw</generator>
|
||||||
|
<includes>
|
||||||
|
<include>linux-x86-32</include>
|
||||||
|
<include>linux-x86-64</include>
|
||||||
|
<include>windows-x86-32</include>
|
||||||
|
<include>windows-x86-64</include>
|
||||||
|
</includes>
|
||||||
|
<configuration>
|
||||||
|
<property>
|
||||||
|
<name>configuration.directory.in.classpath.first</name>
|
||||||
|
<value>conf</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>wrapper.ping.timeout</name>
|
||||||
|
<value>120</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>set.default.REPO_DIR</name>
|
||||||
|
<value>lib</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>wrapper.logfile</name>
|
||||||
|
<value>logs/wrapper.log</value>
|
||||||
|
</property>
|
||||||
|
</configuration>
|
||||||
|
</generatorConfiguration>
|
||||||
|
</generatorConfigurations>
|
||||||
|
<jvmSettings>
|
||||||
|
<!-- jvm参数 -->
|
||||||
|
<!--<systemProperties>
|
||||||
|
<systemProperty>com.sun.management.jmxremote</systemProperty>
|
||||||
|
<systemProperty>com.sun.management.jmxremote.port=1984</systemProperty>
|
||||||
|
<systemProperty>com.sun.management.jmxremote.authenticate=false</systemProperty>
|
||||||
|
<systemProperty>com.sun.management.jmxremote.ssl=false</systemProperty>
|
||||||
|
</systemProperties>-->
|
||||||
|
<extraArguments>
|
||||||
|
<extraArgument>-server</extraArgument>
|
||||||
|
<extraArgument>-Dfile.encoding=utf-8</extraArgument>
|
||||||
|
<extraArgument>-Xms128m</extraArgument>
|
||||||
|
<extraArgument>-Xmx1024m</extraArgument>
|
||||||
|
<extraArgument>-XX:+PrintGCDetails</extraArgument><!--输出GC的详细日志-->
|
||||||
|
<extraArgument>-XX:+PrintGCDateStamps</extraArgument><!--输出GC的时间戳-->
|
||||||
|
<extraArgument>-Xloggc:logs/gc.log</extraArgument><!--日志文件的输出路径-->
|
||||||
|
</extraArguments>
|
||||||
|
</jvmSettings>
|
||||||
|
</daemon>
|
||||||
|
</daemons>
|
||||||
|
<programs>
|
||||||
|
<program>
|
||||||
|
<mainClass>net.srt.SystemApplication</mainClass>
|
||||||
|
<id>${project.artifactId}</id>
|
||||||
|
</program>
|
||||||
|
</programs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!--打包 日常调试打包可以把该组件注释掉,不然install的速度比较慢-->
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<descriptors>
|
||||||
|
<descriptor>${project.parent.basedir}/assembly/assembly-win.xml</descriptor>
|
||||||
|
<descriptor>${project.parent.basedir}/assembly/assembly-linux.xml</descriptor>
|
||||||
|
</descriptors>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>make-assembly</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>single</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!--<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<skipTests>true</skipTests>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : ${NAME}
|
||||||
|
* @Description : ${description}
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-22 20:44
|
||||||
|
*/
|
||||||
|
@EnableFeignClients
|
||||||
|
@EnableDiscoveryClient
|
||||||
|
@SpringBootApplication
|
||||||
|
public class ServiceApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ServiceApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
auth:
|
||||||
|
ignore_urls:
|
||||||
|
- /test
|
||||||
|
- /api/**
|
|
@ -0,0 +1,42 @@
|
||||||
|
#数据集成
|
||||||
|
server:
|
||||||
|
port: 8099
|
||||||
|
|
||||||
|
spring:
|
||||||
|
mvc:
|
||||||
|
servlet:
|
||||||
|
load-on-startup: 1
|
||||||
|
application:
|
||||||
|
name: srt-cloud-data-service
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
server-addr: 101.34.77.101:8848
|
||||||
|
# 命名空间,默认:public
|
||||||
|
namespace: 09dff3e2-9790-4d4f-beb6-9baeb01ae040
|
||||||
|
service: ${spring.application.name}
|
||||||
|
group: srt2.0
|
||||||
|
config:
|
||||||
|
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||||
|
namespace: ${spring.cloud.nacos.discovery.namespace}
|
||||||
|
file-extension: yaml
|
||||||
|
# 指定配置
|
||||||
|
extension-configs:
|
||||||
|
- data-id: datasource.yaml
|
||||||
|
refresh: true
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
max-request-size: 100MB
|
||||||
|
max-file-size: 1024MB
|
||||||
|
# feign 配置
|
||||||
|
feign:
|
||||||
|
client:
|
||||||
|
config:
|
||||||
|
default:
|
||||||
|
connectTimeout: 60000
|
||||||
|
readTimeout: 60000
|
||||||
|
loggerLevel: basic
|
||||||
|
okhttp:
|
||||||
|
enabled: true
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--status用于设置log4j2框架内部的日志信息输出,设置成OFF将禁止log4j2内部日志输出,毕竟这个日志对我们没有什么作用,如果设置成trace,你会看到log4j2内部各种详细输出;monitorInterval是监控间隔,例如下面的设置是指:log4j2每隔600秒自动监控该配置文件是否有变化,如果有变化,则根据文件内容新的配置生成日志-->
|
||||||
|
<configuration status="OFF" monitorInterval="600">
|
||||||
|
<Properties>
|
||||||
|
<property name="LOG_PATH">./logs/</property>
|
||||||
|
<property name="LOG_FILE">srt-cloud-system</property>
|
||||||
|
</Properties>
|
||||||
|
<!--定义添加器-->
|
||||||
|
<appenders>
|
||||||
|
<!--Console是输出控制台的标签,target可以控制往控制台输出日志的颜色,例如SYSTEM_OUT就是蓝色的,SYSTEM_ERR就是红色的-->
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<!--控制台只输出level及以上级别的信息,onMatch为true代表符合level标准的才输出,onMismatch为true代表不符合level标准的就不输出-->
|
||||||
|
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="ACCEPT"/>
|
||||||
|
<!--这个是输出日志的格式,如果对里面的参数不理解,可以去看我的这篇文章,网址是:“https://blog.csdn.net/qq_42449963/article/details/104617356”-->
|
||||||
|
<!--<PatternLayout pattern=" %d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %class{36} %L %M - %msg%xEx%n"/>-->
|
||||||
|
<PatternLayout
|
||||||
|
pattern=" %d{yyyy-MM-dd HH:mm:ss.SSS} %highlight{%6p} %style{%5pid}{bright,magenta} --- [%15.15t] %style{%c{20}}{bright,cyan}: %m%n"/>
|
||||||
|
</Console>
|
||||||
|
|
||||||
|
<!--这种存储文件的方式更加合理,可以设置多长时间把文件归档一次,也可以设置多大文件归档一次,如果都把所有的日志存在一个文件里面,文件会受不了的,解释一下参数信息:fileName后面如果后面不跟/,例如dev/logs/app.log,那就会把日志文件放在project工程下面,不是所属的项目下面如果后面跟/,例如/dev/logs/app.log,那就会把日志文件直接放在项目所在盘符的根目录下,例如项目在E盘存放,那就会把日志文件直接放在E盘的根目录下,如果后面直接加盘符,那就会存在特定的位置,例如F:/dev/logs/app.log,那就会直接放在F盘中特定的位置,上面都是经过测验的,fileName后面的app.log文件相当于是一个缓存文件,我们会把日志信息先放在app.log中,当达到我们设置的要求之后会把app.log中的日志信息转移到filePattern指定的日志文件中,转移的内容就会从app.log日志文件中清除,没有转移的内容还存放在app.log中,等到下一次符合要求的时候在进行一次转移-->
|
||||||
|
<!--$${date:yyyy-MM}用在文件上面,输出的是目录的名字,例如2020-03,%d{MM-dd-yyyy}输入的就是月日年,例如03-02-2020,%i按照轮询输出,毕竟一天可能有符合要求的多个日志文件生成,所以需要在后面加一个类似于后缀的东西,当天的第一个日志文件可能是-1.log.gz,第二个文件就是-2.log.gz-->
|
||||||
|
<RollingFile name="RollingFile" fileName="${LOG_PATH}/${LOG_FILE}.log"
|
||||||
|
filePattern="${LOG_PATH}/$${date:yyyy-MM}/${LOG_FILE}-%d{yyyy-MM-dd}-%i.log">
|
||||||
|
<!--%thread:线程名;%-5level:级别从左显示5个字符宽度;%msg:在代码中需要输出的日志消息;%class{36}:估计显示的是完整类名-->
|
||||||
|
<PatternLayout pattern=" %d{yyyy-MM-dd HH:mm:ss z} %-5level %class{36} %L %M - %msg%xEx%n"/>
|
||||||
|
<!--<SizeBasedTriggeringPolicy size="300MB"/>-->
|
||||||
|
<Policies>
|
||||||
|
<!--TimeBasedTriggeringPolicy基于时间的触发策略,integer属性和上面<RollingFile>标签中的filePattern的值有关,例如:filePattern=”xxx%d{yyyy-MM-dd}xx” interval=”1” 表示将1天一个日志文件;filePattern=”xxx%d{yyyy-MM-dd-HH}xxx” interval=”1”表示一个小时一个日志文件,也就是说interval的单位取决于filePattern中的最小时间单位;modulate是(boolean)以0点钟为边界进行偏移计算,应该就是假设你中午启动项目,晚上0点也是一天了,而不是经过24小时才算一天-->
|
||||||
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
|
<!--当app.log文件大小到达100MB的时候,就归档一次日志文件,也就是把app.log中的那前面100MB文件取出来,放到上面<RollingFile >中的filePattern后面的路径中-->
|
||||||
|
<SizeBasedTriggeringPolicy size="100MB"/>
|
||||||
|
</Policies>
|
||||||
|
</RollingFile>
|
||||||
|
</appenders>
|
||||||
|
|
||||||
|
<loggers>
|
||||||
|
<logger name="net.srt.system.dao" level="DEBUG" additivity="false">
|
||||||
|
<appender-ref ref="Console"/>
|
||||||
|
</logger>
|
||||||
|
<!--level="info"代表只能打印出info及其以上的信息;Console是上面Console标签的名字,往这一写,就可以往控制台上输出内容了,RollingFile是上面RollingFile标签的名字,往这一写,就会往设定的文件中输出内容了;当程序运行的时候就会被创建日志输出文件,不过里面没有任何日志内容,是否往里面输入日志,是通过下面的appender-ref标签控制的-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="Console"/>
|
||||||
|
<!--一般不使用这个,只是让你知道有这个输出日志文件的方式而已-->
|
||||||
|
<!--<appender-ref ref="File"/>-->
|
||||||
|
<appender-ref ref="RollingFile"/>
|
||||||
|
</root>
|
||||||
|
</loggers>
|
||||||
|
</configuration>
|
|
@ -42,4 +42,6 @@ public interface Constant {
|
||||||
* OK
|
* OK
|
||||||
*/
|
*/
|
||||||
String OK = "OK";
|
String OK = "OK";
|
||||||
|
|
||||||
|
String STATUS_NORMAL="0";
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
package net.srt.system.convert;
|
||||||
|
|
||||||
|
|
||||||
|
import net.srt.system.entity.DatastandardEntity;
|
||||||
|
import net.srt.system.vo.StandardManagementVo;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.convert
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/20 19:50
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface DatastandardConvert {
|
||||||
|
DatastandardConvert INSTANCE = Mappers.getMapper(DatastandardConvert.class);
|
||||||
|
|
||||||
|
|
||||||
|
List<StandardManagementVo> convertList(List<DatastandardEntity> list);
|
||||||
|
|
||||||
|
StandardManagementVo convert(DatastandardEntity entity);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package net.srt.system.convert;
|
||||||
|
|
||||||
|
|
||||||
|
import net.srt.system.entity.MetamodelEntity;
|
||||||
|
import net.srt.system.vo.MetamodelVO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
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,21 @@
|
||||||
|
package net.srt.system.convert;
|
||||||
|
|
||||||
|
|
||||||
|
import net.srt.system.entity.MetamodelPropertyEntity;
|
||||||
|
import net.srt.system.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);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package net.srt.system.convert;
|
||||||
|
|
||||||
|
|
||||||
|
import net.srt.system.entity.QualityQueryEntity;
|
||||||
|
import net.srt.system.vo.QualityRuleVo;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.convert
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/20 19:50
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface QualityRuleConvert {
|
||||||
|
|
||||||
|
|
||||||
|
QualityRuleConvert INSTANCE = Mappers.getMapper(QualityRuleConvert.class);
|
||||||
|
|
||||||
|
|
||||||
|
List<QualityRuleVo> convertList(List<QualityQueryEntity> list);
|
||||||
|
|
||||||
|
QualityQueryEntity conver(QualityRuleVo vo);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package net.srt.system.convert;
|
||||||
|
|
||||||
|
|
||||||
|
import net.srt.system.entity.QualityTaskEntity;
|
||||||
|
import net.srt.system.vo.QualityTaskVo;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
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,39 @@
|
||||||
|
package net.srt.system.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : DatastandardEntity
|
||||||
|
* @Description :
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-21 11:09
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Data
|
||||||
|
@TableName("standard_management")
|
||||||
|
public class DatastandardEntity extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@TableId("id")
|
||||||
|
private Long id;
|
||||||
|
private Integer categoryId;
|
||||||
|
private String engName;
|
||||||
|
private String cnName;
|
||||||
|
private Integer codeNum;
|
||||||
|
private String dataType;
|
||||||
|
private Integer dataLength;
|
||||||
|
private Integer dataPrecision;
|
||||||
|
private Integer nullable;
|
||||||
|
private Integer standardCodeId;
|
||||||
|
private Integer type;
|
||||||
|
private String note;
|
||||||
|
private Integer projectId;
|
||||||
|
private Integer status;
|
||||||
|
private Integer version;
|
||||||
|
private Integer deleted;
|
||||||
|
private Integer ifStandardRel;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
package net.srt.system.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,71 @@
|
||||||
|
package net.srt.system.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_property")
|
||||||
|
public class MetamodelPropertyEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 元模型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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package net.srt.system.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
import net.srt.framework.mybatis.entity.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.entity
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/20 19:51
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@SuperBuilder
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "data_governance_quality_rule")
|
||||||
|
public class QualityQueryEntity extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 英文名称
|
||||||
|
// */
|
||||||
|
// private String engName;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 1-唯一性 2-规范性 3-有效性 4-完整性 5-一致性 6-及时性 7-准确性
|
||||||
|
// */
|
||||||
|
// private Integer type;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 字段配置 0-单选 1-多选
|
||||||
|
// */
|
||||||
|
// private Integer ifColumnMultiple;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 说明
|
||||||
|
// */
|
||||||
|
// private String description;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 来源 1-内置
|
||||||
|
// */
|
||||||
|
// private Integer builtIn;
|
||||||
|
//
|
||||||
|
// private Long projectId;
|
||||||
|
// /**
|
||||||
|
// * 个性化参数
|
||||||
|
// */
|
||||||
|
// @TableField(typeHandler = JacksonTypeHandler.class)
|
||||||
|
// private List<QualityParam> param;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
package net.srt.system.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,79 @@
|
||||||
|
package net.srt.system.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.system.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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
package net.srt.system.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import net.srt.api.module.data.governance.dto.quality.QualityParam;
|
||||||
|
import net.srt.framework.common.utils.DateUtils;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: srt_cloud
|
||||||
|
* @BelongsPackage: net.srt.vo
|
||||||
|
* @Author: jpz
|
||||||
|
* @CreateTime: 2023/12/20 19:43
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "数据质量")
|
||||||
|
public class QualityRuleVo implements Serializable{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "英文名称")
|
||||||
|
private String engName;
|
||||||
|
|
||||||
|
@Schema(description = "1-唯一性 2-规范性 3-有效性 4-完整性 5-一致性 6-及时性 7-准确性")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@Schema(description = "字段配置 0-单选 1-多选")
|
||||||
|
private Integer ifColumnMultiple;
|
||||||
|
|
||||||
|
@Schema(description = "说明")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Schema(description = "来源 1-内置")
|
||||||
|
private Integer builtIn;
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
@Schema(description = "个性化参数")
|
||||||
|
private List<QualityParam> param;
|
||||||
|
|
||||||
|
@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,62 @@
|
||||||
|
package net.srt.system.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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
package net.srt.system.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : StandardManagementVo
|
||||||
|
* @Description : 标准管理表
|
||||||
|
* @Author : FJJ
|
||||||
|
* @Date: 2023-12-20 11:24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "标准管理查询")
|
||||||
|
public class StandardManagementVo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@TableId("id")
|
||||||
|
private Long id;
|
||||||
|
private Integer categoryId;
|
||||||
|
private String engName;
|
||||||
|
private String cnName;
|
||||||
|
private Integer codeNum;
|
||||||
|
private String dataType;
|
||||||
|
private Integer dataLength;
|
||||||
|
private Integer dataPrecision;
|
||||||
|
private Integer nullable;
|
||||||
|
private Integer standardCodeId;
|
||||||
|
private Integer type;
|
||||||
|
private String note;
|
||||||
|
private Integer projectId;
|
||||||
|
private Integer status;
|
||||||
|
private Integer version;
|
||||||
|
private Integer deleted;
|
||||||
|
private String creator;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
private String updater;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date updateTime;
|
||||||
|
private Integer ifStandardRel;
|
||||||
|
private String group;
|
||||||
|
}
|
Loading…
Reference in New Issue