Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
certificate-print
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
廖旭伟
certificate-print
Commits
aac088b9
Commit
aac088b9
authored
Nov 02, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复form表单可能会重复生成的bug
parent
c22f51d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
certificate-manager/src/main/java/com/mortals/xhx/module/certificate/service/impl/CertificateCatalogServiceImpl.java
...rtificate/service/impl/CertificateCatalogServiceImpl.java
+7
-4
certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/ApplyLogServiceImpl.java
...s/xhx/module/record/service/impl/ApplyLogServiceImpl.java
+8
-8
No files found.
certificate-manager/src/main/java/com/mortals/xhx/module/certificate/service/impl/CertificateCatalogServiceImpl.java
View file @
aac088b9
...
...
@@ -28,10 +28,7 @@ import com.mortals.xhx.module.certificate.dao.CertificateCatalogDao;
import
com.mortals.xhx.module.certificate.model.CertificateCatalogEntity
;
import
com.mortals.xhx.module.certificate.service.CertificateCatalogService
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
...
...
@@ -126,7 +123,13 @@ public class CertificateCatalogServiceImpl extends AbstractCRUDServiceImpl<Certi
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
);
...
...
certificate-manager/src/main/java/com/mortals/xhx/module/record/service/impl/ApplyLogServiceImpl.java
View file @
aac088b9
...
...
@@ -163,8 +163,8 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
DocTemplateVO
docTemplate
=
new
DocTemplateVO
(
catalog
.
getOriginalUrl
(),
applyLogEntity
.
getOriFormContent
());
String
paths
=
preview
(
docTemplate
,
context
);
String
[]
vals
=
paths
.
split
(
";"
);
applyLogEntity
.
setOriginalUrl
(
vals
[
1
]);
applyLogEntity
.
setOriPreview
(
vals
[
0
]);
applyLogEntity
.
setOriginalUrl
(
vals
[
0
]);
applyLogEntity
.
setOriPreview
(
vals
[
1
]);
applyLogEntity
.
setCreateTime
(
new
Date
());
if
(
context
!=
null
&&
context
.
getUser
()!=
null
)
{
applyLogEntity
.
setCreateUserId
(
context
.
getUser
().
getId
());
...
...
@@ -182,8 +182,8 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
DocTemplateVO
docTemplate
=
new
DocTemplateVO
(
catalog
.
getDuplicateUrl
(),
applyLogEntity
.
getDupFormContent
());
String
paths
=
preview
(
docTemplate
,
context
);
String
[]
vals
=
paths
.
split
(
";"
);
applyLogEntity
.
setDuplicateUrl
(
vals
[
1
]);
applyLogEntity
.
setDupPreview
(
vals
[
0
]);
applyLogEntity
.
setDuplicateUrl
(
vals
[
0
]);
applyLogEntity
.
setDupPreview
(
vals
[
1
]);
applyLogEntity
.
setCreateTime
(
new
Date
());
if
(
context
!=
null
&&
context
.
getUser
()!=
null
)
{
applyLogEntity
.
setCreateUserId
(
context
.
getUser
().
getId
());
...
...
@@ -204,16 +204,16 @@ public class ApplyLogServiceImpl extends AbstractCRUDServiceImpl<ApplyLogDao, Ap
DocTemplateVO
docTemplate
=
new
DocTemplateVO
(
catalog
.
getOriginalUrl
(),
applyLogEntity
.
getOriFormContent
());
String
paths
=
preview
(
docTemplate
,
context
);
String
[]
vals
=
paths
.
split
(
";"
);
applyLogEntity
.
setOriginalUrl
(
vals
[
1
]);
applyLogEntity
.
setOriPreview
(
vals
[
0
]);
applyLogEntity
.
setOriginalUrl
(
vals
[
0
]);
applyLogEntity
.
setOriPreview
(
vals
[
1
]);
CertificateClassifyEntity
classifyEntity
=
certificateClassifyService
.
get
(
catalog
.
getClassifyId
());
if
(
classifyEntity
!=
null
&&
classifyEntity
.
getClassifyType
()==
ClassifyType
.
PRINCIPAL_AND_VICE
.
getValue
())
{
docTemplate
.
setFormContent
(
applyLogEntity
.
getDupFormContent
());
docTemplate
.
setTemplatePath
(
catalog
.
getDuplicateUrl
());
String
paths1
=
preview
(
docTemplate
,
context
);
String
[]
vals1
=
paths1
.
split
(
";"
);
applyLogEntity
.
setDuplicateUrl
(
vals1
[
1
]);
applyLogEntity
.
setDupPreview
(
vals1
[
0
]);
applyLogEntity
.
setDuplicateUrl
(
vals1
[
0
]);
applyLogEntity
.
setDupPreview
(
vals1
[
1
]);
}
applyLogEntity
.
setCreateTime
(
new
Date
());
if
(
context
!=
null
&&
context
.
getUser
()!=
null
)
{
...
...
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