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
ca129144
Commit
ca129144
authored
Oct 18, 2024
by
侯彦文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进度计划导出优化
parent
f69d652c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
55 deletions
+30
-55
ExtPlanServiceImpl.java
.../yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
+30
-55
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
View file @
ca129144
...
@@ -292,47 +292,49 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -292,47 +292,49 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
private
StringBuffer
checkPlan
(
PlanExcelVO
excelVO
,
int
i
,
StringBuffer
buffer
)
{
private
StringBuffer
checkPlan
(
PlanExcelVO
excelVO
,
int
i
,
StringBuffer
buffer
)
{
//校验
//校验
if
(
StringUtils
.
isEmpty
(
excelVO
.
getNumber
()))
{
if
(
StringUtils
.
isEmpty
(
excelVO
.
getNumber
()))
{
buffer
.
append
(
String
.
format
(
"第%s行的计划编号为空"
,
i
+
1
)).
append
(
'\n'
);
buffer
.
append
(
String
.
format
(
"第%s行的计划编号为空"
,
i
+
1
)
+
"</br>"
);
}
else
{
//校验编号是否已存在
ExtPlanVO
extPlanVOByNumber
=
this
.
searchByNumber
(
excelVO
.
getNumber
());
if
(!
StringUtils
.
isEmpty
(
extPlanVOByNumber
))
{
buffer
.
append
(
String
.
format
(
"第%s行计划编号已存在"
,
i
+
1
)
+
"</br>"
);
}
}
}
if
(
StringUtils
.
isEmpty
(
excelVO
.
getName
()))
{
if
(
StringUtils
.
isEmpty
(
excelVO
.
getName
()))
{
buffer
.
append
(
String
.
format
(
"第%s行的计划名称为空"
,
i
+
1
)
).
append
(
'\n'
);
buffer
.
append
(
String
.
format
(
"第%s行的计划名称为空"
,
i
+
1
)
+
"</br>"
);
}
}
if
(
StringUtils
.
isEmpty
(
excelVO
.
getStartTime
()))
{
if
(
StringUtils
.
isEmpty
(
excelVO
.
getStartTime
()))
{
buffer
.
append
(
String
.
format
(
"第%s行,请填写正确的计划开始时间的日期格式"
,
i
+
1
)
).
append
(
'\n'
);
buffer
.
append
(
String
.
format
(
"第%s行,请填写正确的计划开始时间的日期格式"
,
i
+
1
)
+
"</br>"
);
}
}
if
(
StringUtils
.
isEmpty
(
excelVO
.
getFeedbackType
()))
{
if
(
StringUtils
.
isEmpty
(
excelVO
.
getFeedbackType
()))
{
buffer
.
append
(
String
.
format
(
"第%s行的反馈类型为空"
,
i
+
1
)
).
append
(
'\n'
);
buffer
.
append
(
String
.
format
(
"第%s行的反馈类型为空"
,
i
+
1
)
+
"</br>"
);
}
}
if
(
StringUtils
.
isEmpty
(
excelVO
.
getPlanExecutor
()))
{
if
(
StringUtils
.
isEmpty
(
excelVO
.
getPlanExecutor
()))
{
buffer
.
append
(
String
.
format
(
"第%s行的计划执行人为空"
,
i
+
1
)).
append
(
'\n'
);
buffer
.
append
(
String
.
format
(
"第%s行的计划执行人为空"
,
i
+
1
)
+
"</br>"
);
}
else
{
DxUserInfoVO
userByName
=
dxUserInfoFeign
.
getUserByName
(
excelVO
.
getPlanExecutor
());
if
(
StringUtils
.
isEmpty
(
userByName
))
{
buffer
.
append
(
String
.
format
(
"第%s行计划执行人不存在"
,
i
+
1
)
+
"</br>"
);
}
else
{
excelVO
.
setPlanExecutorId
(
userByName
.
getId
());
}
}
}
if
(
StringUtils
.
isEmpty
(
excelVO
.
getCompleteTime
()))
{
if
(
StringUtils
.
isEmpty
(
excelVO
.
getCompleteTime
()))
{
buffer
.
append
(
String
.
format
(
"第%s行,请填写正确的计划完成时间的日期格式"
,
i
+
1
)
).
append
(
'\n'
);
buffer
.
append
(
String
.
format
(
"第%s行,请填写正确的计划完成时间的日期格式"
,
i
+
1
)
+
"</br>"
);
}
}
// 密级校验
// 密级校验
String
secretCode
=
excelVO
.
getSecretCode
();
String
secretCode
=
excelVO
.
getSecretCode
();
String
secretCodeKey
=
this
.
searchDictDataByDictCode
(
Constants
.
SECRET_CODE
,
secretCode
);
String
secretCodeKey
=
this
.
searchDictDataByDictCode
(
Constants
.
SECRET_CODE
,
secretCode
);
if
(
StringUtils
.
isEmpty
(
secretCodeKey
))
{
if
(
StringUtils
.
isEmpty
(
secretCodeKey
))
{
buffer
.
append
(
String
.
format
(
"第%s行密级格式不正确!"
,
i
+
1
)
).
append
(
'\n'
);
buffer
.
append
(
String
.
format
(
"第%s行密级格式不正确!"
,
i
+
1
)
+
"</br>"
);
}
}
if
(!
StringUtils
.
isEmpty
(
excelVO
.
getSuperPlanCode
()))
{
if
(!
StringUtils
.
isEmpty
(
excelVO
.
getSuperPlanCode
()))
{
//校验父级编号
//校验父级编号
ExtPlanVO
extPlanVO
=
this
.
searchByNumber
(
excelVO
.
getSuperPlanCode
());
ExtPlanVO
extPlanVO
=
this
.
searchByNumber
(
excelVO
.
getSuperPlanCode
());
if
(
ObjectUtils
.
isEmpty
(
extPlanVO
))
{
if
(
ObjectUtils
.
isEmpty
(
extPlanVO
))
{
buffer
.
append
(
String
.
format
(
"第%s行
,父级编号不存在"
,
i
+
1
)).
append
(
'\n'
);
buffer
.
append
(
String
.
format
(
"第%s行
父级编号不存在"
,
i
+
1
)
+
"</br>"
);
}
}
}
}
//校验编号是否已存在
ExtPlanVO
extPlanVOByNumber
=
this
.
searchByNumber
(
excelVO
.
getNumber
());
if
(!
StringUtils
.
isEmpty
(
extPlanVOByNumber
))
{
buffer
.
append
(
String
.
format
(
"第%s行,计划编号已存在"
,
i
+
1
)).
append
(
'\n'
);
}
DxUserInfoVO
userByName
=
dxUserInfoFeign
.
getUserByName
(
excelVO
.
getPlanExecutor
());
if
(
StringUtils
.
isEmpty
(
userByName
))
{
buffer
.
append
(
String
.
format
(
"第%s行,计划执行人不存在"
,
i
+
1
)).
append
(
'\n'
);
}
else
{
excelVO
.
setPlanExecutorId
(
userByName
.
getId
());
}
return
buffer
;
return
buffer
;
...
@@ -438,63 +440,36 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -438,63 +440,36 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
for
(
ExtPlanDocLinkVO
planDocLink
:
extPlanVO
.
getExtPlanDocLinks
())
{
for
(
ExtPlanDocLinkVO
planDocLink
:
extPlanVO
.
getExtPlanDocLinks
())
{
if
(!
ObjectUtils
.
isEmpty
(
planDocLink
.
getTarget
()))
{
if
(!
ObjectUtils
.
isEmpty
(
planDocLink
.
getTarget
()))
{
if
(!
extPlanVO
.
getNumber
().
equals
(
excelVO
.
getNumber
()))
{
if
(!
extPlanVO
.
getNumber
().
equals
(
excelVO
.
getNumber
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划编号不允许修改"
,
i
+
1
)
).
append
(
'\n'
);
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划编号不允许修改"
,
i
+
1
)
+
"</br>"
);
}
}
if
(!
extPlanVO
.
getName
().
equals
(
excelVO
.
getName
()))
{
if
(!
extPlanVO
.
getName
().
equals
(
excelVO
.
getName
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划名称不允许修改"
,
i
+
1
)
).
append
(
'\n'
);
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划名称不允许修改"
,
i
+
1
)
+
"</br>"
);
}
}
int
compare
=
extPlanVO
.
getStartTime
().
compareTo
(
excelVO
.
getStartTime
());
int
compare
=
extPlanVO
.
getStartTime
().
compareTo
(
excelVO
.
getStartTime
());
if
(
compare
!=
0
)
{
if
(
compare
!=
0
)
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划开始时间不允许修改"
,
i
+
1
)
).
append
(
'\n'
);
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划开始时间不允许修改"
,
i
+
1
)
+
"</br>"
);
}
}
if
(!
extPlanVO
.
getFeedbackType
().
equals
(
excelVO
.
getFeedbackType
()))
{
if
(!
extPlanVO
.
getFeedbackType
().
equals
(
excelVO
.
getFeedbackType
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划反馈类型不允许修改"
,
i
+
1
)
).
append
(
'\n'
);
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划反馈类型不允许修改"
,
i
+
1
)
+
"</br>"
);
}
}
if
(!
extPlanVO
.
getPlanExecutor
().
equals
(
excelVO
.
getPlanExecutor
()))
{
if
(!
extPlanVO
.
getPlanExecutor
().
equals
(
excelVO
.
getPlanExecutor
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划执行人不允许修改"
,
i
+
1
)
).
append
(
'\n'
);
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划执行人不允许修改"
,
i
+
1
)
+
"</br>"
);
}
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getFileType
(),
excelVO
.
getFileType
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划交付文件类型不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getFileName
(),
excelVO
.
getFileName
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划交付文件名称不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getFileNumber
(),
excelVO
.
getFileNumber
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划交付文件编号不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getPhaseState
(),
excelVO
.
getPhaseState
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划阶段状态不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
DxDocumentVO
doc
=
planDocLink
.
getTarget
();
DxDocumentVO
doc
=
planDocLink
.
getTarget
();
if
(
Constants
.
REVIEWING
.
equals
(
doc
.
getState
()))
{
if
(
Constants
.
REVIEWING
.
equals
(
doc
.
getState
()))
{
if
(!
StringUtil
.
equals
(
extPlanVO
.
getBusinessPlanType
(),
excelVO
.
getBusinessPlanType
()))
{
if
(!
StringUtil
.
equals
(
extPlanVO
.
getBusinessPlanType
(),
excelVO
.
getBusinessPlanType
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划业务计划类型不允许修改"
,
i
+
1
))
.
append
(
'\n'
)
;
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划业务计划类型不允许修改"
,
i
+
1
));
}
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getContractNo
(),
excelVO
.
getContractNo
()))
{
if
(!
StringUtil
.
equals
(
extPlanVO
.
getContractNo
(),
excelVO
.
getContractNo
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划合同编号不允许修改"
,
i
+
1
))
.
append
(
'\n'
)
;
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划合同编号不允许修改"
,
i
+
1
));
}
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getSuperPlanCode
(),
excelVO
.
getSuperPlanCode
()))
{
if
(!
StringUtil
.
equals
(
extPlanVO
.
getSuperPlanCode
(),
excelVO
.
getSuperPlanCode
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划父级计划编号不允许修改"
,
i
+
1
)).
append
(
'\n'
);
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划父级计划编号不允许修改"
,
i
+
1
));
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getFileCode
(),
excelVO
.
getFileCode
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划文件代号不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getProjectCode
(),
excelVO
.
getProjectCode
()))
{
if
(!
StringUtil
.
equals
(
extPlanVO
.
getProjectCode
(),
excelVO
.
getProjectCode
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划项目代号不允许修改"
,
i
+
1
)).
append
(
'\n'
);
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划项目代号不允许修改"
,
i
+
1
));
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getSystemCode
(),
excelVO
.
getSystemCode
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划管理信息系统编码不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getReview
(),
excelVO
.
getReview
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划审核者不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getApprover
(),
excelVO
.
getApprover
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划批准者不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getVerifier
(),
excelVO
.
getVerifier
()))
{
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划审定者不允许修改"
,
i
+
1
)).
append
(
'\n'
);
}
}
}
}
}
}
...
...
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