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
fef0c61f
Commit
fef0c61f
authored
Jan 14, 2026
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg): 压力管道后续业务
1.维修告知历史json存储结构不对修改 2.维修告知历史json数据新写入,解决结构不对,导致已完成后还实时查询设备信息 3.历史数据刷库接口开发
parent
4f3c9368
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
9 deletions
+45
-9
DataHandlerController.java
.../boot/module/jg/biz/controller/DataHandlerController.java
+8
-0
JgMaintainByWorkFlowController.java
...ule/jg/biz/controller/JgMaintainByWorkFlowController.java
+1
-1
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+30
-2
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+6
-5
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+0
-1
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/controller/DataHandlerController.java
View file @
fef0c61f
...
@@ -442,4 +442,11 @@ public class DataHandlerController extends BaseController {
...
@@ -442,4 +442,11 @@ public class DataHandlerController extends BaseController {
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
synEquipFromDb2Es
(
equListCode
,
equCategoryCode
,
orgBranchCode
));
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
synEquipFromDb2Es
(
equListCode
,
equCategoryCode
,
orgBranchCode
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/update/mainNoticeJson"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新维修告知的json"
,
notes
=
"更新维修告知的json"
)
public
ResponseModel
<
Integer
>
updateMainNoticeJson
(){
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
updateMainNoticeJson
());
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintainByWorkFlowController.java
View file @
fef0c61f
...
@@ -67,7 +67,7 @@ public class JgMaintainByWorkFlowController {
...
@@ -67,7 +67,7 @@ public class JgMaintainByWorkFlowController {
LinkedHashMap
maintainInfo
=
(
LinkedHashMap
)
model1
.
get
(
TABLE_PAGE_ID
);
LinkedHashMap
maintainInfo
=
(
LinkedHashMap
)
model1
.
get
(
TABLE_PAGE_ID
);
String
opinion
=
model
.
get
(
"opinion"
).
toString
();
String
opinion
=
model
.
get
(
"opinion"
).
toString
();
JgMaintainNoticeDto
jgMaintainNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
maintainInfo
),
JgMaintainNoticeDto
.
class
);
JgMaintainNoticeDto
jgMaintainNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
maintainInfo
),
JgMaintainNoticeDto
.
class
);
jgMaintainNoticeServiceImpl
.
accept
(
jgMaintainNoticeDto
,
op
,
opinion
,
model1
);
jgMaintainNoticeServiceImpl
.
accept
(
jgMaintainNoticeDto
,
op
,
opinion
,
jgMaintainNoticeDto
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
}
}
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 @
fef0c61f
...
@@ -54,8 +54,8 @@ import com.yeejoin.amos.boot.module.ymt.api.dto.EquipWaitRefreshDataQualityScore
...
@@ -54,8 +54,8 @@ import com.yeejoin.amos.boot.module.ymt.api.dto.EquipWaitRefreshDataQualityScore
import
com.yeejoin.amos.boot.module.ymt.api.dto.ProjectWaitRefreshDataQualityScore
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ProjectWaitRefreshDataQualityScore
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.RefreshDataDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.RefreshDataDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
...
@@ -178,6 +178,9 @@ public class DataHandlerServiceImpl {
...
@@ -178,6 +178,9 @@ public class DataHandlerServiceImpl {
private
final
IdxBizJgRegisterInfoMapper
registerInfoMapper
;
private
final
IdxBizJgRegisterInfoMapper
registerInfoMapper
;
private
final
IdxBizJgSupervisionInfoServiceImpl
idxBizJgSupervisionInfoServiceImpl
;
private
final
IdxBizJgSupervisionInfoServiceImpl
idxBizJgSupervisionInfoServiceImpl
;
private
final
JgMaintainNoticeMapper
jgMaintainNoticeMapper
;
private
final
JgMaintainNoticeEqMapper
jgMaintainNoticeEqMapper
;
private
final
JgMaintainNoticeServiceImpl
jgMaintainNoticeServiceImpl
;
@Value
(
"${jyjc.open.online: true}"
)
@Value
(
"${jyjc.open.online: true}"
)
private
Boolean
onlineJyjc
;
private
Boolean
onlineJyjc
;
...
@@ -2782,7 +2785,7 @@ public class DataHandlerServiceImpl {
...
@@ -2782,7 +2785,7 @@ public class DataHandlerServiceImpl {
if
(!
esEquipmentCategoryDtos
.
isEmpty
())
{
if
(!
esEquipmentCategoryDtos
.
isEmpty
())
{
totalUpdate
=
esEquipmentCategoryDtos
.
size
()
+
totalUpdate
;
totalUpdate
=
esEquipmentCategoryDtos
.
size
()
+
totalUpdate
;
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryDtos
);
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryDtos
);
esBulkService
.
bulkUpsert
(
IDX_BIZ_VIEW_JG_ALL
,
esEquipmentCategoryDtos
.
stream
().
map
(
e
->
new
EsEntity
<>(
e
.
getSEQUENCE_NBR
(),
e
)).
collect
(
Collectors
.
toList
()));
esBulkService
.
bulkUpsert
(
IDX_BIZ_VIEW_JG_ALL
,
esEquipmentCategoryDtos
.
stream
().
map
(
e
->
new
EsEntity
<>(
e
.
getSEQUENCE_NBR
(),
e
)).
collect
(
Collectors
.
toList
()));
idxBizJgSupervisionInfoServiceImpl
.
getBaseMapper
().
updateOrgBranchCodeBatch
(
esEquipmentCategoryDtos
);
idxBizJgSupervisionInfoServiceImpl
.
getBaseMapper
().
updateOrgBranchCodeBatch
(
esEquipmentCategoryDtos
);
}
}
}
}
...
@@ -2807,4 +2810,29 @@ public class DataHandlerServiceImpl {
...
@@ -2807,4 +2810,29 @@ public class DataHandlerServiceImpl {
p
.
put
(
"orgBranchCode"
,
orgBranchCode
);
p
.
put
(
"orgBranchCode"
,
orgBranchCode
);
return
equipInsert2EsPatcher
.
patchBatchData
(
p
);
return
equipInsert2EsPatcher
.
patchBatchData
(
p
);
}
}
public
Integer
updateMainNoticeJson
()
{
log
.
info
(
"处理维修告知的json历史数据开始"
);
StopWatch
watch
=
new
StopWatch
();
watch
.
start
();
List
<
JgMaintainNotice
>
maintainNoticesNotices
=
jgMaintainNoticeServiceImpl
.
list
();
maintainNoticesNotices
.
parallelStream
().
forEach
(
r
->
{
List
<
String
>
records
=
jgMaintainNoticeEqMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgMaintainNoticeEq
>()
.
eq
(
JgMaintainNoticeEq:
:
getEquipTransferId
,
r
.
getSequenceNbr
()))
.
stream
()
.
map
(
JgMaintainNoticeEq:
:
getEquId
)
.
collect
(
Collectors
.
toList
());
if
(!
records
.
isEmpty
())
{
List
<
Map
<
String
,
Object
>>
deviceList
=
jgMaintainNoticeServiceImpl
.
getDeviceList
(
r
,
records
);
JSONObject
hisData
=
new
JSONObject
();
BeanUtil
.
copyProperties
(
r
,
hisData
);
hisData
.
put
(
"deviceList"
,
deviceList
);
commonServiceImpl
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getName
(),
hisData
,
null
,
r
.
getSequenceNbr
()
+
""
);
}
});
watch
.
stop
();
log
.
info
(
"处理维修告知的json历史数据结束:处理数量:「{}」,耗时:「{}」"
,
maintainNoticesNotices
.
size
(),
watch
.
getTotalTimeSeconds
());
return
maintainNoticesNotices
.
size
();
}
}
}
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/JgMaintainNoticeServiceImpl.java
View file @
fef0c61f
...
@@ -219,14 +219,14 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -219,14 +219,14 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
JSONObject
hisData
=
commonService
.
queryHistoryData
(
notice
.
getSequenceNbr
());
JSONObject
hisData
=
commonService
.
queryHistoryData
(
notice
.
getSequenceNbr
());
// 兼容老数据
// 兼容老数据
if
(
hisData
==
null
||
ObjectUtils
.
isEmpty
(
hisData
.
get
(
"deviceList"
)))
{
if
(
hisData
==
null
||
ObjectUtils
.
isEmpty
(
hisData
.
get
(
"deviceList"
)))
{
// 老数据逻辑
// 老数据逻辑
-实时查询
setNewEquipInfo
(
sequenceNbr
,
maintainInfo
,
notice
);
setNewEquipInfo
(
sequenceNbr
,
maintainInfo
,
notice
);
new
FillingEditPermForCurrentUser
(
new
JSONObject
(
maintainInfo
),
companyBo
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
).
getData
();
new
FillingEditPermForCurrentUser
(
new
JSONObject
(
maintainInfo
),
companyBo
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
).
getData
();
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
put
(
TABLE_PAGE_ID
,
maintainInfo
);
put
(
TABLE_PAGE_ID
,
maintainInfo
);
}};
}};
}
else
{
}
else
{
// 新数据逻辑
// 新数据逻辑
-使用json数据
hisData
.
putAll
(
maintainInfo
);
hisData
.
putAll
(
maintainInfo
);
CommonServiceImpl
.
formatTime2StrDateForEquip
(
hisData
);
CommonServiceImpl
.
formatTime2StrDateForEquip
(
hisData
);
new
FillingEditPermForCurrentUser
(
hisData
,
companyBo
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
).
getData
();
new
FillingEditPermForCurrentUser
(
hisData
,
companyBo
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
).
getData
();
...
@@ -235,6 +235,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -235,6 +235,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}};
}};
}
}
}
else
{
}
else
{
// 实时查询
setNewEquipInfo
(
sequenceNbr
,
maintainInfo
,
notice
);
setNewEquipInfo
(
sequenceNbr
,
maintainInfo
,
notice
);
new
FillingEditPermForCurrentUser
(
new
JSONObject
(
maintainInfo
),
companyBo
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
).
getData
();
new
FillingEditPermForCurrentUser
(
new
JSONObject
(
maintainInfo
),
companyBo
,
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
).
getData
();
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
...
@@ -293,7 +294,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -293,7 +294,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
maintainInfo
.
put
(
"deviceList"
,
deviceList
);
maintainInfo
.
put
(
"deviceList"
,
deviceList
);
}
}
p
rivate
List
<
Map
<
String
,
Object
>>
getDeviceList
(
JgMaintainNotice
notice
,
List
<
String
>
equIds
)
{
p
ublic
List
<
Map
<
String
,
Object
>>
getDeviceList
(
JgMaintainNotice
notice
,
List
<
String
>
equIds
)
{
List
<
Map
<
String
,
Object
>>
deviceList
;
List
<
Map
<
String
,
Object
>>
deviceList
;
if
(!
notice
.
getEquListCode
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
if
(!
notice
.
getEquListCode
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
deviceList
=
getEquipListMaps
(
esEquipmentCategory
.
findAllById
(
equIds
));
deviceList
=
getEquipListMaps
(
esEquipmentCategory
.
findAllById
(
equIds
));
...
@@ -973,7 +974,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -973,7 +974,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
void
accept
(
JgMaintainNoticeDto
dto
,
String
op
,
String
opinion
,
Map
<
String
,
Object
>
model
)
{
public
void
accept
(
JgMaintainNoticeDto
dto
,
String
op
,
String
opinion
,
JgMaintainNoticeDto
jgMaintainNoticeDto
)
{
String
instanceId
=
dto
.
getInstanceId
();
String
instanceId
=
dto
.
getInstanceId
();
String
nextTaskId
=
dto
.
getNextTaskId
();
String
nextTaskId
=
dto
.
getNextTaskId
();
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
...
@@ -1040,7 +1041,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -1040,7 +1041,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
jgMaintainNoticeMapper
.
updateById
(
jgMaintainNotice
);
jgMaintainNoticeMapper
.
updateById
(
jgMaintainNotice
);
// 保存历史表
// 保存历史表
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
model
));
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jgMaintainNoticeDto
));
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getName
(),
jsonObject
,
""
,
jgMaintainNotice
.
getSequenceNbr
().
toString
());
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_MAINTENANCE_NOTIFICATION
.
getName
(),
jsonObject
,
""
,
jgMaintainNotice
.
getSequenceNbr
().
toString
());
// 保存流水表
// 保存流水表
...
...
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/JgReformNoticeServiceImpl.java
View file @
fef0c61f
...
@@ -936,7 +936,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -936,7 +936,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
LinkedHashMap
model1
=
(
LinkedHashMap
)
map
.
get
(
"model"
);
LinkedHashMap
model1
=
(
LinkedHashMap
)
map
.
get
(
"model"
);
String
opinion
=
(
String
)
map
.
get
(
"opinion"
);
String
opinion
=
(
String
)
map
.
get
(
"opinion"
);
String
jsonString
=
JSON
.
toJSONString
(
model1
);
String
jsonString
=
JSON
.
toJSONString
(
model1
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jsonString
);
JgReformNoticeDto
jgReformNoticeDto
=
JSON
.
parseObject
(
jsonString
,
JgReformNoticeDto
.
class
);
JgReformNoticeDto
jgReformNoticeDto
=
JSON
.
parseObject
(
jsonString
,
JgReformNoticeDto
.
class
);
jgReformNoticeDto
.
setRemark
(
opinion
);
jgReformNoticeDto
.
setRemark
(
opinion
);
String
instanceId
=
jgReformNoticeDto
.
getInstanceId
();
String
instanceId
=
jgReformNoticeDto
.
getInstanceId
();
...
...
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