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
9700e7e7
Commit
9700e7e7
authored
Mar 27, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产bug:
1.使用登记气瓶详情接口慢问题,查询由单次查询调整为匹配查询,原有好本次不行是因为判断后续业务时,增加了更名变更登记,存储的为json
parent
f1d203b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
22 deletions
+14
-22
CommonMapper.java
.../yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
+3
-2
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+6
-6
FillingUseRegisterResult.java
.../module/jg/biz/service/impl/FillingUseRegisterResult.java
+5
-14
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
View file @
9700e7e7
...
@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
...
@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.biz.common.dto.KeyValueDto
;
import
com.yeejoin.amos.boot.biz.common.dto.KeyValueDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto
;
import
com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO
;
import
com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO
;
...
@@ -241,10 +242,10 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
...
@@ -241,10 +242,10 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
/**
/**
* 查询指定设备,使用登记后,后续业务的数据
* 查询指定设备,使用登记后,后续业务的数据
*
*
* @param
record 设备标识
* @param
equipTransferId 使用登记主表id
* @return 后续业务数量
* @return 后续业务数量
*/
*/
Integer
countBizNumAfterUseReg
(
@Param
(
"record"
)
String
recor
d
);
Long
countBizNumAfterUseReg
(
@Param
(
"equipTransferId"
)
String
equipTransferI
d
);
/**
/**
* 车用气瓶-使用登记证编号全库唯一校验
* 车用气瓶-使用登记证编号全库唯一校验
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
9700e7e7
...
@@ -2461,7 +2461,7 @@
...
@@ -2461,7 +2461,7 @@
where record = #{record}
where record = #{record}
</if>
</if>
</update>
</update>
<select
id=
"countBizNumAfterUseReg"
resultType=
"java.lang.
Integer
"
>
<select
id=
"countBizNumAfterUseReg"
resultType=
"java.lang.
Long
"
>
select
select
sum(inUseNumber)
sum(inUseNumber)
from (
from (
...
@@ -2472,7 +2472,7 @@
...
@@ -2472,7 +2472,7 @@
tzs_jg_change_registration_reform_eq b
tzs_jg_change_registration_reform_eq b
where
where
a.sequence_nbr = b.equip_transfer_id
a.sequence_nbr = b.equip_transfer_id
and b.equ_id
= #{record}
and b.equ_id
in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
and (a.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
UNION all
UNION all
select
select
...
@@ -2482,7 +2482,7 @@
...
@@ -2482,7 +2482,7 @@
tzs_jg_change_registration_transfer_eq b
tzs_jg_change_registration_transfer_eq b
where
where
a.sequence_nbr = b.equip_transfer_id
a.sequence_nbr = b.equip_transfer_id
and b.equ_id
= #{record}
and b.equ_id
in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
and (a.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
UNION all
UNION all
select
select
...
@@ -2492,7 +2492,7 @@
...
@@ -2492,7 +2492,7 @@
tzs_jg_change_registration_unit_eq b
tzs_jg_change_registration_unit_eq b
where
where
a.sequence_nbr = b.unit_change_registration_id
a.sequence_nbr = b.unit_change_registration_id
and b.equ_id
= #{record}
and b.equ_id
in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.status
<![CDATA[ <> ]]>
'使用单位待提交' and a.status
<![CDATA[ <> ]]>
'已作废')
and (a.status
<![CDATA[ <> ]]>
'使用单位待提交' and a.status
<![CDATA[ <> ]]>
'已作废')
UNION all
UNION all
select
select
...
@@ -2502,7 +2502,7 @@
...
@@ -2502,7 +2502,7 @@
tzs_jg_scrap_cancel_eq b
tzs_jg_scrap_cancel_eq b
where
where
a.sequence_nbr = b.equip_transfer_id
a.sequence_nbr = b.equip_transfer_id
and b.equ_id
= #{record}
and b.equ_id
in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
and (a.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and a.audit_status
<![CDATA[ <> ]]>
'已作废')
UNION all
UNION all
select
select
...
@@ -2517,7 +2517,7 @@
...
@@ -2517,7 +2517,7 @@
n.sequence_nbr = e.name_change_registration_id
n.sequence_nbr = e.name_change_registration_id
and n.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and n.audit_status
<![CDATA[ <> ]]>
'已作废') ne
and n.audit_status
<![CDATA[ <> ]]>
'使用单位待提交' and n.audit_status
<![CDATA[ <> ]]>
'已作废') ne
where
where
ne.record
= #{record}
ne.record
in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
)
)
</select>
</select>
...
...
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/FillingUseRegisterResult.java
View file @
9700e7e7
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.dto.CountDto
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
...
@@ -41,23 +42,13 @@ public class FillingUseRegisterResult extends BaseUseRegisterResultData {
...
@@ -41,23 +42,13 @@ public class FillingUseRegisterResult extends BaseUseRegisterResultData {
*/
*/
private
void
fillingEditPermission
(
JSONObject
jsonObject
)
{
private
void
fillingEditPermission
(
JSONObject
jsonObject
)
{
jsonObject
.
put
(
HAPPEN_AFTER_BIZ
,
false
);
jsonObject
.
put
(
HAPPEN_AFTER_BIZ
,
false
);
List
<
JgUseRegistrationEq
>
useRegistrationEqs
=
getJgUseRegistrationEqService
().
list
(
new
LambdaQueryWrapper
<
JgUseRegistrationEq
>()
Long
useTimes
=
getCommonMapper
().
countBizNumAfterUseReg
(
userRegisterId
+
""
);
.
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
userRegisterId
)
if
(
useTimes
>
0
)
{
.
select
(
JgUseRegistrationEq:
:
getEquId
,
BaseEntity:
:
getSequenceNbr
));
log
.
warn
(
"此使用登记:{},存在设备做过后续业务,不可再变更设备信息"
,
userRegisterId
);
for
(
JgUseRegistrationEq
useRegistrationEq
:
useRegistrationEqs
)
{
jsonObject
.
put
(
HAPPEN_AFTER_BIZ
,
true
);
Integer
useTimes
=
getCommonMapper
().
countBizNumAfterUseReg
(
useRegistrationEq
.
getEquId
());
if
(
useTimes
>
0
)
{
log
.
warn
(
"设备:{}做过后续业务, 此使用登记:{}不可再变更设备信息"
,
useRegistrationEq
.
getEquId
(),
userRegisterId
);
jsonObject
.
put
(
HAPPEN_AFTER_BIZ
,
true
);
break
;
}
}
}
}
}
private
JgUseRegistrationEqServiceImpl
getJgUseRegistrationEqService
()
{
return
applicationContext
.
getBean
(
JgUseRegistrationEqServiceImpl
.
class
);
}
private
CommonMapper
getCommonMapper
()
{
private
CommonMapper
getCommonMapper
()
{
return
applicationContext
.
getBean
(
CommonMapper
.
class
);
return
applicationContext
.
getBean
(
CommonMapper
.
class
);
}
}
...
...
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