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
a2814d74
Commit
a2814d74
authored
Feb 28, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加业务修改通知php
parent
e8ea09f0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
base-manager/src/main/java/com/mortals/xhx/module/business/service/impl/BusinessServiceImpl.java
...xhx/module/business/service/impl/BusinessServiceImpl.java
+17
-3
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteBusinessServiceImpl.java
...xhx/module/site/service/impl/SiteBusinessServiceImpl.java
+1
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/module/business/service/impl/BusinessServiceImpl.java
View file @
a2814d74
...
@@ -199,7 +199,6 @@ public class BusinessServiceImpl extends AbstractCRUDCacheServiceImpl<BusinessDa
...
@@ -199,7 +199,6 @@ public class BusinessServiceImpl extends AbstractCRUDCacheServiceImpl<BusinessDa
throw
new
AppException
(
"请选择对应站点"
);
throw
new
AppException
(
"请选择对应站点"
);
}
}
List
<
Long
>
businessIdList
=
Arrays
.
asList
(
businessIds
.
split
(
","
)).
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
List
<
Long
>
businessIdList
=
Arrays
.
asList
(
businessIds
.
split
(
","
)).
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
//先删除后再新增
//先删除后再新增
SiteBusinessQuery
siteBusinessQuery
=
new
SiteBusinessQuery
();
SiteBusinessQuery
siteBusinessQuery
=
new
SiteBusinessQuery
();
siteBusinessQuery
.
setSiteId
(
siteId
);
siteBusinessQuery
.
setSiteId
(
siteId
);
...
@@ -209,6 +208,8 @@ public class BusinessServiceImpl extends AbstractCRUDCacheServiceImpl<BusinessDa
...
@@ -209,6 +208,8 @@ public class BusinessServiceImpl extends AbstractCRUDCacheServiceImpl<BusinessDa
if
(!
ObjectUtils
.
isEmpty
(
ids
))
{
if
(!
ObjectUtils
.
isEmpty
(
ids
))
{
siteBusinessService
.
remove
(
ids
,
context
);
siteBusinessService
.
remove
(
ids
,
context
);
}
}
BusinessQuery
businessQuery
=
new
BusinessQuery
();
BusinessQuery
businessQuery
=
new
BusinessQuery
();
businessQuery
.
setIdList
(
businessIdList
);
businessQuery
.
setIdList
(
businessIdList
);
this
.
find
(
businessQuery
).
stream
()
this
.
find
(
businessQuery
).
stream
()
...
@@ -226,7 +227,10 @@ public class BusinessServiceImpl extends AbstractCRUDCacheServiceImpl<BusinessDa
...
@@ -226,7 +227,10 @@ public class BusinessServiceImpl extends AbstractCRUDCacheServiceImpl<BusinessDa
private
void
updateOrSave
(
BusinessEntity
item
,
Long
siteId
,
Context
context
)
{
private
void
updateOrSave
(
BusinessEntity
item
,
Long
siteId
,
Context
context
)
{
SiteBusinessEntity
siteBusinessEntity
=
new
SiteBusinessEntity
();
SiteBusinessEntity
siteBusinessEntity
=
new
SiteBusinessEntity
();
BeanUtils
.
copyProperties
(
item
,
siteBusinessEntity
,
BeanUtil
.
getNullPropertyNames
(
item
));
// BeanUtils.copyProperties(item, siteBusinessEntity, BeanUtil.getNullPropertyNames(item));
SiteEntity
siteEntity
=
siteService
.
get
(
siteId
);
SiteEntity
siteEntity
=
siteService
.
get
(
siteId
);
if
(
ObjectUtils
.
isEmpty
(
siteEntity
))
{
if
(
ObjectUtils
.
isEmpty
(
siteEntity
))
{
throw
new
AppException
(
"未找到相应站点!"
);
throw
new
AppException
(
"未找到相应站点!"
);
...
@@ -235,7 +239,17 @@ public class BusinessServiceImpl extends AbstractCRUDCacheServiceImpl<BusinessDa
...
@@ -235,7 +239,17 @@ public class BusinessServiceImpl extends AbstractCRUDCacheServiceImpl<BusinessDa
siteBusinessEntity
.
setSiteName
(
siteEntity
.
getSiteName
());
siteBusinessEntity
.
setSiteName
(
siteEntity
.
getSiteName
());
siteBusinessEntity
.
setBusinessId
(
item
.
getId
());
siteBusinessEntity
.
setBusinessId
(
item
.
getId
());
siteBusinessEntity
.
setBusinessName
(
item
.
getName
());
siteBusinessEntity
.
setBusinessName
(
item
.
getName
());
siteBusinessEntity
.
setId
(
null
);
siteBusinessEntity
.
setAncestors
(
item
.
getAncestors
());
siteBusinessEntity
.
setIsBusiness
(
item
.
getIsBusiness
());
siteBusinessEntity
.
setParentId
(
0L
);
siteBusinessEntity
.
setStatus
(
item
.
getStatus
());
siteBusinessEntity
.
setRemark
(
item
.
getRemark
());
siteBusinessEntity
.
setCanorder
(
item
.
getCanorder
());
siteBusinessEntity
.
setCantake
(
item
.
getCantake
());
siteBusinessEntity
.
setDatashow
(
item
.
getDatashow
());
siteBusinessEntity
.
setEnglishname
(
item
.
getEnglishname
());
siteBusinessEntity
.
setFlownum
(
item
.
getFlownum
());
siteBusinessEntity
.
setBusinessType
(
item
.
getBusinessType
());
siteBusinessEntity
.
setCreateUserId
(
context
==
null
?
1L
:
context
.
getUser
()
==
null
?
1L
:
context
.
getUser
().
getId
());
siteBusinessEntity
.
setCreateUserId
(
context
==
null
?
1L
:
context
.
getUser
()
==
null
?
1L
:
context
.
getUser
().
getId
());
siteBusinessEntity
.
setCreateTime
(
new
Date
());
siteBusinessEntity
.
setCreateTime
(
new
Date
());
...
...
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteBusinessServiceImpl.java
View file @
a2814d74
...
@@ -184,7 +184,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
...
@@ -184,7 +184,7 @@ public class SiteBusinessServiceImpl extends AbstractCRUDCacheServiceImpl<SiteBu
List
<
SiteBusinessEntity
>
collect
=
Arrays
.
asList
(
ids
).
stream
()
List
<
SiteBusinessEntity
>
collect
=
Arrays
.
asList
(
ids
).
stream
()
.
flatMap
(
item
->
{
.
flatMap
(
item
->
{
SiteBusinessEntity
siteBusinessEntity
=
this
.
get
(
item
);
SiteBusinessEntity
siteBusinessEntity
=
this
.
get
(
item
);
return
this
.
find
(
new
SiteBusinessQuery
().
parentId
(
siteBusinessEntity
.
get
Business
Id
())).
stream
();
return
this
.
find
(
new
SiteBusinessQuery
().
parentId
(
siteBusinessEntity
.
getId
())).
stream
();
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
Long
[]
childIds
=
collect
.
stream
().
map
(
item
->
item
.
getId
()).
toArray
(
Long
[]::
new
);
Long
[]
childIds
=
collect
.
stream
().
map
(
item
->
item
.
getId
()).
toArray
(
Long
[]::
new
);
...
...
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