...
|
...
|
@@ -3,7 +3,7 @@ |
|
|
## 源文件管理
|
|
|
|
|
|
- 文件列表 - list
|
|
|
- 上传 - 上传oss / 创建file
|
|
|
- 上传 - 上传 oss / 创建 file
|
|
|
- 加载 - loadDataTable
|
|
|
- 编辑 - editDataTable
|
|
|
- 持久化 - flushDataTable
|
...
|
...
|
@@ -11,7 +11,6 @@ |
|
|
- 删除 - delete
|
|
|
- 操作日志 - log
|
|
|
|
|
|
|
|
|
- editDataTable params 列表
|
|
|
|
|
|
### 加载表格数据 loadDataTable - 查询
|
...
|
...
|
@@ -20,15 +19,15 @@ |
|
|
{
|
|
|
"fileId": 1,
|
|
|
"where": [
|
|
|
{
|
|
|
"field": {
|
|
|
"index": 1,
|
|
|
"name": "产品名称"
|
|
|
},
|
|
|
"in": ["a","b"],
|
|
|
"ex": ["c","d"],
|
|
|
"sort": ["a","asc"]
|
|
|
}
|
|
|
{
|
|
|
"field": {
|
|
|
"index": 1,
|
|
|
"name": "产品名称"
|
|
|
},
|
|
|
"in": ["a", "b"],
|
|
|
"ex": ["c", "d"],
|
|
|
"sort": ["a", "asc"]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
...
|
...
|
@@ -37,153 +36,413 @@ |
|
|
|
|
|
```json
|
|
|
{
|
|
|
"field": {
|
|
|
"index": 1,
|
|
|
"name": "产品名称"
|
|
|
},
|
|
|
"operation": {
|
|
|
"desc": ["拆分","按字符数"],
|
|
|
"code": "split_by_char_number"
|
|
|
},
|
|
|
"params": []
|
|
|
"field": {
|
|
|
"index": 1,
|
|
|
"name": "产品名称"
|
|
|
},
|
|
|
"operation": {
|
|
|
"desc": ["拆分", "按字符数"],
|
|
|
"code": "split_by_char_number"
|
|
|
},
|
|
|
"params": []
|
|
|
}
|
|
|
```
|
|
|
|
|
|
精简
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"field": "产品名称",
|
|
|
"desc": ["拆分","按字符数"],
|
|
|
"operationCode": "split_by_char_number",
|
|
|
"params": []
|
|
|
"field": "产品名称",
|
|
|
"desc": ["拆分", "按字符数"],
|
|
|
"operationCode": "split_by_char_number",
|
|
|
"params": []
|
|
|
}
|
|
|
```
|
|
|
|
|
|
`params 列表`
|
|
|
|
|
|
|
|
|
### 数据展示
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"code": 0,
|
|
|
"data": {
|
|
|
"dataFields": [
|
|
|
{
|
|
|
"index": 1,
|
|
|
"name": "产品名称",
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"index": 2,
|
|
|
"name": "产品数量",
|
|
|
"type": "int"
|
|
|
}
|
|
|
],
|
|
|
"dataRows": [
|
|
|
[
|
|
|
"素面",
|
|
|
200
|
|
|
],
|
|
|
[
|
|
|
"冻豆腐",
|
|
|
400
|
|
|
],
|
|
|
[
|
|
|
"冻豆腐1",
|
|
|
300
|
|
|
],
|
|
|
[
|
|
|
"冻豆2",
|
|
|
"A"
|
|
|
]
|
|
|
],
|
|
|
"total": 100,
|
|
|
"pageNumber": 1,
|
|
|
"inValidCells": [
|
|
|
{
|
|
|
"x": 1,
|
|
|
"y": 3,
|
|
|
"error": "不是一个有效的数值"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
"msg": "ok"
|
|
|
"code": 0,
|
|
|
"data": {
|
|
|
"dataFields": [
|
|
|
{
|
|
|
"index": 1,
|
|
|
"name": "产品名称",
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"index": 2,
|
|
|
"name": "产品数量",
|
|
|
"type": "int"
|
|
|
}
|
|
|
],
|
|
|
"dataRows": [
|
|
|
["素面", 200],
|
|
|
["冻豆腐", 400],
|
|
|
["冻豆腐1", 300],
|
|
|
["冻豆2", "A"]
|
|
|
],
|
|
|
"total": 100,
|
|
|
"pageNumber": 1,
|
|
|
"inValidCells": [
|
|
|
{
|
|
|
"x": 1,
|
|
|
"y": 3,
|
|
|
"error": "不是一个有效的数值"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
"msg": "ok"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
|
|
|
## 表关联关系
|
|
|
|
|
|
- [x] 可追加数据的表列表 /tables/search-appended-list
|
|
|
- [x] 校验文件列表 /files/search-verified-file
|
|
|
- [x] 匹配方案列表 /mapping-rule-config/search
|
|
|
- [x] 匹配方案主表 /mapping-rule-config/prepare //主表 校验表 主表字段 校验文件表字段
|
|
|
- [x] 匹配方案添加 /mapping-rule-config/
|
|
|
- [x] 匹配方案删除 /mapping-rule-config/:id
|
|
|
- [x] 追加数据到表格 /append-data-to-table // 验证是否追加过
|
|
|
- [ ] 取消校验中的文件 /cancel-verifying-file //
|
|
|
|
|
|
- [x] 表结构更新 /tables/update-table-struct
|
|
|
- [x] 表结构添加 /tables/add-table-struct
|
|
|
- [x] 分表列表 /tables/search
|
|
|
- [x] 表复制 /tables/copy-data-table
|
|
|
- [x] 表删除 /tables/:id // 若是删除主表,需级联删除关联的分表,删除内容包括表数据及表结构;? 分表的副表是否要删除
|
|
|
- [x] 表详情 /tables/:id // 表结构
|
|
|
- [x] 表更新 /tables/:id // 表结构、分表才可以编辑
|
|
|
|
|
|
- [x] 日志搜索 /log/search
|
|
|
- [x] 校验步骤日志 /log/verified-step-Log
|
|
|
- [x] 可追加数据的表列表 /tables/search-appended-list
|
|
|
- [x] 校验文件列表 /files/search-verified-file
|
|
|
- [x] 匹配方案列表 /mapping-rule-config/search
|
|
|
- [x] 匹配方案主表 /mapping-rule-config/prepare //主表 校验表 主表字段 校验文件表字段
|
|
|
- [x] 匹配方案添加 /mapping-rule-config/
|
|
|
- [x] 匹配方案删除 /mapping-rule-config/:id
|
|
|
- [x] 追加数据到表格 /append-data-to-table // 验证是否追加过
|
|
|
- [ ] 取消校验中的文件 /cancel-verifying-file //
|
|
|
|
|
|
- [x] 表结构更新 /tables/update-table-struct
|
|
|
- [x] 表结构添加 /tables/add-table-struct
|
|
|
- [x] 分表列表 /tables/search
|
|
|
- [x] 表复制 /tables/copy-data-table
|
|
|
- [x] 表删除 /tables/:id // 若是删除主表,需级联删除关联的分表,删除内容包括表数据及表结构;? 分表的副表是否要删除
|
|
|
- [x] 表详情 /tables/:id // 表结构
|
|
|
- [x] 表更新 /tables/:id // 表结构、分表才可以编辑
|
|
|
|
|
|
- [x] 日志搜索 /log/search
|
|
|
- [x] 校验步骤日志 /log/verified-step-Log
|
|
|
|
|
|
## 数据预览
|
|
|
- [x] 表数据预览(格式) /table/preview
|
|
|
- [x] 表数据自定义查询 /table/preview where conditions 升序、降序 包含、不包含
|
|
|
- [x] 表数据字段可选值搜索 /table/field-optional 文本匹配
|
|
|
|
|
|
- [x] 表数据预览(格式) /table/preview
|
|
|
- [x] 表数据自定义查询 /table/preview where conditions 升序、降序 包含、不包含
|
|
|
- [x] 表数据字段可选值搜索 /table/field-optional 文本匹配
|
|
|
- [x] 表数据更新、添加、删除 /table/row-data-mutation
|
|
|
- [x] 表数据导出 /table/export-table
|
|
|
- [x] 表数据导出 /table/export-table
|
|
|
|
|
|
## 数据验证
|
|
|
|
|
|
- [x] 文件验证 /data/edit-data-table
|
|
|
- [x] 文件验证 /data/edit-data-table
|
|
|
|
|
|
## 底层字库接口
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"file": {},
|
|
|
"fields": [],
|
|
|
"action":"filed_rename",
|
|
|
"params": ["产品名2"]
|
|
|
}
|
|
|
```
|
|
|
- [x] 数据预览 1
|
|
|
- [ ] 表格编辑 1
|
|
|
- [ ] 保存校验文件 (文件地址) 1
|
|
|
- [x] 表格编辑 1
|
|
|
- [x] 保存校验文件 (文件地址) 1
|
|
|
- [x] 生成主表 1
|
|
|
- [x] 表复制 (副表)1
|
|
|
- [x] 追加数据 (主表、副表)
|
|
|
- [ ] 表删除 (主表、副表)~~、分表~~
|
|
|
- [x] 表拆分 1
|
|
|
- [ ] 更新表结构(分表)1
|
|
|
- [ ] 编辑、添加、删除表数据(副表) 1
|
|
|
- [x] 更新表结构(分表)1
|
|
|
- [x] 编辑、添加、删除表数据(副表) 1
|
|
|
- [ ] 取消校验
|
|
|
|
|
|
## 定时作业
|
|
|
|
|
|
- [x] 隔天清理校验中的文件
|
|
|
- [x] 隔天清理public临时文件
|
|
|
- [x] 隔天清理 public 临时文件
|
|
|
|
|
|
## 表数据导出
|
|
|
|
|
|
- [ ] 加锁,只允许当前用户同时只能发起一次导出命令 ,3min过期
|
|
|
- [ ] 加锁,只允许当前用户同时只能发起一次导出命令 ,3min 过期
|
|
|
- [ ] 单次拉取数量 MR
|
|
|
- [ ] 100W ..
|
|
|
- [ ] 50W 120s 读取数据库:30s 保存文件:10s 下载:30M/500K=60S;RAR压缩 24M/500k=50S
|
|
|
- [ ] 20W ..
|
|
|
- [ ] 10W ..
|
|
|
- [ ] 保存单个文件、压缩 | 保存多个文件、压缩
|
|
|
- [ ] 100W ..
|
|
|
- [ ] 50W 120s 读取数据库:30s 保存文件:10s 下载:30M/500K=60S;RAR 压缩 24M/500k=50S
|
|
|
- [ ] 20W ..
|
|
|
- [ ] 10W ..
|
|
|
- [ ] 保存单个文件、压缩 | 保存多个文件、压缩
|
|
|
|
|
|
## 讨论事项
|
|
|
|
|
|
- [ ] 校验动作,参数模型讨论
|
|
|
- [ ] 校验日志错误(标红)
|
|
|
- [ ] 校验完毕应答实体,类型修改即使错误,也要返回修改完毕的表 |
|
|
\ No newline at end of file |
|
|
- [ ] 校验完毕应答实体,类型修改即使错误,也要返回修改完毕的表
|
|
|
|
|
|
## 参数说明
|
|
|
|
|
|
### 通用格式
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"objectId": 1,
|
|
|
"processFields": [],
|
|
|
"action": "xx",
|
|
|
"params": {}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
processFields:操作字段
|
|
|
|
|
|
### 常规
|
|
|
|
|
|
1. 删除列
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "remove-column",
|
|
|
"params": {}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
2. 复制列
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "copy-column",
|
|
|
"params": {}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
3. 重命名
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "rename-column",
|
|
|
"params": {
|
|
|
"newColumnName": "新的列名称"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
4. 替换值
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "replace-column",
|
|
|
"params": {
|
|
|
"replaceMethod": "replace",
|
|
|
"searchValue": "搜索值",
|
|
|
"replaceValue": "替换值"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
参数说明
|
|
|
|
|
|
```
|
|
|
replaceMethod: 替换方法(1.replace:替换值 2.add-prefix:添加前缀 3.add-postfix:添加后缀 4.remove-prefix:去除前缀 5.remove-postfix:去除后缀 6.remove-chars:去除固定字符 7.clean:清除)
|
|
|
searchValue: 搜索值-replace,remove-prefix,remove-postfix,remove-chars参数
|
|
|
replaceValue: 替换值-replace,add-prefix,add-postfix参数
|
|
|
```
|
|
|
|
|
|
### 格式 formatMethod
|
|
|
|
|
|
1. 大写
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "format-column",
|
|
|
"params": {
|
|
|
"formatMethod": "upper"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
参数说明
|
|
|
|
|
|
```
|
|
|
formatMethod: 格式化方法(1.upper:大写2.lower:小写3.capitalize:首字母大写4.strip:修整)
|
|
|
```
|
|
|
|
|
|
2. 小写
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "format-column",
|
|
|
"params": {
|
|
|
"formatMethod": "lower"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
3. 首字母大写
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "format-column",
|
|
|
"params": {
|
|
|
"formatMethod": "capitalize"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
4. 清除
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "replace-column",
|
|
|
"params": {
|
|
|
"replaceMethod": "clean"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
5. 修整
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "format-column",
|
|
|
"params": {
|
|
|
"formatMethod": "strip"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
6. 添加前缀
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "replace-column",
|
|
|
"params": {
|
|
|
"replaceMethod": "add-prefix",
|
|
|
"replaceValue": "前缀值"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
7. 添加后缀
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "replace-column",
|
|
|
"params": {
|
|
|
"replaceMethod": "add-postfix",
|
|
|
"replaceValue": "后缀值"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
8. 去除前缀
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "replace-column",
|
|
|
"params": {
|
|
|
"replaceMethod": "remove-prefix",
|
|
|
"searchValue": "前缀值"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
9. 去除后最
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "replace-column",
|
|
|
"params": {
|
|
|
"replaceMethod": "remove-postfix",
|
|
|
"searchValue": "后缀值"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
10. 去除固定字符
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "replace-column",
|
|
|
"params": {
|
|
|
"replaceMethod": "remove-chars",
|
|
|
"searchValue": "字符"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### 拆分 split-column
|
|
|
|
|
|
1. 按分隔符
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "split-column",
|
|
|
"params": {
|
|
|
"splitMethod": "separator",
|
|
|
"separator": "|",
|
|
|
"splitDirection": "left",
|
|
|
"splitCount": "1"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
参数说明
|
|
|
|
|
|
```
|
|
|
separator: 分割符号 ‘|’
|
|
|
splitDirection: 拆分方向(1.left:从左边 2.right:从右边)-separator专属参数
|
|
|
splitCount: 拆分次数-separator专属参数
|
|
|
```
|
|
|
|
|
|
2. 按字符数
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "split-column",
|
|
|
"params": {
|
|
|
"splitMethod": "char-length",
|
|
|
"charLength": 10
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
参数说明
|
|
|
|
|
|
```
|
|
|
charLength: 字符长度-char-length专属参数
|
|
|
```
|
|
|
|
|
|
### 提取 extract-column
|
|
|
|
|
|
1. 按日期
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "extract-column",
|
|
|
"params": {
|
|
|
"extractMethod": "by-date"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
参数说明
|
|
|
|
|
|
```
|
|
|
extractMethod: 提取方法(1.by-date:按日期 2.by-number:按数值)
|
|
|
```
|
|
|
|
|
|
2. 按数值 action
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "extract-column",
|
|
|
"params": {
|
|
|
"extractMethod": "by-number"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### 修改字段类型
|
|
|
|
|
|
```json
|
|
|
{
|
|
|
"action": "convert-column-type",
|
|
|
"params": {
|
|
|
"convertType": "STRING"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
参数说明
|
|
|
|
|
|
```
|
|
|
convertType:转换类型 STRING 数值: INT 小数: FLOAT 日期: DATE 时间: DATETIME
|
|
|
``` |
...
|
...
|
|