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
bb892466
Commit
bb892466
authored
Aug 20, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(tcm): 优化企业信息更新接口
- 修改 TzBaseEnterpriseInfoMapper 接口,增加新参数 newOrgName - 更新 SQL 语句,添加 supervise_org_name 和 governing_body 字段的更新
parent
6763ef31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
TzBaseEnterpriseInfoMapper.java
...oot/module/tcm/api/mapper/TzBaseEnterpriseInfoMapper.java
+1
-1
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+3
-2
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+2
-1
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzBaseEnterpriseInfoMapper.java
View file @
bb892466
...
...
@@ -96,7 +96,7 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
List
<
String
>
selectCompanyBySupervisionOrgCode
(
String
oldOrgCode
);
void
updateRedundantSupervisionOrgCodeUnit
(
String
newOrgCode
,
String
oldOrgCode
);
void
updateRedundantSupervisionOrgCodeUnit
(
String
newOrg
Name
,
String
newOrg
Code
,
String
oldOrgCode
);
void
updateRedundantSupervisionOrgCodeStatistics
(
String
newOrgCode
,
String
oldOrgCode
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
bb892466
...
...
@@ -191,7 +191,8 @@
update tz_base_enterprise_info
set SUPERVISE_ORG_NAME = #{superviseOrgName},
SUPERVISE_ORG_CODE = REPLACE(SUPERVISE_ORG_CODE, #{oldSuperviseOrgCode}, #{preSuperviseOrgCode}),
ORG_CODE = IFNULL(REPLACE(ORG_CODE, #{oldOrgCode}, #{preOrgCode}), #{preOrgCode}) -- 兼容旧数据,如果为空则使用新值
ORG_CODE = IFNULL(REPLACE(ORG_CODE, #{oldOrgCode}, #{preOrgCode}), #{preOrgCode}), -- 兼容旧数据,如果为空则使用新值
governing_body = #{superviseOrgName}
where sequence_nbr = #{sequenceNbr}
</update>
...
...
@@ -265,7 +266,7 @@
<update
id=
"updateRedundantSupervisionOrgCodeUnit"
>
update tz_base_enterprise_info
set supervise_org_code = replace(supervise_org_code, #{oldOrgCode}, #{newOrgCode})
set supervise_org_code = replace(supervise_org_code, #{oldOrgCode}, #{newOrgCode})
, supervise_org_name = #{newOrgName}, governing_body = #{newOrgName}
where supervise_org_code like concat(#{oldOrgCode}, '%');
update tz_base_enterprise_info
set org_code = replace(org_code, #{oldOrgCode}, #{newOrgCode})
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
bb892466
...
...
@@ -1449,12 +1449,13 @@ public class TzBaseEnterpriseInfoServiceImpl
public
void
refreshCompanyOrgCode
(
JSONObject
dataResult
,
String
newOrgCode
,
String
oldOrgCode
)
{
try
{
if
(!
ValidationUtil
.
isEmpty
(
newOrgCode
)
&&
!
ValidationUtil
.
isEmpty
(
oldOrgCode
)
&&
!
newOrgCode
.
equals
(
oldOrgCode
))
{
JSONObject
newModel
=
(
JSONObject
)
dataResult
.
get
(
"newModel"
);
// 1. 查询旧属地监管部门orgCode对应所有的公司
List
<
String
>
companySeqList
=
tzBaseEnterpriseInfoMapper
.
selectCompanyBySupervisionOrgCode
(
oldOrgCode
);
// 2. 查询旧属地监管部门orgCode对应的所有设备
List
<
String
>
equipmentRecordList
=
tzBaseEnterpriseInfoMapper
.
selectEquipmentBySupervisionOrgCode
(
oldOrgCode
);
// 3. 3.1 更新单位及业务表的监管单位orgCode
tzBaseEnterpriseInfoMapper
.
updateRedundantSupervisionOrgCodeUnit
(
newOrgCode
,
oldOrgCode
);
tzBaseEnterpriseInfoMapper
.
updateRedundantSupervisionOrgCodeUnit
(
new
Model
.
getString
(
"companyName"
),
new
OrgCode
,
oldOrgCode
);
// 3.2 更新业务表统计表冗余的监管单位orgCode
tzBaseEnterpriseInfoMapper
.
updateRedundantSupervisionOrgCodeStatistics
(
newOrgCode
,
oldOrgCode
);
// 4. 发送数据刷新事件 - 内存分页处理
...
...
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