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
14f84aa3
Commit
14f84aa3
authored
Nov 10, 2024
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:1、大屏问题修复;2、安全追溯维保备案变码修改
parent
c0b2e138
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
94 additions
and
39 deletions
+94
-39
MaintenanceInfoModelForWX.java
...os/boot/module/app/api/dto/MaintenanceInfoModelForWX.java
+4
-1
JYBJEventHandler.java
...oin/amos/boot/module/jg/biz/handler/JYBJEventHandler.java
+14
-13
JYCQEventHandler.java
...oin/amos/boot/module/jg/biz/handler/JYCQEventHandler.java
+5
-4
SafetyProblemEventHandlerFactory.java
...dule/jg/biz/handler/SafetyProblemEventHandlerFactory.java
+1
-1
WBBAEventHandler.java
...oin/amos/boot/module/jg/biz/handler/WBBAEventHandler.java
+45
-3
WBCQEventHandler.java
...oin/amos/boot/module/jg/biz/handler/WBCQEventHandler.java
+5
-4
SafetyProblemTopicMessage.java
...oot/module/jg/biz/listener/SafetyProblemTopicMessage.java
+6
-6
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+1
-1
SafetyProblemTracingGenServiceImpl.java
.../biz/service/impl/SafetyProblemTracingGenServiceImpl.java
+6
-4
EnterpriseBizMapper.xml
...ics-api/src/main/resources/mapper/EnterpriseBizMapper.xml
+1
-1
DPSubServiceImpl.java
...t/module/statistcs/biz/service/impl/DPSubServiceImpl.java
+5
-1
JGDPStatisticsServiceImpl.java
...statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
+1
-0
No files found.
amos-boot-system-tzs/amos-boot-module-app/amos-boot-module-app-api/src/main/java/com/yeejoin/amos/boot/module/app/api/dto/MaintenanceInfoModelForWX.java
View file @
14f84aa3
...
@@ -11,9 +11,12 @@ import java.util.Date;
...
@@ -11,9 +11,12 @@ import java.util.Date;
@ApiModel
(
value
=
"maintenanceRecordInfo"
,
description
=
""
)
@ApiModel
(
value
=
"maintenanceRecordInfo"
,
description
=
""
)
public
class
MaintenanceInfoModelForWX
{
public
class
MaintenanceInfoModelForWX
{
@ApiModelProperty
(
value
=
"
最近维保
日期"
)
@ApiModelProperty
(
value
=
"
维保合同开始
日期"
)
private
Date
informStart
;
private
Date
informStart
;
@ApiModelProperty
(
value
=
"维保合同结束日期"
)
private
Date
informEnd
;
@ApiModelProperty
(
value
=
"维保单位"
)
@ApiModelProperty
(
value
=
"维保单位"
)
private
String
meUnitName
;
private
String
meUnitName
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/handler/JYBJEventHandler.java
View file @
14f84aa3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
handler
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
handler
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
Array
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
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.common.api.dto.ESEquipmentCategoryDto
;
...
@@ -16,7 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -16,7 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.Optional
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* WBCQEventHandler 类实现了 SafetyProblemEventHandler 接口,
* WBCQEventHandler 类实现了 SafetyProblemEventHandler 接口,
...
@@ -48,25 +49,25 @@ public class JYBJEventHandler implements SafetyProblemEventHandler {
...
@@ -48,25 +49,25 @@ public class JYBJEventHandler implements SafetyProblemEventHandler {
@Override
@Override
public
void
handle
(
SafetyProblemEvent
event
)
{
public
void
handle
(
SafetyProblemEvent
event
)
{
// 此处为处理安全问题事件的逻辑代码
// 此处为处理安全问题事件的逻辑代码
handleInspectionRecord
(
JSON
.
parseObject
(
event
.
getMessage
().
toString
()));
JSONArray
jsonArray
=
JSONObject
.
parseArray
(
event
.
getMessage
().
toString
());
handleInspectionRecord
(
jsonArray
);
}
}
private
void
handleInspectionRecord
(
JSON
Object
jsonObject
)
{
private
void
handleInspectionRecord
(
JSON
Array
jsonArray
)
{
String
equipRecord
=
jsonObject
.
getString
(
"record"
);
List
<
String
>
equipRecords
=
jsonArray
.
stream
().
map
(
obj
->
JSONObject
.
parseObject
(
obj
.
toString
()).
getString
(
"record"
)).
collect
(
Collectors
.
toList
()
);
if
(!
ValidationUtil
.
isEmpty
(
equipRecord
))
{
if
(!
ValidationUtil
.
isEmpty
(
equipRecord
s
))
{
safetyProblemTracingService
.
lambdaUpdate
()
safetyProblemTracingService
.
lambdaUpdate
()
.
set
(
SafetyProblemTracing:
:
getProblemStatusCode
,
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())
.
set
(
SafetyProblemTracing:
:
getProblemStatusCode
,
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())
.
set
(
SafetyProblemTracing:
:
getProblemStatus
,
SafetyProblemStatusEnum
.
HANDLED
.
getName
())
.
set
(
SafetyProblemTracing:
:
getProblemStatus
,
SafetyProblemStatusEnum
.
HANDLED
.
getName
())
.
eq
(
SafetyProblemTracing:
:
getSourceId
,
equipRecord
)
.
in
(
SafetyProblemTracing:
:
getSourceId
,
equipRecords
)
.
eq
(
SafetyProblemTracing:
:
getProblemTypeCode
,
SafetyProblemTypeEnum
.
JYCQ
.
getCode
()).
update
();
.
eq
(
SafetyProblemTracing:
:
getProblemTypeCode
,
SafetyProblemTypeEnum
.
JYCQ
.
getCode
()).
update
();
idxBizJgOtherInfoService
.
lambdaUpdate
().
set
(
IdxBizJgOtherInfo:
:
getStatus
,
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())
idxBizJgOtherInfoService
.
lambdaUpdate
().
set
(
IdxBizJgOtherInfo:
:
getStatus
,
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())
.
eq
(
IdxBizJgOtherInfo:
:
getRecord
,
equipRecord
).
update
();
.
in
(
IdxBizJgOtherInfo:
:
getRecord
,
equipRecords
).
update
();
Optional
<
ESEquipmentCategoryDto
>
equipEsDto
=
esEquipmentCategory
.
findById
(
equipRecord
);
Iterable
<
ESEquipmentCategoryDto
>
equipEsDtoIter
=
esEquipmentCategory
.
findAllById
(
equipRecords
);
if
(
equipEsDto
.
isPresent
())
{
for
(
ESEquipmentCategoryDto
equipEsDto
:
equipEsDtoIter
)
{
ESEquipmentCategoryDto
equipDto
=
equipEsDto
.
get
();
equipEsDto
.
setProblemStatus
(
SafetyProblemStatusEnum
.
HANDLED
.
getCode
());
equipDto
.
setProblemStatus
(
SafetyProblemStatusEnum
.
HANDLED
.
getCode
());
esEquipmentCategory
.
save
(
equipDto
);
}
}
esEquipmentCategory
.
saveAll
(
equipEsDtoIter
);
}
}
}
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/handler/JYCQEventHandler.java
View file @
14f84aa3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
handler
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
handler
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent
;
import
com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent
;
...
@@ -32,12 +33,12 @@ public class JYCQEventHandler implements SafetyProblemEventHandler {
...
@@ -32,12 +33,12 @@ public class JYCQEventHandler implements SafetyProblemEventHandler {
@Override
@Override
public
void
handle
(
SafetyProblemEvent
event
)
{
public
void
handle
(
SafetyProblemEvent
event
)
{
// 此处为处理安全问题事件的逻辑代码
// 此处为处理安全问题事件的逻辑代码
JSON
Object
jsonObject
=
JSONObject
.
parseObject
(
event
.
getMessage
().
toString
());
JSON
Array
jsonArray
=
JSONObject
.
parseArray
(
event
.
getMessage
().
toString
());
generateProblem
(
json
Object
);
generateProblem
(
json
Array
);
}
}
private
void
generateProblem
(
JSON
Object
jsonObject
)
{
private
void
generateProblem
(
JSON
Array
jsonArray
)
{
SafetyProblemTopicMessage
.
generateProblem
(
json
Object
,
SafetyProblemTypeEnum
.
JYCQ
,
safetyProblemTracingService
);
SafetyProblemTopicMessage
.
generateProblem
(
json
Array
,
SafetyProblemTypeEnum
.
JYCQ
,
safetyProblemTracingService
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/handler/SafetyProblemEventHandlerFactory.java
View file @
14f84aa3
...
@@ -23,7 +23,7 @@ public class SafetyProblemEventHandlerFactory {
...
@@ -23,7 +23,7 @@ public class SafetyProblemEventHandlerFactory {
if
(
topic
.
startsWith
(
SafetyProblemTypeEnum
.
WBCQ
.
getTopic
()))
{
if
(
topic
.
startsWith
(
SafetyProblemTypeEnum
.
WBCQ
.
getTopic
()))
{
return
new
WBCQEventHandler
(
safetyProblemTracingService
);
return
new
WBCQEventHandler
(
safetyProblemTracingService
);
}
else
if
(
topic
.
startsWith
(
SafetyProblemTypeEnum
.
WBBA
.
getTopic
()))
{
}
else
if
(
topic
.
startsWith
(
SafetyProblemTypeEnum
.
WBBA
.
getTopic
()))
{
return
new
WBBAEventHandler
();
return
new
WBBAEventHandler
(
safetyProblemTracingService
,
idxBizJgOtherInfoService
,
esEquipmentCategory
);
}
else
if
(
topic
.
startsWith
(
SafetyProblemTypeEnum
.
JYCQ
.
getTopic
()))
{
}
else
if
(
topic
.
startsWith
(
SafetyProblemTypeEnum
.
JYCQ
.
getTopic
()))
{
return
new
JYCQEventHandler
(
safetyProblemTracingService
);
return
new
JYCQEventHandler
(
safetyProblemTracingService
);
}
else
if
(
topic
.
startsWith
(
SafetyProblemTypeEnum
.
JYBJ
.
getTopic
()))
{
}
else
if
(
topic
.
startsWith
(
SafetyProblemTypeEnum
.
JYBJ
.
getTopic
()))
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/handler/WBBAEventHandler.java
View file @
14f84aa3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
handler
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
handler
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
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.entity.SafetyProblemTracing
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent
;
import
com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent
;
import
com.yeejoin.amos.boot.module.jg.api.event.handler.SafetyProblemEventHandler
;
import
com.yeejoin.amos.boot.module.jg.api.event.handler.SafetyProblemEventHandler
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgOtherInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.SafetyProblemTracingServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* WBBAEventHandler 类实现了 SafetyProblemEventHandler 接口,
* WBBAEventHandler 类实现了 SafetyProblemEventHandler 接口,
...
@@ -12,6 +26,19 @@ import org.springframework.stereotype.Component;
...
@@ -12,6 +26,19 @@ import org.springframework.stereotype.Component;
@Component
@Component
public
class
WBBAEventHandler
implements
SafetyProblemEventHandler
{
public
class
WBBAEventHandler
implements
SafetyProblemEventHandler
{
SafetyProblemTracingServiceImpl
safetyProblemTracingService
;
IdxBizJgOtherInfoServiceImpl
idxBizJgOtherInfoService
;
ESEquipmentCategory
esEquipmentCategory
;
@Autowired
public
WBBAEventHandler
(
SafetyProblemTracingServiceImpl
safetyProblemTracingService
,
IdxBizJgOtherInfoServiceImpl
idxBizJgOtherInfoService
,
ESEquipmentCategory
esEquipmentCategory
)
{
this
.
safetyProblemTracingService
=
safetyProblemTracingService
;
this
.
idxBizJgOtherInfoService
=
idxBizJgOtherInfoService
;
this
.
esEquipmentCategory
=
esEquipmentCategory
;
}
/**
/**
* 处理安全问题事件。
* 处理安全问题事件。
*
*
...
@@ -21,11 +48,26 @@ public class WBBAEventHandler implements SafetyProblemEventHandler {
...
@@ -21,11 +48,26 @@ public class WBBAEventHandler implements SafetyProblemEventHandler {
@Override
@Override
public
void
handle
(
SafetyProblemEvent
event
)
{
public
void
handle
(
SafetyProblemEvent
event
)
{
// 此处为处理安全问题事件的逻辑代码
// 此处为处理安全问题事件的逻辑代码
handleMaintenanceRecord
(
JSONObject
.
parseObject
(
event
.
getMessage
().
toString
()));
JSONArray
jsonArray
=
JSONObject
.
parseArray
(
event
.
getMessage
().
toString
());
handleMaintenanceRecord
(
jsonArray
);
}
}
private
void
handleMaintenanceRecord
(
JSONObject
jsonObject
)
{
private
void
handleMaintenanceRecord
(
JSONArray
jsonArray
)
{
// JSONArray maintenanceRecords = JSONArray.parseArray(String.valueOf(jsonObject));
List
<
String
>
equipRecords
=
jsonArray
.
stream
().
map
(
obj
->
JSONObject
.
parseObject
(
obj
.
toString
()).
getString
(
"record"
)).
collect
(
Collectors
.
toList
());
if
(!
ValidationUtil
.
isEmpty
(
equipRecords
))
{
safetyProblemTracingService
.
lambdaUpdate
()
.
set
(
SafetyProblemTracing:
:
getProblemStatusCode
,
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())
.
set
(
SafetyProblemTracing:
:
getProblemStatus
,
SafetyProblemStatusEnum
.
HANDLED
.
getName
())
.
in
(
SafetyProblemTracing:
:
getSourceId
,
equipRecords
)
.
eq
(
SafetyProblemTracing:
:
getProblemTypeCode
,
SafetyProblemTypeEnum
.
WBCQ
.
getCode
()).
update
();
idxBizJgOtherInfoService
.
lambdaUpdate
().
set
(
IdxBizJgOtherInfo:
:
getStatus
,
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())
.
in
(
IdxBizJgOtherInfo:
:
getRecord
,
equipRecords
).
update
();
Iterable
<
ESEquipmentCategoryDto
>
equipEsDtoIter
=
esEquipmentCategory
.
findAllById
(
equipRecords
);
for
(
ESEquipmentCategoryDto
equipEsDto
:
equipEsDtoIter
)
{
equipEsDto
.
setProblemStatus
(
SafetyProblemStatusEnum
.
HANDLED
.
getCode
());
}
esEquipmentCategory
.
saveAll
(
equipEsDtoIter
);
}
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/handler/WBCQEventHandler.java
View file @
14f84aa3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
handler
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
handler
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent
;
import
com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent
;
...
@@ -32,12 +33,12 @@ public class WBCQEventHandler implements SafetyProblemEventHandler {
...
@@ -32,12 +33,12 @@ public class WBCQEventHandler implements SafetyProblemEventHandler {
@Override
@Override
public
void
handle
(
SafetyProblemEvent
event
)
{
public
void
handle
(
SafetyProblemEvent
event
)
{
// 此处为处理安全问题事件的逻辑代码
// 此处为处理安全问题事件的逻辑代码
JSON
Object
jsonObject
=
JSONObject
.
parseObject
(
event
.
getMessage
().
toString
());
JSON
Array
jsonArray
=
JSONObject
.
parseArray
(
event
.
getMessage
().
toString
());
generateProblem
(
json
Object
);
generateProblem
(
json
Array
);
}
}
private
void
generateProblem
(
JSON
Object
jsonObject
)
{
private
void
generateProblem
(
JSON
Array
jsonArray
)
{
SafetyProblemTopicMessage
.
generateProblem
(
json
Object
,
SafetyProblemTypeEnum
.
WBCQ
,
safetyProblemTracingService
);
SafetyProblemTopicMessage
.
generateProblem
(
json
Array
,
SafetyProblemTypeEnum
.
WBCQ
,
safetyProblemTracingService
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/listener/SafetyProblemTopicMessage.java
View file @
14f84aa3
...
@@ -81,7 +81,7 @@ public class SafetyProblemTopicMessage extends EmqxListener {
...
@@ -81,7 +81,7 @@ public class SafetyProblemTopicMessage extends EmqxListener {
try
{
try
{
while
(
true
)
{
while
(
true
)
{
SafetyProblemEvent
safetyProblemMessageEvent
=
blockingQueue
.
take
();
SafetyProblemEvent
safetyProblemMessageEvent
=
blockingQueue
.
take
();
JSON
Object
jsonObject
=
JSON
.
parseObject
(
safetyProblemMessageEvent
.
getMessage
().
toString
());
JSON
Array
jsonObject
=
JSON
.
parseArray
(
safetyProblemMessageEvent
.
getMessage
().
toString
());
log
.
info
(
"接收到问题生产消息:{}"
,
jsonObject
);
log
.
info
(
"接收到问题生产消息:{}"
,
jsonObject
);
SafetyProblemEventHandler
eventHandler
=
SafetyProblemEventHandlerFactory
.
createProblemHandler
(
safetyProblemMessageEvent
.
getTopic
());
SafetyProblemEventHandler
eventHandler
=
SafetyProblemEventHandlerFactory
.
createProblemHandler
(
safetyProblemMessageEvent
.
getTopic
());
eventHandler
.
handle
(
safetyProblemMessageEvent
);
eventHandler
.
handle
(
safetyProblemMessageEvent
);
...
@@ -103,13 +103,13 @@ public class SafetyProblemTopicMessage extends EmqxListener {
...
@@ -103,13 +103,13 @@ public class SafetyProblemTopicMessage extends EmqxListener {
log
.
info
(
"接收问题生产消息完成"
);
log
.
info
(
"接收问题生产消息完成"
);
}
}
public
static
void
generateProblem
(
JSON
Object
jsonObject
,
SafetyProblemTypeEnum
problemTypeEnum
,
SafetyProblemTracingServiceImpl
safetyProblemTracingService
)
{
public
static
void
generateProblem
(
JSON
Array
jsonArray
,
SafetyProblemTypeEnum
problemTypeEnum
,
SafetyProblemTracingServiceImpl
safetyProblemTracingService
)
{
if
(
json
Object
==
null
||
problemTypeEnum
==
null
)
{
if
(
json
Array
==
null
||
problemTypeEnum
==
null
)
{
throw
new
IllegalArgumentException
(
"jsonObject and problemTypeEnum must not be null."
);
throw
new
IllegalArgumentException
(
"jsonObject and problemTypeEnum must not be null."
);
}
}
JSONArray
records
=
jsonObject
.
getJSONArray
(
problemTypeEnum
.
getMsgKey
());
//
JSONArray records = jsonObject.getJSONArray(problemTypeEnum.getMsgKey());
if
(!
ValidationUtil
.
isEmpty
(
records
))
{
if
(!
ValidationUtil
.
isEmpty
(
jsonArray
))
{
List
<
SafetyProblemTracing
>
safetyProblemTracingList
=
records
.
stream
().
map
(
item
->
{
List
<
SafetyProblemTracing
>
safetyProblemTracingList
=
jsonArray
.
stream
().
map
(
item
->
{
if
(!(
item
instanceof
JSONObject
))
{
if
(!(
item
instanceof
JSONObject
))
{
throw
new
IllegalArgumentException
(
"item is not a JSONObject."
);
throw
new
IllegalArgumentException
(
"item is not a JSONObject."
);
}
}
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
14f84aa3
...
@@ -14,7 +14,6 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
...
@@ -14,7 +14,6 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum
;
...
@@ -718,6 +717,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -718,6 +717,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
maintenanceRecordInfoList
.
add
(
info
);
maintenanceRecordInfoList
.
add
(
info
);
});
});
idxBizJgMaintenanceRecordInfoService
.
saveBatch
(
maintenanceRecordInfoList
);
idxBizJgMaintenanceRecordInfoService
.
saveBatch
(
maintenanceRecordInfoList
);
// 维保备案后更新安全追溯对应设备状态
emqKeeper
.
getMqttClient
().
publish
(
SafetyProblemTypeEnum
.
WBBA
.
getTopic
(),
JSON
.
toJSONBytes
(
maintenanceRecordInfoList
),
2
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
SafetyProblemTypeEnum
.
WBBA
.
getTopic
(),
JSON
.
toJSONBytes
(
maintenanceRecordInfoList
),
2
,
false
);
}
}
...
...
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/SafetyProblemTracingGenServiceImpl.java
View file @
14f84aa3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
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.common.api.dto.ESEquipmentCategoryDto
;
...
@@ -80,10 +81,11 @@ public class SafetyProblemTracingGenServiceImpl{
...
@@ -80,10 +81,11 @@ public class SafetyProblemTracingGenServiceImpl{
esEquipmentCategoryDto
.
add
(
equipmentCategoryDto
);
esEquipmentCategoryDto
.
add
(
equipmentCategoryDto
);
}
}
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryDto
);
esEquipmentCategory
.
saveAll
(
esEquipmentCategoryDto
);
JSONObject
jsonObject
=
new
JSONObject
();
// JSONObject jsonObject = new JSONObject();
jsonObject
.
put
(
safetyProblemTypeEnum
.
getMsgKey
(),
mapList
);
// jsonObject.put(safetyProblemTypeEnum.getMsgKey(), mapList);
JSONArray
jsonArray
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
mapList
));
try
{
try
{
emqKeeper
.
getMqttClient
().
publish
(
safetyProblemTypeEnum
.
getTopic
(),
json
Object
.
toString
().
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
safetyProblemTypeEnum
.
getTopic
(),
json
Array
.
toString
().
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
}
catch
(
MqttException
e
)
{
logger
.
error
(
"发送安全追溯问题设备信息消息失败---->{}"
,
e
.
getMessage
());
logger
.
error
(
"发送安全追溯问题设备信息消息失败---->{}"
,
e
.
getMessage
());
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/EnterpriseBizMapper.xml
View file @
14f84aa3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
</select>
</select>
<select
id=
"queryByUseCode"
resultType=
"com.yeejoin.amos.boot.module.statistics.api.entity.TzBaseEnterpriseInfo"
>
<select
id=
"queryByUseCode"
resultType=
"com.yeejoin.amos.boot.module.statistics.api.entity.TzBaseEnterpriseInfo"
>
select * from tz_base_enterprise_info where use_code = #{useCode}
select * from tz_base_enterprise_info where use_
unit_
code = #{useCode}
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/DPSubServiceImpl.java
View file @
14f84aa3
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.feign.morphic.model.FormSceneModel;
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.feign.morphic.model.FormSceneModel;
import
jdk.nashorn.api.scripting.ScriptObjectMirror
;
import
jdk.nashorn.api.scripting.ScriptObjectMirror
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.client.loadbalancer.LoadBalanced
;
import
org.springframework.cloud.client.loadbalancer.LoadBalanced
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
...
@@ -57,6 +58,9 @@ public class DPSubServiceImpl {
...
@@ -57,6 +58,9 @@ public class DPSubServiceImpl {
@Autowired
@Autowired
DPSubBizServiceImpl
dpSubBizService
;
DPSubBizServiceImpl
dpSubBizService
;
@Value
(
"${supervisionCode.prefix:https://sxtzsb.sxsei.com:19435/tzs?code=}"
)
private
String
supervisionCodePrefix
;
public
JSONObject
commonQuery
(
String
template
,
@RequestBody
Map
<
String
,
Object
>
param
)
{
public
JSONObject
commonQuery
(
String
template
,
@RequestBody
Map
<
String
,
Object
>
param
)
{
JSONObject
result
=
new
JSONObject
();
JSONObject
result
=
new
JSONObject
();
String
templateJson
=
DpSubUtils
.
getFileContent
(
template
+
".json"
);
String
templateJson
=
DpSubUtils
.
getFileContent
(
template
+
".json"
);
...
@@ -533,7 +537,7 @@ public class DPSubServiceImpl {
...
@@ -533,7 +537,7 @@ public class DPSubServiceImpl {
}
else
if
(
"异常"
.
equals
(
problemStatus
)
||
"未处理"
.
equals
(
problemStatus
))
{
}
else
if
(
"异常"
.
equals
(
problemStatus
)
||
"未处理"
.
equals
(
problemStatus
))
{
color
=
"red"
;
color
=
"red"
;
}
}
qrcode
.
put
(
"value"
,
!
ValidationUtil
.
isEmpty
(
result
.
get
(
"SUPERVISORY_CODE"
))
?
"https://sxtzsb.sxsei.com:9435/tzs/?code="
+
result
.
get
(
"SUPERVISORY_CODE"
)
:
result
.
get
(
"USE_ORG_CODE"
));
qrcode
.
put
(
"value"
,
!
ValidationUtil
.
isEmpty
(
result
.
get
(
"SUPERVISORY_CODE"
))
?
supervisionCodePrefix
+
result
.
get
(
"SUPERVISORY_CODE"
)
:
result
.
get
(
"USE_ORG_CODE"
));
qrcode
.
put
(
"status"
,
problemStatus
);
qrcode
.
put
(
"status"
,
problemStatus
);
qrcode
.
put
(
"color"
,
color
);
qrcode
.
put
(
"color"
,
color
);
return
qrcode
;
return
qrcode
;
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/JGDPStatisticsServiceImpl.java
View file @
14f84aa3
...
@@ -2443,6 +2443,7 @@ public class JGDPStatisticsServiceImpl {
...
@@ -2443,6 +2443,7 @@ public class JGDPStatisticsServiceImpl {
LambdaQueryWrapper
<
SafetyProblemTracing
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SafetyProblemTracing
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
SafetyProblemTracing:
:
getSourceId
,
record
);
lambdaQueryWrapper
.
eq
(
SafetyProblemTracing:
:
getSourceId
,
record
);
lambdaQueryWrapper
.
orderByDesc
(
SafetyProblemTracing:
:
getRecDate
);
lambdaQueryWrapper
.
orderByDesc
(
SafetyProblemTracing:
:
getRecDate
);
lambdaQueryWrapper
.
eq
(
SafetyProblemTracing:
:
getProblemStatusCode
,
SafetyProblemStatusEnum
.
UNHANDLED
.
getCode
());
List
<
SafetyProblemTracing
>
safetyProblemTracings
=
safetyProblemTracingMapper
.
selectList
(
lambdaQueryWrapper
);
List
<
SafetyProblemTracing
>
safetyProblemTracings
=
safetyProblemTracingMapper
.
selectList
(
lambdaQueryWrapper
);
if
(!
ObjectUtils
.
isEmpty
(
safetyProblemTracings
))
{
if
(!
ObjectUtils
.
isEmpty
(
safetyProblemTracings
))
{
objMap
.
put
(
"problemStatus"
,
ProblemStatusEnum
.
getNameByDesc
.
get
(
safetyProblemTracings
.
get
(
0
).
getProblemStatus
()));
objMap
.
put
(
"problemStatus"
,
ProblemStatusEnum
.
getNameByDesc
.
get
(
safetyProblemTracings
.
get
(
0
).
getProblemStatus
()));
...
...
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