Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
3d57fb9e
Commit
3d57fb9e
authored
Feb 23, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加窗口无人值守
parent
e11061f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
9 deletions
+60
-9
base-manager/src/main/java/com/mortals/xhx/base/system/upload/service/UploadService.java
...mortals/xhx/base/system/upload/service/UploadService.java
+14
-2
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteBusinessServiceImpl.java
...xhx/module/site/service/impl/SiteBusinessServiceImpl.java
+44
-5
base-manager/src/test/java/com/mortals/httpclient/site/SiteBusinessController.http
...a/com/mortals/httpclient/site/SiteBusinessController.http
+2
-2
No files found.
base-manager/src/main/java/com/mortals/xhx/base/system/upload/service/UploadService.java
View file @
3d57fb9e
...
@@ -46,12 +46,24 @@ public interface UploadService extends IService {
...
@@ -46,12 +46,24 @@ public interface UploadService extends IService {
*/
*/
void
fileDownload
(
String
fileName
,
Boolean
delete
,
HttpServletResponse
response
);
void
fileDownload
(
String
fileName
,
Boolean
delete
,
HttpServletResponse
response
);
/**
* 预览
* @param fileName
* @param response
*/
void
preview
(
String
fileName
,
HttpServletResponse
response
);
void
preview
(
String
fileName
,
HttpServletResponse
response
);
/**
* 上传
* @param fileName
* @param response
*/
void
uploadDownload
(
String
fileName
,
HttpServletResponse
response
);
void
uploadDownload
(
String
fileName
,
HttpServletResponse
response
);
/**
* 刪除
* @param fileName
*/
void
deleteFile
(
String
fileName
);
void
deleteFile
(
String
fileName
);
}
}
\ No newline at end of file
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteBusinessServiceImpl.java
View file @
3d57fb9e
...
@@ -6,6 +6,7 @@ import com.mortals.framework.model.Context;
...
@@ -6,6 +6,7 @@ import com.mortals.framework.model.Context;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl
;
import
com.mortals.xhx.common.code.BusinessTypeEnum
;
import
com.mortals.xhx.common.code.IsBusinessEnum
;
import
com.mortals.xhx.common.code.IsBusinessEnum
;
import
com.mortals.xhx.module.business.model.BusinessEntity
;
import
com.mortals.xhx.module.business.model.BusinessEntity
;
import
com.mortals.xhx.module.business.model.BusinessMatterEntity
;
import
com.mortals.xhx.module.business.model.BusinessMatterEntity
;
...
@@ -24,10 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -24,10 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -47,10 +45,51 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
...
@@ -47,10 +45,51 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
@Autowired
@Autowired
private
BusinessMatterService
businessMatterService
;
private
BusinessMatterService
businessMatterService
;
/**
* @param params
* @param pageInfo
* @param context
* @return
* @throws AppException
*/
@Override
protected
SiteBusinessEntity
findBefore
(
SiteBusinessEntity
params
,
PageInfo
pageInfo
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
params
.
getIdNotList
()))
{
Set
<
Long
>
notIdSet
=
params
.
getIdNotList
().
stream
().
collect
(
Collectors
.
toSet
());
//排除掉了父级,但是子集存在,需要吧父id排除到notlist外
SiteBusinessQuery
siteBusinessQuery
=
new
SiteBusinessQuery
();
siteBusinessQuery
.
setIdList
(
params
.
getIdNotList
());
List
<
SiteBusinessEntity
>
rootSiteBusiness
=
this
.
find
(
siteBusinessQuery
).
stream
().
filter
(
f
->
f
.
getIsBusiness
()
==
IsBusinessEnum
.
一级业务
.
getValue
()).
collect
(
Collectors
.
toList
());
for
(
SiteBusinessEntity
root
:
rootSiteBusiness
)
{
SiteBusinessQuery
query
=
new
SiteBusinessQuery
();
query
.
setParentId
(
root
.
getId
());
List
<
SiteBusinessEntity
>
childSiteBusiness
=
this
.
find
(
query
,
context
);
//判断排除的id是否包含所有
Boolean
bool
=
false
;
for
(
SiteBusinessEntity
child
:
childSiteBusiness
)
{
if
(!
notIdSet
.
contains
(
child
.
getId
()))
{
bool
=
true
;
break
;
}
}
if
(
bool
)
{
//排除掉父id
notIdSet
.
remove
(
root
.
getId
());
}
}
params
.
setIdNotList
(
notIdSet
.
stream
().
collect
(
Collectors
.
toList
()));
}
return
super
.
findBefore
(
params
,
pageInfo
,
context
);
}
@Override
@Override
protected
void
findAfter
(
SiteBusinessEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
SiteBusinessEntity
>
list
)
throws
AppException
{
protected
void
findAfter
(
SiteBusinessEntity
params
,
PageInfo
pageInfo
,
Context
context
,
List
<
SiteBusinessEntity
>
list
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
params
.
getIdNotList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
params
.
getIdNotList
()))
{
//排除掉已经存在的ids
//排除掉已经存在的ids
log
.
info
(
"idNotList:{}"
,
JSON
.
toJSONString
(
params
.
getIdNotList
()));
log
.
info
(
"idNotList:{}"
,
JSON
.
toJSONString
(
params
.
getIdNotList
()));
Iterator
<
SiteBusinessEntity
>
iterator
=
list
.
iterator
();
Iterator
<
SiteBusinessEntity
>
iterator
=
list
.
iterator
();
...
@@ -66,7 +105,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
...
@@ -66,7 +105,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
if
(
ObjectUtils
.
isEmpty
(
childs
))
{
if
(
ObjectUtils
.
isEmpty
(
childs
))
{
//子节点已经全部选中,删除父节点
//子节点已经全部选中,删除父节点
iterator
.
remove
();
iterator
.
remove
();
pageInfo
.
setTotalResult
(
pageInfo
.
getTotalResult
()
-
1
);
pageInfo
.
setTotalResult
(
pageInfo
.
getTotalResult
()
-
1
);
}
else
{
}
else
{
childs
.
stream
().
forEach
(
item1
->
{
childs
.
stream
().
forEach
(
item1
->
{
...
...
base-manager/src/test/java/com/mortals/httpclient/site/SiteBusinessController.http
View file @
3d57fb9e
...
@@ -4,9 +4,9 @@ POST {{baseUrl}}/site/business/list
...
@@ -4,9 +4,9 @@ POST {{baseUrl}}/site/business/list
Content-Type: application/json
Content-Type: application/json
{
{
"idNotList": [],
"idNotList": [
11,18,17,14,27,26
],
"siteId": 1,
"siteId": 1,
"page":
3
,
"page":
1
,
"size":10
"size":10
}
}
...
...
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