Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-plan
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
INET-TWO
server
dcs-plan
Commits
ac092941
Commit
ac092941
authored
Sep 29, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
word模板生成
parent
5c564cdd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
ExtExpenditureContractServiceImpl.java
.../core/service/impl/ExtExpenditureContractServiceImpl.java
+15
-9
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtExpenditureContractServiceImpl.java
View file @
ac092941
...
...
@@ -2,13 +2,14 @@ package com.yonde.dcs.plan.core.service.impl;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.extra.spring.SpringUtil
;
import
com.google.common.collect.Lists
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.constants.SignConstants
;
import
com.yonde.dcs.plan.common.utils.FileUtils
;
import
com.yonde.dcs.plan.common.vo.ExtExpenditureContractVO
;
import
com.yonde.dcs.plan.common.vo.ExtInComeContractVO
;
import
com.yonde.dcs.plan.core.factory.ExpenditureContractUtils
;
import
com.yonde.dcs.plan.core.factory.InComeContractUtils
;
import
com.yonde.dcs.plan.core.repository.ExtExpenditureContractRepository
;
import
com.yonde.dcs.plan.core.service.ExtExpenditureContractService
;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
...
...
@@ -45,7 +46,6 @@ import java.io.File;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
...
...
@@ -83,6 +83,12 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
@Autowired
private
DxUserInfoFeign
userService
;
@Autowired
private
ExpenditureContractUtils
expenditureContractUtils
;
@Autowired
private
InComeContractUtils
inComeContractUtils
;
@Override
public
ExtExpenditureContractVO
startWorkflow
(
Long
id
)
{
ExtExpenditureContractVO
extExpenditureContractVO
=
this
.
get
(
id
);
...
...
@@ -103,16 +109,18 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
try
{
if
(
obj
instanceof
ExtExpenditureContractVO
)
{
ExtExpenditureContractVO
expenditureContractVO
=
(
ExtExpenditureContractVO
)
obj
;
Class
<?>
clazz
=
Class
.
forName
(
"com.yonde.dcs.plan.core.factory.ExpenditureContractUtils"
);
/*
Class<?> clazz = Class.forName("com.yonde.dcs.plan.core.factory.ExpenditureContractUtils");
Method settingDataMethod = clazz.getMethod("settingData", ExtExpenditureContractVO.class, DxWfProcessInfoVO.class);
settingDataMethod
.
invoke
(
SpringUtil
.
getBean
(
classType
),
expenditureContractVO
,
wfProcessInfoVO
);
settingDataMethod.invoke(SpringUtil.getBean(classType), expenditureContractVO, wfProcessInfoVO);*/
expenditureContractUtils
.
settingDocData
(
expenditureContractVO
,
wfProcessInfoVO
);
outFilePath
=
outFilePath
+
expenditureContractVO
.
getSubTypeName
()
+
"\\"
+
expenditureContractVO
.
getNumber
()
+
"\\"
;
sPath
=
sPath
+
expenditureContractVO
.
getSubTypeName
()
+
"\\"
+
expenditureContractVO
.
getNumber
();
}
else
if
(
obj
instanceof
ExtInComeContractVO
)
{
ExtInComeContractVO
extInComeContractVO
=
(
ExtInComeContractVO
)
obj
;
Class
<?>
clazz
=
Class
.
forName
(
"com.yonde.dcs.plan.core.factory.InComeContractUtils"
);
/*
Class<?> clazz = Class.forName("com.yonde.dcs.plan.core.factory.InComeContractUtils");
Method settingDataMethod = clazz.getMethod("settingData", ExtInComeContractVO.class, DxWfProcessInfoVO.class);
settingDataMethod
.
invoke
(
SpringUtil
.
getBean
(
classType
),
extInComeContractVO
,
wfProcessInfoVO
);
settingDataMethod.invoke(SpringUtil.getBean(classType), extInComeContractVO, wfProcessInfoVO);*/
inComeContractUtils
.
settingDocData
(
extInComeContractVO
,
wfProcessInfoVO
);
outFilePath
=
outFilePath
+
extInComeContractVO
.
getSubTypeName
()
+
"\\"
+
extInComeContractVO
.
getNumber
()
+
"\\"
;
sPath
=
sPath
+
extInComeContractVO
.
getSubTypeName
()
+
"\\"
+
extInComeContractVO
.
getNumber
();
}
else
{
...
...
@@ -124,9 +132,7 @@ public class ExtExpenditureContractServiceImpl<V extends ExtExpenditureContractV
//获取文件夹的所有文件--绝对路径
List
<
String
>
fileList
=
new
ArrayList
<>();
File
[]
files
=
FileUtil
.
ls
(
outFilePath
);
Arrays
.
stream
(
files
).
forEach
(
item
->
{
fileList
.
add
(
item
.
getAbsolutePath
());
});
Arrays
.
stream
(
files
).
forEach
(
item
->
fileList
.
add
(
item
.
getAbsolutePath
()));
if
(
CollectionUtils
.
isEmpty
(
fileList
))
{
log
.
error
(
"签名----生成的word文件目录内容为空===="
);
}
else
{
...
...
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