Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-doc-expand
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-doc-expand
Commits
1e8b7f48
Commit
1e8b7f48
authored
Oct 12, 2024
by
wangyangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档 图册:回写ied计划状态
parent
b588106a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
24 deletions
+27
-24
ExtAutoTaskServiceImpl.java
...cs/document/core/service/impl/ExtAutoTaskServiceImpl.java
+27
-24
No files found.
dcs-doc-expand-core/src/main/java/com/yonde/dcs/document/core/service/impl/ExtAutoTaskServiceImpl.java
View file @
1e8b7f48
...
@@ -260,31 +260,34 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
...
@@ -260,31 +260,34 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
catalogExcelVO
.
setPictureFrame
(
String
.
valueOf
(
doc
.
getDynamicAttrs
().
get
(
"pictureFrame"
)));
catalogExcelVO
.
setPictureFrame
(
String
.
valueOf
(
doc
.
getDynamicAttrs
().
get
(
"pictureFrame"
)));
excelVOS
.
add
(
catalogExcelVO
);
excelVOS
.
add
(
catalogExcelVO
);
}
}
//TODO 图册生成图纸信息
//已发布的时候才需要生成图册目录 以及修改IED计划状态
String
dir
=
ResourceHelper
.
createTemDir
().
getPath
();
if
(
Constants
.
DOC_RELEASE
.
equalsIgnoreCase
(
state
)){
String
filePath
=
dir
+
"\\图册.xlsx"
;
//TODO 图册生成图纸信息
EasyExcel
.
write
(
filePath
,
ExtCatalogExcelVO
.
class
)
String
dir
=
ResourceHelper
.
createTemDir
().
getPath
();
.
registerWriteHandler
(
new
LongestMatchColumnWidthStyleStrategy
())
String
filePath
=
dir
+
"\\图册.xlsx"
;
.
sheet
(
"图册"
).
doWrite
(
excelVOS
);
EasyExcel
.
write
(
filePath
,
ExtCatalogExcelVO
.
class
)
//转pdf
.
registerWriteHandler
(
new
LongestMatchColumnWidthStyleStrategy
())
String
pdfName
=
"图册.pdf"
;
.
sheet
(
"图册"
).
doWrite
(
excelVOS
);
String
filePdfPath
=
dir
+
File
.
separator
+
pdfName
;
//转pdf
ExcelUtils
.
Ex2PDF
(
filePath
,
filePdfPath
);
String
pdfName
=
"图册.pdf"
;
//上传文件到文件服务器
String
filePdfPath
=
dir
+
File
.
separator
+
pdfName
;
MultipartFile
multipartFile
=
null
;
ExcelUtils
.
Ex2PDF
(
filePath
,
filePdfPath
);
multipartFile
=
new
MockMultipartFile
(
"file"
,
pdfName
,
com
.
yonde
.
dcs
.
plan
.
common
.
constants
.
Constants
.
CONTENT_TYPE_PDF
,
new
FileInputStream
(
filePdfPath
));
//上传文件到文件服务器
RepoFileVO
fileVO
=
fileManagerFeignService
.
uploadFile
(
multipartFile
,
CommonUtil
.
getBucketIdByAppName
(
com
.
yonde
.
dcs
.
document
.
core
.
constants
.
Constants
.
APPLICATION_DOC_INNER_NAME
));
MultipartFile
multipartFile
=
null
;
ObjFileLinkUtil
.
addFile
(
documentVO
,
fileVO
,
com
.
yonde
.
dcs
.
plan
.
common
.
constants
.
Constants
.
ATTACH_FILE
);
multipartFile
=
new
MockMultipartFile
(
"file"
,
pdfName
,
com
.
yonde
.
dcs
.
plan
.
common
.
constants
.
Constants
.
CONTENT_TYPE_PDF
,
new
FileInputStream
(
filePdfPath
));
documentVO
.
setOperator
(
OperatorType
.
MODIFY
);
RepoFileVO
fileVO
=
fileManagerFeignService
.
uploadFile
(
multipartFile
,
CommonUtil
.
getBucketIdByAppName
(
com
.
yonde
.
dcs
.
document
.
core
.
constants
.
Constants
.
APPLICATION_DOC_INNER_NAME
));
documentVO
=
(
DxDocumentVO
)
documentService
.
saveRecursion
(
documentVO
);
ObjFileLinkUtil
.
addFile
(
documentVO
,
fileVO
,
com
.
yonde
.
dcs
.
plan
.
common
.
constants
.
Constants
.
ATTACH_FILE
);
FileUtil
.
del
(
dir
);
documentVO
.
setOperator
(
OperatorType
.
MODIFY
);
documentVO
=
(
DxDocumentVO
)
documentService
.
saveRecursion
(
documentVO
);
FileUtil
.
del
(
dir
);
// generateCatalog(documentVO.getId());
// generateCatalog(documentVO.getId());
//TODO 判断该文档关联IED计划下所有的文档状态是否为已完成,已完成则回写IED计划状态----一个IED计划对应一个图册,直接修改计划状态即可
//TODO 判断该文档关联IED计划下所有的文档状态是否为已完成,已完成则回写IED计划状态----一个IED计划对应一个图册,直接修改计划状态即可
SearchQueryCondition
query
=
SearchUtil
.
buildQuery
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
documentVO
.
getId
());
SearchQueryCondition
query
=
SearchUtil
.
buildQuery
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
documentVO
.
getId
());
DxPageImpl
iedPage
=
extIEDPlanDocLinkServiceFeign
.
findRecursion
(
query
);
DxPageImpl
iedPage
=
extIEDPlanDocLinkServiceFeign
.
findRecursion
(
query
);
ExtIEDPlanDocLinkVO
extIEDPlanDocLinkVO
=
(
ExtIEDPlanDocLinkVO
)
iedPage
.
getContent
().
get
(
0
);
ExtIEDPlanDocLinkVO
extIEDPlanDocLinkVO
=
(
ExtIEDPlanDocLinkVO
)
iedPage
.
getContent
().
get
(
0
);
Long
iedPlanId
=
extIEDPlanDocLinkVO
.
getSourceId
();
Long
iedPlanId
=
extIEDPlanDocLinkVO
.
getSourceId
();
extIEDPlanServiceFeign
.
changeStatus
(
iedPlanId
,
Constants
.
IED_Complete
,
true
);
extIEDPlanServiceFeign
.
changeStatus
(
iedPlanId
,
Constants
.
IED_Complete
,
true
);
}
}
}
//判断接口单为审阅中设置全局状态为已打开
//判断接口单为审阅中设置全局状态为已打开
if
(
Constants
.
INTERNAL_INTERFACE
.
equals
(
documentVO
.
getSubTypeName
()))
{
if
(
Constants
.
INTERNAL_INTERFACE
.
equals
(
documentVO
.
getSubTypeName
()))
{
...
...
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