Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
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
廖旭伟
fill-system
Commits
60a7f56a
Commit
60a7f56a
authored
Nov 28, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复模板生成表单可能出现重复表单的bug
parent
13887d77
Pipeline
#2346
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
fill-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumServiceImpl.java
...hx/module/matter/service/impl/MatterDatumServiceImpl.java
+12
-0
No files found.
fill-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumServiceImpl.java
View file @
60a7f56a
...
...
@@ -201,7 +201,13 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
config
.
initAttribute
();
root
.
setConfig
(
config
);
List
<
ListItem
>
collect
=
new
ArrayList
<>();
HashSet
<
String
>
hs
=
new
HashSet
<>();
//去除重复标签
for
(
MetaTemplate
item
:
template
.
getElementTemplates
())
{
if
(
hs
.
contains
(
item
.
variable
())){
continue
;
}
else
{
hs
.
add
(
item
.
variable
());
}
//识别简单输入
String
val
=
StrUtil
.
strip
(
item
.
variable
(),
"{{"
,
"}}"
);
List
<
String
>
keys
=
StrSplitter
.
split
(
val
,
"_"
,
true
,
true
);
...
...
@@ -216,6 +222,7 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
cons
.
setUploadFileUrl
(
uploadUrl
);
if
(
type
.
equalsIgnoreCase
(
ComponentEnum
.
DYNAMIC_TABLE
.
getValue
()))
{
HashSet
<
String
>
dhs
=
new
HashSet
<>();
//去除重复标签
List
<
TableColItem
>
colList
=
new
ArrayList
<>();
//表格 结构化绑定数据
ConfigureBuilder
builderTable
=
Configure
.
builder
();
...
...
@@ -225,6 +232,11 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
XWPFTemplate
templateTable
=
XWPFTemplate
.
compile
(
filepath
,
builderTable
.
build
());
for
(
MetaTemplate
col
:
templateTable
.
getElementTemplates
())
{
if
(
dhs
.
contains
(
col
.
variable
())){
continue
;
}
else
{
dhs
.
add
(
col
.
variable
());
}
String
colVal
=
StrUtil
.
strip
(
col
.
variable
(),
"["
,
"]"
);
if
(!
StrUtil
.
startWith
(
colVal
,
label
))
{
continue
;
...
...
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