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
546705a0
Commit
546705a0
authored
Oct 17, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IED计划导入导出增加校核、批准等用户
parent
0b73fc7b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
5 deletions
+41
-5
IEDPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
+28
-0
ExtIEDPlanServiceImpl.java
...nde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
+13
-5
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
View file @
546705a0
...
...
@@ -281,9 +281,22 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
}
}
//编制
extIEDPlanVO
.
setEditor
(
extIEDPlanExcelVO
.
getEditor
());
//校核
extIEDPlanVO
.
setChecker
(
extIEDPlanExcelVO
.
getChecker
());
//审核
extIEDPlanVO
.
setAuditor
(
extIEDPlanExcelVO
.
getAuditor
());
//审定
extIEDPlanVO
.
setInvestigator
(
extIEDPlanExcelVO
.
getInvestigator
());
//批准
extIEDPlanVO
.
setRatifier
(
extIEDPlanExcelVO
.
getRatifier
());
Map
<
String
,
Object
>
dynamicAttrs
=
new
HashMap
<>();
dynamicAttrs
.
put
(
"editorName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getEditor
())).
getName
());
dynamicAttrs
.
put
(
"checkerName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getChecker
())).
getName
());
dynamicAttrs
.
put
(
"auditorName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getAuditor
())).
getName
());
dynamicAttrs
.
put
(
"investigatorName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getInvestigator
())).
getName
());
dynamicAttrs
.
put
(
"ratifierName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getRatifier
())).
getName
());
extIEDPlanVO
.
setDynamicAttrs
(
dynamicAttrs
);
extIEDPlanVO
.
setChecker
(
extIEDPlanExcelVO
.
getChecker
());
extIEDPlanVO
.
setAuditor
(
extIEDPlanExcelVO
.
getAuditor
());
...
...
@@ -473,6 +486,21 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
extIEDPlanExcelVO
.
setEditor
(
String
.
valueOf
(
dxUserInfoVO
.
getId
()));
}
}
//校核不能为空,判断该用户是否存在,存在的话,将用户id保存
if
(
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getChecker
()))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的编写者不能为空!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
DxUserInfoVO
dxUserInfoVO
=
userUtils
.
getUserByName
(
extIEDPlanExcelVO
.
getChecker
());
if
(
ObjectUtils
.
isEmpty
(
dxUserInfoVO
))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的校核在系统中未查到!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
extIEDPlanExcelVO
.
setChecker
(
String
.
valueOf
(
dxUserInfoVO
.
getId
()));
}
}
//审核不是空,判断该用户是否存在,存在的话,将用户id保存
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getAuditor
()))
{
DxUserInfoVO
dxUserInfoVO
=
userUtils
.
getUserByName
(
extIEDPlanExcelVO
.
getAuditor
());
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
View file @
546705a0
...
...
@@ -152,11 +152,11 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
if
(!
ObjectUtil
.
isEmpty
(
extIEDPlanVO
.
getFileSubmitTime
()))
{
extIEDPlanExcelVO
.
setFileSubmitTime
(
extIEDPlanVO
.
getFileSubmitTime
().
format
(
DateTimeFormatter
.
ISO_DATE
));
}
extIEDPlanExcelVO
.
setEditor
(
extIEDPlanVO
.
get
Editor
());
extIEDPlanExcelVO
.
setChecker
(
extIEDPlanVO
.
get
Checker
());
extIEDPlanExcelVO
.
setAuditor
(
extIEDPlanVO
.
get
Auditor
());
extIEDPlanExcelVO
.
setInvestigator
(
extIEDPlanVO
.
get
Investigator
());
extIEDPlanExcelVO
.
setRatifier
(
extIEDPlanVO
.
get
Ratifier
());
extIEDPlanExcelVO
.
setEditor
(
extIEDPlanVO
.
get
DynamicAttrs
().
get
(
"userName"
).
toString
());
extIEDPlanExcelVO
.
setChecker
(
extIEDPlanVO
.
get
DynamicAttrs
().
get
(
"checkerName"
).
toString
());
extIEDPlanExcelVO
.
setAuditor
(
extIEDPlanVO
.
get
DynamicAttrs
().
get
(
"auditorName"
).
toString
());
extIEDPlanExcelVO
.
setInvestigator
(
extIEDPlanVO
.
get
DynamicAttrs
().
get
(
"investigatorName"
).
toString
());
extIEDPlanExcelVO
.
setRatifier
(
extIEDPlanVO
.
get
DynamicAttrs
().
get
(
"ratifierName"
).
toString
());
extIEDPlanExcelVO
.
setNote
(
extIEDPlanVO
.
getNote
());
//获取密级code
String
secretCode
=
CommonUtils
.
searchDictDataValueByDictCode
(
Constants
.
SECRET_CODE
,
extIEDPlanVO
.
getSecretCode
());
...
...
@@ -204,6 +204,14 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
dynamicAttrs
.
put
(
"phase"
,
extIEDPlanVO
.
getPhase
());
//编写者
dynamicAttrs
.
put
(
"editor"
,
extIEDPlanVO
.
getEditor
());
//校核
dynamicAttrs
.
put
(
"checker"
,
extIEDPlanVO
.
getChecker
());
//审核
dynamicAttrs
.
put
(
"auditor"
,
extIEDPlanVO
.
getAuditor
());
//审定
dynamicAttrs
.
put
(
"investigator"
,
extIEDPlanVO
.
getInvestigator
());
//批准
dynamicAttrs
.
put
(
"ratifier"
,
extIEDPlanVO
.
getRatifier
());
//设置动态属性
dxDocumentVO
.
setDynamicAttrs
(
dynamicAttrs
);
//创建时间
...
...
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