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
0a580817
Commit
0a580817
authored
Sep 02, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(jg): 优化获取管辖分局树接口并调整设备查询逻辑
- 在 CommonController 中为 creatTree 方法添加 client 参数
parent
bbcea0c3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+13
-11
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+2
-2
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+3
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
0a580817
...
@@ -385,11 +385,8 @@
...
@@ -385,11 +385,8 @@
<when
test=
"dto.equList != null or dto.equCategory != null or dto.equDefine != null or
<when
test=
"dto.equList != null or dto.equCategory != null or dto.equDefine != null or
dto.equCode != null or dto.code96333 != null or dto.supervisoryCode != null"
>
dto.equCode != null or dto.code96333 != null or dto.supervisoryCode != null"
>
WITH filtered_main_ids AS (
WITH filtered_main_ids AS (
SELECT
DISTINCT
fu.sequence_nbr
SELECT fu.sequence_nbr
FROM tzs_jg_use_registration fu
FROM tzs_jg_use_registration fu
LEFT JOIN tzs_jg_use_registration_eq re ON fu.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri ON re.equ_id = jri."RECORD"
LEFT JOIN idx_biz_jg_other_info other ON jri."RECORD" = other."RECORD"
WHERE fu.is_delete = '0'
WHERE fu.is_delete = '0'
<!-- 公共主表过滤条件 -->
<!-- 公共主表过滤条件 -->
<if
test=
"dto.status != null and dto.status != ''"
>
<if
test=
"dto.status != null and dto.status != ''"
>
...
@@ -442,27 +439,32 @@
...
@@ -442,27 +439,32 @@
AND (fu.use_unit_credit_code = #{dto.unitCode}
AND (fu.use_unit_credit_code = #{dto.unitCode}
OR fu.transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%'))
OR fu.transfer_to_user_ids LIKE CONCAT('%', #{dto.currentUserId}, '%'))
</if>
</if>
AND exists(
SELECT 1 FROM tzs_jg_use_registration_eq re
INNER JOIN idx_biz_jg_register_info jri ON re.equ_id = jri."RECORD"
LEFT JOIN idx_biz_jg_other_info other ON jri."RECORD" = other."RECORD"
WHERE re.equip_transfer_id = fu.sequence_nbr
<!-- 设备表过滤条件 -->
<!-- 设备表过滤条件 -->
<if
test=
"dto.equList != null and dto.equList != ''"
>
<if
test=
"dto.equList != null and dto.equList != ''"
>
AND jri.EQU_LIST
= #{dto.equList}
AND jri."EQU_LIST"
= #{dto.equList}
</if>
</if>
<if
test=
"dto.equCategory != null and dto.equCategory != ''"
>
<if
test=
"dto.equCategory != null and dto.equCategory != ''"
>
AND jri.EQU_CATEGORY
= #{dto.equCategory}
AND jri."EQU_CATEGORY"
= #{dto.equCategory}
</if>
</if>
<if
test=
"dto.equDefine != null and dto.equDefine != ''"
>
<if
test=
"dto.equDefine != null and dto.equDefine != ''"
>
AND jri.EQU_DEFINE
= #{dto.equDefine}
AND jri."EQU_DEFINE"
= #{dto.equDefine}
</if>
</if>
<if
test=
"dto.equCode != null and dto.equCode != ''"
>
<if
test=
"dto.equCode != null and dto.equCode != ''"
>
AND jri.EQU_CODE
LIKE CONCAT(#{dto.equCode}, '%')
AND jri."EQU_CODE"
LIKE CONCAT(#{dto.equCode}, '%')
</if>
</if>
<if
test=
"dto.code96333 != null and dto.code96333 != ''"
>
<if
test=
"dto.code96333 != null and dto.code96333 != ''"
>
AND other.CODE96333
LIKE CONCAT(#{dto.code96333}, '%')
AND other."CODE96333"
LIKE CONCAT(#{dto.code96333}, '%')
</if>
</if>
<if
test=
"dto.supervisoryCode != null and dto.supervisoryCode != ''"
>
<if
test=
"dto.supervisoryCode != null and dto.supervisoryCode != ''"
>
AND other.supervisory_code
LIKE CONCAT(#{dto.supervisoryCode}, '%')
AND other."SUPERVISORY_CODE"
LIKE CONCAT(#{dto.supervisoryCode}, '%')
</if>
</if>
)
)
)
SELECT
SELECT
fu.sequence_nbr AS sequenceNbr,
fu.sequence_nbr AS sequenceNbr,
fu.audit_status AS auditStatus,
fu.audit_status AS auditStatus,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
0a580817
...
@@ -109,8 +109,8 @@ public class CommonController extends BaseController {
...
@@ -109,8 +109,8 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/creatTree"
)
@GetMapping
(
value
=
"/creatTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
public
ResponseModel
<
Object
>
creatTree
()
{
public
ResponseModel
<
Object
>
creatTree
(
@RequestParam
(
required
=
false
)
String
client
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getTree
(
getSelectedOrgInfo
()));
return
ResponseHelper
.
buildResponse
(
commonService
.
getTree
(
client
,
getSelectedOrgInfo
()));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
0a580817
...
@@ -30,7 +30,7 @@ public interface ICommonService {
...
@@ -30,7 +30,7 @@ public interface ICommonService {
List
<
LinkedHashMap
>
getRegion
(
String
level
,
String
parentId
);
List
<
LinkedHashMap
>
getRegion
(
String
level
,
String
parentId
);
List
<
LinkedHashMap
>
getTree
(
ReginParams
selectedOrgInfo
);
List
<
LinkedHashMap
>
getTree
(
String
client
,
ReginParams
selectedOrgInfo
);
List
<
LinkedHashMap
>
getApproveTree
(
ReginParams
reginParams
);
List
<
LinkedHashMap
>
getApproveTree
(
ReginParams
reginParams
);
...
...
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 @
0a580817
...
@@ -733,9 +733,9 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -733,9 +733,9 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
@Override
public
List
<
LinkedHashMap
>
getTree
(
ReginParams
reginParams
)
{
public
List
<
LinkedHashMap
>
getTree
(
String
client
,
ReginParams
reginParams
)
{
// 企业逻辑
// 企业逻辑
if
(
reginParams
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
))
{
if
(
reginParams
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
)
||
"jgLook"
.
equals
(
client
)
)
{
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
REGULATOR_UNIT_TREE
);
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
REGULATOR_UNIT_TREE
);
// 判断redis是否存在管辖机构树
// 判断redis是否存在管辖机构树
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
creatTree
();
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
creatTree
();
...
@@ -871,7 +871,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -871,7 +871,7 @@ public class CommonServiceImpl implements ICommonService {
Iterator
it
=
result
.
iterator
();
Iterator
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
// 删除非
行政审批局
// 删除非
监管机构
Object
companyTypeObj
=
e
.
get
(
"companyType"
);
Object
companyTypeObj
=
e
.
get
(
"companyType"
);
if
(
companyTypeObj
==
null
||
!
companyTypeObj
.
toString
().
contains
(
companyType
))
{
if
(
companyTypeObj
==
null
||
!
companyTypeObj
.
toString
().
contains
(
companyType
))
{
it
.
remove
();
it
.
remove
();
...
...
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