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
7807ac81
Commit
7807ac81
authored
Dec 06, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加新闻来源
parent
1feec22e
Pipeline
#2392
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
fill-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumServiceImpl.java
...hx/module/matter/service/impl/MatterDatumServiceImpl.java
+13
-1
No files found.
fill-manager/src/main/java/com/mortals/xhx/module/matter/service/impl/MatterDatumServiceImpl.java
View file @
7807ac81
...
@@ -43,6 +43,7 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
...
@@ -43,6 +43,7 @@ import com.mortals.xhx.module.matter.model.MatterEntity;
import
com.mortals.xhx.module.matter.model.MatterQuery
;
import
com.mortals.xhx.module.matter.model.MatterQuery
;
import
com.mortals.xhx.module.matter.service.MatterService
;
import
com.mortals.xhx.module.matter.service.MatterService
;
import
com.mortals.xhx.module.pubdatum.model.PubdatumEntity
;
import
com.mortals.xhx.module.pubdatum.model.PubdatumEntity
;
import
com.mortals.xhx.module.pubdatum.model.PubdatumQuery
;
import
com.mortals.xhx.module.pubdatum.service.PubdatumService
;
import
com.mortals.xhx.module.pubdatum.service.PubdatumService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.io.FilenameUtils
;
import
org.apache.commons.io.FilenameUtils
;
...
@@ -116,6 +117,11 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
...
@@ -116,6 +117,11 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
private
void
addPubdatum
(
MatterDatumEntity
entity
,
Context
context
)
{
private
void
addPubdatum
(
MatterDatumEntity
entity
,
Context
context
)
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getPub
())
&&
entity
.
getPub
()
==
YesNoEnum
.
YES
.
getValue
())
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getPub
())
&&
entity
.
getPub
()
==
YesNoEnum
.
YES
.
getValue
())
{
int
count
=
pubdatumService
.
count
(
new
PubdatumQuery
().
materialName
(
entity
.
getMaterialName
()),
context
);
if
(
count
>
0
){
throw
new
AppException
(
"当前公共库已存在当前材料名!"
);
}
//添加到公共库
//添加到公共库
PubdatumEntity
pubdatumEntity
=
new
PubdatumEntity
();
PubdatumEntity
pubdatumEntity
=
new
PubdatumEntity
();
pubdatumEntity
.
initAttrValue
();
pubdatumEntity
.
initAttrValue
();
...
@@ -147,6 +153,12 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
...
@@ -147,6 +153,12 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
if
(
StringUtils
.
isEmpty
(
entity
.
getTemplatePath
()))
{
if
(
StringUtils
.
isEmpty
(
entity
.
getTemplatePath
()))
{
throw
new
AppException
(
"样表模板地址不能为空"
);
throw
new
AppException
(
"样表模板地址不能为空"
);
}
}
//校验材料名是否重复
int
count
=
this
.
count
(
new
MatterDatumQuery
().
materialName
(
entity
.
getMaterialName
()),
context
);
if
(
count
>
0
){
throw
new
AppException
(
"当前材料名称已存在!"
);
}
//生成样表预览图片
//生成样表预览图片
String
rootPath
=
this
.
filePath
.
endsWith
(
"/"
)
?
this
.
filePath
:
this
.
filePath
+
"/"
;
String
rootPath
=
this
.
filePath
.
endsWith
(
"/"
)
?
this
.
filePath
:
this
.
filePath
+
"/"
;
String
samplePath
=
rootPath
+
entity
.
getSamplePath
();
String
samplePath
=
rootPath
+
entity
.
getSamplePath
();
...
@@ -162,7 +174,7 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
...
@@ -162,7 +174,7 @@ public class MatterDatumServiceImpl extends AbstractCRUDServiceImpl<MatterDatumD
WordUtil
.
convertWordToJPEG
(
samplePath
,
filePathAll
);
WordUtil
.
convertWordToJPEG
(
samplePath
,
filePathAll
);
entity
.
setPreViewPath
(
prePath
+
newName
);
entity
.
setPreViewPath
(
prePath
+
newName
);
//校验模板变量正确性
todo
//校验模板变量正确性
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getTemplatePath
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getTemplatePath
()))
{
parseDocxToJson
(
entity
);
parseDocxToJson
(
entity
);
}
}
...
...
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