Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-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
dcs-doc-expand
Commits
9edb3564
Commit
9edb3564
authored
Oct 12, 2024
by
侯彦文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件目录新增树结构
parent
b588106a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
110 deletions
+93
-110
ExtComDocLinkVO.java
...ava/com/yonde/dcs/document/common/vo/ExtComDocLinkVO.java
+30
-32
ExtDxDocumentController.java
...ument/core/controller/expand/ExtDxDocumentController.java
+2
-2
ExtDxDocumentService.java
...cs/document/core/service/expand/ExtDxDocumentService.java
+1
-1
ExtDxDocumentServiceImpl.java
...nt/core/service/impl/expand/ExtDxDocumentServiceImpl.java
+22
-23
ExtComDocLink.java
.../java/com/yonde/dcs/document/entity/po/ExtComDocLink.java
+38
-52
No files found.
dcs-doc-expand-common/src/main/java/com/yonde/dcs/document/common/vo/ExtComDocLinkVO.java
View file @
9edb3564
...
...
@@ -2,7 +2,6 @@ package com.yonde.dcs.document.common.vo;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.DexTypeVersionProp
;
...
...
@@ -22,18 +21,17 @@ import lombok.ToString;
import
java.time.LocalDateTime
;
/**
* @description: ExtComDocLink-VO
* @author: dexadmin
* @version: V
* @date: 2024-7-15 15:32:34
**/
@JsonTypeInfo
(
use
=
JsonTypeInfo
.
Id
.
CLASS
,
property
=
"dxClassname"
,
visible
=
true
,
defaultImpl
=
ExtComDocLinkVO
.
class
)
* @description: ExtComDocLink-VO
* @author: dexadmin
* @version: V
* @date: 2024-10-12 10:22:01
**/
@JsonTypeInfo
(
use
=
JsonTypeInfo
.
Id
.
CLASS
,
property
=
"dxClassname"
,
visible
=
true
,
defaultImpl
=
ExtComDocLinkVO
.
class
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@ToString
(
callSuper
=
true
)
@DexTypeVersionProp
(
propName
=
"target"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERSION
))
@DexTypeVersionProp
(
propName
=
"source"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
MASTER
))
public
class
ExtComDocLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtReviewCommentVO
,
DxDocumentVO
>
,
DxLogicDeleteVOHolder
{
@DexTypeVersionProp
(
propName
=
"target"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
ITERATION
))
public
class
ExtComDocLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtReviewCommentVO
,
DxDocumentVO
>,
DxLogicDeleteVOHolder
{
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
public
static
final
String
DX_LOGIC_DELETE_EMBEDDABLE_PROP_NAME
=
"dxLogicDeleteEmbeddable"
;
...
...
@@ -48,64 +46,64 @@ public class ExtComDocLinkVO extends IdOnlyVO implements IdVO ,DxLinkDataVOHolde
public
static
final
String
RESPONSIBLE_PERSON_PROP_NAME
=
"responsiblePerson"
;
/**
* dao扩展对象
*/
* dao扩展对象
*/
@DexEmbedded
()
@JsonIgnore
private
DxIdVOEmbeddable
dxIdEmbeddable
;
/**
* 扩展VO属性
*/
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLogicDeleteVOEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展VO属性
*/
* 扩展VO属性
*/
@DexEmbedded
()
@JsonIgnore
private
DxLinkDataVOEmbeddable
<
ExtReviewCommentVO
,
DxDocumentVO
>
dxLinkDataEmbeddable
;
/**
* 落实情况
*/
* 落实情况
*/
private
String
auditing
;
/**
* 原因说明
*/
* 原因说明
*/
private
String
causeDescript
;
/**
* 更改原因
*/
* 更改原因
*/
private
String
changeReason
;
/**
* 升版要求完成时间
*/
* 升版要求完成时间
*/
private
LocalDateTime
completeTime
;
/**
* 关联描述
*/
* 关联描述
*/
private
String
linkDescript
;
/**
* 阶段
*/
* 阶段
*/
private
String
phaseState
;
/**
* 备注
*/
* 备注
*/
private
String
remark
;
/**
* 落实责任人
*/
* 落实责任人
*/
private
String
responsiblePerson
;
}
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/document/core/controller/expand/ExtDxDocumentController.java
View file @
9edb3564
...
...
@@ -31,8 +31,8 @@ public class ExtDxDocumentController<V extends DxDocumentVO, S extends ExtDxDocu
@ApiOperation
(
"文档和目录查询"
)
@GetMapping
({
"/docAndFloder"
})
public
ApiResult
docAndFloder
(
@RequestParam
Long
dxContextId
,
@RequestParam
Long
parentId
)
{
return
ApiResult
.
ok
(
service
.
getDocAndFolder
(
dxContextId
,
parentId
),
"查询成功"
);
public
ApiResult
docAndFloder
(
@RequestParam
Long
dxContextId
,
@RequestParam
Long
parentId
,
@RequestParam
Long
dxDocumentFolderId
)
{
return
ApiResult
.
ok
(
service
.
getDocAndFolder
(
dxContextId
,
parentId
,
dxDocumentFolderId
),
"查询成功"
);
}
//
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/document/core/service/expand/ExtDxDocumentService.java
View file @
9edb3564
...
...
@@ -24,7 +24,7 @@ public interface ExtDxDocumentService<V extends DxDocumentVO> extends ExtDxDocum
* @param parentId 目录夹id
* @return
*/
Map
<
String
,
DxPageImpl
>
getDocAndFolder
(
Long
dxContextId
,
Long
parentId
);
Map
<
String
,
DxPageImpl
>
getDocAndFolder
(
Long
dxContextId
,
Long
parentId
,
Long
dxDocumentFolderId
);
/**
* 生成图册目录
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/document/core/service/impl/expand/ExtDxDocumentServiceImpl.java
View file @
9edb3564
...
...
@@ -12,6 +12,7 @@ import com.yonde.dcs.document.core.event.DocumentEvent;
import
com.yonde.dcs.document.core.util.*
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryBuilder
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
...
...
@@ -74,38 +75,36 @@ public class ExtDxDocumentServiceImpl<V extends DxDocumentVO> extends DocumentSe
}
@Override
public
Map
<
String
,
DxPageImpl
>
getDocAndFolder
(
Long
dxContextId
,
Long
parentId
)
{
public
Map
<
String
,
DxPageImpl
>
getDocAndFolder
(
Long
dxContextId
,
Long
parentId
,
Long
dxDocumentFolderId
)
{
Map
<
String
,
DxPageImpl
>
result
=
new
HashMap
<>();
//查询目录
SearchQueryCondition
folderCondition
=
SearchQueryBuilder
.
openBuild
()
.
openFilterBuilder
()
.
setItem
(
"dxContextId"
,
SearchItem
.
Operator
.
EQ
,
dxContextId
)
.
setItem
(
"parentId"
,
SearchItem
.
Operator
.
EQ
,
parentId
)
.
builder
().
build
();
.
builder
().
setPropName
(
"dxContext"
).
build
();
DxPageImpl
folderPage
=
dxDocumentFolderService
.
findRecursion
(
folderCondition
);
result
.
put
(
"DxDocumentFolder"
,
folderPage
);
//查询文档
SearchQueryCondition
documentCondition
=
SearchQueryBuilder
.
openBuild
()
.
openFilterBuilder
()
.
setItem
(
"dxContextId"
,
SearchItem
.
Operator
.
EQ
,
dxContextId
)
.
setItem
(
"dxDocumentFolderId"
,
SearchItem
.
Operator
.
ISNULL
,
null
)
.
setItem
(
"latest"
,
SearchItem
.
Operator
.
EQ
,
true
)
.
setItem
(
"checkOuted"
,
SearchItem
.
Operator
.
EQ
,
false
)
.
builder
().
build
();
// SearchQueryCondition documentCondition = SearchQueryCondition.builder()
// .searchItems(SearchItems.builder()
// .item(new SearchItem("dxContextId", SearchItem.Operator.EQ, dxContextId, null))
// .item(new SearchItem("dxDocumentFolderId", SearchItem.Operator.ISNULL, null, null))
// .item(new SearchItem("latest", SearchItem.Operator.EQ, true, null))
// .item(new SearchItem("checkOuted", SearchItem.Operator.EQ, false, null))
// .operator(SearchItems.BooleanOperator.AND).build()).build();
SpecSearch
specSearch
=
SpecSearch
.
builder
()
.
searchQueryCondition
(
documentCondition
)
.
searchTypes
(
new
ArrayList
<>())
.
build
();
DxPageImpl
<
V
>
docPage
=
this
.
findByConfigSpec
(
specSearch
);
SearchItems
searchItems
=
new
SearchItems
();
SearchItem
dxDocumentFolderIdSearchItem
;
if
(
Objects
.
nonNull
(
dxDocumentFolderId
)){
dxDocumentFolderIdSearchItem
=
new
SearchItem
(
"dxDocumentFolderId"
,
SearchItem
.
Operator
.
EQ
,
dxDocumentFolderId
,
null
);
}
else
{
dxDocumentFolderIdSearchItem
=
new
SearchItem
(
"dxDocumentFolderId"
,
SearchItem
.
Operator
.
ISNULL
,
null
,
null
);
}
searchItems
.
addItem
(
dxDocumentFolderIdSearchItem
);
SearchItem
dxContextIdItem
=
new
SearchItem
(
"dxContextId"
,
SearchItem
.
Operator
.
EQ
,
dxContextId
,
null
);
SearchItem
latest
=
new
SearchItem
(
"latest"
,
SearchItem
.
Operator
.
EQ
,
true
,
null
);
SearchItem
checkOuted
=
new
SearchItem
(
"checkOuted"
,
SearchItem
.
Operator
.
EQ
,
false
,
null
);
searchItems
.
addItem
(
dxContextIdItem
);
searchItems
.
addItem
(
latest
);
searchItems
.
addItem
(
checkOuted
);
SearchQueryCondition
query
=
SearchQueryCondition
.
builder
()
.
searchItems
(
searchItems
).
openProp
(
SearchQueryCondition
.
builder
().
name
(
"dxContext"
).
build
()).
build
();
DxPageImpl
<
V
>
docPage
=
this
.
findRecursion
(
query
);
result
.
put
(
"DxDocument"
,
docPage
);
return
result
;
}
...
...
dcs-doc-expand-entity/src/main/java/com/yonde/dcs/document/entity/po/ExtComDocLink.java
View file @
9edb3564
package
com
.
yonde
.
dcs
.
document
.
entity
.
po
;
import
org.springframework.data.annotation.CreatedBy
;
import
javax.persistence.UniqueConstraint
;
import
java.util.Date
;
import
java.time.LocalDateTime
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
javax.persistence.Column
;
import
org.springframework.data.annotation.CreatedDate
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataEmbeddable
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder
;
import
lombok.Data
;
import
com.yonde.dex.basedata.entity.annotation.*
;
import
java.math.BigInteger
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
lombok.AllArgsConstructor
;
import
lombok.EqualsAndHashCode
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
import
javax.persistence.Embedded
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
javax.persistence.Column
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable
;
import
java.time.LocalDateTime
;
/**
* @description: ExtComDocLink-PO实体
* @author: dexadmin
* @version: V
* @date: 2024-8-2 15:26:33
**/
* @description: ExtComDocLink-PO实体
* @author: dexadmin
* @version: V
* @date: 2024-10-12 10:22:01
**/
@Entity
@EqualsAndHashCode
(
callSuper
=
true
)
@NoArgsConstructor
@Data
@Table
(
name
=
"EXT_COM_DOC_LINK"
)
public
class
ExtComDocLink
extends
IdOnlyEntity
implements
IdEntity
,
DxLogicDeleteHolder
,
DxLinkDataHolder
{
public
class
ExtComDocLink
extends
IdOnlyEntity
implements
IdEntity
,
DxLogicDeleteHolder
,
DxLinkDataHolder
{
/**
* dao扩展对象
*/
* dao扩展对象
*/
@DexEmbedded
()
@Embedded
()
private
DxIdEntityEmbeddable
dxIdEmbeddable
;
/**
* 扩展PO属性
*/
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxLogicDeleteEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展PO属性
*/
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxLinkDataEmbeddable
dxLinkDataEmbeddable
;
/**
* 落实情况
*/
* 落实情况
*/
private
String
auditing
;
/**
* 原因说明
*/
* 原因说明
*/
private
String
causeDescript
;
/**
* 更改原因
*/
* 更改原因
*/
private
String
changeReason
;
/**
* 升版要求完成时间
*/
* 升版要求完成时间
*/
private
LocalDateTime
completeTime
;
/**
* 关联描述
*/
* 关联描述
*/
private
String
linkDescript
;
/**
* 阶段
*/
* 阶段
*/
private
String
phaseState
;
/**
* 备注
*/
* 备注
*/
private
String
remark
;
/**
* 落实责任人
*/
* 落实责任人
*/
private
String
responsiblePerson
;
}
...
...
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