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
d50ab311
Commit
d50ab311
authored
Oct 17, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改IED 审核、校核、批准等校验
parent
0980a767
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
IEDPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
+15
-11
PurchasePlanExcelDataVerifyListenner.java
...n/core/listener/PurchasePlanExcelDataVerifyListenner.java
+1
-1
ExtPuchasePlanAttributeServiceImpl.java
...core/service/impl/ExtPuchasePlanAttributeServiceImpl.java
+1
-1
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
View file @
d50ab311
...
...
@@ -296,10 +296,18 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
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
());
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getAuditor
())){
dynamicAttrs
.
put
(
"auditorName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getAuditor
())).
getName
());
}
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getChecker
())){
dynamicAttrs
.
put
(
"checkerName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getChecker
())).
getName
());
}
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getInvestigator
())){
dynamicAttrs
.
put
(
"investigatorName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getInvestigator
())).
getName
());
}
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getRatifier
())){
dynamicAttrs
.
put
(
"ratifierName"
,
userUtils
.
getUserById
(
Long
.
valueOf
(
extIEDPlanExcelVO
.
getRatifier
())).
getName
());
}
extIEDPlanVO
.
setDynamicAttrs
(
dynamicAttrs
);
extIEDPlanVO
.
setChecker
(
extIEDPlanExcelVO
.
getChecker
());
extIEDPlanVO
.
setAuditor
(
extIEDPlanExcelVO
.
getAuditor
());
...
...
@@ -490,11 +498,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
}
}
//校核不能为空,判断该用户是否存在,存在的话,将用户id保存
if
(
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getChecker
()))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的编写者不能为空!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getChecker
()))
{
DxUserInfoVO
dxUserInfoVO
=
userUtils
.
getUserByName
(
extIEDPlanExcelVO
.
getChecker
());
if
(
ObjectUtils
.
isEmpty
(
dxUserInfoVO
))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的校核在系统中未查到!!"
);
...
...
@@ -531,7 +535,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getRatifier
()))
{
DxUserInfoVO
dxUserInfoVO
=
userUtils
.
getUserByName
(
extIEDPlanExcelVO
.
getRatifier
());
if
(
ObjectUtils
.
isEmpty
(
dxUserInfoVO
))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的
审定
者在系统中未查到!!"
);
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的
批准
者在系统中未查到!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
...
...
@@ -540,7 +544,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
}
//校验密级,计划密级不能大于项目密级
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getSecretCode
()))
{
if
(!
CommonUtils
.
verifySecretLevel
(
projectSecret
,
extIEDPlanExcelVO
.
getSecretCode
())){
if
(!
CommonUtils
.
verifySecretLevel
(
CommonUtils
.
searchDictDataValueByDictCode
(
Constants
.
SECRET_CODE
,
projectSecret
)
,
extIEDPlanExcelVO
.
getSecretCode
())){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的密级不能大于项目密级!!"
);
errorList
.
add
(
errorString
);
return
;
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/PurchasePlanExcelDataVerifyListenner.java
View file @
d50ab311
...
...
@@ -98,7 +98,7 @@ public class PurchasePlanExcelDataVerifyListenner extends AnalysisEventListener<
//校验表格中的数据是否合法
List
<
StringBuffer
>
errList
=
checkPurchasePlanExcelData
();
if
(
errList
.
size
()
>
0
)
{
throw
new
DxBusinessException
(
"
0
"
,
"导入采购计划数据有误!!"
+
errList
.
toString
());
throw
new
DxBusinessException
(
"
-1
"
,
"导入采购计划数据有误!!"
+
errList
.
toString
());
}
//清理list ,方便内存回收
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPuchasePlanAttributeServiceImpl.java
View file @
d50ab311
...
...
@@ -207,7 +207,7 @@ public class ExtPuchasePlanAttributeServiceImpl<V extends ExtPuchasePlanAttribut
multipartFile
=
fileManagerFeignService
.
feignDownloadIO
(
fileId
);
inputStream
=
new
ByteArrayInputStream
(
multipartFile
.
getBytes
());
}
catch
(
IOException
e
)
{
throw
new
DxBusinessException
(
"
0
"
,
"文件id:"
+
fileId
+
"在系统中未找到!"
);
throw
new
DxBusinessException
(
"
-1
"
,
"文件id:"
+
fileId
+
"在系统中未找到!"
);
}
EasyExcel
.
read
(
inputStream
,
ExtPuchasePlanExcelVO
.
class
,
...
...
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