Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
c40d44e9
Commit
c40d44e9
authored
Apr 18, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):安装告知和使用登记的监管部门,接收机构
parent
f89662f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
17 deletions
+42
-17
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+23
-0
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+8
-5
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+11
-12
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
c40d44e9
...
...
@@ -1709,6 +1709,29 @@ public class CommonServiceImpl implements ICommonService {
}
return
result
;
}
/**
* 递归属地监管部门树匹配监管部门
*
* @param tree 监管树
* @param orgBranchCode 监管部门orgCode
* @return 监管部门信息
*/
public
LinkedHashMap
recursiveMatching
(
List
<
LinkedHashMap
>
tree
,
String
orgBranchCode
)
{
if
(
tree
!=
null
)
{
for
(
LinkedHashMap
map
:
tree
)
{
if
(
orgBranchCode
.
equals
(
map
.
get
(
"orgCode"
)))
{
return
map
;
}
if
(
map
.
containsKey
(
"children"
)
&&
map
.
get
(
"children"
)
instanceof
List
)
{
LinkedHashMap
result
=
recursiveMatching
((
List
<
LinkedHashMap
>)
map
.
get
(
"children"
),
orgBranchCode
);
if
(!
""
.
equals
(
result
))
{
return
result
;
}
}
}
}
return
null
;
}
/**
* 排序 :页面列表排序功能支持,将 "字段,ascend" 或 "字段,descend" 转化为对应JSONObject
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
c40d44e9
...
...
@@ -146,6 +146,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
CommonServiceImpl
commonService
;
@Autowired
private
RedissonClient
redissonClient
;
@Autowired
CommonServiceImpl
commonServiceImpl
;
/**
* 根据sequenceNbr查询
...
...
@@ -904,16 +906,17 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
List
<
LinkedHashMap
>
tree
=
commonServiceImpl
.
getCreatTree
();
// 更新设备监管部门信息
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>
eq
=
new
QueryWrapper
<
IdxBizJgSupervisionInfo
>().
lambda
()
.
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
=
idxBizJgSupervisionInfoMapper
.
selectOne
(
eq
);
if
(!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getOrgBranchCode
())
&&
!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getOrgBranchName
()))
{
CompanyModel
result
=
Privilege
.
companyClient
.
queryByCompanyName
(
jgInstallationNotice
.
getOrgBranchName
()).
getResult
();
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
result
.
getOrgCode
());
idxBizJgSupervisionInfo
.
setOrgBranchName
(
result
.
getCompanyName
());
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
result
.
getCompanyCode
());
// CompanyModel result = Privilege.companyClient.queryByCompanyName(jgInstallationNotice.getOrgBranchName()).getResult();
LinkedHashMap
linkedHashMap
=
commonServiceImpl
.
recursiveMatching
(
tree
,
jgInstallationNotice
.
getOrgBranchCode
());
idxBizJgSupervisionInfo
.
setOrgBranchCode
((
String
)
linkedHashMap
.
get
(
"orgCode"
));
idxBizJgSupervisionInfo
.
setOrgBranchName
((
String
)
linkedHashMap
.
get
(
"companyName"
));
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
((
String
)
linkedHashMap
.
get
(
"companyCode"
));
idxBizJgSupervisionInfoMapper
.
updateById
(
idxBizJgSupervisionInfo
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
c40d44e9
...
...
@@ -234,11 +234,11 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
=
new
IdxBizJgSupervisionInfo
();
if
(
map
.
containsKey
(
"orgBranchCode"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"orgBranchCode"
)))
{
String
[]
data
=
String
.
valueOf
(
map
.
getString
(
"orgBranchCode"
)).
split
(
"_"
);
String
orgBranchName
=
data
[
1
]
;
CompanyModel
result
=
Privilege
.
companyClient
.
queryByCompanyName
(
orgBranchName
).
getResult
(
);
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
result
.
getOrgCode
()
);
idxBizJgSupervisionInfo
.
setOrgBranchName
(
result
.
getCompanyName
()
);
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
result
.
getCompanyCode
(
));
List
<
LinkedHashMap
>
tree
=
commonServiceImpl
.
getCreatTree
()
;
LinkedHashMap
linkedHashMap
=
commonServiceImpl
.
recursiveMatching
(
tree
,
data
[
0
]
);
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
data
[
0
]
);
idxBizJgSupervisionInfo
.
setOrgBranchName
(
data
[
1
]
);
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
(
String
)
linkedHashMap
.
get
(
"companyCode"
));
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>
eq
=
new
QueryWrapper
<
IdxBizJgSupervisionInfo
>().
lambda
().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
idxBizJgSupervisionInfoMapper
.
update
(
idxBizJgSupervisionInfo
,
eq
);
}
...
...
@@ -525,18 +525,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 使用单位信息
useRegistration
.
setUseUnitName
(
company
.
getCompanyName
());
useRegistration
.
setUseUnitCreditCode
(
company
.
getCompanyCode
());
List
<
LinkedHashMap
>
tree
=
commonService
.
getCreatTree
();
// 接收单位信息
Optional
.
ofNullable
(
useRegistration
.
getReceiveOrgCode
())
.
filter
(
code
->
code
.
contains
(
"_"
))
.
map
(
code
->
code
.
split
(
"_"
))
.
ifPresent
(
splitReceiveOrgCode
->
{
String
orgBranchName
=
splitReceiveOrgCode
[
1
];
CompanyModel
result
=
Privilege
.
companyClient
.
queryByCompanyName
(
orgBranchName
).
getResult
();
useRegistration
.
setReceiveOrgCode
(
result
.
getOrgCode
());
useRegistration
.
setReceiveCompanyOrgCode
(
result
.
getOrgCode
());
useRegistration
.
setReceiveCompanyCode
(
result
.
getCompanyCode
());
useRegistration
.
setReceiveOrgName
(
result
.
getCompanyName
());
LinkedHashMap
linkedHashMap
=
commonServiceImpl
.
recursiveMatching
(
tree
,
splitReceiveOrgCode
[
0
]);
useRegistration
.
setReceiveOrgCode
(
splitReceiveOrgCode
[
0
]);
useRegistration
.
setReceiveCompanyOrgCode
(
splitReceiveOrgCode
[
0
]);
useRegistration
.
setReceiveCompanyCode
((
String
)
linkedHashMap
.
get
(
"companyCode"
));
useRegistration
.
setReceiveOrgName
(
splitReceiveOrgCode
[
1
]);
});
// 安全管理员
...
...
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