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
04aedaf3
Commit
04aedaf3
authored
Oct 31, 2024
by
wei
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
案卷下有文件不能删除
parent
7f1cd55c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
20 deletions
+55
-20
ExtFilesDocLinkService.java
...net/dcs/document/core/service/ExtFilesDocLinkService.java
+15
-5
ExtFilesDocLinkServiceImpl.java
...ocument/core/service/impl/ExtFilesDocLinkServiceImpl.java
+24
-15
ExtFilesServiceImpl.java
...t/dcs/document/core/service/impl/ExtFilesServiceImpl.java
+16
-0
No files found.
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/ExtFilesDocLinkService.java
View file @
04aedaf3
...
@@ -2,12 +2,22 @@ package com.inet.dcs.document.core.service;
...
@@ -2,12 +2,22 @@ package com.inet.dcs.document.core.service;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.core.service.shadow.ExtFilesDocLinkServiceShadow
;
import
com.inet.dcs.document.core.service.shadow.ExtFilesDocLinkServiceShadow
;
import
java.util.List
;
/**
/**
* @description: ExtFilesDocLink-service
* @description: ExtFilesDocLink-service
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-10-29 10:30:49
* @date: 2024-10-29 10:30:49
**/
**/
public
interface
ExtFilesDocLinkService
<
V
extends
ExtFilesDocLinkVO
>
extends
ExtFilesDocLinkServiceShadow
<
V
>
{
public
interface
ExtFilesDocLinkService
<
V
extends
ExtFilesDocLinkVO
>
extends
ExtFilesDocLinkServiceShadow
<
V
>
{
/**
* 根据案卷ID查询关联文件的source
*
* @param targetId
* @return
*/
List
<
ExtFilesDocLinkVO
>
getFilesDocLinkByTargetId
(
Long
targetId
);
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesDocLinkServiceImpl.java
View file @
04aedaf3
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.List
;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
import
com.inet.dcs.document.core.repository.ExtFilesDocLinkRepository
;
import
com.inet.dcs.document.core.repository.ExtFilesDocLinkRepository
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
import
com.inet.dcs.document.entity.po.ExtFilesDocLink
;
import
com.inet.dcs.document.entity.po.ExtFilesDocLink
;
import
javax.annotation.Resource
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* @description: ExtFilesDocLink-ServiceImpl
* @description: ExtFilesDocLink-ServiceImpl
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-10-29 10:30:49
* @date: 2024-10-29 10:30:49
**/
**/
@Slf4j
@Slf4j
@Service
(
ExtFilesDocLinkServiceImpl
.
BEAN_NAME
)
@Service
(
ExtFilesDocLinkServiceImpl
.
BEAN_NAME
)
public
class
ExtFilesDocLinkServiceImpl
<
V
extends
ExtFilesDocLinkVO
>
implements
ExtFilesDocLinkService
<
V
>{
public
class
ExtFilesDocLinkServiceImpl
<
V
extends
ExtFilesDocLinkVO
>
implements
ExtFilesDocLinkService
<
V
>
{
public
static
final
String
BEAN_NAME
=
"extFilesDocLinkServiceImpl"
;
public
static
final
String
BEAN_NAME
=
"extFilesDocLinkServiceImpl"
;
...
@@ -29,6 +29,15 @@ public class ExtFilesDocLinkServiceImpl<V extends ExtFilesDocLinkVO> implements
...
@@ -29,6 +29,15 @@ public class ExtFilesDocLinkServiceImpl<V extends ExtFilesDocLinkVO> implements
@Autowired
@Autowired
ExtFilesDocLinkRepository
<
ExtFilesDocLink
>
extFilesDocLinkRepository
;
ExtFilesDocLinkRepository
<
ExtFilesDocLink
>
extFilesDocLinkRepository
;
@Override
public
List
<
ExtFilesDocLinkVO
>
getFilesDocLinkByTargetId
(
Long
targetId
)
{
SearchQueryCondition
queryDoc
=
SearchQueryCondition
.
builder
()
.
openProp
(
SearchQueryCondition
.
builder
().
name
(
"source"
).
build
())
.
searchItems
(
SearchItems
.
builder
().
item
(
new
SearchItem
(
"targetId"
,
SearchItem
.
Operator
.
EQ
,
targetId
,
null
)).
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
return
(
List
<
ExtFilesDocLinkVO
>)
this
.
findRecursion
(
queryDoc
).
getContent
();
}
}
}
inet-doc-expand-core/src/main/java/com/inet/dcs/document/core/service/impl/ExtFilesServiceImpl.java
View file @
04aedaf3
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
package
com
.
inet
.
dcs
.
document
.
core
.
service
.
impl
;
import
com.inet.dcs.document.common.vo.ExtFilesDocLinkVO
;
import
com.inet.dcs.document.common.vo.ExtFilesVO
;
import
com.inet.dcs.document.common.vo.ExtFilesVO
;
import
com.inet.dcs.document.core.repository.ExtFilesRepository
;
import
com.inet.dcs.document.core.repository.ExtFilesRepository
;
import
com.inet.dcs.document.core.service.ExtFilesDocLinkService
;
import
com.inet.dcs.document.core.service.ExtFilesService
;
import
com.inet.dcs.document.core.service.ExtFilesService
;
import
com.inet.dcs.document.core.util.SearchUtil
;
import
com.inet.dcs.document.core.util.SearchUtil
;
import
com.inet.dcs.document.entity.po.ExtFiles
;
import
com.inet.dcs.document.entity.po.ExtFiles
;
...
@@ -43,6 +45,9 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
...
@@ -43,6 +45,9 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
@Autowired
@Autowired
private
ExtDxContextProjectServiceFeign
extDxContextProjectServiceFeign
;
private
ExtDxContextProjectServiceFeign
extDxContextProjectServiceFeign
;
@Autowired
private
ExtFilesDocLinkService
extFilesDocLinkService
;
@Override
@Override
public
void
beforeSave
(
Collection
<
V
>
target
)
{
public
void
beforeSave
(
Collection
<
V
>
target
)
{
// 全宗号+项目号+项目代号+类别代号+盒号(三位流水号)+后缀“-(两位数字流水号)例如:2-20114272031-QH03-JS01-001-(01)
// 全宗号+项目号+项目代号+类别代号+盒号(三位流水号)+后缀“-(两位数字流水号)例如:2-20114272031-QH03-JS01-001-(01)
...
@@ -65,6 +70,16 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
...
@@ -65,6 +70,16 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
}
}
}
}
@Override
public
void
beforeDelete
(
Collection
<
V
>
target
)
{
for
(
V
v
:
target
)
{
List
<
ExtFilesDocLinkVO
>
filesDocLink
=
extFilesDocLinkService
.
getFilesDocLinkByTargetId
(
v
.
getId
());
if
(
CollectionUtils
.
isNotEmpty
(
filesDocLink
))
{
throw
new
DxBusinessException
(
"500"
,
"案卷下有文件不能删除"
);
}
}
}
/**
/**
* 根据案卷序号查询案卷
* 根据案卷序号查询案卷
*
*
...
@@ -76,6 +91,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
...
@@ -76,6 +91,7 @@ public class ExtFilesServiceImpl<V extends ExtFilesVO> implements ExtFilesServic
.
searchItems
(
SearchItems
.
builder
()
.
searchItems
(
SearchItems
.
builder
()
.
item
(
new
SearchItem
(
"volumeNumber"
,
SearchItem
.
Operator
.
EQ
,
volumeNumber
,
null
))
.
item
(
new
SearchItem
(
"volumeNumber"
,
SearchItem
.
Operator
.
EQ
,
volumeNumber
,
null
))
.
item
(
new
SearchItem
(
"latest"
,
SearchItem
.
Operator
.
EQ
,
true
,
null
))
.
item
(
new
SearchItem
(
"latest"
,
SearchItem
.
Operator
.
EQ
,
true
,
null
))
.
item
(
new
SearchItem
(
"checkOuted"
,
SearchItem
.
Operator
.
EQ
,
true
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
return
(
List
<
ExtFilesVO
>)
this
.
findRecursion
(
queryDoc
).
getContent
();
return
(
List
<
ExtFilesVO
>)
this
.
findRecursion
(
queryDoc
).
getContent
();
}
}
...
...
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