Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
位宇华
klck
Commits
b59bab67
Commit
b59bab67
authored
Dec 21, 2023
by
hehongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清洗规则修改功能
parent
ea14c1df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
391 additions
and
357 deletions
+391
-357
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
...ystem/service/impl/ActSuppliesHistorydataServiceImpl.java
+46
-43
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
+345
-314
No files found.
ruoyi-supplies/src/main/java/com/ruoyi/system/service/impl/ActSuppliesHistorydataServiceImpl.java
View file @
b59bab67
...
@@ -335,7 +335,10 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
...
@@ -335,7 +335,10 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
actSuppliesImportCleaning
.
setDepartmentColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"DepartmentColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaning
.
setDepartmentColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"DepartmentColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaning
.
setNumberColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaning
.
setNumberColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaning
.
setMoneyColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaning
.
setMoneyColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)
-
1
)].
getV
());
Object
dateColumn
=
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
);
if
(
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
).
hashCode
()>
0
){
actSuppliesImportCleaning
.
setDateColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
)
-
1
)].
getV
());
actSuppliesImportCleaning
.
setDateColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][((
int
)
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
)
-
1
)].
getV
());
}
//actSuppliesImportCleaning.setDateColumn(actOperation2s.get(i).getActOperation2()[x][JSON.parseObject(actOperation2s.get(i).getHistoryRole()).getInteger("DateColumn")].getV());
//actSuppliesImportCleaning.setDateColumn(actOperation2s.get(i).getActOperation2()[x][JSON.parseObject(actOperation2s.get(i).getHistoryRole()).getInteger("DateColumn")].getV());
//新增一条生成表数据
//新增一条生成表数据
actSuppliesCleaningRuleMapper
.
addActSuppliesImportCleaning
(
actSuppliesImportCleaning
);
actSuppliesCleaningRuleMapper
.
addActSuppliesImportCleaning
(
actSuppliesImportCleaning
);
...
@@ -351,48 +354,48 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
...
@@ -351,48 +354,48 @@ public class ActSuppliesHistorydataServiceImpl implements IActSuppliesHistorydat
for
(
int
i
=
0
;
i
<
actOperation2s
.
size
();
i
++)
{
//
for (int i = 0; i < actOperation2s.size(); i++) {
//
//获取导入excel表数据存储到生成表实体类中
//
//获取导入excel表数据存储到生成表实体类中
for
(
int
x
=
0
;
x
<
actOperation2s
.
get
(
i
).
getActOperation2
().
length
;
x
++)
{
//
for (int x = 0; x < actOperation2s.get(i).getActOperation2().length; x++) {
//判断数据是否为空,为空结束循环
//
//判断数据是否为空,为空结束循环
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]
!=
null
)
{
//
if (actOperation2s.get(i).getActOperation2()[x] != null) {
ActSuppliesImportCleaning
actSuppliesImportCleaning
=
new
ActSuppliesImportCleaning
();
//
ActSuppliesImportCleaning actSuppliesImportCleaning = new ActSuppliesImportCleaning();
//
UUID
uuid
=
UUID
.
randomUUID
();
//
UUID uuid = UUID.randomUUID();
String
s
=
StringUtils
.
remove
(
uuid
.
toString
(),
'-'
);
//
String s = StringUtils.remove(uuid.toString(), '-');
actSuppliesImportCleaning
.
setId
(
s
);
//
actSuppliesImportCleaning.setId(s);
actSuppliesImportCleaning
.
setRoleId
(
actOperation2s
.
get
(
i
).
gethId
());
//
actSuppliesImportCleaning.setRoleId(actOperation2s.get(i).gethId());
actSuppliesImportCleaning
.
setDate
(
actOperation2s
.
get
(
i
).
gethDate
());
//
actSuppliesImportCleaning.setDate(actOperation2s.get(i).gethDate());
actSuppliesImportCleaning
.
setSskId
(
actOperation2s
.
get
(
i
).
getMining
());
//
actSuppliesImportCleaning.setSskId(actOperation2s.get(i).getMining());
//获取数组x行的真实非空长度
//
//获取数组x行的真实非空长度
List
<
Object
>
actOperation2s1
=
Arrays
.
asList
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]);
//
List<Object> actOperation2s1 = Arrays.asList(actOperation2s.get(i).getActOperation2()[x]);
long
count
=
Arrays
.
stream
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
]).
filter
(
Objects:
:
nonNull
).
count
();
//
long count = Arrays.stream(actOperation2s.get(i).getActOperation2()[x]).filter(Objects::nonNull).count();
//
//循环保存到实体类字段中
//
//循环保存到实体类字段中
for
(
int
y
=
0
;
y
<
count
;
y
++)
{
//
for (int y = 0; y < count; y++) {
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
]
!=
null
)
{
//
if (actOperation2s.get(i).getActOperation2()[x][y] != null) {
if
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][
y
].
getV
()
!=
null
)
{
//
if (actOperation2s.get(i).getActOperation2()[x][y].getV() != null) {
//[{"HeaderRow": 1, "CodeColumn": 6, "DateColumn": 5, "NameColumn": 7, "MoneyColumn": 12, "NumberColumn": 11, "DepartmentColumn": 2}]
//
//[{"HeaderRow": 1, "CodeColumn": 6, "DateColumn": 5, "NameColumn": 7, "MoneyColumn": 12, "NumberColumn": 11, "DepartmentColumn": 2}]
JSONArray
parse
=
(
JSONArray
)
JSONArray
.
parse
(
actOperation2s
.
get
(
i
).
getHistoryRole
());
//
JSONArray parse = (JSONArray) JSONArray.parse(actOperation2s.get(i).getHistoryRole());
actSuppliesImportCleaning
.
setNameColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][(
int
)
parse
.
getJSONObject
(
0
).
get
(
"NameColumn"
)-
1
].
getV
());
//
actSuppliesImportCleaning.setNameColumn(actOperation2s.get(i).getActOperation2()[x][(int) parse.getJSONObject(0).get("NameColumn")-1].getV());
actSuppliesImportCleaning
.
setCodeColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][(
int
)
parse
.
getJSONObject
(
0
).
get
(
"CodeColumn"
)-
1
].
getV
());
//
actSuppliesImportCleaning.setCodeColumn(actOperation2s.get(i).getActOperation2()[x][(int) parse.getJSONObject(0).get("CodeColumn")-1].getV());
actSuppliesImportCleaning
.
setDepartmentColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][(
int
)
parse
.
getJSONObject
(
0
).
get
(
"DepartmentColumn"
)-
1
].
getV
());
//
actSuppliesImportCleaning.setDepartmentColumn(actOperation2s.get(i).getActOperation2()[x][(int) parse.getJSONObject(0).get("DepartmentColumn")-1].getV());
actSuppliesImportCleaning
.
setNumberColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][(
int
)
parse
.
getJSONObject
(
0
).
get
(
"NumberColumn"
)-
1
].
getV
());
//
actSuppliesImportCleaning.setNumberColumn(actOperation2s.get(i).getActOperation2()[x][(int) parse.getJSONObject(0).get("NumberColumn")-1].getV());
actSuppliesImportCleaning
.
setMoneyColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][(
int
)
parse
.
getJSONObject
(
0
).
get
(
"MoneyColumn"
)-
1
].
getV
());
//
actSuppliesImportCleaning.setMoneyColumn(actOperation2s.get(i).getActOperation2()[x][(int) parse.getJSONObject(0).get("MoneyColumn")-1].getV());
actSuppliesImportCleaning
.
setDateColumn
(
actOperation2s
.
get
(
i
).
getActOperation2
()[
x
][(
int
)
parse
.
getJSONObject
(
0
).
get
(
"DateColumn"
)-
1
].
getV
());
//
actSuppliesImportCleaning.setDateColumn(actOperation2s.get(i).getActOperation2()[x][(int) parse.getJSONObject(0).get("DateColumn")-1].getV());
}
//
}
}
//
}
//
}
//
}
//新增一条生成表数据
//
//新增一条生成表数据
actSuppliesCleaningRuleMapper
.
addActSuppliesImportCleaning
(
actSuppliesImportCleaning
);
//
actSuppliesCleaningRuleMapper.addActSuppliesImportCleaning(actSuppliesImportCleaning);
}
else
{
//
} else {
break
;
//
break;
}
//
}
//
}
//
}
}
//
}
String
[]
attributes
=
new
String
[
200
];
String
[]
attributes
=
new
String
[
200
];
...
...
ruoyi-ui/src/views/system/suppliesroledetail/index.vue
View file @
b59bab67
...
@@ -171,15 +171,28 @@
...
@@ -171,15 +171,28 @@
<el-form-item
label=
"金额所在列"
prop=
"CleanIng"
class=
"form-item-inline"
v-if=
"options2id === 6"
>
<el-form-item
label=
"金额所在列"
prop=
"CleanIng"
class=
"form-item-inline"
v-if=
"options2id === 6"
>
<el-input-number
size=
"medium"
v-model=
"CleanIng.MoneyColumn"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
<el-input-number
size=
"medium"
v-model=
"CleanIng.MoneyColumn"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
</el-form-item>
</el-form-item>
<el-form-item
label=
"日期所在列"
prop=
"CleanIng"
class=
"form-item-inline"
v-if=
"options2id === 6"
>
<el-input-number
size=
"medium"
v-model=
"CleanIng.DateColumn"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
<el-form-item
label=
"日期所在列"
prop=
"CleanIng"
class=
"form-item-inline"
v-if=
"options2id === 6 "
>
<el-select
v-model=
"datevalue"
placeholder=
"请选择日期所在列"
@
change=
"dateChange"
label=
"日期所在列"
>
<el-option
v-for=
"item in date"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-input-number
style=
"margin-left: 5vw;"
v-if=
"datevalue == 1"
size=
"medium"
v-model=
"CleanIng.DateColumn"
:min=
"1"
:step=
"1"
>
1
</el-input-number>
</el-form-item>
</el-form-item>
<el-form-item
style=
"display: inline-block;"
>
<el-form-item
style=
"display: inline-block;"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"small"
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"small"
@
click=
"removeInputs(index)"
>
删除
</el-button>
@
click=
"removeInputs(index)"
>
删除
</el-button>
</el-form-item>
</el-form-item>
</div>
</div>
<div
v-if=
"form.detailYS"
style=
"color: red; margin-left: 2.5vw;"
>
为防止后面步骤出错,导入表和模板表的行列坐标必须为表头所在单元格的行列
</div>
<div
v-if=
"options2id !== 6 && instea >= 1"
style=
"color: red; margin-left: 2.5vw;"
>
为防止后面步骤出错,导入表和模板表的行列坐标必须为表头所在单元格的行列
</div>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
...
@@ -189,14 +202,14 @@
...
@@ -189,14 +202,14 @@
</div>
</div>
</template>
</template>
<
style
>
<
style
>
.form-item-inline
{
.form-item-inline
{
display
:
inline-block
;
display
:
inline-block
;
margin-right
:
20px
;
margin-right
:
20px
;
}
}
</
style
>
</
style
>
<
script
>
<
script
>
import
{
import
{
listSuppliesroledetail
,
listSuppliesroledetail
,
getSuppliesroledetail
,
getSuppliesroledetail
,
delSuppliesroledetail
,
delSuppliesroledetail
,
...
@@ -208,16 +221,24 @@ import {
...
@@ -208,16 +221,24 @@ import {
toggleDisable
,
toggleDisable
,
saveOperation
,
saveOperation
,
saveSidsta
,
saveSidsta
,
}
from
"
@/api/system/suppliesroledetail
"
;
}
from
"
@/api/system/suppliesroledetail
"
;
import
Editor
from
'
@/components/Editor
'
;
import
Editor
from
'
@/components/Editor
'
;
export
default
{
export
default
{
name
:
"
Suppliesroledetail
"
,
name
:
"
Suppliesroledetail
"
,
components
:
{
components
:
{
Editor
,
Editor
,
},
},
data
()
{
data
()
{
return
{
return
{
date
:
[{
value
:
0
,
label
:
'
无
'
},
{
value
:
1
,
label
:
'
有
'
}],
datevalue
:
0
,
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
//下拉选中的数值
//下拉选中的数值
...
@@ -297,13 +318,16 @@ export default {
...
@@ -297,13 +318,16 @@ export default {
computed
:
{
computed
:
{
isDisable
()
{
isDisable
()
{
return
this
.
instea
>=
1
&&
this
.
options2id
==
6
;
return
this
.
instea
>=
1
&&
this
.
options2id
==
6
;
}
},
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getnameid
();
this
.
getnameid
();
},
},
methods
:
{
methods
:
{
dateChange
()
{
this
.
CleanIng
.
DateColumn
=
''
},
handleRadioChange
()
{
handleRadioChange
()
{
this
.
options2id
=
this
.
form
.
convertStatus
this
.
options2id
=
this
.
form
.
convertStatus
this
.
detailMH
=
[]
this
.
detailMH
=
[]
...
@@ -443,9 +467,15 @@ export default {
...
@@ -443,9 +467,15 @@ export default {
this
.
options2id
=
response
.
data
.
convertStatus
this
.
options2id
=
response
.
data
.
convertStatus
const
detailContent
=
response
.
data
.
detailContent
;
const
detailContent
=
response
.
data
.
detailContent
;
const
parse
=
JSON
.
parse
(
detailContent
);
const
parse
=
JSON
.
parse
(
detailContent
);
console
.
log
(
response
.
data
)
if
(
this
.
options2id
===
6
)
{
if
(
this
.
options2id
===
6
)
{
this
.
instea
=
1
this
.
instea
=
1
this
.
CleanIng
=
parse
[
0
]
this
.
CleanIng
=
parse
[
0
]
if
(
this
.
CleanIng
.
DateColumn
!==
''
)
{
this
.
datevalue
=
1
}
else
{
this
.
datevalue
=
0
}
}
else
{
}
else
{
this
.
detailMH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
rt
)
+
1
);
this
.
detailMH
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
rt
)
+
1
);
this
.
detailML
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
ct
)
+
1
);
this
.
detailML
=
parse
.
map
(
obj
=>
parseInt
(
obj
.
ct
)
+
1
);
...
@@ -471,6 +501,7 @@ export default {
...
@@ -471,6 +501,7 @@ export default {
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
console
.
log
(
JSON
.
parse
(
this
.
form
.
cleanIng
),
'
2222222222
'
)
updateSuppliesroledetail
(
this
.
form
).
then
(
response
=>
{
updateSuppliesroledetail
(
this
.
form
).
then
(
response
=>
{
this
.
msgSuccess
(
"
修改成功
"
);
this
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
open
=
false
;
...
@@ -516,5 +547,5 @@ export default {
...
@@ -516,5 +547,5 @@ export default {
})
})
}
}
}
}
};
};
</
script
>
</
script
>
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