Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄营
datax-cloud
Commits
340ababc
Commit
340ababc
authored
Oct 11, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目初始化
parent
c0e6fb69
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
686 additions
and
93 deletions
+686
-93
application-dev.yml
datax-config/src/main/resources/config/application-dev.yml
+10
-6
datax-gateway-dev.yml
datax-config/src/main/resources/config/datax-gateway-dev.yml
+2
-7
datax-service-email-dev.yml
...fig/src/main/resources/config/datax-service-email-dev.yml
+0
-1
datax-service-file-dev.yml
...nfig/src/main/resources/config/datax-service-file-dev.yml
+0
-1
datax-service-websocket-dev.yml
...src/main/resources/config/datax-service-websocket-dev.yml
+34
-12
datax-service-workflow-dev.yml
.../src/main/resources/config/datax-service-workflow-dev.yml
+1
-0
Endpoint.java
...java/cn/datax/service/data/standard/api/dto/Endpoint.java
+18
-0
ManualMappingDto.java
...datax/service/data/standard/api/dto/ManualMappingDto.java
+21
-0
ContrastEntity.java
...atax/service/data/standard/api/entity/ContrastEntity.java
+12
-0
ContrastQuery.java
.../datax/service/data/standard/api/query/ContrastQuery.java
+4
-0
ContrastStatisticVo.java
...tax/service/data/standard/api/vo/ContrastStatisticVo.java
+46
-0
ContrastController.java
.../service/data/standard/controller/ContrastController.java
+24
-0
DictMappingController.java
...rvice/data/standard/controller/DictMappingController.java
+11
-3
ContrastDao.java
.../java/cn/datax/service/data/standard/dao/ContrastDao.java
+6
-0
ContrastMapper.java
...datax/service/data/standard/mapstruct/ContrastMapper.java
+16
-0
ContrastService.java
.../datax/service/data/standard/service/ContrastService.java
+5
-0
DictMappingService.java
...tax/service/data/standard/service/DictMappingService.java
+5
-1
ContrastServiceImpl.java
...rvice/data/standard/service/impl/ContrastServiceImpl.java
+7
-0
DictMappingServiceImpl.java
...ce/data/standard/service/impl/DictMappingServiceImpl.java
+20
-1
ContrastMapper.xml
...dard-service/src/main/resources/mapper/ContrastMapper.xml
+15
-0
pom.xml
datax-modules/pom.xml
+1
-1
pom.xml
datax-modules/websocket-service-parent/pom.xml
+21
-0
pom.xml
...es/websocket-service-parent/websocket-service-api/pom.xml
+36
-0
spring.factories
...-service-api/src/main/resources/META-INF/spring.factories
+1
-0
pom.xml
...odules/websocket-service-parent/websocket-service/pom.xml
+18
-16
DataxWebsocketApplication.java
...cn/datax/service/websocket/DataxWebsocketApplication.java
+2
-2
DataResourceServerConfig.java
...ax/service/websocket/config/DataResourceServerConfig.java
+0
-0
StartedUpRunner.java
...va/cn/datax/service/websocket/config/StartedUpRunner.java
+0
-0
SwaggerConfig.java
...java/cn/datax/service/websocket/config/SwaggerConfig.java
+0
-0
SwaggerProperties.java
.../cn/datax/service/websocket/config/SwaggerProperties.java
+0
-0
InnerController.java
...n/datax/service/websocket/controller/InnerController.java
+0
-0
PushController.java
...cn/datax/service/websocket/controller/PushController.java
+0
-0
MyWsMsgHandler.java
...ava/cn/datax/service/websocket/server/MyWsMsgHandler.java
+1
-1
MyAioListener.java
...atax/service/websocket/server/listener/MyAioListener.java
+1
-1
MyGroupListener.java
...ax/service/websocket/server/listener/MyGroupListener.java
+1
-3
MyIpStatListener.java
...x/service/websocket/server/listener/MyIpStatListener.java
+1
-1
bootstrap.yml
...parent/websocket-service/src/main/resources/bootstrap.yml
+1
-2
logback-spring.xml
...t/websocket-service/src/main/resources/logback-spring.xml
+0
-0
spy.properties
...arent/websocket-service/src/main/resources/spy.properties
+26
-0
contrast.js
datax-ui/src/api/standard/contrast.js
+8
-0
dictmapping.js
datax-ui/src/api/standard/dictmapping.js
+15
-0
index.vue
datax-ui/src/views/standard/contrastrelease/index.vue
+0
-15
index.vue
datax-ui/src/views/standard/contrastresult/index.vue
+0
-15
ContrastStatisticList.vue
...iews/standard/contraststatistic/ContrastStatisticList.vue
+243
-0
index.vue
datax-ui/src/views/standard/contraststatistic/index.vue
+33
-0
index.vue
datax-ui/src/views/standard/dictmapping/index.vue
+18
-2
pom.xml
pom.xml
+2
-2
No files found.
datax-config/src/main/resources/config/application-dev.yml
View file @
340ababc
...
...
@@ -47,14 +47,14 @@ feign:
# hystrix 配置
hystrix
:
command
:
default
:
default
:
#default全局有效,service id指定应用有效
execution
:
timeout
:
enabled
:
true
isolation
:
strategy
:
SEMAPHORE
thread
:
timeoutInMilliseconds
:
5
000
#断路器超时时间,默认1000ms
timeoutInMilliseconds
:
20
000
#断路器超时时间,默认1000ms
dataSqlConsoleHystrix
:
#sql工作台方法的超时时间 60s
fallback
:
enabled
:
true
...
...
@@ -75,7 +75,11 @@ hystrix:
timeoutInMilliseconds
:
60000
#断路器超时时间,默认1000ms
shareSecurityContext
:
true
#请求处理的超时时间
# 请求处理的超时时间
# 建议hystrix的超时时间为:(1 + MaxAutoRetries + MaxAutoRetriesNextServer) * ReadTimeout
ribbon
:
ReadTimeout
:
10000
ConnectTimeout
:
10000
\ No newline at end of file
OkToRetryOnAllOperations
:
false
#对所有操作请求都进行重试,默认false
ReadTimeout
:
10000
#负载均衡超时时间,默认值5000
ConnectTimeout
:
2000
#ribbon请求连接的超时时间,默认值2000
MaxAutoRetries
:
0
#对当前实例的重试次数,默认0
MaxAutoRetriesNextServer
:
1
#对切换实例的重试次数,默认1
\ No newline at end of file
datax-config/src/main/resources/config/datax-gateway-dev.yml
View file @
340ababc
...
...
@@ -210,9 +210,4 @@ spring:
predicates
:
-
Path=/websocket/**
filters
:
-
SwaggerHeaderFilter
-
StripPrefix=1
-
name
:
Hystrix
args
:
name
:
websocketHystrix
fallbackUri
:
forward:/fallback
\ No newline at end of file
-
StripPrefix=1
\ No newline at end of file
datax-config/src/main/resources/config/datax-service-email-dev.yml
View file @
340ababc
...
...
@@ -33,7 +33,6 @@ spring:
username
:
root
password
:
1234@abcd
mybatis-plus
:
mapper-locations
:
classpath*:mapper/*Mapper.xml
type-aliases-package
:
cn.datax.service.email.api.entity
...
...
datax-config/src/main/resources/config/datax-service-file-dev.yml
View file @
340ababc
...
...
@@ -22,7 +22,6 @@ spring:
username
:
root
password
:
1234@abcd
mybatis-plus
:
mapper-locations
:
classpath*:mapper/*Mapper.xml
type-aliases-package
:
cn.datax.service.file.api.entity
...
...
datax-config/src/main/resources/config/datax-service-websocket-dev.yml
View file @
340ababc
...
...
@@ -12,19 +12,28 @@ spring:
max-wait
:
-1ms
# 连接池最大阻塞等待时间(使用负值表示没有限制)
max-idle
:
10
# 连接池中的最大空闲连接
min-idle
:
5
# 连接池中的最小空闲连接
datasource
:
dynamic
:
primary
:
mysql
datasource
:
mysql
:
driver-class-name
:
com.p6spy.engine.spy.P6SpyDriver
url
:
jdbc:p6spy:mysql://localhost:3306/data_cloud?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
password
:
1234@abcd
# spring security 配置
security
:
oauth2
:
client
:
access-token-uri
:
http://localhost:8612/auth/oauth/token
user-authorization-uri
:
http://localhost:8612/auth/oauth/authorize
client-id
:
datax
client-secret
:
123456
scope
:
all
resource
:
loadBalanced
:
true
token-info-uri
:
http://localhost:8612/auth/oauth/check_token
mybatis-plus
:
mapper-locations
:
classpath*:mapper/*Mapper.xml
type-aliases-package
:
cn.datax.service.websocket.api.entity
global-config
:
db-config
:
id-type
:
ASSIGN_ID
banner
:
false
configuration
:
map-underscore-to-camel-case
:
true
cache-enabled
:
false
call-setters-on-nulls
:
true
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
# tio 配置
tio
:
...
...
@@ -49,6 +58,19 @@ tio:
ip
:
true
user
:
true
# spring security 配置
security
:
oauth2
:
client
:
access-token-uri
:
http://localhost:8612/auth/oauth/token
user-authorization-uri
:
http://localhost:8612/auth/oauth/authorize
client-id
:
datax
client-secret
:
123456
scope
:
all
resource
:
loadBalanced
:
true
token-info-uri
:
http://localhost:8612/auth/oauth/check_token
# Swagger界面内容配置
swagger
:
enable
:
true
...
...
datax-config/src/main/resources/config/datax-service-workflow-dev.yml
View file @
340ababc
...
...
@@ -43,6 +43,7 @@ spring:
password
:
1234@abcd
# 如果不加这个参数,建表会失败:nullCatalogMeansCurrent=true
url
:
jdbc:mysql://localhost:3306/data_cloud_flowable?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
flowable
:
# 关闭定时任务JOB
async-executor-activate
:
false
...
...
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/dto/Endpoint.java
0 → 100644
View file @
340ababc
package
cn
.
datax
.
service
.
data
.
standard
.
api
.
dto
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
@Data
public
class
Endpoint
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@NotBlank
(
message
=
"源端点不能为空"
)
private
String
sourceId
;
@NotBlank
(
message
=
"目标端点不能为空"
)
private
String
targetId
;
}
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/dto/ManualMappingDto.java
0 → 100644
View file @
340ababc
package
cn
.
datax
.
service
.
data
.
standard
.
api
.
dto
;
import
cn.datax.common.validate.ValidationGroups
;
import
lombok.Data
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.Size
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
ManualMappingDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Valid
@NotEmpty
(
message
=
"对照关系不能为空"
)
@Size
(
min
=
1
,
message
=
"对照关系长度不能少于{min}位"
)
private
List
<
Endpoint
>
endpoints
;
}
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/entity/ContrastEntity.java
View file @
340ababc
...
...
@@ -84,4 +84,16 @@ public class ContrastEntity extends DataScopeBaseEntity {
* 绑定标准字段
*/
private
String
bindGbColumn
;
/**
* 对照数量
*/
@TableField
(
exist
=
false
)
private
Integer
mappingCount
;
/**
* 未对照数量
*/
@TableField
(
exist
=
false
)
private
Integer
unMappingCount
;
}
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/query/ContrastQuery.java
View file @
340ababc
...
...
@@ -17,4 +17,8 @@ import lombok.EqualsAndHashCode;
public
class
ContrastQuery
extends
BaseQueryParams
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
sourceName
;
private
String
tableName
;
private
String
columnName
;
}
datax-modules/data-standard-service-parent/data-standard-service-api/src/main/java/cn/datax/service/data/standard/api/vo/ContrastStatisticVo.java
0 → 100644
View file @
340ababc
package
cn
.
datax
.
service
.
data
.
standard
.
api
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 对照表信息表 实体VO
* </p>
*
* @author yuwei
* @since 2020-09-27
*/
@Data
public
class
ContrastStatisticVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
String
id
;
private
String
status
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
createTime
;
private
String
remark
;
private
String
sourceId
;
private
String
sourceName
;
private
String
tableId
;
private
String
tableName
;
private
String
tableComment
;
private
String
columnId
;
private
String
columnName
;
private
String
columnComment
;
private
String
gbTypeId
;
private
String
gbTypeCode
;
private
String
gbTypeName
;
private
String
bindGbColumn
;
private
Integer
mappingCount
;
private
Integer
unMappingCount
;
/**
* 对照比例 20%
*/
private
String
mappingPercent
;
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/controller/ContrastController.java
View file @
340ababc
...
...
@@ -5,11 +5,13 @@ import cn.datax.common.core.R;
import
cn.datax.common.validate.ValidationGroups
;
import
cn.datax.service.data.standard.api.dto.ContrastDto
;
import
cn.datax.service.data.standard.api.entity.ContrastEntity
;
import
cn.datax.service.data.standard.api.vo.ContrastStatisticVo
;
import
cn.datax.service.data.standard.api.vo.ContrastTreeVo
;
import
cn.datax.service.data.standard.api.vo.ContrastVo
;
import
cn.datax.service.data.standard.api.query.ContrastQuery
;
import
cn.datax.service.data.standard.mapstruct.ContrastMapper
;
import
cn.datax.service.data.standard.service.ContrastService
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -138,4 +140,26 @@ public class ContrastController extends BaseController {
List
<
ContrastTreeVo
>
list
=
contrastService
.
getContrastTree
();
return
R
.
ok
().
setData
(
list
);
}
/**
* 分页查询统计信息
*
* @param contrastQuery
* @return
*/
@ApiOperation
(
value
=
"分页查询"
,
notes
=
""
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"contrastQuery"
,
value
=
"查询实体contrastQuery"
,
required
=
true
,
dataTypeClass
=
ContrastQuery
.
class
)
})
@GetMapping
(
"/statistic"
)
public
R
contrastStatistic
(
ContrastQuery
contrastQuery
)
{
QueryWrapper
<
ContrastEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
contrastQuery
.
getSourceName
()),
"c.source_name"
,
contrastQuery
.
getSourceName
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
contrastQuery
.
getTableName
()),
"c.table_name"
,
contrastQuery
.
getTableName
());
queryWrapper
.
like
(
StrUtil
.
isNotBlank
(
contrastQuery
.
getColumnName
()),
"c.column_name"
,
contrastQuery
.
getColumnName
());
IPage
<
ContrastEntity
>
page
=
contrastService
.
statistic
(
new
Page
<>(
contrastQuery
.
getPageNum
(),
contrastQuery
.
getPageSize
()),
queryWrapper
);
List
<
ContrastStatisticVo
>
collect
=
page
.
getRecords
().
stream
().
map
(
contrastMapper:
:
toSVO
).
collect
(
Collectors
.
toList
());
JsonPage
<
ContrastStatisticVo
>
jsonPage
=
new
JsonPage
<>(
page
.
getCurrent
(),
page
.
getSize
(),
page
.
getTotal
(),
collect
);
return
R
.
ok
().
setData
(
jsonPage
);
}
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/controller/DictMappingController.java
View file @
340ababc
...
...
@@ -2,9 +2,11 @@ package cn.datax.service.data.standard.controller;
import
cn.datax.common.base.BaseController
;
import
cn.datax.common.core.R
;
import
cn.datax.service.data.standard.api.dto.ManualMappingDto
;
import
cn.datax.service.data.standard.service.DictMappingService
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Map
;
...
...
@@ -29,9 +31,15 @@ public class DictMappingController extends BaseController {
return
R
.
ok
();
}
@PostMapping
(
"/manual/{id}"
)
public
R
dictManualMapping
(
@PathVariable
String
id
)
{
dictMappingService
.
dictManualMapping
(
id
);
@PostMapping
(
"/manual"
)
public
R
dictManualMapping
(
@RequestBody
@Validated
ManualMappingDto
manualMappingDto
)
{
dictMappingService
.
dictManualMapping
(
manualMappingDto
);
return
R
.
ok
();
}
@PostMapping
(
"/cancel/{id}"
)
public
R
dictCancelMapping
(
@PathVariable
String
id
)
{
dictMappingService
.
dictCancelMapping
(
id
);
return
R
.
ok
();
}
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/dao/ContrastDao.java
View file @
340ababc
...
...
@@ -2,7 +2,11 @@ package cn.datax.service.data.standard.dao;
import
cn.datax.common.base.BaseDao
;
import
cn.datax.service.data.standard.api.entity.ContrastEntity
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.io.Serializable
;
...
...
@@ -19,4 +23,6 @@ public interface ContrastDao extends BaseDao<ContrastEntity> {
@Override
ContrastEntity
selectById
(
Serializable
id
);
IPage
<
ContrastEntity
>
statistic
(
IPage
<
ContrastEntity
>
page
,
@Param
(
Constants
.
WRAPPER
)
Wrapper
<
ContrastEntity
>
queryWrapper
);
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/mapstruct/ContrastMapper.java
View file @
340ababc
...
...
@@ -3,9 +3,12 @@ package cn.datax.service.data.standard.mapstruct;
import
cn.datax.common.mapstruct.EntityMapper
;
import
cn.datax.service.data.standard.api.dto.ContrastDto
;
import
cn.datax.service.data.standard.api.entity.ContrastEntity
;
import
cn.datax.service.data.standard.api.vo.ContrastStatisticVo
;
import
cn.datax.service.data.standard.api.vo.ContrastVo
;
import
org.mapstruct.Mapper
;
import
java.util.List
;
/**
* <p>
* 对照表信息表 Mapper 实体映射
...
...
@@ -17,4 +20,17 @@ import org.mapstruct.Mapper;
@Mapper
(
componentModel
=
"spring"
)
public
interface
ContrastMapper
extends
EntityMapper
<
ContrastDto
,
ContrastEntity
,
ContrastVo
>
{
/**
* 将源对象转换为VO对象
* @param e
* @return D
*/
ContrastStatisticVo
toSVO
(
ContrastEntity
e
);
/**
* 将源对象集合转换为VO对象集合
* @param es
* @return List<D>
*/
List
<
ContrastStatisticVo
>
toSVO
(
List
<
ContrastEntity
>
es
);
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/service/ContrastService.java
View file @
340ababc
...
...
@@ -4,6 +4,9 @@ import cn.datax.service.data.standard.api.entity.ContrastEntity;
import
cn.datax.service.data.standard.api.dto.ContrastDto
;
import
cn.datax.common.base.BaseService
;
import
cn.datax.service.data.standard.api.vo.ContrastTreeVo
;
import
cn.datax.service.system.api.entity.UserEntity
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.List
;
...
...
@@ -28,4 +31,6 @@ public interface ContrastService extends BaseService<ContrastEntity> {
void
deleteContrastBatch
(
List
<
String
>
ids
);
List
<
ContrastTreeVo
>
getContrastTree
();
IPage
<
ContrastEntity
>
statistic
(
IPage
<
ContrastEntity
>
page
,
Wrapper
<
ContrastEntity
>
queryWrapper
);
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/service/DictMappingService.java
View file @
340ababc
package
cn
.
datax
.
service
.
data
.
standard
.
service
;
import
cn.datax.service.data.standard.api.dto.ManualMappingDto
;
import
java.util.Map
;
public
interface
DictMappingService
{
...
...
@@ -8,5 +10,7 @@ public interface DictMappingService {
void
dictAutoMapping
(
String
id
);
void
dictManualMapping
(
String
id
);
void
dictManualMapping
(
ManualMappingDto
manualMappingDto
);
void
dictCancelMapping
(
String
id
);
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/service/impl/ContrastServiceImpl.java
View file @
340ababc
...
...
@@ -7,6 +7,8 @@ import cn.datax.service.data.standard.service.ContrastService;
import
cn.datax.service.data.standard.mapstruct.ContrastMapper
;
import
cn.datax.service.data.standard.dao.ContrastDao
;
import
cn.datax.common.base.BaseServiceImpl
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -114,4 +116,9 @@ public class ContrastServiceImpl extends BaseServiceImpl<ContrastDao, ContrastEn
}
return
list
;
}
@Override
public
IPage
<
ContrastEntity
>
statistic
(
IPage
<
ContrastEntity
>
page
,
Wrapper
<
ContrastEntity
>
queryWrapper
)
{
return
contrastDao
.
statistic
(
page
,
queryWrapper
);
}
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/java/cn/datax/service/data/standard/service/impl/DictMappingServiceImpl.java
View file @
340ababc
package
cn
.
datax
.
service
.
data
.
standard
.
service
.
impl
;
import
cn.datax.common.core.DataConstant
;
import
cn.datax.service.data.standard.api.dto.Endpoint
;
import
cn.datax.service.data.standard.api.dto.ManualMappingDto
;
import
cn.datax.service.data.standard.api.entity.ContrastDictEntity
;
import
cn.datax.service.data.standard.api.entity.ContrastEntity
;
import
cn.datax.service.data.standard.api.entity.DictEntity
;
...
...
@@ -14,6 +16,7 @@ import cn.datax.service.data.standard.mapstruct.DictMapper;
import
cn.datax.service.data.standard.service.DictMappingService
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -99,7 +102,23 @@ public class DictMappingServiceImpl implements DictMappingService {
}
@Override
public
void
dictManualMapping
(
String
id
)
{
public
void
dictManualMapping
(
ManualMappingDto
manualMappingDto
)
{
List
<
Endpoint
>
endpoints
=
manualMappingDto
.
getEndpoints
();
endpoints
.
stream
().
forEach
(
s
->
{
LambdaUpdateWrapper
<
ContrastDictEntity
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
ContrastDictEntity:
:
getStatus
,
DataConstant
.
TrueOrFalse
.
TRUE
.
getKey
());
updateWrapper
.
set
(
ContrastDictEntity:
:
getContrastGbId
,
s
.
getTargetId
());
updateWrapper
.
eq
(
ContrastDictEntity:
:
getId
,
s
.
getSourceId
());
contrastDictDao
.
update
(
new
ContrastDictEntity
(),
updateWrapper
);
});
}
@Override
public
void
dictCancelMapping
(
String
id
)
{
LambdaUpdateWrapper
<
ContrastDictEntity
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
set
(
ContrastDictEntity:
:
getStatus
,
DataConstant
.
TrueOrFalse
.
FALSE
.
getKey
());
updateWrapper
.
set
(
ContrastDictEntity:
:
getContrastGbId
,
null
);
updateWrapper
.
eq
(
ContrastDictEntity:
:
getId
,
id
);
contrastDictDao
.
update
(
new
ContrastDictEntity
(),
updateWrapper
);
}
}
datax-modules/data-standard-service-parent/data-standard-service/src/main/resources/mapper/ContrastMapper.xml
View file @
340ababc
...
...
@@ -29,6 +29,11 @@
<result
column=
"gb_type_name"
property=
"gbTypeName"
/>
</resultMap>
<resultMap
id=
"ExtendStatisticResultMap"
type=
"cn.datax.service.data.standard.api.entity.ContrastEntity"
extends=
"ExtendResultMap"
>
<result
column=
"mapping_count"
property=
"mappingCount"
/>
<result
column=
"un_mapping_count"
property=
"unMappingCount"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
id,
...
...
@@ -63,4 +68,14 @@
WHERE 1 = 1 AND c.id = #{id}
</select>
<select
id=
"statistic"
resultMap=
"ExtendStatisticResultMap"
>
SELECT t.gb_type_code, t.gb_type_name,
(select count(1) from standard_contrast_dict where contrast_id = c.id and status = 1) as mapping_count,
(select count(1) from standard_contrast_dict where contrast_id = c.id and status = 0) as un_mapping_count,
<include
refid=
"Contrast_Column_List"
><property
name=
"alias"
value=
"c"
/></include>
FROM standard_contrast c
LEFT JOIN standard_type t ON t.id = c.gb_type_id
${ew.customSqlSegment}
</select>
</mapper>
datax-modules/pom.xml
View file @
340ababc
...
...
@@ -25,6 +25,6 @@
<module>
data-masterdata-service-parent
</module>
<module>
data-quality-service-parent
</module>
<module>
workflow-service-parent
</module>
<module>
websocket-service
</module>
<module>
websocket-service
-parent
</module>
</modules>
</project>
datax-modules/websocket-service-parent/pom.xml
0 → 100644
View file @
340ababc
<?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"
>
<parent>
<artifactId>
datax-modules
</artifactId>
<groupId>
cn.datax
</groupId>
<version>
2.0.0
</version>
</parent>
<packaging>
pom
</packaging>
<modelVersion>
4.0.0
</modelVersion>
<version>
2.0.0
</version>
<description>
即时通讯
</description>
<artifactId>
websocket-service-parent
</artifactId>
<modules>
<module>
websocket-service-api
</module>
<module>
websocket-service
</module>
</modules>
</project>
\ No newline at end of file
datax-modules/websocket-service-parent/websocket-service-api/pom.xml
0 → 100644
View file @
340ababc
<?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"
>
<parent>
<artifactId>
websocket-service-parent
</artifactId>
<groupId>
cn.datax
</groupId>
<version>
2.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<version>
2.0.0
</version>
<artifactId>
websocket-service-api
</artifactId>
<dependencies>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-micro-spring-boot-starter
</artifactId>
<version>
${knife4j.version}
</version>
</dependency>
<!--feign 依赖-->
<dependency>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-okhttp
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-core
</artifactId>
<version>
2.0.0
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
datax-modules/websocket-service-parent/websocket-service-api/src/main/resources/META-INF/spring.factories
0 → 100644
View file @
340ababc
org.springframework.boot.autoconfigure.EnableAutoConfiguration=
datax-modules/websocket-service/pom.xml
→
datax-modules/websocket-service
-parent/websocket-service
/pom.xml
View file @
340ababc
...
...
@@ -3,13 +3,12 @@
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"
>
<parent>
<artifactId>
datax-modules
</artifactId>
<artifactId>
websocket-service-parent
</artifactId>
<groupId>
cn.datax
</groupId>
<version>
2.0.0
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<version>
2.0.0
</version>
<description>
即时通讯
</description>
<artifactId>
websocket-service
</artifactId>
<dependencies>
...
...
@@ -34,38 +33,41 @@
<artifactId>
spring-cloud-starter-config
</artifactId>
</dependency>
<dependency>
<groupId>
com.github.xiaoymin
</groupId>
<artifactId>
knife4j-micro
-spring-boot-starter
</artifactId>
<version>
${
knife4j
.version}
</version>
<groupId>
org.t-io
</groupId>
<artifactId>
tio-websocket
-spring-boot-starter
</artifactId>
<version>
${
tio-websocket
.version}
</version>
</dependency>
<!--feign 依赖-->
<dependency>
<groupId>
io.github.openfeign
</groupId>
<artifactId>
feign-okhttp
</artifactId>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct
</artifactId>
<version>
${mapstruct.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct-processor
</artifactId>
<version>
${mapstruct.version}
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-
core
</artifactId>
<artifactId>
datax-common-
mybatis
</artifactId>
<version>
2.0.0
</version>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-
security
</artifactId>
<artifactId>
datax-common-
redis
</artifactId>
<version>
2.0.0
</version>
</dependency>
<dependency>
<groupId>
cn.datax
</groupId>
<artifactId>
datax-common-
redis
</artifactId>
<artifactId>
datax-common-
security
</artifactId>
<version>
2.0.0
</version>
</dependency>
<dependency>
<groupId>
org.t-io
</groupId>
<artifactId>
tio-websocket-spring-boot-starter
</artifactId>
<version>
${tio-websocket.version}
</version>
<groupId>
cn.datax
</groupId>
<artifactId>
websocket-service-api
</artifactId>
<version>
2.0.0
</version>
</dependency>
</dependencies>
...
...
datax-modules/websocket-service/src/main/java/cn/datax/service/websocket/DataxWebsocketApplication.java
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/java/cn/datax/service/websocket/DataxWebsocketApplication.java
View file @
340ababc
package
cn
.
datax
.
service
.
websocket
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.
cloud.client.SpringCloud
Application
;
import
org.springframework.
boot.autoconfigure.SpringBoot
Application
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.tio.websocket.starter.EnableTioWebSocketServer
;
@EnableTioWebSocketServer
@EnableFeignClients
@Spring
Cloud
Application
@Spring
Boot
Application
public
class
DataxWebsocketApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
datax-modules/websocket-service/src/main/java/cn/datax/service/websocket/config/DataResourceServerConfig.java
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/java/cn/datax/service/websocket/config/DataResourceServerConfig.java
View file @
340ababc
File moved
datax-modules/websocket-service/src/main/java/cn/datax/service/websocket/config/StartedUpRunner.java
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/java/cn/datax/service/websocket/config/StartedUpRunner.java
View file @
340ababc
File moved
datax-modules/websocket-service/src/main/java/cn/datax/service/websocket/config/SwaggerConfig.java
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/java/cn/datax/service/websocket/config/SwaggerConfig.java
View file @
340ababc
File moved
datax-modules/websocket-service/src/main/java/cn/datax/service/websocket/config/SwaggerProperties.java
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/java/cn/datax/service/websocket/config/SwaggerProperties.java
View file @
340ababc
File moved
datax-modules/websocket-service/src/main/java/cn/datax/service/websocket/controller/InnerController.java
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/java/cn/datax/service/websocket/controller/InnerController.java
View file @
340ababc
File moved
datax-modules/websocket-service/src/main/java/cn/datax/service/websocket/controller/PushController.java
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/java/cn/datax/service/websocket/controller/PushController.java
View file @
340ababc
File moved
datax-modules/websocket-service
/src/main/java/cn/datax/service/websocket/socket
/MyWsMsgHandler.java
→
datax-modules/websocket-service
-parent/websocket-service/src/main/java/cn/datax/service/websocket/server
/MyWsMsgHandler.java
View file @
340ababc
package
cn
.
datax
.
service
.
websocket
.
s
ocket
;
package
cn
.
datax
.
service
.
websocket
.
s
erver
;
import
org.tio.core.ChannelContext
;
import
org.tio.core.Tio
;
...
...
datax-modules/websocket-service
/src/main/java/cn/datax/service/websocket/socket
/listener/MyAioListener.java
→
datax-modules/websocket-service
-parent/websocket-service/src/main/java/cn/datax/service/websocket/server
/listener/MyAioListener.java
View file @
340ababc
package
cn
.
datax
.
service
.
websocket
.
s
ocket
.
listener
;
package
cn
.
datax
.
service
.
websocket
.
s
erver
.
listener
;
import
org.tio.core.ChannelContext
;
import
org.tio.core.intf.Packet
;
...
...
datax-modules/websocket-service
/src/main/java/cn/datax/service/websocket/socket
/listener/MyGroupListener.java
→
datax-modules/websocket-service
-parent/websocket-service/src/main/java/cn/datax/service/websocket/server
/listener/MyGroupListener.java
View file @
340ababc
package
cn
.
datax
.
service
.
websocket
.
s
ocket
.
listener
;
package
cn
.
datax
.
service
.
websocket
.
s
erver
.
listener
;
import
org.springframework.stereotype.Service
;
import
org.tio.core.ChannelContext
;
import
org.tio.core.intf.GroupListener
;
@Service
public
class
MyGroupListener
implements
GroupListener
{
@Override
...
...
datax-modules/websocket-service
/src/main/java/cn/datax/service/websocket/socket
/listener/MyIpStatListener.java
→
datax-modules/websocket-service
-parent/websocket-service/src/main/java/cn/datax/service/websocket/server
/listener/MyIpStatListener.java
View file @
340ababc
package
cn
.
datax
.
service
.
websocket
.
s
ocket
.
listener
;
package
cn
.
datax
.
service
.
websocket
.
s
erver
.
listener
;
import
org.tio.core.ChannelContext
;
import
org.tio.core.TioConfig
;
...
...
datax-modules/websocket-service/src/main/resources/bootstrap.yml
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/resources/bootstrap.yml
View file @
340ababc
...
...
@@ -25,4 +25,4 @@ eureka:
instance-info-replication-interval-seconds
:
30
registry-fetch-interval-seconds
:
3
service-url
:
defaultZone
:
http://localhost:8610/eureka
\ No newline at end of file
defaultZone
:
http://localhost:8610/eureka
datax-modules/websocket-service/src/main/resources/logback-spring.xml
→
datax-modules/websocket-service
-parent/websocket-service
/src/main/resources/logback-spring.xml
View file @
340ababc
File moved
datax-modules/websocket-service-parent/websocket-service/src/main/resources/spy.properties
0 → 100644
View file @
340ababc
module.log
=
com.p6spy.engine.logging.P6LogFactory,com.p6spy.engine.outage.P6OutageFactory
# 自定义日志打印
logMessageFormat
=
com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
#日志输出到控制台
appender
=
com.baomidou.mybatisplus.extension.p6spy.StdoutLogger
# 使用日志系统记录 sql
#appender=com.p6spy.engine.spy.appender.Slf4JLogger
# 设置 p6spy driver 代理
deregisterdrivers
=
true
# 取消JDBC URL前缀
useprefix
=
true
# 配置记录 Log 例外,可去掉的结果集有error,info,batch,debug,statement,commit,rollback,result,resultset.
excludecategories
=
info,debug,result,batch,resultset
# 日期格式
dateformat
=
yyyy-MM-dd HH:mm:ss
# 实际驱动可多个
#driverlist=org.h2.Driver
# 是否开启慢SQL记录
outagedetection
=
true
# 慢SQL记录标准 2 秒
outagedetectioninterval
=
2
# 开启过滤
filter
=
true
# 配置不打印的内容
exclude
=
select 1
\ No newline at end of file
datax-ui/src/api/standard/contrast.js
View file @
340ababc
...
...
@@ -30,3 +30,11 @@ export function delContrast(id) {
method
:
'delete'
})
}
export
function
contrastStatistic
(
data
)
{
return
request
({
url
:
'/data/standard/contrasts/statistic'
,
method
:
'get'
,
params
:
data
})
}
datax-ui/src/api/standard/dictmapping.js
View file @
340ababc
...
...
@@ -13,3 +13,18 @@ export function dictAutoMapping(id) {
method
:
'post'
})
}
export
function
dictManualMapping
(
data
)
{
return
request
({
url
:
'/data/standard/mappings/manual'
,
method
:
'post'
,
data
:
data
})
}
export
function
dictCancelMapping
(
id
)
{
return
request
({
url
:
'/data/standard/mappings/cancel/'
+
id
,
method
:
'post'
})
}
datax-ui/src/views/standard/contrastrelease/index.vue
deleted
100644 → 0
View file @
c0e6fb69
<
template
>
<div
class=
"app-container"
>
ContrastRelease
</div>
</
template
>
<
script
>
export
default
{
name
:
'ContrastRelease'
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
datax-ui/src/views/standard/contrastresult/index.vue
deleted
100644 → 0
View file @
c0e6fb69
<
template
>
<div
class=
"app-container"
>
ContrastResult
</div>
</
template
>
<
script
>
export
default
{
name
:
'ContrastResult'
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
datax-ui/src/views/standard/contraststatistic/ContrastStatisticList.vue
0 → 100644
View file @
340ababc
<
template
>
<el-card
class=
"box-card"
shadow=
"always"
>
<el-form
ref=
"queryForm"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"数据源"
prop=
"sourceName"
>
<el-input
v-model=
"queryParams.sourceName"
placeholder=
"请输入数据源"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"数据表"
prop=
"tableName"
>
<el-input
v-model=
"queryParams.tableName"
placeholder=
"请输入数据表"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"对照字段"
prop=
"columnName"
>
<el-input
v-model=
"queryParams.columnName"
placeholder=
"请输入对照字段"
clearable
size=
"small"
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-col
:span=
"12"
>
<el-button-group>
</el-button-group>
</el-col>
<el-col
:span=
"12"
>
<div
class=
"right-toolbar"
>
<el-tooltip
content=
"密度"
effect=
"dark"
placement=
"top"
>
<el-dropdown
trigger=
"click"
@
command=
"handleCommand"
>
<el-button
circle
size=
"mini"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"colum-height"
/>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"medium"
>
正常
</el-dropdown-item>
<el-dropdown-item
command=
"small"
>
中等
</el-dropdown-item>
<el-dropdown-item
command=
"mini"
>
紧凑
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-tooltip>
<el-tooltip
content=
"刷新"
effect=
"dark"
placement=
"top"
>
<el-button
circle
size=
"mini"
@
click=
"handleRefresh"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"shuaxin"
/>
</el-button>
</el-tooltip>
<el-tooltip
content=
"列设置"
effect=
"dark"
placement=
"top"
>
<el-popover
placement=
"bottom"
width=
"100"
trigger=
"click"
>
<el-checkbox-group
v-model=
"checkedTableColumns"
@
change=
"handleCheckedColsChange"
>
<el-checkbox
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.prop"
>
{{
item
.
label
}}
</el-checkbox>
</el-checkbox-group>
<span
slot=
"reference"
>
<el-button
circle
size=
"mini"
>
<svg-icon
class-name=
"size-icon"
icon-class=
"shezhi"
/>
</el-button>
</span>
</el-popover>
</el-tooltip>
</div>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"tableDataList"
border
tooltip-effect=
"dark"
:size=
"tableSize"
:height=
"tableHeight"
style=
"width: 100%;margin: 15px 0;"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"序号"
width=
"55"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<
template
v-for=
"(item, index) in tableColumns"
>
<el-table-column
v-if=
"item.show"
:key=
"index"
:prop=
"item.prop"
:label=
"item.label"
:formatter=
"item.formatter"
align=
"center"
show-overflow-tooltip
/>
</
template
>
</el-table>
<el-pagination
:page-sizes=
"[10, 20, 50, 100]"
layout=
"total, sizes, prev, pager, next, jumper"
:current-page
.
sync=
"queryParams.pageNum"
:page-size
.
sync=
"queryParams.pageSize"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</el-card>
</template>
<
script
>
import
{
contrastStatistic
}
from
'@/api/standard/contrast'
export
default
{
name
:
'ContrastStatisticList'
,
data
()
{
return
{
tableHeight
:
document
.
body
.
offsetHeight
-
310
+
'px'
,
// 展示切换
showOptions
:
{
data
:
{},
showList
:
true
},
// 遮罩层
loading
:
true
,
// 表格头
tableColumns
:
[
{
prop
:
'sourceName'
,
label
:
'数据源'
,
show
:
true
},
{
prop
:
'tableName'
,
label
:
'数据表'
,
show
:
true
},
{
prop
:
'columnName'
,
label
:
'对照字段'
,
show
:
true
},
{
prop
:
'gbTypeCode'
,
label
:
'标准类别编码'
,
show
:
true
},
{
prop
:
'gbTypeName'
,
label
:
'标准类别名称'
,
show
:
true
},
{
prop
:
'mappingCount'
,
label
:
'对照数量'
,
show
:
true
},
{
prop
:
'unMappingCount'
,
label
:
'未对照数量'
,
show
:
true
},
{
prop
:
'mappingPercent'
,
label
:
'对照比例'
,
show
:
true
,
formatter
:
this
.
mappingFormatter
}
],
// 默认选择中表格头
checkedTableColumns
:
[],
tableSize
:
'medium'
,
// 表格数据
tableDataList
:
[],
// 总数据条数
total
:
0
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
20
,
sourceName
:
''
,
tableName
:
''
,
columnName
:
''
}
}
},
created
()
{
this
.
getList
()
},
mounted
()
{
this
.
initCols
()
},
methods
:
{
/** 查询数据源列表 */
getList
()
{
this
.
loading
=
true
contrastStatistic
(
this
.
queryParams
).
then
(
response
=>
{
this
.
loading
=
false
if
(
response
.
success
)
{
const
{
data
}
=
response
this
.
tableDataList
=
data
.
data
this
.
total
=
data
.
total
}
})
},
initCols
()
{
this
.
checkedTableColumns
=
this
.
tableColumns
.
map
(
col
=>
col
.
prop
)
},
handleCheckedColsChange
(
val
)
{
this
.
tableColumns
.
forEach
(
col
=>
{
if
(
!
this
.
checkedTableColumns
.
includes
(
col
.
prop
))
{
col
.
show
=
false
}
else
{
col
.
show
=
true
}
})
},
handleCommand
(
command
)
{
this
.
tableSize
=
command
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
this
.
getList
()
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
20
,
sourceName
:
''
,
tableName
:
''
,
columnName
:
''
}
this
.
handleQuery
()
},
/** 刷新列表 */
handleRefresh
()
{
this
.
getList
()
},
handleSizeChange
(
val
)
{
console
.
log
(
`每页
${
val
}
条`
)
this
.
queryParams
.
pageNum
=
1
this
.
queryParams
.
pageSize
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
console
.
log
(
`当前页:
${
val
}
`
)
this
.
queryParams
.
pageNum
=
val
this
.
getList
()
},
mappingFormatter
(
row
,
column
,
cellValue
,
index
)
{
return
Math
.
round
(
parseFloat
(
row
.
mappingCount
)
/
(
parseFloat
(
row
.
mappingCount
)
+
parseFloat
(
row
.
unMappingCount
))
*
10000
)
/
100.00
+
'%'
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.right-toolbar
{
float
:
right
;
}
.el-card
::v-deep
.el-card__body
{
height
:
calc
(
100vh
-
170px
);
}
</
style
>
datax-ui/src/views/standard/contraststatistic/index.vue
0 → 100644
View file @
340ababc
<
template
>
<div
class=
"app-container"
>
<transition
name=
"el-zoom-in-center"
>
<contrast-statistic-list
v-if=
"options.showList"
@
showCard=
"showCard"
/>
</transition>
</div>
</
template
>
<
script
>
import
ContrastStatisticList
from
'./ContrastStatisticList'
export
default
{
name
:
'ContrastStatistic'
,
components
:
{
ContrastStatisticList
},
data
()
{
return
{
options
:
{
data
:
{},
showList
:
true
}
}
},
methods
:
{
showCard
(
data
)
{
Object
.
assign
(
this
.
options
,
data
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
datax-ui/src/views/standard/dictmapping/index.vue
View file @
340ababc
...
...
@@ -103,7 +103,7 @@
<
script
>
import
{
getContrastTree
}
from
'@/api/standard/contrast'
import
{
getDictMapping
,
dictAutoMapping
}
from
'@/api/standard/dictmapping'
import
{
getDictMapping
,
dictAutoMapping
,
dictManualMapping
,
dictCancelMapping
}
from
'@/api/standard/dictmapping'
import
{
jsPlumb
}
from
'jsplumb'
export
default
{
...
...
@@ -220,6 +220,7 @@ export default {
strokeWidth
:
4
}
}
this
.
connEndpoints
=
[]
// 清除端点、连接
_this
.
jsPlumb
.
reset
()
// 设置监听事件
...
...
@@ -279,7 +280,16 @@ export default {
})
},
handleManual
()
{
console
.
log
(
this
.
connEndpoints
)
if
(
this
.
connEndpoints
.
length
>
0
)
{
dictManualMapping
({
endpoints
:
this
.
connEndpoints
}).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'对照成功'
)
this
.
getDictMapping
()
}
})
}
else
{
this
.
$message
.
warning
(
'请先设置对照关系'
)
}
},
handleCancel
(
id
)
{
console
.
log
(
id
)
...
...
@@ -288,6 +298,12 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
dictCancelMapping
(
id
).
then
(
response
=>
{
if
(
response
.
success
)
{
this
.
$message
.
success
(
'取消对照成功'
)
this
.
getDictMapping
()
}
})
}).
catch
(()
=>
{
})
}
...
...
pom.xml
View file @
340ababc
...
...
@@ -30,8 +30,8 @@
<spring-cloud.version>
Hoxton.SR7
</spring-cloud.version>
<spring-boot-admin.version>
2.2.4
</spring-boot-admin.version>
<fastjson.version>
1.2.7
3
</fastjson.version>
<hutool.version>
5.
3.10
</hutool.version>
<fastjson.version>
1.2.7
4
</fastjson.version>
<hutool.version>
5.
4.4
</hutool.version>
<mybatis-plus.version>
3.3.2
</mybatis-plus.version>
<dynamic-datasource.version>
3.2.0
</dynamic-datasource.version>
<p6spy.version>
3.8.7
</p6spy.version>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment