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
9dfa2af4
Commit
9dfa2af4
authored
Jul 29, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ExtPlanController:业务代码迁入(2.x版本->4.1版本)--已全部编译通过
parent
c41d2718
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
101 additions
and
76 deletions
+101
-76
jacob.jar
dcs-plan-common/lib/jacob.jar
+0
-0
pom.xml
dcs-plan-common/pom.xml
+13
-0
FileUtils.java
.../main/java/com/yonde/dcs/plan/common/utils/FileUtils.java
+6
-3
ExtPlanVO.java
...src/main/java/com/yonde/dcs/plan/common/vo/ExtPlanVO.java
+5
-0
PlanExcelVO.java
...c/main/java/com/yonde/dcs/plan/common/vo/PlanExcelVO.java
+3
-2
ExtPlanServiceImpl.java
.../yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
+74
-71
No files found.
dcs-plan-common/lib/jacob.jar
0 → 100644
View file @
9dfa2af4
File added
dcs-plan-common/pom.xml
View file @
9dfa2af4
...
@@ -50,6 +50,19 @@
...
@@ -50,6 +50,19 @@
<artifactId>
dex-basic-service-common
</artifactId>
<artifactId>
dex-basic-service-common
</artifactId>
<version>
4.1-RELEASE
</version>
<version>
4.1-RELEASE
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.jacob
</groupId>
<artifactId>
jacob
</artifactId>
<version>
1.19
</version>
<scope>
system
</scope>
<systemPath>
${project.basedir}/lib/jacob.jar
</systemPath>
</dependency>
<dependency>
<groupId>
org.apache.pdfbox
</groupId>
<artifactId>
pdfbox
</artifactId>
<version>
2.0.24
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
...
...
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/utils/FileUtils.java
View file @
9dfa2af4
...
@@ -2,17 +2,20 @@ package com.yonde.dcs.plan.common.utils;
...
@@ -2,17 +2,20 @@ package com.yonde.dcs.plan.common.utils;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.IoUtil
;
import
cn.hutool.core.io.IoUtil
;
import
com.inet.pdm.constants.Constants
;
import
com.jacob.activeX.ActiveXComponent
;
import
com.jacob.activeX.ActiveXComponent
;
import
com.jacob.com.Dispatch
;
import
com.jacob.com.Dispatch
;
import
com.jacob.com.Variant
;
import
com.jacob.com.Variant
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.valut.handler.ContentHolder
;
import
com.yonde.dex.valut.vo.ObjFileLinkVO
;
import
com.yonde.dex.dfs.handler.ContentHolder
;
import
com.yonde.dex.dfs.vo.ObjFileLinkVO
;
import
lombok.SneakyThrows
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.pdfbox.io.MemoryUsageSetting
;
import
org.apache.pdfbox.io.MemoryUsageSetting
;
import
org.apache.pdfbox.multipdf.PDFMergerUtility
;
import
org.apache.pdfbox.multipdf.PDFMergerUtility
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
...
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtPlanVO.java
View file @
9dfa2af4
...
@@ -269,6 +269,11 @@ public class ExtPlanVO extends IdOnlyVO implements IdVO ,DxTreeContextVOHolder<E
...
@@ -269,6 +269,11 @@ public class ExtPlanVO extends IdOnlyVO implements IdVO ,DxTreeContextVOHolder<E
*/
*/
private
String
verifier
;
private
String
verifier
;
/**
* 密级
*/
private
String
secretCode
;
}
}
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/PlanExcelVO.java
View file @
9dfa2af4
...
@@ -3,6 +3,7 @@ package com.yonde.dcs.plan.common.vo;
...
@@ -3,6 +3,7 @@ package com.yonde.dcs.plan.common.vo;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -63,13 +64,13 @@ public class PlanExcelVO implements Serializable {
...
@@ -63,13 +64,13 @@ public class PlanExcelVO implements Serializable {
/**
/**
* 开始时间
* 开始时间
*/
*/
private
Dat
e
startTime
;
private
LocalDateTim
e
startTime
;
/**
/**
* 完成时间
* 完成时间
*/
*/
private
Dat
e
completeTime
;
private
LocalDateTim
e
completeTime
;
/**
/**
* 文件分类
* 文件分类
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
View file @
9dfa2af4
...
@@ -6,7 +6,9 @@ import com.yonde.dcs.plan.common.constants.Constants;
...
@@ -6,7 +6,9 @@ import com.yonde.dcs.plan.common.constants.Constants;
import
com.yonde.dcs.plan.common.utils.ExcelUtils
;
import
com.yonde.dcs.plan.common.utils.ExcelUtils
;
import
com.yonde.dcs.plan.common.utils.FileUtils
;
import
com.yonde.dcs.plan.common.utils.FileUtils
;
import
com.yonde.dcs.plan.common.utils.ResourceHelper
;
import
com.yonde.dcs.plan.common.utils.ResourceHelper
;
import
com.yonde.dcs.plan.common.vo.ExtPlanDocLinkVO
;
import
com.yonde.dcs.plan.common.vo.PlanExcelVO
;
import
com.yonde.dcs.plan.common.vo.PlanExcelVO
;
import
com.yonde.dcs.plan.core.service.ExtPlanDocLinkService
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
...
@@ -18,6 +20,7 @@ import com.yonde.dex.dao.service.util.DxPageUtils;
...
@@ -18,6 +20,7 @@ import com.yonde.dex.dao.service.util.DxPageUtils;
import
com.yonde.dex.dict.feign.DictDataFeignService
;
import
com.yonde.dex.dict.feign.DictDataFeignService
;
import
com.yonde.dex.dict.service.vo.DictDataVO
;
import
com.yonde.dex.dict.service.vo.DictDataVO
;
import
com.yonde.dex.user.common.vo.DxOrganizationVO
;
import
com.yonde.dex.user.common.vo.DxOrganizationVO
;
import
com.yonde.dex.version.plugin.core.deleteType.IterationDeleteVO
;
import
dm.jdbc.util.StringUtil
;
import
dm.jdbc.util.StringUtil
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -212,7 +215,7 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -212,7 +215,7 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
extPlanVO
.
setState
(
Constants
.
PLAN_STATE_UNOPENED
);
extPlanVO
.
setState
(
Constants
.
PLAN_STATE_UNOPENED
);
//todo wq:setDxContextId暂时注释,在2.0中DxContextId 属性在DxObjectVo类中,但在4.1中未找到
//todo wq:setDxContextId暂时注释,在2.0中DxContextId 属性在DxObjectVo类中,但在4.1中未找到
//extPlanVO.setDxContextId(projectId);
//extPlanVO.setDxContextId(projectId);
this
.
saveRecursion
(
extPlanVO
);
this
.
saveRecursion
(
(
V
)
extPlanVO
);
}
}
});
});
}
}
...
@@ -385,7 +388,7 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -385,7 +388,7 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
//设置Excel的值
//设置Excel的值
BeanUtils
.
copyProperties
(
planExcelVO
,
checkout
);
BeanUtils
.
copyProperties
(
planExcelVO
,
checkout
);
checkout
.
setOperator
(
OperatorType
.
MODIFY
);
checkout
.
setOperator
(
OperatorType
.
MODIFY
);
ExtPlanVO
planVO
=
this
.
saveRecursion
(
checkout
);
ExtPlanVO
planVO
=
this
.
saveRecursion
(
(
V
)
checkout
);
return
planVO
;
return
planVO
;
}
}
...
@@ -444,73 +447,73 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -444,73 +447,73 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
switch
(
extPlanVO
.
getState
())
{
switch
(
extPlanVO
.
getState
())
{
//未完成
//未完成
case
Constants
.
UNFINISHED
:
case
Constants
.
UNFINISHED
:
//todo wq: 2.0是使用extPlanVO.getSourcePlanDocLink,但是在4.0中获取方式?暂时将if前部注释
if
(
"交付文件类"
.
equals
(
extPlanVO
.
getFeedbackType
())
&&
!
CollectionUtils
.
isEmpty
(
extPlanVO
.
getSourcePlanDocLink
()))
{
//
if ("交付文件类".equals(extPlanVO.getFeedbackType()) && !CollectionUtils.isEmpty(extPlanVO.getSourcePlanDocLink())) {
for
(
PlanDocLinkVO
planDocLink
:
extPlanVO
.
getSourcePlanDocLink
())
{
//
for (PlanDocLinkVO planDocLink : extPlanVO.getSourcePlanDocLink()) {
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
)
+
"</br>"
);
//
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
)
+
"</br>"
);
//
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
)
+
"</br>"
);
//
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
)
+
"</br>"
);
//
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
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划执行人不允许修改", i + 1) + "</br>");
}
//
}
//
if
(!
StringUtil
.
equals
(
extPlanVO
.
getFileType
(),
excelVO
.
getFileType
()))
{
//
if (!StringUtil.equals(extPlanVO.getFileType(), excelVO.getFileType())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划交付文件类型不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划交付文件类型不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getFileName
(),
excelVO
.
getFileName
()))
{
//
if (!StringUtil.equals(extPlanVO.getFileName(), excelVO.getFileName())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划交付文件名称不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划交付文件名称不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getFileNumber
(),
excelVO
.
getFileNumber
()))
{
//
if (!StringUtil.equals(extPlanVO.getFileNumber(), excelVO.getFileNumber())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划交付文件编号不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划交付文件编号不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getPhaseState
(),
excelVO
.
getPhaseState
()))
{
//
if (!StringUtil.equals(extPlanVO.getPhaseState(), excelVO.getPhaseState())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划阶段状态不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划阶段状态不允许修改", i + 1) + "</br>");
}
//
}
//
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
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划业务计划类型不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getContractNo
(),
excelVO
.
getContractNo
()))
{
//
if (!StringUtil.equals(extPlanVO.getContractNo(), excelVO.getContractNo())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划合同编号不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划合同编号不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getSuperPlanCode
(),
excelVO
.
getSuperPlanCode
()))
{
//
if (!StringUtil.equals(extPlanVO.getSuperPlanCode(), excelVO.getSuperPlanCode())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划父级计划编号不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划父级计划编号不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getFileCode
(),
excelVO
.
getFileCode
()))
{
//
if (!StringUtil.equals(extPlanVO.getFileCode(), excelVO.getFileCode())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划文件代号不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划文件代号不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getProjectCode
(),
excelVO
.
getProjectCode
()))
{
//
if (!StringUtil.equals(extPlanVO.getProjectCode(), excelVO.getProjectCode())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划项目代号不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划项目代号不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getSystemCode
(),
excelVO
.
getSystemCode
()))
{
//
if (!StringUtil.equals(extPlanVO.getSystemCode(), excelVO.getSystemCode())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划管理信息系统编码不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划管理信息系统编码不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getReview
(),
excelVO
.
getReview
()))
{
//
if (!StringUtil.equals(extPlanVO.getReview(), excelVO.getReview())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划审核者不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划审核者不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getApprover
(),
excelVO
.
getApprover
()))
{
//
if (!StringUtil.equals(extPlanVO.getApprover(), excelVO.getApprover())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划批准者不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划批准者不允许修改", i + 1) + "</br>");
}
//
}
if
(!
StringUtil
.
equals
(
extPlanVO
.
getVerifier
(),
excelVO
.
getVerifier
()))
{
//
if (!StringUtil.equals(extPlanVO.getVerifier(), excelVO.getVerifier())) {
stringBuffer
.
append
(
String
.
format
(
"第%s行的计划审定者不允许修改"
,
i
+
1
)
+
"</br>"
);
//
stringBuffer.append(String.format("第%s行的计划审定者不允许修改", i + 1) + "</br>");
}
//
}
}
//
}
}
//
}
}
//
}
}
//
}
break
;
break
;
//已完成
//已完成
case
Constants
.
COMPLETED
:
case
Constants
.
COMPLETED
:
...
@@ -538,9 +541,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -538,9 +541,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
});
});
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
list
.
stream
().
forEach
(
x
->
{
list
.
stream
().
forEach
(
x
->
{
DeleteWrap
deleteWrap
=
new
DeleteWrap
();
IterationDeleteVO
deleteWrap
=
new
IterationDeleteVO
();
deleteWrap
.
setDeleteId
(
x
);
deleteWrap
.
setDeleteId
(
x
);
deleteWrap
.
setDeleteType
(
DeleteWrap
.
DeleteType
.
MASTER_ITERATION
);
deleteWrap
.
setDeleteType
(
IterationDeleteVO
.
DeleteType
.
MASTER_ITERATION
);
//删除
//删除
this
.
deleteObjByType
(
deleteWrap
);
this
.
deleteObjByType
(
deleteWrap
);
});
});
...
...
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