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
42b39220
Commit
42b39220
authored
Oct 24, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IED计划开启之后创建签审流程中的项目代号改为项目群的项目代号
parent
df0da5af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
14 deletions
+55
-14
IEDPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
+1
-1
ExtIEDPlanServiceImpl.java
...nde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
+54
-13
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
View file @
42b39220
...
@@ -234,7 +234,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -234,7 +234,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行,更新IED计划的文件编号:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"已完成的计划不能更新!"
);
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行,更新IED计划的文件编号:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"已完成的计划不能更新!"
);
errorList
.
add
(
errorString
);
errorList
.
add
(
errorString
);
}
}
//如果更新时,计划是未完成状态且不是待审阅状态时,不允许更新
//如果更新时,计划是未完成状态且
文档
不是待审阅状态时,不允许更新
if
(
Constants
.
UNFINISHED
.
equals
(
iedPlan
.
getState
()))
{
if
(
Constants
.
UNFINISHED
.
equals
(
iedPlan
.
getState
()))
{
DxDocumentVO
dxDocumentVO
=
getDocmentVoByPlanId
(
iedPlan
.
getId
());
DxDocumentVO
dxDocumentVO
=
getDocmentVoByPlanId
(
iedPlan
.
getId
());
if
(!
Constants
.
PENDING_REVIEW
.
equals
(
dxDocumentVO
.
getState
()))
{
if
(!
Constants
.
PENDING_REVIEW
.
equals
(
dxDocumentVO
.
getState
()))
{
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
View file @
42b39220
...
@@ -30,6 +30,8 @@ import com.yonde.dex.basedata.entity.api.CustomMultipartFile;
...
@@ -30,6 +30,8 @@ import com.yonde.dex.basedata.entity.api.CustomMultipartFile;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basic.feign.expand.ExtDxContextProjectServiceFeign
;
import
com.yonde.dex.context.common.vo.DxContextProjectVO
;
import
com.yonde.dex.context.common.vo.DxContextVO
;
import
com.yonde.dex.context.common.vo.DxContextVO
;
import
com.yonde.dex.dfs.feign.FileManagerFeignService
;
import
com.yonde.dex.dfs.feign.FileManagerFeignService
;
import
com.yonde.dex.systemfile.feign.SystemFileFeignService
;
import
com.yonde.dex.systemfile.feign.SystemFileFeignService
;
...
@@ -76,6 +78,8 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
...
@@ -76,6 +78,8 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
private
ExtDxDocumentServiceFeign
<
DxDocumentVO
>
extDxDocumentServiceFeign
;
private
ExtDxDocumentServiceFeign
<
DxDocumentVO
>
extDxDocumentServiceFeign
;
@Autowired
@Autowired
private
ExtIEDPlanDocLinkService
extIEDPlanDocLinkService
;
private
ExtIEDPlanDocLinkService
extIEDPlanDocLinkService
;
@Autowired
private
ExtDxContextProjectServiceFeign
extDxContextProjectServiceFeign
;
@Override
@Override
...
@@ -146,8 +150,8 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
...
@@ -146,8 +150,8 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
extIEDPlanExcelVO
.
setFileNumber
(
extIEDPlanVO
.
getFileNumber
());
extIEDPlanExcelVO
.
setFileNumber
(
extIEDPlanVO
.
getFileNumber
());
extIEDPlanExcelVO
.
setFileCode
(
extIEDPlanVO
.
getFileCode
());
extIEDPlanExcelVO
.
setFileCode
(
extIEDPlanVO
.
getFileCode
());
extIEDPlanExcelVO
.
setFileName
(
extIEDPlanVO
.
getFileName
());
extIEDPlanExcelVO
.
setFileName
(
extIEDPlanVO
.
getFileName
());
extIEDPlanExcelVO
.
setSystemNumber
(
extIEDPlanVO
.
getSystemNumber
());
extIEDPlanExcelVO
.
setSystemNumber
(
extIEDPlanVO
.
getSystemNumber
()
==
null
?
""
:
extIEDPlanVO
.
getSystemNumber
()
);
extIEDPlanExcelVO
.
setDeviceNumber
(
extIEDPlanVO
.
getDeviceNumber
());
extIEDPlanExcelVO
.
setDeviceNumber
(
extIEDPlanVO
.
getDeviceNumber
()
==
null
?
""
:
extIEDPlanVO
.
getDeviceNumber
()
);
extIEDPlanExcelVO
.
setPhase
(
extIEDPlanVO
.
getPhase
());
extIEDPlanExcelVO
.
setPhase
(
extIEDPlanVO
.
getPhase
());
if
(!
ObjectUtil
.
isEmpty
(
extIEDPlanVO
.
getAuditTime
()))
{
if
(!
ObjectUtil
.
isEmpty
(
extIEDPlanVO
.
getAuditTime
()))
{
extIEDPlanExcelVO
.
setAuditTime
(
extIEDPlanVO
.
getAuditTime
().
format
(
DateTimeFormatter
.
ISO_DATE
));
extIEDPlanExcelVO
.
setAuditTime
(
extIEDPlanVO
.
getAuditTime
().
format
(
DateTimeFormatter
.
ISO_DATE
));
...
@@ -155,15 +159,25 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
...
@@ -155,15 +159,25 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
if
(!
ObjectUtil
.
isEmpty
(
extIEDPlanVO
.
getFileSubmitTime
()))
{
if
(!
ObjectUtil
.
isEmpty
(
extIEDPlanVO
.
getFileSubmitTime
()))
{
extIEDPlanExcelVO
.
setFileSubmitTime
(
extIEDPlanVO
.
getFileSubmitTime
().
format
(
DateTimeFormatter
.
ISO_DATE
));
extIEDPlanExcelVO
.
setFileSubmitTime
(
extIEDPlanVO
.
getFileSubmitTime
().
format
(
DateTimeFormatter
.
ISO_DATE
));
}
}
extIEDPlanExcelVO
.
setEditor
(
String
.
valueOf
(
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"editorName"
)));
Object
editorName
=
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"editorName"
);
extIEDPlanExcelVO
.
setChecker
(
String
.
valueOf
(
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"checkerName"
)));
extIEDPlanExcelVO
.
setEditor
(
ObjectUtils
.
isEmpty
(
editorName
)?
""
:
editorName
.
toString
());
extIEDPlanExcelVO
.
setAuditor
(
String
.
valueOf
(
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"auditorName"
)));
extIEDPlanExcelVO
.
setInvestigator
(
String
.
valueOf
(
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"investigatorName"
)));
Object
checkerName
=
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"checkerName"
);
extIEDPlanExcelVO
.
setRatifier
(
String
.
valueOf
(
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"ratifierName"
)));
extIEDPlanExcelVO
.
setChecker
(
ObjectUtils
.
isEmpty
(
checkerName
)?
""
:
checkerName
.
toString
());
extIEDPlanExcelVO
.
setNote
(
extIEDPlanVO
.
getNote
());
Object
auditorName
=
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"auditorName"
);
extIEDPlanExcelVO
.
setAuditor
(
ObjectUtils
.
isEmpty
(
auditorName
)?
""
:
auditorName
.
toString
());
Object
investigatorName
=
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"investigatorName"
);
extIEDPlanExcelVO
.
setInvestigator
(
ObjectUtils
.
isEmpty
(
investigatorName
)?
""
:
investigatorName
.
toString
());
Object
ratifierName
=
extIEDPlanVO
.
getDynamicAttrs
().
get
(
"ratifierName"
);
extIEDPlanExcelVO
.
setRatifier
(
ObjectUtils
.
isEmpty
(
ratifierName
)?
""
:
ratifierName
.
toString
());
extIEDPlanExcelVO
.
setNote
(
extIEDPlanVO
.
getNote
()
==
null
?
""
:
extIEDPlanVO
.
getNote
());
//获取密级code
//获取密级code
String
secretCode
=
CommonUtils
.
searchDictDataValueByDictCode
(
Constants
.
SECRET_CODE
,
extIEDPlanVO
.
getSecretCode
());
String
secretCode
=
CommonUtils
.
searchDictDataValueByDictCode
(
Constants
.
SECRET_CODE
,
extIEDPlanVO
.
getSecretCode
());
extIEDPlanExcelVO
.
setSecretCode
(
secretCode
);
extIEDPlanExcelVO
.
setSecretCode
(
secretCode
==
null
?
""
:
secretCode
);
extIEDPlanExcelVOList
.
add
(
extIEDPlanExcelVO
);
extIEDPlanExcelVOList
.
add
(
extIEDPlanExcelVO
);
}
}
return
extIEDPlanExcelVOList
;
return
extIEDPlanExcelVOList
;
...
@@ -218,11 +232,10 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
...
@@ -218,11 +232,10 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
dxDocumentVO
.
setDynamicAttrs
(
dynamicAttrs
);
dxDocumentVO
.
setDynamicAttrs
(
dynamicAttrs
);
//创建时间
//创建时间
dxDocumentVO
.
setCreateTime
(
LocalDateTime
.
now
());
dxDocumentVO
.
setCreateTime
(
LocalDateTime
.
now
());
//文档扩展类的设备号;
dxDocumentVO
.
setOwnedEquipment
(
extIEDPlanVO
.
getDeviceNumber
());
dxDocumentVO
.
setOwnedEquipment
(
extIEDPlanVO
.
getDeviceNumber
());
//todo wq 设备号和项目代号需要产品解决,暂时注释
//文档扩展类的项目群的代号
//文档扩展类的设备号
dxDocumentVO
.
setProjectCode
(
getProgramProjectCodeByProjectId
(
extIEDPlanVO
.
getDxContext
()));
dxDocumentVO
.
setProjectCode
(
extIEDPlanVO
.
getDxContext
().
getNumber
());
//文档扩展类的项目代号
//设置扩展属性
//设置扩展属性
dxDocumentVO
.
setOperator
(
OperatorType
.
ADD
);
dxDocumentVO
.
setOperator
(
OperatorType
.
ADD
);
DxDocumentVO
dxDocumentVOForDB
=
extDxDocumentServiceFeign
.
saveRecursion
(
dxDocumentVO
);
DxDocumentVO
dxDocumentVOForDB
=
extDxDocumentServiceFeign
.
saveRecursion
(
dxDocumentVO
);
...
@@ -295,6 +308,34 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
...
@@ -295,6 +308,34 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
return
fileName
;
return
fileName
;
}
}
/**
* 根据项目或子项id查询项目群的项目代号
* @return
*/
public
String
getProgramProjectCodeByProjectId
(
DxContextVO
dxContextVO
){
//project_class = 项目群:program 项目:project 子项:childProject
if
(
"childProject"
.
equals
(
dxContextVO
.
getProjectClass
())){
//如果是子项,需要查询两次查项目群 --下面是查询项目
SearchQueryCondition
searchProject
=
SearchUtil
.
buildQuery
(
"parentId"
,
SearchItem
.
Operator
.
EQ
,
dxContextVO
.
getParentId
());
DxPageImpl
projectDxPage
=
extDxContextProjectServiceFeign
.
findRecursion
(
searchProject
);
DxContextProjectVO
project
=
(
DxContextProjectVO
)
projectDxPage
.
getContent
().
get
(
0
);
//根据项目查询项目群
SearchQueryCondition
searchProgram
=
SearchUtil
.
buildQuery
(
"id"
,
SearchItem
.
Operator
.
EQ
,
project
.
getParentId
());
DxPageImpl
programDxPage
=
extDxContextProjectServiceFeign
.
findRecursion
(
searchProgram
);
DxContextProjectVO
program
=
(
DxContextProjectVO
)
programDxPage
.
getContent
().
get
(
0
);
return
program
.
getNumber
();
}
else
{
//如果是项目,就查询一次查到项目群
SearchQueryCondition
searchProgram
=
SearchUtil
.
buildQuery
(
"id"
,
SearchItem
.
Operator
.
EQ
,
dxContextVO
.
getParentId
());
DxPageImpl
programDxPage
=
extDxContextProjectServiceFeign
.
findRecursion
(
searchProgram
);
DxContextProjectVO
program
=
(
DxContextProjectVO
)
programDxPage
.
getContent
().
get
(
0
);
return
program
.
getNumber
();
}
}
}
}
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