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
e5ec3eb5
Commit
e5ec3eb5
authored
May 31, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加站点更新日志
parent
9509e587
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
...mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
+22
-12
No files found.
base-manager/src/main/java/com/mortals/xhx/module/dept/service/impl/DeptServiceImpl.java
View file @
e5ec3eb5
...
...
@@ -57,12 +57,6 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
private
MattersDeptService
mattersDeptService
;
@Autowired
private
WindowService
windowService
;
@Autowired
private
BusinessService
businessService
;
@Autowired
private
SiteBusinessService
siteBusinessService
;
@Autowired
private
WindowBusinessService
windowBusinessService
;
@Override
...
...
@@ -70,22 +64,38 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
return
data
.
getDeptNumber
();
}
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected
void
validData
(
DeptEntity
entity
,
Context
context
)
throws
AppException
{
super
.
validData
(
entity
,
context
);
//校验部门编码是否重复
protected
void
saveBefore
(
DeptEntity
entity
,
Context
context
)
throws
AppException
{
super
.
saveBefore
(
entity
,
context
);
//
新增
校验部门编码是否重复
DeptEntity
extCache
=
this
.
getExtCache
(
entity
.
getDeptNumber
());
if
(!
ObjectUtils
.
isEmpty
(
extCache
)
&&
SourceEnum
.
自定义
.
getValue
()
==
entity
.
getSource
()
)
{
if
(!
ObjectUtils
.
isEmpty
(
extCache
))
{
throw
new
AppException
(
"部门编码重复!deptCode:"
+
extCache
.
getDeptNumber
());
}
}
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected
void
updateBefore
(
DeptEntity
entity
,
Context
context
)
throws
AppException
{
super
.
updateBefore
(
entity
,
context
);
DeptEntity
beforeEntity
=
this
.
get
(
entity
.
getId
(),
context
);
if
(!
beforeEntity
.
getDeptNumber
().
equals
(
entity
.
getDeptNumber
())){
DeptEntity
extCache
=
this
.
getExtCache
(
entity
.
getDeptNumber
());
if
(!
ObjectUtils
.
isEmpty
(
extCache
))
{
throw
new
AppException
(
"部门编码重复!deptCode:"
+
extCache
.
getDeptNumber
());
}
}
}
@Override
public
void
syncDept
(
String
areaCode
,
Context
context
)
{
List
<
MattersDeptEntity
>
deptList
=
mattersDeptService
.
find
(
new
MattersDeptQuery
());
...
...
@@ -126,7 +136,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
String
deptCode
=
item
.
getKey
();
String
deptName
=
item
.
getValue
();
DeptEntity
deptEntity
=
deptService
.
getExtCache
(
deptCode
);
// DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
// DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
if
(
ObjectUtils
.
isEmpty
(
deptEntity
))
{
deptEntity
=
new
DeptEntity
();
deptEntity
.
initAttrValue
();
...
...
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