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
da34e0d0
Commit
da34e0d0
authored
Sep 23, 2024
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_bugfix
parents
27a26a7d
5f8aa960
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
96 additions
and
20 deletions
+96
-20
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+96
-20
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/JgInstallationNoticeServiceImpl.java
View file @
da34e0d0
...
@@ -13,7 +13,9 @@ import com.github.pagehelper.util.StringUtil;
...
@@ -13,7 +13,9 @@ import com.github.pagehelper.util.StringUtil;
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.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
...
@@ -1128,9 +1130,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1128,9 +1130,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
=
getIdxBizJgRegisterInfo
(
jgRelationEquip
);
queryWrapper2
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
String
equCode
=
Optional
.
ofNullable
(
idxBizJgRegisterInfo
.
getEquDefine
())
String
equCode
=
Optional
.
ofNullable
(
idxBizJgRegisterInfo
.
getEquDefine
())
.
orElse
(
idxBizJgRegisterInfo
.
getEquCategory
());
.
orElse
(
idxBizJgRegisterInfo
.
getEquCategory
());
String
registrationCode
=
equCode
+
jgInstallationNotice
.
getReceiveOrgCreditCode
()
+
finalYm
;
String
registrationCode
=
equCode
+
jgInstallationNotice
.
getReceiveOrgCreditCode
()
+
finalYm
;
...
@@ -1287,7 +1287,19 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1287,7 +1287,19 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
}
}
public
void
genJgCertificateChangeRecord
(
JgInstallationNotice
jgInstallationNotice
,
Long
sequenceNbr
,
String
registrationCode
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
,
TaskV2Model
taskV2Model1
)
{
private
IdxBizJgRegisterInfo
getIdxBizJgRegisterInfo
(
JgInstallationNoticeEq
jgRelationEquip
)
{
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
return
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
}
private
IdxBizJgRegisterInfo
getIdxBizJgRegisterInfo2
(
JgInstallationNoticeEq
jgRelationEquip
)
{
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
queryWrapper2
.
select
(
TzsBaseEntity:
:
getSequenceNbr
,
IdxBizJgRegisterInfo:
:
getRecord
,
IdxBizJgRegisterInfo:
:
getEquCodeType
);
return
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
}
private
void
genJgCertificateChangeRecord
(
JgInstallationNotice
jgInstallationNotice
,
Long
sequenceNbr
,
String
registrationCode
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
,
TaskV2Model
taskV2Model1
)
{
// 生成一条tzs_jg_certificate_change_record记录
// 生成一条tzs_jg_certificate_change_record记录
JgCertificateChangeRecord
jgCertificateChangeRecord
=
new
JgCertificateChangeRecord
();
JgCertificateChangeRecord
jgCertificateChangeRecord
=
new
JgCertificateChangeRecord
();
jgCertificateChangeRecord
.
setApplyNo
(
jgInstallationNotice
.
getApplyNo
());
jgCertificateChangeRecord
.
setApplyNo
(
jgInstallationNotice
.
getApplyNo
());
...
@@ -1577,29 +1589,93 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1577,29 +1589,93 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
private
void
clearUseInfoOfEquip
(
JgInstallationNotice
installationNotice
)
{
private
void
clearUseInfoOfEquip
(
JgInstallationNotice
installationNotice
)
{
// 2.1 数据库的的USE_UNIT_CREDIT_CODE赋空
LambdaQueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationNotice
.
getSequenceNbr
());
queryWrapper
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationNotice
.
getSequenceNbr
());
queryWrapper
.
select
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
BaseEntity:
:
getSequenceNbr
,
JgInstallationNoticeEq:
:
getEquId
);
List
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
jgInstallationNoticeEqMapper
.
selectList
(
queryWrapper
);
List
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
jgInstallationNoticeEqMapper
.
selectList
(
queryWrapper
);
jgInstallationNoticeEqs
.
forEach
(
jgRelationEquip
->
{
jgInstallationNoticeEqs
.
forEach
(
jgRelationEquip
->
{
// 强制更新字段为 NULL
// 1.use_info 回退
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
this
.
rollBackUseInfo
(
jgRelationEquip
);
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
// 设置更新条件
// 2.other_info 回退
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitCreditCode
,
null
);
this
.
rollBackOtherInfo
(
jgRelationEquip
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitName
,
null
);
// 3.supervise_info回退
useInfoService
.
update
(
updateWrapper
);
this
.
rollBackSuperviseInfo
(
jgRelationEquip
);
// 2.2 es的USE_UNIT_CREDIT_CODE赋空
// 4.设备代码 回退
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
jgRelationEquip
.
getEquId
());
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
=
getIdxBizJgRegisterInfo2
(
jgRelationEquip
);
if
(
optional
.
isPresent
())
{
this
.
rollBackRegisterInfo
(
jgRelationEquip
,
idxBizJgRegisterInfo
);
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
// 5.es 回退
esEquipmentCategoryDto
.
setUSE_UNIT_CREDIT_CODE
(
null
);
this
.
rollBackEsInfo
(
jgRelationEquip
,
idxBizJgRegisterInfo
);
esEquipmentCategoryDto
.
setUSE_UNIT_NAME
(
null
);
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
});
});
}
}
private
void
rollBackEsInfo
(
JgInstallationNoticeEq
jgRelationEquip
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
)
{
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
jgRelationEquip
.
getEquId
());
if
(
optional
.
isPresent
())
{
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
esEquipmentCategoryDto
.
setUSE_UNIT_CREDIT_CODE
(
null
);
esEquipmentCategoryDto
.
setUSE_UNIT_NAME
(
null
);
esEquipmentCategoryDto
.
setORG_BRANCH_CODE
(
null
);
esEquipmentCategoryDto
.
setORG_BRANCH_NAME
(
null
);
esEquipmentCategoryDto
.
setSUPERVISORY_CODE
(
null
);
esEquipmentCategoryDto
.
setCODE96333
(
null
);
esEquipmentCategoryDto
.
setUSE_PLACE
(
null
);
esEquipmentCategoryDto
.
setUSE_PLACE_CODE
(
null
);
esEquipmentCategoryDto
.
setADDRESS
(
null
);
if
(
EquCodeTypeEnum
.
SYSTEM_GENERATED
.
getCode
().
equals
(
idxBizJgRegisterInfo
.
getEquCodeType
())){
esEquipmentCategoryDto
.
setEQU_CODE
(
null
);
}
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
}
private
void
rollBackRegisterInfo
(
JgInstallationNoticeEq
jgRelationEquip
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
)
{
if
(
EquCodeTypeEnum
.
SYSTEM_GENERATED
.
getCode
().
equals
(
idxBizJgRegisterInfo
.
getEquCodeType
()))
{
// 如果设备代码是系统自动生成,回退注册信息表的设备代码字段
LambdaUpdateWrapper
<
IdxBizJgRegisterInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
updateWrapper
.
set
(
IdxBizJgRegisterInfo:
:
getEquCode
,
null
);
tzsJgRegistrationInfoMapper
.
update
(
null
,
updateWrapper
);
}
}
private
void
rollBackSuperviseInfo
(
JgInstallationNoticeEq
jgRelationEquip
)
{
LambdaUpdateWrapper
<
IdxBizJgSupervisionInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
updateWrapper
.
set
(
IdxBizJgSupervisionInfo:
:
getOrgBranchCode
,
null
);
updateWrapper
.
set
(
IdxBizJgSupervisionInfo:
:
getOrgBranchName
,
null
);
updateWrapper
.
set
(
IdxBizJgSupervisionInfo:
:
getCompanyOrgBranchCode
,
null
);
idxBizJgSupervisionInfoMapper
.
update
(
null
,
updateWrapper
);
}
private
void
rollBackOtherInfo
(
JgInstallationNoticeEq
jgRelationEquip
)
{
LambdaUpdateWrapper
<
OtherInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
AbstractEquipBaseEntity:
:
getRecord
,
jgRelationEquip
.
getEquId
());
updateWrapper
.
set
(
OtherInfo:
:
getCode96333
,
null
);
updateWrapper
.
set
(
OtherInfo:
:
getSupervisoryCode
,
null
);
tzsJgOtherInfoMapper
.
update
(
null
,
updateWrapper
);
}
private
void
rollBackUseInfo
(
JgInstallationNoticeEq
jgRelationEquip
)
{
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
// 设置更新条件
// 强制更新字段为 NULL
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitCreditCode
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitName
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getProvince
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getProvinceName
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getCity
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getCityName
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getCounty
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getCountyName
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getFactoryUseSiteStreet
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getStreetName
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getIsNotXiXian
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getEstateUnitCreditCode
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getEstateUnitName
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getAddress
,
null
);
useInfoService
.
update
(
updateWrapper
);
}
@Transactional
@Transactional
@Override
@Override
public
Boolean
historyDataRepair
()
{
public
Boolean
historyDataRepair
()
{
...
...
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