Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
I
inet-doc-expand
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
inet-doc-expand
Commits
8116f58d
Commit
8116f58d
authored
Aug 01, 2024
by
xuzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat[doc]代码迁移
parent
f1fd1dfb
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
547 additions
and
263 deletions
+547
-263
pom.xml
dcs-doc-common/pom.xml
+5
-0
DxDocumentVO.java
...n/java/com/yonde/dcs/document/common/vo/DxDocumentVO.java
+5
-0
ExpectPayDetailsVO.java
.../com/yonde/dcs/document/common/vo/ExpectPayDetailsVO.java
+9
-0
ExtContractExpensesVO.java
...m/yonde/dcs/document/common/vo/ExtContractExpensesVO.java
+20
-2
ExtContractLinkVO.java
...a/com/yonde/dcs/document/common/vo/ExtContractLinkVO.java
+5
-5
ExtDisReocredLinkVO.java
...com/yonde/dcs/document/common/vo/ExtDisReocredLinkVO.java
+3
-3
ExtIncomeBillInfoVO.java
...com/yonde/dcs/document/common/vo/ExtIncomeBillInfoVO.java
+20
-1
ExtIncomeContractVO.java
...com/yonde/dcs/document/common/vo/ExtIncomeContractVO.java
+0
-16
ExtIncomeDetailVO.java
...a/com/yonde/dcs/document/common/vo/ExtIncomeDetailVO.java
+36
-2
ExtSpendingDetailVO.java
...com/yonde/dcs/document/common/vo/ExtSpendingDetailVO.java
+22
-2
pom.xml
dcs-doc-core/pom.xml
+23
-0
ContractEvent.java
...ava/com/yonde/dcs/document/core/events/ContractEvent.java
+0
-106
DocBeforeCreateEvent.java
.../yonde/dcs/document/core/events/DocBeforeCreateEvent.java
+15
-13
DocTransactionEvent.java
...m/yonde/dcs/document/core/events/DocTransactionEvent.java
+17
-17
ProcessDataUtils.java
.../com/yonde/dcs/document/core/events/ProcessDataUtils.java
+43
-48
ValidateSecretListener.java
...onde/dcs/document/core/events/ValidateSecretListener.java
+27
-28
InternalInterfaceUtils.java
...nde/dcs/document/core/factory/InternalInterfaceUtils.java
+194
-0
MeetingUtils.java
...ava/com/yonde/dcs/document/core/factory/MeetingUtils.java
+1
-0
OutdatedDocNotifyUtils.java
...nde/dcs/document/core/factory/OutdatedDocNotifyUtils.java
+83
-0
ExtAutoTaskServiceImpl.java
...cs/document/core/service/impl/ExtAutoTaskServiceImpl.java
+0
-1
DocumentDispatch.java
...va/com/yonde/dcs/document/core/word/DocumentDispatch.java
+1
-1
ImportWordService.java
...a/com/yonde/dcs/document/core/word/ImportWordService.java
+18
-18
No files found.
dcs-doc-common/pom.xml
View file @
8116f58d
...
@@ -66,6 +66,11 @@
...
@@ -66,6 +66,11 @@
<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.yonde.dcs
</groupId>
<artifactId>
dcs-plan-common
</artifactId>
<version>
4.1-RELEASE
</version>
</dependency>
</dependencies>
</dependencies>
...
...
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/DxDocumentVO.java
View file @
8116f58d
...
@@ -630,6 +630,11 @@ public class DxDocumentVO extends IdOnlyVO implements DxIterationVOHolder<DxDocu
...
@@ -630,6 +630,11 @@ public class DxDocumentVO extends IdOnlyVO implements DxIterationVOHolder<DxDocu
* 三级分类
* 三级分类
*/
*/
private
String
threeLevCategory
;
private
String
threeLevCategory
;
/**
* 阶段状态
*/
private
String
phaseState
;
}
}
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/ExpectPayDetailsVO.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -27,6 +30,12 @@ import java.util.Map;
...
@@ -27,6 +30,12 @@ import java.util.Map;
)
)
@ModelConfigProperty
(
syncES
=
true
)
@ModelConfigProperty
(
syncES
=
true
)
public
class
ExpectPayDetailsVO
extends
IdOnlyVO
implements
IdVO
{
public
class
ExpectPayDetailsVO
extends
IdOnlyVO
implements
IdVO
{
/**
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
/**
* 金额
* 金额
*/
*/
...
...
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/ExtContractExpensesVO.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.lcycle.baseentity.vo.DxObjectVo
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
lombok.ToString
;
...
@@ -25,7 +31,19 @@ import java.util.Map;
...
@@ -25,7 +31,19 @@ import java.util.Map;
defaultImpl
=
ExtContractExpensesVO
.
class
defaultImpl
=
ExtContractExpensesVO
.
class
)
)
@ModelConfigProperty
(
syncES
=
true
)
@ModelConfigProperty
(
syncES
=
true
)
public
class
ExtContractExpensesVO
extends
DxObjectVo
{
public
class
ExtContractExpensesVO
extends
IdOnlyVO
implements
IdVO
,
DxContextVOHolder
{
/**
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxContextVOEmbeddable
dxContextEmbeddable
;
/**
/**
* 收入合同
* 收入合同
*/
*/
...
...
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/ExtContractLinkVO.java
View file @
8116f58d
...
@@ -2,14 +2,14 @@ package com.yonde.dcs.document.common.vo;
...
@@ -2,14 +2,14 @@ package com.yonde.dcs.document.common.vo;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dex.basedata.entity.annotation.*
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.data.VersionRelationType
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOHolder
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -32,7 +32,7 @@ import java.util.Map;
...
@@ -32,7 +32,7 @@ import java.util.Map;
defaultImpl
=
ExtContractLinkVO
.
class
defaultImpl
=
ExtContractLinkVO
.
class
)
)
@ModelConfigProperty
(
syncES
=
true
)
@ModelConfigProperty
(
syncES
=
true
)
public
class
ExtContractLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
DxDocumentVO
,
DxDocumen
tVO
>,
DxLogicDeleteVOHolder
{
public
class
ExtContractLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtIncomeContractVO
,
ExtSpendingContrac
tVO
>,
DxLogicDeleteVOHolder
{
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
public
static
final
String
DX_LOGIC_DELETE_EMBEDDABLE_PROP_NAME
=
"dxLogicDeleteEmbeddable"
;
public
static
final
String
DX_LOGIC_DELETE_EMBEDDABLE_PROP_NAME
=
"dxLogicDeleteEmbeddable"
;
...
@@ -58,7 +58,7 @@ public class ExtContractLinkVO extends IdOnlyVO implements IdVO,DxLinkDataVOHold
...
@@ -58,7 +58,7 @@ public class ExtContractLinkVO extends IdOnlyVO implements IdVO,DxLinkDataVOHold
*/
*/
@DexEmbedded
()
@DexEmbedded
()
@JsonIgnore
@JsonIgnore
private
DxLinkDataVOEmbeddable
<
DxDocumentVO
,
DxDocumen
tVO
>
dxLinkDataEmbeddable
;
private
DxLinkDataVOEmbeddable
<
ExtIncomeContractVO
,
ExtSpendingContrac
tVO
>
dxLinkDataEmbeddable
;
/**
/**
* 支出合同
* 支出合同
*/
*/
...
...
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/ExtDisReocredLinkVO.java
View file @
8116f58d
...
@@ -2,13 +2,13 @@ package com.yonde.dcs.document.common.vo;
...
@@ -2,13 +2,13 @@ package com.yonde.dcs.document.common.vo;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dcs.plan.common.vo.ExtPlanVO
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOEmbeddable
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder
;
import
com.yonde.dex.linkdata.plugin.common.DxLinkDataVOHolder
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable
;
...
@@ -34,7 +34,7 @@ import java.util.Map;
...
@@ -34,7 +34,7 @@ import java.util.Map;
defaultImpl
=
ExtDisReocredLinkVO
.
class
defaultImpl
=
ExtDisReocredLinkVO
.
class
)
)
@ModelConfigProperty
(
syncES
=
true
)
@ModelConfigProperty
(
syncES
=
true
)
public
class
ExtDisReocredLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtDistributeRecordVO
,
IdOnlyEntity
>
{
public
class
ExtDisReocredLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtDistributeRecordVO
,
ExtPlanVO
>
{
/**
/**
* dao扩展对象
* dao扩展对象
...
@@ -55,7 +55,7 @@ public class ExtDisReocredLinkVO extends IdOnlyVO implements IdVO, DxLinkDataVOH
...
@@ -55,7 +55,7 @@ public class ExtDisReocredLinkVO extends IdOnlyVO implements IdVO, DxLinkDataVOH
*/
*/
@DexEmbedded
()
@DexEmbedded
()
@JsonIgnore
@JsonIgnore
private
DxLinkDataVOEmbeddable
<
ExtDistributeRecordVO
,
IdOnlyEntity
>
dxLinkDataEmbeddable
;
private
DxLinkDataVOEmbeddable
<
ExtDistributeRecordVO
,
ExtPlanVO
>
dxLinkDataEmbeddable
;
/**
/**
* DxObject
* DxObject
...
...
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/ExtIncomeBillInfoVO.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
lombok.ToString
;
...
@@ -25,7 +32,19 @@ import java.util.Map;
...
@@ -25,7 +32,19 @@ import java.util.Map;
defaultImpl
=
ExtIncomeBillInfoVO
.
class
defaultImpl
=
ExtIncomeBillInfoVO
.
class
)
)
@ModelConfigProperty
(
syncES
=
true
)
@ModelConfigProperty
(
syncES
=
true
)
public
class
ExtIncomeBillInfoVO
extends
DxObjectVo
{
public
class
ExtIncomeBillInfoVO
extends
IdOnlyVO
implements
IdVO
,
DxContextVOHolder
{
/**
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxContextVOEmbeddable
dxContextEmbeddable
;
/**
/**
* 收入明细
* 收入明细
*/
*/
...
...
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/ExtIncomeContractVO.java
View file @
8116f58d
...
@@ -71,20 +71,6 @@ public class ExtIncomeContractVO extends IdOnlyVO implements DxSecretVOHolder, D
...
@@ -71,20 +71,6 @@ public class ExtIncomeContractVO extends IdOnlyVO implements DxSecretVOHolder, D
@JsonIgnore
@JsonIgnore
private
DxSecretVOEmbeddable
dxSecretEmbeddable
;
private
DxSecretVOEmbeddable
dxSecretEmbeddable
;
public
class
ExtIncomeContractVO
extends
IdOnlyVO
implements
IdVO
,
DxLogicDeleteVOHolder
{
/**
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLogicDeleteVOEmbeddable
dxLogicDeleteEmbeddable
;
/**
/**
* 项目属性
* 项目属性
*/
*/
...
@@ -246,7 +232,5 @@ public class ExtIncomeContractVO extends IdOnlyVO implements IdVO, DxLogicDelete
...
@@ -246,7 +232,5 @@ public class ExtIncomeContractVO extends IdOnlyVO implements IdVO, DxLogicDelete
*/
*/
@RelationProperty
(
refProperty
=
"source"
)
@RelationProperty
(
refProperty
=
"source"
)
private
List
<
ExtContractLinkVO
>
sourceContractLink
;
private
List
<
ExtContractLinkVO
>
sourceContractLink
;
}
}
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/ExtIncomeDetailVO.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.annotation.RelationProperty
;
import
com.yonde.dex.basedata.entity.annotation.RelationProperty
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.lcycle.baseentity.vo.DxObjectVo
;
import
com.yonde.dex.context.common.vo.DxContextVO
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
com.yonde.dex.logicdelete.plugin.common.entity.DxLogicDeleteVOEmbeddable
;
import
com.yonde.dex.secretcode.plugin.common.entity.DxSecretVOEmbeddable
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
lombok.ToString
;
...
@@ -29,7 +37,33 @@ import java.util.Map;
...
@@ -29,7 +37,33 @@ import java.util.Map;
defaultImpl
=
ExtIncomeDetailVO
.
class
defaultImpl
=
ExtIncomeDetailVO
.
class
)
)
@ModelConfigProperty
(
syncES
=
true
)
@ModelConfigProperty
(
syncES
=
true
)
public
class
ExtIncomeDetailVO
extends
DxObjectVo
implements
IdVO
{
public
class
ExtIncomeDetailVO
extends
IdOnlyVO
implements
IdVO
,
DxContextVOHolder
{
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxContextVOEmbeddable
dxContextEmbeddable
;
/**
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLogicDeleteVOEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxSecretVOEmbeddable
dxSecretEmbeddable
;
/**
/**
* IncomeBillInfo集合
* IncomeBillInfo集合
*/
*/
...
...
dcs-doc-common/src/main/java/com/yonde/dcs/document/common/vo/ExtSpendingDetailVO.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
package
com
.
yonde
.
dcs
.
document
.
common
.
vo
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ModelConfigProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.annotation.ReferenceProperty
;
import
com.yonde.dex.basedata.entity.annotation.RelationProperty
;
import
com.yonde.dex.basedata.entity.annotation.RelationProperty
;
import
com.yonde.dex.lcycle.baseentity.vo.DxObjectVo
;
import
com.yonde.dex.basedata.entity.vo.DxIdVOEmbeddable
;
import
com.yonde.dex.basedata.entity.vo.IdOnlyVO
;
import
com.yonde.dex.basedata.entity.vo.IdVO
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOEmbeddable
;
import
com.yonde.dex.context.plugin.common.entity.DxContextVOHolder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
lombok.ToString
;
...
@@ -29,7 +35,21 @@ import java.util.Map;
...
@@ -29,7 +35,21 @@ import java.util.Map;
defaultImpl
=
ExtSpendingDetailVO
.
class
defaultImpl
=
ExtSpendingDetailVO
.
class
)
)
@ModelConfigProperty
(
syncES
=
true
)
@ModelConfigProperty
(
syncES
=
true
)
public
class
ExtSpendingDetailVO
extends
DxObjectVo
{
public
class
ExtSpendingDetailVO
extends
IdOnlyVO
implements
IdVO
,
DxContextVOHolder
{
/**
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxContextVOEmbeddable
dxContextEmbeddable
;
/**
/**
* 支出合同
* 支出合同
*/
*/
...
...
dcs-doc-core/pom.xml
View file @
8116f58d
...
@@ -115,6 +115,29 @@
...
@@ -115,6 +115,29 @@
<groupId>
org.freemarker
</groupId>
<groupId>
org.freemarker
</groupId>
<artifactId>
freemarker
</artifactId>
<artifactId>
freemarker
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
<version>
4.1.2
</version>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
4.1.2
</version>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml-schemas
</artifactId>
<version>
4.1.2
</version>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
ooxml-schemas
</artifactId>
<version>
1.4
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/events/ContractEvent.java
deleted
100644 → 0
View file @
f1fd1dfb
package
com
.
yonde
.
dcs
.
document
.
core
.
events
;
import
com.inet.pdm.entity.vo.ExtIncomeDetailVO
;
import
com.inet.pdm.entity.vo.ExtSpendingDetailVO
;
import
com.inet.pdm.service.ExtIncomeContractService
;
import
com.inet.pdm.service.ExtSpendingContractService
;
import
com.yonde.dex.dao.events.BusinessEventType
;
import
com.yonde.dex.dao.events.DxEvent
;
import
com.yonde.dex.dao.events.DxEventListener
;
import
com.yonde.dex.dao.events.DxEventWrap
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* @author xfchai
* @ClassName ContractEvent.java
* @Description TODO
* @createTime 2022/03/03 19:01:00
*/
@Component
@Slf4j
@DxEvent
public
class
ContractEvent
{
@Autowired
private
ExtIncomeContractService
extIncomeContractService
;
@Autowired
private
ExtSpendingContractService
extSpendingContractService
;
@DxEventListener
(
value
=
ExtIncomeDetailVO
.
class
,
eventType
=
BusinessEventType
.
POST_CREATE
,
order
=
1
)
public
void
incomeDetailPostCreateListener
(
List
<
DxEventWrap
<
ExtIncomeDetailVO
>>
events
)
{
events
.
forEach
(
e
->
{
ExtIncomeDetailVO
extIncomeDetailVO
=
e
.
getTarget
();
this
.
refreshInContractAmount
(
extIncomeDetailVO
.
getExtIncomeContractId
());
});
//刷新收入合同相关金额
}
@DxEventListener
(
value
=
ExtIncomeDetailVO
.
class
,
eventType
=
BusinessEventType
.
POST_UPDATE
,
order
=
1
)
public
void
incomeDetailPostUpdateListener
(
List
<
DxEventWrap
<
ExtIncomeDetailVO
>>
events
)
{
events
.
forEach
(
e
->
{
ExtIncomeDetailVO
extIncomeDetailVO
=
e
.
getTarget
();
this
.
refreshInContractAmount
(
extIncomeDetailVO
.
getExtIncomeContractId
());
});
}
@DxEventListener
(
value
=
ExtIncomeDetailVO
.
class
,
eventType
=
BusinessEventType
.
POST_DELETE
,
order
=
1
)
public
void
incomeDetailPostDeleteListener
(
List
<
DxEventWrap
<
ExtIncomeDetailVO
>>
events
)
{
events
.
forEach
(
e
->
{
ExtIncomeDetailVO
extIncomeDetailVO
=
e
.
getTarget
();
this
.
refreshInContractAmount
(
extIncomeDetailVO
.
getExtIncomeContractId
());
});
}
@DxEventListener
(
value
=
ExtSpendingDetailVO
.
class
,
eventType
=
BusinessEventType
.
POST_CREATE
,
order
=
1
)
public
void
spendingDetailPostCreateListener
(
List
<
DxEventWrap
<
ExtSpendingDetailVO
>>
events
)
{
events
.
forEach
(
e
->
{
ExtSpendingDetailVO
extSpendingDetailVO
=
e
.
getTarget
();
this
.
refreshSpeContractAmount
(
extSpendingDetailVO
.
getExtSpendingContractId
());
});
//刷新收入合同相关金额
}
@DxEventListener
(
value
=
ExtSpendingDetailVO
.
class
,
eventType
=
BusinessEventType
.
POST_UPDATE
,
order
=
1
)
public
void
spendingDetailPostUpdateListener
(
List
<
DxEventWrap
<
ExtSpendingDetailVO
>>
events
)
{
events
.
forEach
(
e
->
{
ExtSpendingDetailVO
extSpendingDetailVO
=
e
.
getTarget
();
this
.
refreshSpeContractAmount
(
extSpendingDetailVO
.
getExtSpendingContractId
());
});
}
@DxEventListener
(
value
=
ExtSpendingDetailVO
.
class
,
eventType
=
BusinessEventType
.
POST_DELETE
,
order
=
1
)
public
void
spendingDetailPostDeleteListener
(
List
<
DxEventWrap
<
ExtSpendingDetailVO
>>
events
)
{
events
.
forEach
(
e
->
{
ExtSpendingDetailVO
extSpendingDetailVO
=
e
.
getTarget
();
this
.
refreshSpeContractAmount
(
extSpendingDetailVO
.
getExtSpendingContractId
());
});
}
/**
* 刷新收入合同金额
*
* @param contractId
*/
private
void
refreshInContractAmount
(
Long
contractId
)
{
//已到款
//待拨付
extIncomeContractService
.
calculateIncome
(
contractId
);
//XXX年到款
extIncomeContractService
.
reCalculIncomeById
(
contractId
);
}
/**
* 刷新支出合同金额
*
* @param contractId
*/
private
void
refreshSpeContractAmount
(
Long
contractId
)
{
//已付金额
//未付金额
//付款比例
extSpendingContractService
.
calculateSpending
(
contractId
);
}
}
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/events/DocBeforeCreateEvent.java
View file @
8116f58d
...
@@ -2,15 +2,16 @@ package com.yonde.dcs.document.core.events;
...
@@ -2,15 +2,16 @@ package com.yonde.dcs.document.core.events;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.extra.spring.SpringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yonde.dcs.document.common.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.vo.ExtInterfaceInfoLinkVO
;
import
com.yonde.dcs.document.common.vo.ExtInterfaceInfoLinkVO
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.factory.InternalInterfaceUtils
;
import
com.yonde.dcs.document.core.factory.TechnicalFileUtils
;
import
com.yonde.dcs.document.core.factory.TechnicalFileUtils
;
import
com.yonde.dcs.document.core.service.ExtDocService
;
import
com.yonde.dcs.document.core.service.ExtDocService
;
import
com.yonde.dcs.document.core.util.ExtDocUtil
;
import
com.yonde.dcs.document.core.util.ExtDocUtil
;
import
com.yonde.dcs.document.core.util.FileUtils
;
import
com.yonde.dcs.document.core.util.FileUtils
;
import
com.yonde.dcs.document.core.util.Word2PdfJacobUtil
;
import
com.yonde.dcs.document.core.word.ImportWordService
;
import
com.yonde.dcs.document.core.word.ImportWordService
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.dao.events.BusinessEventType
;
import
com.yonde.dex.dao.events.BusinessEventType
;
...
@@ -18,6 +19,7 @@ import com.yonde.dex.dao.events.DxEvent;
...
@@ -18,6 +19,7 @@ import com.yonde.dex.dao.events.DxEvent;
import
com.yonde.dex.dao.events.DxEventListener
;
import
com.yonde.dex.dao.events.DxEventListener
;
import
com.yonde.dex.dao.events.DxEventWrap
;
import
com.yonde.dex.dao.events.DxEventWrap
;
import
com.yonde.dex.dfs.vo.ObjFileLinkVO
;
import
com.yonde.dex.dfs.vo.ObjFileLinkVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -137,14 +139,14 @@ public class DocBeforeCreateEvent {
...
@@ -137,14 +139,14 @@ public class DocBeforeCreateEvent {
* @param documentVo
* @param documentVo
* @param infoLinkVO 提资人信息
* @param infoLinkVO 提资人信息
*/
*/
public
void
generateAutoInterFaceWord
(
DxDocumentVO
documentVo
,
ExtInterfaceInfoLinkVO
infoLinkVO
,
WfProcessInfoVO
wfProcessInfoVO
)
{
public
void
generateAutoInterFaceWord
(
DxDocumentVO
documentVo
,
ExtInterfaceInfoLinkVO
infoLinkVO
,
Dx
WfProcessInfoVO
wfProcessInfoVO
)
{
try
{
try
{
String
file
=
documentVo
.
getSubTypeName
();
String
file
=
documentVo
.
getSubTypeName
();
String
outWordFilePath
=
Constants
.
MERGER_FILE_ABSOLUTE_PATH
+
documentVo
.
getSubTypeName
()
+
"\\"
+
documentVo
.
getNumber
()
+
"\\"
+
Constants
.
MERGER_SOURCE
+
"\\"
;
String
outWordFilePath
=
Constants
.
MERGER_FILE_ABSOLUTE_PATH
+
documentVo
.
getSubTypeName
()
+
"\\"
+
documentVo
.
getNumber
()
+
"\\"
+
Constants
.
MERGER_SOURCE
+
"\\"
;
//生成特定的文档目录,保存生成的word文件
//生成特定的文档目录,保存生成的word文件
FileUtil
.
mkdir
(
outWordFilePath
);
FileUtil
.
mkdir
(
outWordFilePath
);
Class
<?>
clazz
=
Class
.
forName
(
"com.inet.pdm.factory.InternalInterfaceUtils"
);
Class
<?>
clazz
=
Class
.
forName
(
"com.inet.pdm.factory.InternalInterfaceUtils"
);
Method
settingDataMethod
=
clazz
.
getMethod
(
"settingData"
,
DxDocumentVO
.
class
,
InterfaceInfoLinkVO
.
class
,
WfProcessInfoVO
.
class
);
Method
settingDataMethod
=
clazz
.
getMethod
(
"settingData"
,
DxDocumentVO
.
class
,
ExtInterfaceInfoLinkVO
.
class
,
Dx
WfProcessInfoVO
.
class
);
JSONObject
jsonObject
=
(
JSONObject
)
settingDataMethod
.
invoke
(
SpringUtil
.
getBean
(
InternalInterfaceUtils
.
class
),
documentVo
,
infoLinkVO
,
wfProcessInfoVO
);
JSONObject
jsonObject
=
(
JSONObject
)
settingDataMethod
.
invoke
(
SpringUtil
.
getBean
(
InternalInterfaceUtils
.
class
),
documentVo
,
infoLinkVO
,
wfProcessInfoVO
);
String
generateWordFilePath
=
FileUtils
.
generateWordFile
(
outWordFilePath
);
String
generateWordFilePath
=
FileUtils
.
generateWordFile
(
outWordFilePath
);
//生成word文件方法
//生成word文件方法
...
@@ -228,16 +230,16 @@ public class DocBeforeCreateEvent {
...
@@ -228,16 +230,16 @@ public class DocBeforeCreateEvent {
List
<
ObjFileLinkVO
>
objFileLinks
=
documentVo
.
getObjFileLinks
();
List
<
ObjFileLinkVO
>
objFileLinks
=
documentVo
.
getObjFileLinks
();
//判断是否为word,不是word不合并
//判断是否为word,不是word不合并
if
(!
CollectionUtils
.
isEmpty
(
objFileLinks
))
{
if
(!
CollectionUtils
.
isEmpty
(
objFileLinks
))
{
//获取主内容数据流
//
todo
获取主内容数据流
PapersVO
fileVO
=
extDocUtil
.
obtainPrimaryFile
(
objFileLinks
);
//
PapersVO fileVO = extDocUtil.obtainPrimaryFile(objFileLinks);
if
(!
ObjectUtils
.
isEmpty
(
fileVO
)
&&
(
fileVO
.
getOriginalFileName
().
endsWith
(
DOC_END_WITH
)
||
fileVO
.
getOriginalFileName
().
endsWith
(
DOCX_END_WITH
)))
{
//
if (!ObjectUtils.isEmpty(fileVO) && (fileVO.getOriginalFileName().endsWith(DOC_END_WITH) || fileVO.getOriginalFileName().endsWith(DOCX_END_WITH))) {
inputStream
=
extDocUtil
.
obtainPrimaryFileInputStream
(
fileVO
);
//
inputStream = extDocUtil.obtainPrimaryFileInputStream(fileVO);
//保存临时文件
//
//保存临时文件
String
filePath
=
FileUtils
.
saveToLocal
(
inputStream
,
outWordFilePath
+
fileVO
.
getOriginalFileName
());
//
String filePath = FileUtils.saveToLocal(inputStream, outWordFilePath + fileVO.getOriginalFileName());
log
.
info
(
"临时文件目录为:"
,
filePath
);
//
log.info("临时文件目录为:", filePath);
//先将word转为pdf,再合并
//
//先将word转为pdf,再合并
Word2PdfJacobUtil
.
word2PDF
(
filePath
,
outPath
+
"/"
+
i
+
"MasterFile.pdf"
);
//
Word2PdfJacobUtil.word2PDF(filePath, outPath + "/" + i + "MasterFile.pdf");
}
//
}
}
}
}
}
//合并生成好的文档
//合并生成好的文档
...
...
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/events/DocTransactionEvent.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
core
.
events
;
package
com
.
yonde
.
dcs
.
document
.
core
.
events
;
import
com.inet.pdm.entity.vo.ExtIncomeDetailVO
;
import
com.yonde.dcs.document.common.vo.DxDocumentVO
;
import
com.inet.pdm.entity.vo.ExtSpendingDetailVO
;
import
com.yonde.dcs.document.common.vo.ExtIncomeDetailVO
;
import
com.inet.pdm.service.ExtDocService
;
import
com.yonde.dcs.document.common.vo.ExtSpendingDetailVO
;
import
com.inet.pdm.service.ExtIncomeContractService
;
import
com.yonde.dcs.document.core.service.DxDocumentService
;
import
com.inet.pdm.service.ExtSpendingContractService
;
import
com.yonde.dcs.document.core.service.ExtDocService
;
import
com.inet.pdm.util.ExtDocUtil
;
import
com.yonde.dcs.document.core.util.ExtDocUtil
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.plan.feign.ExtIncomeContractServiceFeign
;
import
com.yonde.dcs.document.convert.service.DocConvertService
;
import
com.yonde.dcs.plan.feign.ExtSpendingContractServiceFeign
;
import
com.yonde.dcs.document.core.service.DocumentService
;
import
com.yonde.dex.dao.service.BaseService
;
import
com.yonde.dex.dao.service.BaseService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -32,13 +31,11 @@ public class DocTransactionEvent {
...
@@ -32,13 +31,11 @@ public class DocTransactionEvent {
@Autowired
@Autowired
@Qualifier
(
"documentServiceImpl"
)
@Qualifier
(
"documentServiceImpl"
)
DocumentService
documentService
;
D
xD
ocumentService
documentService
;
@Autowired
@Autowired
DocConvertService
docConver
tService
;
private
ExtIncomeContractServiceFeign
extIncomeContrac
tService
;
@Autowired
@Autowired
private
ExtIncomeContractService
extIncomeContractService
;
private
ExtSpendingContractServiceFeign
extSpendingContractService
;
@Autowired
private
ExtSpendingContractService
extSpendingContractService
;
@Autowired
@Autowired
private
ExtDocUtil
extDocUtil
;
private
ExtDocUtil
extDocUtil
;
...
@@ -71,9 +68,11 @@ public class DocTransactionEvent {
...
@@ -71,9 +68,11 @@ public class DocTransactionEvent {
private
void
refreshInContractAmount
(
Long
contractId
)
{
private
void
refreshInContractAmount
(
Long
contractId
)
{
//已到款
//已到款
//待拨付
//待拨付
extIncomeContractService
.
calculateIncome
(
contractId
);
//todo feign添加
// extIncomeContractService.calculateIncome(contractId);
//XXX年到款
//XXX年到款
extIncomeContractService
.
reCalculIncomeById
(
contractId
);
//todo feign添加
// extIncomeContractService.reCalculIncomeById(contractId);
}
}
/**
/**
...
@@ -85,6 +84,7 @@ public class DocTransactionEvent {
...
@@ -85,6 +84,7 @@ public class DocTransactionEvent {
//已付金额
//已付金额
//未付金额
//未付金额
//付款比例
//付款比例
extSpendingContractService
.
calculateSpending
(
contractId
);
//todo feign添加
// extSpendingContractService.calculateSpending(contractId);
}
}
}
}
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/events/ProcessDataUtils.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
core
.
events
;
package
com
.
yonde
.
dcs
.
document
.
core
.
events
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.extra.spring.SpringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.inet.pdm.constants.Constants
;
import
com.inet.pdm.factory.*
;
import
com.inet.pdm.service.ExtDocService
;
import
com.inet.pdm.util.ExtDocUtil
;
import
com.inet.pdm.util.FileUtils
;
import
com.inet.pdm.util.WorkFlowUtil
;
import
com.inet.pdm.word.ImportWordService
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.entity.vo.InterfaceInfoLinkVO
;
import
com.yonde.dcs.document.common.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.vo.ExtInterfaceInfoLinkVO
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.factory.InternalInterfaceUtils
;
import
com.yonde.dcs.document.core.factory.OutdatedDocNotifyUtils
;
import
com.yonde.dcs.document.core.service.ExtDocService
;
import
com.yonde.dcs.document.core.util.ExtDocUtil
;
import
com.yonde.dcs.document.core.util.FileUtils
;
import
com.yonde.dcs.document.core.util.FileUtils
;
import
com.yonde.dcs.document.core.util.WorkFlowUtil
;
import
com.yonde.dcs.document.core.word.ImportWordService
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessVO
;
import
com.yonde.dex.wfc.common.vo.WfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInstVO
;
import
com.yonde.dex.wfc.feign.api.DexWorkFlowService
;
import
com.yonde.dex.wfc.spi.utils.SpringUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -51,14 +45,14 @@ public class ProcessDataUtils {
...
@@ -51,14 +45,14 @@ public class ProcessDataUtils {
private
ExtDocUtil
extDocUtil
;
private
ExtDocUtil
extDocUtil
;
@Autowired
@Autowired
private
WorkFlowUtil
workFlowUtil
;
private
WorkFlowUtil
workFlowUtil
;
@Autowired
//
@Autowired
private
DexWorkFlowService
dexWorkFlowService
;
//
private DexWorkFlowService dexWorkFlowService;
/**
/**
* 单独处理过时文件通知单数据
* 单独处理过时文件通知单数据
*/
*/
public
void
processOutdatedDocNotify
(
DxDocumentVO
documentVo
)
{
public
void
processOutdatedDocNotify
(
DxDocumentVO
documentVo
)
{
extDocService
.
getDocWord
(
documentVo
,
OutdatedDocNotifyUtils
.
class
,
new
WfProcessInfoVO
(),
""
);
extDocService
.
getDocWord
(
documentVo
,
OutdatedDocNotifyUtils
.
class
,
new
Dx
WfProcessInfoVO
(),
""
);
}
}
/**
/**
...
@@ -68,35 +62,36 @@ public class ProcessDataUtils {
...
@@ -68,35 +62,36 @@ public class ProcessDataUtils {
*/
*/
public
void
processData
(
DxDocumentVO
documentVo
)
{
public
void
processData
(
DxDocumentVO
documentVo
)
{
String
subTypeName
=
documentVo
.
getSubTypeName
();
String
subTypeName
=
documentVo
.
getSubTypeName
();
DxWfProcessVO
DxWfProcessInstVO
=
workFlowUtil
.
getWfProcessInst
(
documentVo
);
//todo
DxWfProcessInfoVO
wfProcessInfoVO
=
dexWorkFlowService
.
getProcessInstDetailById
(
DxWfProcessInstVO
.
getId
());
// WfProcessInstVO DxWfProcessInstVO = workFlowUtil.getWfProcessInst(documentVo);
switch
(
subTypeName
)
{
// DxWfProcessInfoVO wfProcessInfoVO = dexWorkFlowService.getProcessInstDetailById(DxWfProcessInstVO.getId());
case
Constants
.
INTERNAL_INTERFACE
:
// switch (subTypeName) {
this
.
generateInterFaceWord
(
documentVo
,
new
InterfaceInfoLinkVO
(),
wfProcessInfoVO
);
// case Constants.INTERNAL_INTERFACE:
break
;
// this.generateInterFaceWord(documentVo, new InterfaceInfoLinkVO(), wfProcessInfoVO);
case
Constants
.
CONTACTLIST
:
// break;
extDocService
.
getDocWord
(
documentVo
,
ContactListUtils
.
class
,
wfProcessInfoVO
,
"一"
);
// case Constants.CONTACTLIST:
break
;
// extDocService.getDocWord(documentVo, ContactListUtils.class, wfProcessInfoVO, "一");
case
Constants
.
WORK_CONTACTLIST
:
// break;
extDocService
.
getDocWord
(
documentVo
,
WorkContactListUtils
.
class
,
wfProcessInfoVO
,
""
);
// case Constants.WORK_CONTACTLIST:
break
;
// extDocService.getDocWord(documentVo, WorkContactListUtils.class, wfProcessInfoVO, "");
case
Constants
.
DESIGN_CHANGE
:
// break;
extDocService
.
getDocWord
(
documentVo
,
DesignChangeUtils
.
class
,
wfProcessInfoVO
,
""
);
// case Constants.DESIGN_CHANGE:
break
;
// extDocService.getDocWord(documentVo, DesignChangeUtils.class, wfProcessInfoVO, "");
case
Constants
.
DESIGN_APPLICATION
:
// break;
extDocService
.
getDocWord
(
documentVo
,
DesignDocApplicatUtils
.
class
,
wfProcessInfoVO
,
""
);
// case Constants.DESIGN_APPLICATION:
break
;
// extDocService.getDocWord(documentVo, DesignDocApplicatUtils.class, wfProcessInfoVO, "");
case
Constants
.
DESIGN_ENTER
:
// break;
extDocService
.
getDocWord
(
documentVo
,
DesignEnterUtils
.
class
,
wfProcessInfoVO
,
""
);
// case Constants.DESIGN_ENTER:
break
;
// extDocService.getDocWord(documentVo, DesignEnterUtils.class, wfProcessInfoVO, "");
case
Constants
.
NCR
:
// break;
extDocService
.
getDocWord
(
documentVo
,
NCRUtils
.
class
,
wfProcessInfoVO
,
""
);
// case Constants.NCR:
break
;
// extDocService.getDocWord(documentVo, NCRUtils.class, wfProcessInfoVO, "");
case
Constants
.
DEN
:
// break;
//根据模板生成两张不同澄清单
// case Constants.DEN:
extDocService
.
getDocWord
(
documentVo
,
DENUtils
.
class
,
wfProcessInfoVO
,
""
);
// //根据模板生成两张不同澄清单
break
;
// extDocService.getDocWord(documentVo, DENUtils.class, wfProcessInfoVO, "");
}
// break;
// }
}
}
/**
/**
...
@@ -105,14 +100,14 @@ public class ProcessDataUtils {
...
@@ -105,14 +100,14 @@ public class ProcessDataUtils {
* @param documentVo
* @param documentVo
* @param infoLinkVO 提资人信息
* @param infoLinkVO 提资人信息
*/
*/
public
void
generateInterFaceWord
(
DxDocumentVO
documentVo
,
InterfaceInfoLinkVO
infoLinkVO
,
WfProcessInfoVO
wfProcessInfoVO
)
{
public
void
generateInterFaceWord
(
DxDocumentVO
documentVo
,
ExtInterfaceInfoLinkVO
infoLinkVO
,
Dx
WfProcessInfoVO
wfProcessInfoVO
)
{
try
{
try
{
String
file
=
documentVo
.
getSubTypeName
();
String
file
=
documentVo
.
getSubTypeName
();
String
outWordFilePath
=
Constants
.
MERGER_FILE_ABSOLUTE_PATH
+
documentVo
.
getSubTypeName
()
+
"\\"
+
documentVo
.
getNumber
()
+
"\\"
;
String
outWordFilePath
=
Constants
.
MERGER_FILE_ABSOLUTE_PATH
+
documentVo
.
getSubTypeName
()
+
"\\"
+
documentVo
.
getNumber
()
+
"\\"
;
//生成特定的文档目录,保存生成的word文件
//生成特定的文档目录,保存生成的word文件
FileUtil
.
mkdir
(
outWordFilePath
);
FileUtil
.
mkdir
(
outWordFilePath
);
Class
<?>
clazz
=
Class
.
forName
(
"com.inet.pdm.factory.InternalInterfaceUtils"
);
Class
<?>
clazz
=
Class
.
forName
(
"com.inet.pdm.factory.InternalInterfaceUtils"
);
Method
settingDataMethod
=
clazz
.
getMethod
(
"settingData"
,
DxDocumentVO
.
class
,
InterfaceInfoLinkVO
.
class
,
WfProcessInfoVO
.
class
);
Method
settingDataMethod
=
clazz
.
getMethod
(
"settingData"
,
DxDocumentVO
.
class
,
ExtInterfaceInfoLinkVO
.
class
,
Dx
WfProcessInfoVO
.
class
);
JSONObject
jsonObject
=
(
JSONObject
)
settingDataMethod
.
invoke
(
SpringUtil
.
getBean
(
InternalInterfaceUtils
.
class
),
documentVo
,
infoLinkVO
,
wfProcessInfoVO
);
JSONObject
jsonObject
=
(
JSONObject
)
settingDataMethod
.
invoke
(
SpringUtil
.
getBean
(
InternalInterfaceUtils
.
class
),
documentVo
,
infoLinkVO
,
wfProcessInfoVO
);
//生成word文件方法
//生成word文件方法
importWordService
.
getWordAllTable
(
jsonObject
,
PATH
+
file
+
".docx"
,
outWordFilePath
+
"outFile.docx"
);
importWordService
.
getWordAllTable
(
jsonObject
,
PATH
+
file
+
".docx"
,
outWordFilePath
+
"outFile.docx"
);
...
...
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/events/ValidateSecretListener.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
core
.
events
;
package
com
.
yonde
.
dcs
.
document
.
core
.
events
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.inet.pdm.entity.vo.ExtIncomeContractVO
;
import
com.inet.pdm.entity.vo.ExtPlanVO
;
import
com.inet.pdm.entity.vo.ExtSpendingContractVO
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.context.common.vo.DxContextVO
;
import
com.yonde.dex.context.common.vo.DxContextVO
;
import
com.yonde.dex.context.feign.ContextServiceFeign
;
import
com.yonde.dex.context.feign.ContextServiceFeign
;
import
com.yonde.dex.dao.service.BaseService
;
import
com.yonde.dex.dao.service.BaseService
;
import
com.yonde.dex.dao.service.listener.AbstractEventListener
;
import
com.yonde.dex.dao.service.listener.AbstractEventListener
;
import
com.yonde.dex.dict.
service.service.IDictData
Service
;
import
com.yonde.dex.dict.
feign.DictDataFeign
Service
;
import
com.yonde.dex.dict.service.vo.DictDataVO
;
import
com.yonde.dex.dict.service.vo.DictDataVO
;
import
com.yonde.dex.lcycle.baseentity.vo.DxObjectVo
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -27,7 +23,7 @@ import java.util.stream.Collectors;
...
@@ -27,7 +23,7 @@ import java.util.stream.Collectors;
@Slf4j
@Slf4j
public
class
ValidateSecretListener
extends
AbstractEventListener
<
BaseService
.
DataChangeEvent
>
{
public
class
ValidateSecretListener
extends
AbstractEventListener
<
BaseService
.
DataChangeEvent
>
{
@Autowired
@Autowired
private
IDictData
Service
dictDataService
;
private
DictDataFeign
Service
dictDataService
;
@Autowired
@Autowired
private
ContextServiceFeign
contextServiceFeign
;
private
ContextServiceFeign
contextServiceFeign
;
...
@@ -59,8 +55,8 @@ public class ValidateSecretListener extends AbstractEventListener<BaseService.Da
...
@@ -59,8 +55,8 @@ public class ValidateSecretListener extends AbstractEventListener<BaseService.Da
log
.
info
(
">>>>>extValidateSecret data:"
+
data
);
log
.
info
(
">>>>>extValidateSecret data:"
+
data
);
log
.
info
(
">>>>>extValidateSecret data.getClass:"
+
data
.
getClass
());
log
.
info
(
">>>>>extValidateSecret data.getClass:"
+
data
.
getClass
());
//校验项目中心相关对象密级和计划密级
//校验项目中心相关对象密级和计划密级
if
(
data
instanceof
Dx
ObjectVo
)
{
if
(
data
instanceof
Dx
ContextVO
)
{
String
checkResultStr
=
checkDxObjectSecret
((
Dx
ObjectVo
)
data
);
String
checkResultStr
=
checkDxObjectSecret
((
Dx
ContextVO
)
data
);
if
(!
StringUtils
.
isEmpty
(
checkResultStr
))
{
if
(!
StringUtils
.
isEmpty
(
checkResultStr
))
{
throw
new
DxBusinessException
(
"500"
,
checkResultStr
);
throw
new
DxBusinessException
(
"500"
,
checkResultStr
);
}
}
...
@@ -76,21 +72,22 @@ public class ValidateSecretListener extends AbstractEventListener<BaseService.Da
...
@@ -76,21 +72,22 @@ public class ValidateSecretListener extends AbstractEventListener<BaseService.Da
* @param dxObjectVo
* @param dxObjectVo
* @return
* @return
*/
*/
private
String
checkDxObjectSecret
(
Dx
ObjectVo
dxObjectVo
)
{
private
String
checkDxObjectSecret
(
Dx
ContextVO
dxObjectVo
)
{
String
checkResultStr
=
""
;
String
checkResultStr
=
""
;
Boolean
checkResult
=
true
;
Boolean
checkResult
=
true
;
if
(
dxObjectVo
instanceof
ExtPlanVO
)
{
//todo
checkResult
=
checkDxObjectVoSecret
(
dxObjectVo
);
// if (dxObjectVo instanceof ExtPlanVO) {
checkResultStr
=
"计划密级不能高于项目密级!"
;
// checkResult = checkDxObjectVoSecret(dxObjectVo);
}
// checkResultStr = "计划密级不能高于项目密级!";
if
(
dxObjectVo
instanceof
ExtIncomeContractVO
)
{
// }
checkResult
=
checkDxObjectVoSecret
(
dxObjectVo
);
// if (dxObjectVo instanceof ExtIncomeContractVO) {
checkResultStr
=
"收入合同密级不能高于项目密级!"
;
// checkResult = checkDxObjectVoSecret(dxObjectVo);
}
// checkResultStr = "收入合同密级不能高于项目密级!";
if
(
dxObjectVo
instanceof
ExtSpendingContractVO
)
{
// }
checkResult
=
checkDxObjectVoSecret
(
dxObjectVo
);
// if (dxObjectVo instanceof ExtSpendingContractVO) {
checkResultStr
=
"支出合同密级不能高于项目密级!"
;
// checkResult = checkDxObjectVoSecret(dxObjectVo);
}
// checkResultStr = "支出合同密级不能高于项目密级!";
// }
if
(
checkResult
)
{
if
(
checkResult
)
{
checkResultStr
=
""
;
checkResultStr
=
""
;
}
}
...
@@ -102,12 +99,14 @@ public class ValidateSecretListener extends AbstractEventListener<BaseService.Da
...
@@ -102,12 +99,14 @@ public class ValidateSecretListener extends AbstractEventListener<BaseService.Da
*
*
* @return
* @return
*/
*/
private
Boolean
checkDxObjectVoSecret
(
DxObjectVo
dxObjectVo
)
{
//todo
if
(
StringUtils
.
isBlank
(
dxObjectVo
.
getSecretCode
()))
{
private
Boolean
checkDxObjectVoSecret
(
DxContextVO
dxObjectVo
)
{
return
true
;
// if (StringUtils.isBlank(dxObjectVo.getSecretCode())) {
}
// return true;
DxContextVO
dxContextVO
=
contextServiceFeign
.
get
(
dxObjectVo
.
getDxContextId
());
// }
return
checkTargetSecret
(
dxContextVO
.
getSecretCode
(),
dxObjectVo
.
getSecretCode
());
// DxContextVO dxContextVO = contextServiceFeign.get(dxObjectVo.getDxContextId());
// return checkTargetSecret(dxContextVO.getSecretCode(), dxObjectVo.getSecretCode());
return
false
;
}
}
/**
/**
...
...
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/factory/InternalInterfaceUtils.java
0 → 100644
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
core
.
factory
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yonde.dcs.document.common.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.vo.ExtInterfaceInfoLinkVO
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.service.ExtDocService
;
import
com.yonde.dex.dfs.vo.ObjFileLinkVO
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author xfchai
* @ClassName InterfaceUtils.java
* @Description 内部接口
* @createTime 2021/11/16 14:13:00
*/
@Component
@Slf4j
public
class
InternalInterfaceUtils
{
@Autowired
private
ExtDocService
extDocService
;
@Autowired
private
DxUserInfoFeign
userService
;
/**
* 填充数据
*
* @param
* @return
*/
public
JSONObject
settingData
(
DxDocumentVO
v
,
ExtInterfaceInfoLinkVO
infoLinkVO
,
DxWfProcessInfoVO
wfProcessInfoVO
)
{
//获取动态属性
// Map<String, Object> dynamicAttrs = v.getDynamicAttrs();
// String designPhase = Objects.isNull(dynamicAttrs.get("designPhase")) ? "" : (String) dynamicAttrs.get("designPhase");
// String content = Objects.isNull(dynamicAttrs.get("content")) ? "" : (String) dynamicAttrs.get("content");
// String applicant = Objects.isNull(dynamicAttrs.get("applicant")) ? "" : (String) dynamicAttrs.get("applicant");
// String aplicationDate = Objects.isNull(dynamicAttrs.get("aplicationDate")) ? "" : (String) dynamicAttrs.get("aplicationDate");
// String requestDate = Objects.isNull(dynamicAttrs.get("requestDate")) ? "" : (String) dynamicAttrs.get("requestDate");
// String appReviewerDate = Objects.isNull(dynamicAttrs.get("appReviewerDate")) ? "" : (String) dynamicAttrs.get("appReviewerDate");
// String ztsSignDate = Objects.isNull(dynamicAttrs.get("ztsSignDate")) ? "" : (String) dynamicAttrs.get("ztsSignDate");
// JSONObject jsonObject = new JSONObject();
// //项目代号
// String projectCode = ObjectUtils.isEmpty(v.getProjectCode()) ? "" : v.getProjectCode();
// jsonObject.put("apply", "\u0052");
// //密级
// jsonObject.put("SecretCode", extDocService.searchDictDataByDictCode(Constants.SECRET_CODE, v.getSecretCode()));
// jsonObject.put("projectCode", projectCode);
// //设计阶段
// jsonObject.put("designPhase", extDocService.searchDictDataByDictCode(Constants.DESIGN_STAGE, designPhase));
// //接口资料编号
// jsonObject.put("number", ObjectUtils.isEmpty(v.getNumber()) ? "" : v.getNumber());
// //接口名称
// jsonObject.put("name", ObjectUtils.isEmpty(v.getName()) ? "" : v.getName());
// //申请方
// jsonObject.put("applicant", applicant);
// //申请人日期
// jsonObject.put("aplicationDate", DateUtils.conversionDate(aplicationDate));
// String userId = (String) dynamicAttrs.get("applicantorId");
// DxUserInfoVO userVO = (DxUserInfoVO) userService.get(Long.parseLong(userId));
// //申请人签审
// jsonObject.put("sqr_photo", userVO.getUserAccount() + ".png");
// //内容
// jsonObject.put("content", content);
// //要求提交日期
// jsonObject.put("requestDate", DateUtils.conversionDate(requestDate));
// String appReviewer = (String) dynamicAttrs.get("appReviewer");
// if (StringUtils.isEmpty(appReviewer)) {
// log.error("申请审核人为空!");
// }
// if (StringUtils.isEmpty((String) dynamicAttrs.get("ztsSign"))) {
// log.error("总体室签审为空!");
// }
// //申请审核人
// jsonObject.put("sqshr_photo", (String) dynamicAttrs.get("appReviewer") + ".png");
// //总体室签审/日期
// jsonObject.put("ztsSign", (String) dynamicAttrs.get("ztsSign") + ".png");
// //申请审核人日期
// jsonObject.put("appReviewerDate", DateUtils.conversionDate(appReviewerDate));
// jsonObject.put("ztsSignDate", DateUtils.conversionDate(ztsSignDate));
// //页数
// jsonObject.put("pages", v.getAttachPages());
// //判断内部接口基本信息有无附件属性
// checkObjFileLinks(jsonObject, v.getObjFileLinks());
// ExtInformingVO informingVO = infoLinkVO.getTarget();
// if (ObjectUtils.isEmpty(informingVO)) {
// jsonObject.put("infoAttach", "\u00A3");
// jsonObject.put("infoNoAttach", "\u00A3");
// return jsonObject;
// } else {
// jsonObject.put("informativeUnit", Objects.isNull(informingVO.getInformativeUnit()) ? "" : informingVO.getInformativeUnit());
// //提交人日期
// DxUserInfoVO informativeUser = informingVO.getInformativeUser();
// if (!ObjectUtils.isEmpty(informativeUser)) {
// String user = informativeUser.getUserAccount() + ".png";
// //提交人
// jsonObject.put("tjr_photo", user);
// }
// //提交人日期
// jsonObject.put("informativeDate", DateUtils.converLocalDateToString(informingVO.getCreateTime()));
// jsonObject.put("infoContent", Objects.isNull(informingVO.getInfoContent()) ? "" : informingVO.getInfoContent());
// jsonObject.put("remark", Objects.isNull(informingVO.getInfoComment()) ? "" : informingVO.getInfoComment());
// //有无附件属性
// List<ObjFileLinkVO> informingVOObjFileLinks = informingVO.getObjFileLinks();
// this.checkInforObjFileLinks(jsonObject, informingVOObjFileLinks);
// //todo 获取参与者
// List<WfTaskDefinitionVO> activities = wfProcessInfoVO.getActivityInfo();
// if (!CollectionUtils.isEmpty(activities)) {
// for (WfTaskDefinitionVO wf : activities) {
// if (SignConstants.SIGN_KEY_PREPARED.equals(wf.getTaskName())) {
// List<WfProcessTaskVO> taskList = wf.getTaskList();
// for (WfProcessTaskVO wfPro : taskList) {
// //编制且为提交时,把编制人填写备注的属性,写入word文档
// if (SignConstants.WfRoutingList.contains(wfPro.getResult())) {
// jsonObject.put("decription", ObjectUtils.isEmpty(wfPro.getComments()) ? "" : wfPro.getComments().get(0));
// }
// }
// }
// }
// //写入签名数据
// //负责人签字
// jsonObject.put("sqfqr_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_PREPARED));
// jsonObject.put("sqfqr_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_PREPARED));
// //总体室签审/日期
// jsonObject.put("zts_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_ZTSQS));
// jsonObject.put("zts_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_ZTSQS));
// //提资审核
// jsonObject.put("sh_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_TZSH));
// jsonObject.put("sh_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_TZSH));
// //批准
// jsonObject.put("pz_photo", extDocService.getSignImage(activities, SignConstants.SIGN_KEY_APPROVED));
// jsonObject.put("pz_date", extDocService.getEndDate(activities, SignConstants.SIGN_KEY_APPROVED));
// }
// return jsonObject;
// }
return
null
;
}
/**
* 校验提资信息是否有附件
*
* @param jsonObject
* @param informingVOObjFileLinks
*/
private
void
checkInforObjFileLinks
(
JSONObject
jsonObject
,
List
<
ObjFileLinkVO
>
informingVOObjFileLinks
)
{
if
(
CollectionUtils
.
isEmpty
(
informingVOObjFileLinks
))
{
jsonObject
.
put
(
"infoNoAttach"
,
"\u0052"
);
jsonObject
.
put
(
"infoAttach"
,
"\u00A3"
);
}
else
{
List
<
ObjFileLinkVO
>
collect
=
informingVOObjFileLinks
.
stream
().
filter
(
item
->
Constants
.
ATTACH_FILE
.
equals
(
item
.
getContentType
())
).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
jsonObject
.
put
(
"infoAttach"
,
"\u0052"
);
jsonObject
.
put
(
"infoNoAttach"
,
"\u00A3"
);
}
else
{
jsonObject
.
put
(
"infoNoAttach"
,
"\u0052"
);
jsonObject
.
put
(
"infoAttach"
,
"\u00A3"
);
}
}
}
/**
* 校验内部接口基本信息内容是否附件
*
* @param jsonObject
* @param objFileLinks
*/
private
void
checkObjFileLinks
(
JSONObject
jsonObject
,
List
<
ObjFileLinkVO
>
objFileLinks
)
{
if
(
CollectionUtils
.
isEmpty
(
objFileLinks
))
{
jsonObject
.
put
(
"interNoAttach"
,
"\u0052"
);
jsonObject
.
put
(
"interAttach"
,
"\u00A3"
);
}
else
{
List
<
ObjFileLinkVO
>
collect
=
objFileLinks
.
stream
().
filter
(
item
->
Constants
.
APP_CONTENT_ATTCH
.
equals
(
item
.
getContentType
())
).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
//对号
jsonObject
.
put
(
"interAttach"
,
"\u0052"
);
jsonObject
.
put
(
"interNoAttach"
,
"\u00A3"
);
}
else
{
jsonObject
.
put
(
"interNoAttach"
,
"\u0052"
);
jsonObject
.
put
(
"interAttach"
,
"\u00A3"
);
}
}
}
}
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/factory/MeetingUtils.java
View file @
8116f58d
...
@@ -5,6 +5,7 @@ import com.yonde.dcs.document.common.vo.DxDocumentVO;
...
@@ -5,6 +5,7 @@ import com.yonde.dcs.document.common.vo.DxDocumentVO;
import
com.yonde.dcs.document.common.vo.ExtCheckedFileLinkVO
;
import
com.yonde.dcs.document.common.vo.ExtCheckedFileLinkVO
;
import
com.yonde.dcs.document.common.vo.ExtReviewDocLinkVO
;
import
com.yonde.dcs.document.common.vo.ExtReviewDocLinkVO
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.service.ExtDocService
;
import
com.yonde.dcs.document.core.util.DateUtils
;
import
com.yonde.dcs.document.core.util.DateUtils
;
import
com.yonde.dcs.document.entity.excel.MeetingPojo
;
import
com.yonde.dcs.document.entity.excel.MeetingPojo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/factory/OutdatedDocNotifyUtils.java
0 → 100644
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
core
.
factory
;
import
cn.hutool.core.io.FileUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yonde.dcs.document.common.vo.DxDocumentVO
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.service.ExtDocService
;
import
com.yonde.dcs.document.core.util.DateUtils
;
import
com.yonde.dcs.document.core.util.WorkFlowUtil
;
import
com.yonde.dcs.document.core.word.ImportWordService
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* @author xfchai
* @ClassName OutdatedDocNotifyUtils.java
* @Description 过时文件通知
* @createTime 2021/11/23 09:54:00
*/
@Component
public
class
OutdatedDocNotifyUtils
{
@Autowired
private
ExtDocService
extDocService
;
@Autowired
private
ImportWordService
importWordService
;
@Autowired
private
WorkFlowUtil
workFlowUtil
;
/**
* 填充数据
*
* @param
* @return
*/
public
JSONObject
settingData
(
DxDocumentVO
v
,
DxWfProcessInfoVO
wfProcessInfoVO
)
{
String
path
=
Constants
.
MTEMPLATE_ABSOLUTE_PATH
;
String
file
=
v
.
getSubTypeName
();
String
outFilePath
=
Constants
.
MERGER_FILE_ABSOLUTE_PATH
+
v
.
getSubTypeName
()
+
"\\"
+
v
.
getNumber
()
+
"\\"
;
//生成特定的文档目录,保存生成的word文件
FileUtil
.
mkdir
(
outFilePath
);
//获取动态属性
Map
<
String
,
Object
>
dynamicAttrs
=
v
.
getDynamicAttrs
();
String
distributNumber
=
Objects
.
isNull
(
dynamicAttrs
.
get
(
"distributNumber"
))
?
""
:
(
String
)
dynamicAttrs
.
get
(
"distributNumber"
);
String
obsoletedDocNo
=
Objects
.
isNull
(
dynamicAttrs
.
get
(
"obsoletedDocNo"
))
?
""
:
(
String
)
dynamicAttrs
.
get
(
"obsoletedDocNo"
);
String
obsoleteDocVer
=
Objects
.
isNull
(
dynamicAttrs
.
get
(
"obsoleteDocVer"
))
?
""
:
(
String
)
dynamicAttrs
.
get
(
"obsoleteDocVer"
);
String
obsoleteDocName
=
Objects
.
isNull
(
dynamicAttrs
.
get
(
"obsoleteDocName"
))
?
""
:
(
String
)
dynamicAttrs
.
get
(
"obsoleteDocName"
);
String
copies
=
Objects
.
isNull
(
dynamicAttrs
.
get
(
"copies"
))
?
""
:
(
String
)
dynamicAttrs
.
get
(
"copies"
);
Integer
pages
=
Objects
.
isNull
(
dynamicAttrs
.
get
(
"pages"
))
?
0
:
(
Integer
)
dynamicAttrs
.
get
(
"pages"
);
String
distributDate
=
Objects
.
isNull
(
dynamicAttrs
.
get
(
"distributDate"
))
?
""
:
(
String
)
dynamicAttrs
.
get
(
"distributDate"
);
JSONObject
jsonObject
=
new
JSONObject
();
//文件分发号
jsonObject
.
put
(
"disNumber"
,
distributNumber
);
//文件编号
jsonObject
.
put
(
"obsoDocNo"
,
obsoletedDocNo
);
//过时文件通知单编号
jsonObject
.
put
(
"number"
,
ObjectUtils
.
isEmpty
(
v
.
getNumber
())
?
""
:
v
.
getNumber
());
//版本
jsonObject
.
put
(
"version"
,
obsoleteDocVer
);
//文件名称
jsonObject
.
put
(
"docName"
,
obsoleteDocName
);
//分发日期
jsonObject
.
put
(
"disDate"
,
DateUtils
.
conversionDate
(
distributDate
));
//份数
jsonObject
.
put
(
"copies"
,
copies
);
//页数
jsonObject
.
put
(
"page"
,
pages
);
//todo 获取参与者
// List<WfTaskDefinitionVO> activities = wfProcessInfoVO.getActivityInfo();
// if (!CollectionUtils.isEmpty(activities)) {
// //写入签名数据(总体室)
// jsonObject.put("bmfzr_photo", workFlowUtil.getSignImage(activities, SignConstants.ZTSSignTaskList));
// jsonObject.put("bmfzr_date", workFlowUtil.getEndDate(activities, SignConstants.ZTSSignTaskList));
// }
//模板名称
importWordService
.
getWordAllTable
(
jsonObject
,
path
+
file
+
".docx"
,
outFilePath
+
"outFile.docx"
);
return
jsonObject
;
}
}
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/service/impl/ExtAutoTaskServiceImpl.java
View file @
8116f58d
...
@@ -5,7 +5,6 @@ import cn.hutool.core.convert.Convert;
...
@@ -5,7 +5,6 @@ import cn.hutool.core.convert.Convert;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.extra.spring.SpringUtil
;
import
cn.hutool.extra.spring.SpringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jcraft.jsch.UserInfo
;
import
com.yonde.dcs.document.common.vo.*
;
import
com.yonde.dcs.document.common.vo.*
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.constants.Constants
;
import
com.yonde.dcs.document.core.events.DocBeforeCreateEvent
;
import
com.yonde.dcs.document.core.events.DocBeforeCreateEvent
;
...
...
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/word/DocumentDispatch.java
View file @
8116f58d
...
@@ -3,11 +3,11 @@ package com.yonde.dcs.document.core.word;
...
@@ -3,11 +3,11 @@ package com.yonde.dcs.document.core.word;
import
com.jacob.activeX.ActiveXComponent
;
import
com.jacob.activeX.ActiveXComponent
;
import
com.jacob.com.ComThread
;
import
com.jacob.com.ComThread
;
import
com.jacob.com.Dispatch
;
import
com.jacob.com.Dispatch
;
import
com.jacob.com.Variant
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
com.jacob.com.Variant
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
...
...
dcs-doc-core/src/main/java/com/yonde/dcs/document/core/word/ImportWordService.java
View file @
8116f58d
package
com
.
yonde
.
dcs
.
document
.
core
.
word
;
package
com
.
yonde
.
dcs
.
document
.
core
.
word
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.
inet.pdm
.util.Word2PdfJacobUtil
;
import
com.
yonde.dcs.document.core
.util.Word2PdfJacobUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.pdfbox.pdmodel.PDDocument
;
import
org.apache.poi.xwpf.usermodel.XWPFDocument
;
import
org.apache.poi.xwpf.usermodel.XWPFDocument
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -94,22 +93,23 @@ public class ImportWordService {
...
@@ -94,22 +93,23 @@ public class ImportWordService {
*/
*/
public
int
getPdfPages
(
FileInputStream
is
)
{
public
int
getPdfPages
(
FileInputStream
is
)
{
int
page
=
0
;
int
page
=
0
;
PDDocument
pdDocument
=
null
;
//todo
try
{
// PDDocument pdDocument = null;
pdDocument
=
PDDocument
.
load
(
is
);
// try {
int
pdfPages
=
pdDocument
.
getNumberOfPages
();
// pdDocument = PDDocument.load(is);
page
=
page
+
pdfPages
;
// int pdfPages = pdDocument.getNumberOfPages();
}
catch
(
Exception
e
)
{
// page = page + pdfPages;
log
.
error
(
e
.
toString
());
// } catch (Exception e) {
}
finally
{
// log.error(e.toString());
if
(
pdDocument
!=
null
)
{
// } finally {
try
{
// if (pdDocument != null) {
pdDocument
.
close
();
// try {
}
catch
(
IOException
e
)
{
// pdDocument.close();
log
.
error
(
e
.
toString
());
// } catch (IOException e) {
}
// log.error(e.toString());
}
// }
}
// }
// }
return
page
;
return
page
;
}
}
...
...
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