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
889a3068
Commit
889a3068
authored
Jan 10, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.管道历史问题处理-550数据处理
parent
6737776d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
0 deletions
+84
-0
JgInstallationNoticeEqMapper.java
...ot/module/jg/api/mapper/JgInstallationNoticeEqMapper.java
+18
-0
JgInstallationNoticeEqMapper.xml
...rc/main/resources/mapper/JgInstallationNoticeEqMapper.xml
+29
-0
DataHandlerController.java
.../boot/module/jg/biz/controller/DataHandlerController.java
+8
-0
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+29
-0
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/JgInstallationNoticeEqMapper.java
View file @
889a3068
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PieLineEquipContraptionDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -37,4 +39,20 @@ public interface JgInstallationNoticeEqMapper extends CustomBaseMapper<JgInstall
*/
List
<
PieLineEquipContraptionDto
>
selectPCIdNeErrorPieLineInUseInfo2
();
/**
* 查询存在多个安装告知的设备-管道
*
* @return List<JgInstallationNoticeEq> 管道record数组
*/
List
<
PieLineEquipContraptionDto
>
selectPCIdNeErrorPieLineInUseInfo3
();
/**
* 查询管道对应的安装告知单
*
* @return List<JgInstallationNoticeEqDto> 管道对应的最新安装告知
*/
JgInstallationNoticeEqDto
selectLatestNoticeByRecord
(
@Param
(
"record"
)
String
record
)
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeEqMapper.xml
View file @
889a3068
...
...
@@ -54,4 +54,33 @@
and pc.usc_unit_credit_code = n.install_unit_credit_code
order by n.create_date
</select>
<select
id=
"selectPCIdNeErrorPieLineInUseInfo3"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.PieLineEquipContraptionDto"
>
SELECT
distinct ne.equ_id as record
FROM
"tzs_jg_installation_notice" n,
tzs_jg_installation_notice_eq ne,
"idx_biz_jg_use_info" u,
idx_biz_jg_project_contraption pc
WHERE
ne.equip_transfer_id = n.sequence_nbr
and ne.equ_id = u."RECORD"
and pc.sequence_nbr = n.project_contraption_id
and n.is_delete = '0'
and n.notice_status != '6617'
and u.project_contraption_id != n.project_contraption_id
and pc.usc_unit_credit_code = n.install_unit_credit_code
</select>
<select
id=
"selectLatestNoticeByRecord"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeEqDto"
>
select
max(n.sequence_nbr) as equipTransferId
from
"tzs_jg_installation_notice" n,
tzs_jg_installation_notice_eq ne
where
n.is_delete = '0'
and n.notice_status != '6617'
and ne.equip_transfer_id = n.sequence_nbr
and ne.equ_id = #{record}
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataHandlerController.java
View file @
889a3068
...
...
@@ -119,5 +119,13 @@ public class DataHandlerController extends BaseController {
return
ResponseHelper
.
buildResponse
(
true
);
}
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"20250110-处理一个管道在多个安装告知里,刷管道的use_info、es的装置id,已最新安装告知为准"
,
notes
=
"历史数据处理"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/v5/projectContraption/useInfo"
)
public
ResponseModel
<
Boolean
>
projectUseInfoUpdateV5
(){
dataHandlerService
.
projectUseInfoUpdateV5
();
return
ResponseHelper
.
buildResponse
(
true
);
}
}
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/DataHandlerServiceImpl.java
View file @
889a3068
...
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.PieLineEquipContraptionDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum
;
...
...
@@ -930,4 +931,32 @@ public class DataHandlerServiceImpl {
List
<
PieLineEquipContraptionDto
>
eqsAfter
=
jgInstallationNoticeEqMapper
.
selectPCIdNeErrorPieLineInUseInfo2
();
log
.
info
(
"处理后:查询管道装置id与安装告知的装置id的不一样管道设备:{}"
,
eqsAfter
.
size
());
}
/**
* 处理一个管道在多个安装告知里,刷管道的use_info、es的装置id,已最新安装告知为准
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
projectUseInfoUpdateV5
()
{
List
<
PieLineEquipContraptionDto
>
eqs
=
jgInstallationNoticeEqMapper
.
selectPCIdNeErrorPieLineInUseInfo3
();
log
.
info
(
"处理前:一个管道在多个安装告知里,安装告知的装置id的不一样管道设备:{}"
,
eqs
.
size
());
eqs
.
forEach
(
eq
->{
JgInstallationNoticeEqDto
jgInstallationNoticeEqDto
=
jgInstallationNoticeEqMapper
.
selectLatestNoticeByRecord
(
eq
.
getRecord
());
JgInstallationNotice
jgInstallationNotice
=
jgInstallationNoticeMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgInstallationNotice
>()
.
eq
(
BaseEntity:
:
getSequenceNbr
,
jgInstallationNoticeEqDto
.
getEquipTransferId
())
.
select
(
JgInstallationNotice:
:
getProjectContraptionId
,
JgInstallationNotice:
:
getProjectContraption
));
// 1.已安装告知单据为准更新es
Optional
<
ESEquipmentCategoryDto
>
equInfosWithEs
=
esEquipmentCategory
.
findById
(
eq
.
getRecord
());
equInfosWithEs
.
ifPresent
(
equInfoEs
->
{
equInfoEs
.
setProjectContraptionId
(
jgInstallationNotice
.
getProjectContraptionId
());
equInfoEs
.
setPROJECT_CONTRAPTION
(
jgInstallationNotice
.
getProjectContraption
());
esEquipmentCategory
.
save
(
equInfoEs
);
});
// 2.已安装告知单据为准更新use_info
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
eq
.
getRecord
());
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getProjectContraptionId
,
jgInstallationNotice
.
getProjectContraptionId
());
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getProjectContraption
,
jgInstallationNotice
.
getProjectContraption
());
useInfoService
.
update
(
updateWrapper
);
});
}
}
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