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
2242f3f3
Commit
2242f3f3
authored
Apr 17, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):使用登记统一监管部门的orgcode
parent
1c5217e1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
35 deletions
+13
-35
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+13
-35
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/JgUseRegistrationServiceImpl.java
View file @
2242f3f3
...
...
@@ -39,6 +39,8 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.EquCodeTypeEnum;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
...
...
@@ -232,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
(
"_"
);
List
<
LinkedHashMap
>
tree
=
commonServiceImpl
.
getCreatTree
()
;
String
orgCode
=
this
.
recursiveMatching
(
tree
,
data
[
0
]
);
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
orgCode
);
idxBizJgSupervisionInfo
.
setOrgBranchName
(
data
[
1
]
);
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
data
[
0
]
);
String
orgBranchName
=
data
[
1
]
;
CompanyModel
result
=
Privilege
.
companyClient
.
queryByCompanyName
(
orgBranchName
).
getResult
(
);
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
result
.
getOrgCode
()
);
idxBizJgSupervisionInfo
.
setOrgBranchName
(
result
.
getCompanyName
()
);
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
result
.
getCompanyCode
()
);
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>
eq
=
new
QueryWrapper
<
IdxBizJgSupervisionInfo
>().
lambda
().
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
idxBizJgSupervisionInfoMapper
.
update
(
idxBizJgSupervisionInfo
,
eq
);
}
...
...
@@ -267,30 +269,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
/**
* 递归属地监管部门树匹配监管部门
*
* @param tree 监管树
* @param orgBranchCode 监管部门companyCode
* @return 监管部门orgCode
*/
public
String
recursiveMatching
(
List
<
LinkedHashMap
>
tree
,
String
orgBranchCode
)
{
if
(
tree
!=
null
)
{
for
(
LinkedHashMap
map
:
tree
)
{
if
(
orgBranchCode
.
equals
(
map
.
get
(
"companyCode"
)))
{
return
(
String
)
map
.
get
(
"orgCode"
);
}
if
(
map
.
containsKey
(
"children"
)
&&
map
.
get
(
"children"
)
instanceof
List
)
{
String
result
=
recursiveMatching
((
List
<
LinkedHashMap
>)
map
.
get
(
"children"
),
orgBranchCode
);
if
(!
""
.
equals
(
result
))
{
return
result
;
}
}
}
}
return
""
;
}
/**
* 获取类型为ZC的“已注册”的字典值
*
* @return code
...
...
@@ -547,18 +525,18 @@ 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
orgCode
=
this
.
recursiveMatching
(
tree
,
splitReceiveOrgCode
[
0
]);
useRegistration
.
setReceiveOrgCode
(
orgCode
);
useRegistration
.
setReceiveCompanyOrgCode
(
orgCode
);
useRegistration
.
setReceiveCompanyCode
(
splitReceiveOrgCode
[
0
]);
useRegistration
.
setReceiveOrgName
(
splitReceiveOrgCode
[
1
]);
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
());
});
// 安全管理员
...
...
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