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
fe3b967a
Commit
fe3b967a
authored
Dec 18, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
dca6c5d4
3f657e9e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
224 additions
and
117 deletions
+224
-117
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+13
-5
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+12
-10
KafkaAnalyseController.java
...t/module/jxiop/biz/controller/KafkaAnalyseController.java
+4
-2
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+50
-5
TdInfoQueryController.java
...ot/module/jxiop/biz/controller/TdInfoQueryController.java
+3
-0
WarningRecordStatusMessage.java
...oot/module/jxiop/biz/emqx/WarningRecordStatusMessage.java
+3
-3
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+1
-1
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+6
-6
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+4
-2
IndicatorDataMapper.java
...s/boot/module/jxiop/biz/tdmapper/IndicatorDataMapper.java
+1
-1
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+36
-35
IdxBizFanWarningRecordMapper.xml
...resources/mapper/cluster/IdxBizFanWarningRecordMapper.xml
+2
-2
FanHealthIndex.xml
...iz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
+7
-7
FanWarningRecord.xml
.../src/main/resources/mapper/tdengine2/FanWarningRecord.xml
+9
-9
PvWarningRecord.xml
...z/src/main/resources/mapper/tdengine2/PvWarningRecord.xml
+2
-2
PersonBasicMapper.xml
...jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
+5
-2
PersonBasicServiceImpl.java
...module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
+5
-1
PersonYardTimeTask.java
...oot/module/jxiop/biz/service/impl/PersonYardTimeTask.java
+51
-20
SjglZsjZsbtzMapper.xml
.../src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
+10
-4
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanHealthIndexController.java
View file @
fe3b967a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -68,6 +70,8 @@ public class IdxBizFanHealthIndexController extends BaseController {
@Autowired
FanWaringRecordMapper
fanWarningRecord
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"#.0"
);
public
final
DecimalFormat
dfSS
=
new
DecimalFormat
(
"#.00"
);
/**
* 新增
*
...
...
@@ -763,7 +767,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
}
...
...
@@ -784,9 +788,11 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
Date
dateTime
=
DateUtil
.
parseDateTime
(
obj
.
getAnalysisTime
());
String
format
=
DateUtil
.
format
(
dateTime
,
"yyyy-MM-dd HH:00"
);
axisData
.
add
(
format
);
}
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
...
...
@@ -806,9 +812,11 @@ public class IdxBizFanHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
Date
dateTime
=
DateUtil
.
parseDateTime
(
obj
.
getAnalysisTime
());
String
format
=
DateUtil
.
format
(
dateTime
,
DatePattern
.
NORM_DATETIME_MINUTE_PATTERN
);
axisData
.
add
(
format
);
}
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvHealthIndexController.java
View file @
fe3b967a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
...
...
@@ -57,6 +59,8 @@ public class IdxBizPvHealthIndexController extends BaseController {
IdxBizPvPointProcessVariableClassificationMapper
idxBizPvPointProcessVariableClassificationMapper
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"0.0"
);
public
final
DecimalFormat
dfSS
=
new
DecimalFormat
(
"0.00"
);
/**
* 新增
*
...
...
@@ -430,7 +434,7 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
}
...
...
@@ -451,9 +455,11 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
(
));
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()
));
}
axisData
.
add
(
obj
.
getAnalysisTime
());
Date
dateTime
=
DateUtil
.
parseDateTime
(
obj
.
getAnalysisTime
());
String
format
=
DateUtil
.
format
(
dateTime
,
"yyyy-MM-dd HH:00"
);
axisData
.
add
(
format
);
}
result
.
put
(
"seriesData"
,
seriesData
);
result
.
put
(
"axisData"
,
axisData
);
...
...
@@ -476,14 +482,10 @@ public class IdxBizPvHealthIndexController extends BaseController {
if
(
type
.
equals
(
"0"
)){
seriesData
.
add
(
Double
.
parseDouble
(
df
.
format
(
obj
.
getHealthIndex
())));
}
else
{
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
obj
.
getAnomaly
());
}
Date
format
=
null
;
try
{
format
=
formatterNYRSF
.
parse
(
obj
.
getAnalysisTime
());
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
seriesData
.
add
(
obj
.
getAnomaly
()
>
7.5
?
7.5
:
dfSS
.
format
(
obj
.
getAnomaly
()));
}
Date
dateTime
=
DateUtil
.
parseDateTime
(
obj
.
getAnalysisTime
());
String
format
=
DateUtil
.
format
(
dateTime
,
DatePattern
.
NORM_DATETIME_MINUTE_PATTERN
);
axisData
.
add
(
format
);
}
result
.
put
(
"seriesData"
,
seriesData
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/KafkaAnalyseController.java
View file @
fe3b967a
...
...
@@ -23,6 +23,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -155,6 +156,7 @@ public class KafkaAnalyseController {
return
ResponseHelper
.
buildResponse
(
indicatorData
);
}
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"0.0"
);
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"全景诊断回溯"
)
...
...
@@ -192,7 +194,7 @@ public class KafkaAnalyseController {
int
subSystemInt
=
1
;
Double
healthScoreInfo
=
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByParam
(
null
,
null
,
analysisType
).
doubleValue
();
healthScoreInfo
=
Double
.
parseDouble
(
df
.
format
(
healthScoreInfo
));
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
isNull
(
IdxBizFanHealthLevel:
:
getStatus
);
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"全域"
);
...
...
@@ -216,7 +218,7 @@ public class KafkaAnalyseController {
Double
areaHighScore
=
null
;
Double
areaHealthScoreInfo
=
idxBizFanHealthIndexMapper
.
getHealthScoreInfoByParam
(
areaMap
.
getKey
(),
null
,
analysisType
).
doubleValue
();
areaHealthScoreInfo
=
Double
.
parseDouble
(
df
.
format
(
areaHealthScoreInfo
));
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
areaQuery
=
new
LambdaQueryWrapper
<>();
areaQuery
.
isNull
(
IdxBizFanHealthLevel:
:
getStatus
);
areaQuery
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"片区"
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
fe3b967a
...
...
@@ -17,6 +17,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.*
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -63,11 +64,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanWaringRecordMapper;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvHealthIndexDayMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvWaringRecordMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndexDay
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvHealthIndexDay
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
...
@@ -1543,4 +1539,53 @@ public class TDBigScreenAnalyseController extends BaseController {
return
ResponseHelper
.
buildResponse
(
stringStringHashMap
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"字段修改 处置 改为 确认"
,
notes
=
"字段修改 处置 改为 确认"
)
@GetMapping
(
value
=
"/updateState"
)
public
ResponseModel
updateState
()
{
List
<
FanWarningRecord
>
list
=
fanWaringRecordMapper
.
selectList
(
null
);
list
.
forEach
(
item
->
{
if
(
"未处置"
.
equals
(
item
.
getDisposotionState
()))
{
item
.
setDisposotionState
(
"待确认"
);
}
else
if
(
"已处置"
.
equals
(
item
.
getDisposotionState
()))
{
item
.
setDisposotionState
(
"已确认"
);
}
});
ArrayList
<
FanWarningRecord
>
newList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
//分批次处理
newList
.
add
(
list
.
get
(
i
));
//循环将数据填入载体list
if
(
500
==
newList
.
size
()
||
i
==
list
.
size
()
-
1
)
{
//载体list达到要求,进行批量操作
//调用批量插入
fanWaringRecordMapper
.
saveBatchWarningRecords
(
newList
);
newList
.
clear
();
//每次批量操作后,清空载体list,等待下次的数据填入
}
}
List
<
PvWarningRecord
>
list2
=
pvWaringRecordMapper
.
selectList
(
null
);
list2
.
forEach
(
item
->
{
if
(
"未处置"
.
equals
(
item
.
getDisposotionState
()))
{
item
.
setDisposotionState
(
"待确认"
);
}
else
if
(
"已处置"
.
equals
(
item
.
getDisposotionState
()))
{
item
.
setDisposotionState
(
"已确认"
);
}
});
ArrayList
<
PvWarningRecord
>
newList2
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list2
.
size
();
i
++)
{
//分批次处理
newList2
.
add
(
list2
.
get
(
i
));
//循环将数据填入载体list
if
(
500
==
newList2
.
size
()
||
i
==
list2
.
size
()
-
1
)
{
//载体list达到要求,进行批量操作
//调用批量插入
pvWaringRecordMapper
.
saveBatchWarningRecords
(
newList2
);
newList2
.
clear
();
//每次批量操作后,清空载体list,等待下次的数据填入
}
}
return
ResponseHelper
.
buildResponse
(
null
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TdInfoQueryController.java
View file @
fe3b967a
...
...
@@ -121,6 +121,9 @@ public class TdInfoQueryController {
public
static
String
convert
(
String
camelCase
)
{
StringBuilder
result
=
new
StringBuilder
();
if
(
camelCase
.
equals
(
"analysisTime"
))
{
return
"ts"
;
}
for
(
int
i
=
0
;
i
<
camelCase
.
length
();
i
++)
{
char
currentChar
=
camelCase
.
charAt
(
i
);
if
(
Character
.
isUpperCase
(
currentChar
))
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/emqx/WarningRecordStatusMessage.java
View file @
fe3b967a
...
...
@@ -73,7 +73,7 @@ public class WarningRecordStatusMessage extends EmqxListener {
List
<
JSONObject
>
taskList
=
JSONObject
.
parseArray
(
analysisResult
.
toJSONString
(),
JSONObject
.
class
);
List
<
String
>
traceIds
=
taskList
.
stream
().
map
(
t
->
t
.
get
(
"extAttr1"
).
toString
()).
collect
(
Collectors
.
toList
());
// LambdaUpdateWrapper<IdxBizFanWarningRecord> lambda = new LambdaUpdateWrapper<>();
// lambda.set(IdxBizFanWarningRecord::getDisposotionState, "已
处置
");
// lambda.set(IdxBizFanWarningRecord::getDisposotionState, "已
确认
");
// lambda.set(IdxBizFanWarningRecord::getStatus, "1");
// lambda.set(IdxBizFanWarningRecord::getDisposotionDate, new Date());
// lambda.in(IdxBizFanWarningRecord::getSequenceNbr, traceIds);
...
...
@@ -85,7 +85,7 @@ public class WarningRecordStatusMessage extends EmqxListener {
fanWarningRecord
.
setTs
(
Long
.
valueOf
(
traceId
));
fanWarningRecord
.
setDisposotionDate
(
DateUtil
.
now
());
fanWarningRecord
.
setStatus
(
"1"
);
fanWarningRecord
.
setDisposotionState
(
"已
处置
"
);
fanWarningRecord
.
setDisposotionState
(
"已
确认
"
);
list
.
add
(
fanWarningRecord
);
}
fanWaringRecordMapper
.
updateStatusByTs
(
list
);
...
...
@@ -110,7 +110,7 @@ public class WarningRecordStatusMessage extends EmqxListener {
pvWarningRecord
.
setTs
(
Long
.
valueOf
(
traceId
));
pvWarningRecord
.
setDisposotionDate
(
DateUtil
.
now
());
pvWarningRecord
.
setStatus
(
"1"
);
pvWarningRecord
.
setDisposotionState
(
"已
处置
"
);
pvWarningRecord
.
setDisposotionState
(
"已
确认
"
);
list
.
add
(
pvWarningRecord
);
}
pvWaringRecordMapper
.
updateStatusByTs
(
list
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
fe3b967a
...
...
@@ -161,7 +161,7 @@ public class CommonServiceImpl {
@Autowired
private
TdengineTimeServiceImpl
tdengineTimeService
;
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"#.0"
);
public
final
DecimalFormat
df
=
new
DecimalFormat
(
"#.0
0
"
);
/**
* @return
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/HealthStatusIndicatorServiceImpl.java
View file @
fe3b967a
...
...
@@ -281,7 +281,7 @@ public class HealthStatusIndicatorServiceImpl {
idxBizPvWarningRecord
.
setIndexAddress
(
address
);
idxBizPvWarningRecord
.
setEquipmentName
(
idxBizPvHealthIndices
.
get
(
0
).
getEquipmentName
());
idxBizPvWarningRecord
.
setAnalysisPointId
(
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
idxBizPvWarningRecord
.
setDisposotionState
(
"
未处置
"
);
idxBizPvWarningRecord
.
setDisposotionState
(
"
待确认
"
);
idxBizPvWarningRecord
.
setStatus
(
"0"
);
idxBizPvWarningRecord
.
setWarningName
(
level
);
idxBizPvWarningRecord
.
setCONTENT
(
idxBizPvHealthIndices
.
get
(
0
).
getPointName
()
+
"连续"
+
content
+
"健康指数<"
+
num
);
...
...
@@ -448,7 +448,7 @@ public class HealthStatusIndicatorServiceImpl {
idxBizPvWarningRecord
.
setIndexAddress
(
address
);
idxBizPvWarningRecord
.
setEquipmentName
(
idxBizPvHealthIndices
.
get
(
0
).
getEquipmentName
());
idxBizPvWarningRecord
.
setAnalysisPointId
(
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
idxBizPvWarningRecord
.
setDisposotionState
(
"
未处置
"
);
idxBizPvWarningRecord
.
setDisposotionState
(
"
待确认
"
);
idxBizPvWarningRecord
.
setStatus
(
"0"
);
idxBizPvWarningRecord
.
setWarningName
(
level
);
idxBizPvWarningRecord
.
setCONTENT
(
idxBizPvHealthIndices
.
get
(
0
).
getPointName
()
+
"连续"
+
content
+
"健康指数<"
+
num
);
...
...
@@ -613,7 +613,7 @@ public class HealthStatusIndicatorServiceImpl {
idxBizPvWarningRecord
.
setIndexAddress
(
address
);
idxBizPvWarningRecord
.
setEquipmentName
(
idxBizPvHealthIndices
.
get
(
0
).
getEquipmentName
());
idxBizPvWarningRecord
.
setAnalysisPointId
(
idxBizPvHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
idxBizPvWarningRecord
.
setDisposotionState
(
"
未处置
"
);
idxBizPvWarningRecord
.
setDisposotionState
(
"
待确认
"
);
idxBizPvWarningRecord
.
setStatus
(
"0"
);
idxBizPvWarningRecord
.
setWarningName
(
level
);
idxBizPvWarningRecord
.
setCONTENT
(
idxBizPvHealthIndices
.
get
(
0
).
getPointName
()
+
"连续"
+
content
+
"健康指数<"
+
num
);
...
...
@@ -782,7 +782,7 @@ public class HealthStatusIndicatorServiceImpl {
idxBizFanWarningRecord
.
setIndexAddress
(
address
);
idxBizFanWarningRecord
.
setEquipmentName
(
idxBizFanHealthIndices
.
get
(
0
).
getEquipmentName
());
idxBizFanWarningRecord
.
setAnalysisPointId
(
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
idxBizFanWarningRecord
.
setDisposotionState
(
"
未处置
"
);
idxBizFanWarningRecord
.
setDisposotionState
(
"
待确认
"
);
idxBizFanWarningRecord
.
setStatus
(
"0"
);
idxBizFanWarningRecord
.
setWarningName
(
level
);
idxBizFanWarningRecord
.
setCONTENT
(
idxBizFanHealthIndices
.
get
(
0
).
getPointName
()
+
"连续"
+
content
+
"健康指数<"
+
num
);
...
...
@@ -950,7 +950,7 @@ public class HealthStatusIndicatorServiceImpl {
idxBizFanWarningRecord
.
setIndexAddress
(
address
);
idxBizFanWarningRecord
.
setEquipmentName
(
idxBizFanHealthIndices
.
get
(
0
).
getEquipmentName
());
idxBizFanWarningRecord
.
setAnalysisPointId
(
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
idxBizFanWarningRecord
.
setDisposotionState
(
"
未处置
"
);
idxBizFanWarningRecord
.
setDisposotionState
(
"
待确认
"
);
idxBizFanWarningRecord
.
setStatus
(
"0"
);
idxBizFanWarningRecord
.
setWarningName
(
level
);
idxBizFanWarningRecord
.
setCONTENT
(
idxBizFanHealthIndices
.
get
(
0
).
getPointName
()
+
"连续"
+
content
+
"健康指数<"
+
num
);
...
...
@@ -1121,7 +1121,7 @@ public class HealthStatusIndicatorServiceImpl {
idxBizFanWarningRecord
.
setIndexAddress
(
address
);
idxBizFanWarningRecord
.
setEquipmentName
(
idxBizFanHealthIndices
.
get
(
0
).
getEquipmentName
());
idxBizFanWarningRecord
.
setAnalysisPointId
(
idxBizFanHealthIndices
.
get
(
0
).
getAnalysisObjSeq
());
idxBizFanWarningRecord
.
setDisposotionState
(
"
未处置
"
);
idxBizFanWarningRecord
.
setDisposotionState
(
"
待确认
"
);
idxBizFanWarningRecord
.
setStatus
(
"0"
);
idxBizFanWarningRecord
.
setWarningName
(
level
);
idxBizFanWarningRecord
.
setCONTENT
(
idxBizFanHealthIndices
.
get
(
0
).
getPointName
()
+
"连续"
+
content
+
"健康指数<"
+
num
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
View file @
fe3b967a
...
...
@@ -13,6 +13,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
...
...
@@ -69,7 +71,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
}
public
final
DecimalFormat
dfSS
=
new
DecimalFormat
(
"0.00"
);
public
Object
getqyt
(
String
type
,
String
address
,
String
statioName
,
String
equipmentName
,
String
arae
,
String
startTime
,
String
endTime
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
@@ -120,7 +122,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
List
<
String
>
axisData
=
new
ArrayList
<>();
List
<
String
>
activePowers
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
indicatorDataListActivePowers
.
size
();
i
++)
{
activePowers
.
add
(
indicatorDataListActivePowers
.
get
(
i
).
getValue
(
));
activePowers
.
add
(
dfSS
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getValueF
()
));
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getCreatedTime
(),
"yyyy-MM-dd HH:mm:ss"
));
}
// List<Map<String, Object>> seriesData = new ArrayList<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdmapper/IndicatorDataMapper.java
View file @
fe3b967a
...
...
@@ -48,7 +48,7 @@ public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
List
<
IndicatorData
>
selectByIndexNameAndDate
(
@Param
(
"equipmentIndexName"
)
String
equipmentIndexName
,
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"date"
)
String
date
,
@Param
(
"limitNum"
)
Integer
limitNum
);
@Select
(
"select `value
`
, created_time from iot_data.indicator_data where id =#{id} and ts >= #{startTime} and ts <= #{endTime} "
)
@Select
(
"select `value
_f` as valueF
, created_time from iot_data.indicator_data where id =#{id} and ts >= #{startTime} and ts <= #{endTime} "
)
List
<
IndicatorData
>
selectDataByequipmentIndexNameAndtimeAndEquipmentNumber
(
@Param
(
"id"
)
String
id
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
@Select
(
"select `value`,`value_f`, address, gateway_id from iot_data.indicator_data where ts > NOW()-10m and gateway_id = #{gatewayId}"
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
fe3b967a
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanWarningRecordMapper.xml
View file @
fe3b967a
...
...
@@ -46,7 +46,7 @@
idx_biz_fan_warning_record
) a
<where>
((a.disposotionState = '
未处置') or (a.disposotionState = '已处置
' AND a.disposotionDate > DATE_ADD( now(), INTERVAL - 3 DAY )))
((a.disposotionState = '
待确认') or (a.disposotionState = '已确认
' AND a.disposotionDate > DATE_ADD( now(), INTERVAL - 3 DAY )))
<if
test=
"arae != '' and arae != null"
>
AND a.arae like concat('%', #{arae}, '%')
</if>
...
...
@@ -107,7 +107,7 @@
idx_biz_fan_warning_record
) a
<where>
((a.disposotionState = '
未处置') or (a.disposotionState = '已处置
' AND a.disposotionDate > DATE_ADD( now(), INTERVAL - 3 DAY )))
((a.disposotionState = '
待确认') or (a.disposotionState = '已确认
' AND a.disposotionDate > DATE_ADD( now(), INTERVAL - 3 DAY )))
<if
test=
"arae != '' and arae != null"
>
AND a.arae like concat('%', #{arae}, '%')
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
View file @
fe3b967a
...
...
@@ -244,8 +244,8 @@
from
analysis_data.fan_warning_record
<where>
((disposotion_state = '
未处置
')
or (disposotion_state = '已
处置
'
((disposotion_state = '
待确认
')
or (disposotion_state = '已
确认
'
and ts > now - 3d - 8h))
<if
test=
"stationCode != null and stationCode != ''"
>
and gateway_id = #{stationCode}
...
...
@@ -256,9 +256,9 @@
warning_name as warningName
from
analysis_data.pv_warning_record
<where>
((disposotion_state = '
未处置
')
<where>
((disposotion_state = '
待确认
')
or (
disposotion_state = '已
处置
'
disposotion_state = '已
确认
'
and ts > now - 3d - 8h ))
<if
test=
"stationCode != null and stationCode != ''"
>
and gateway_id = #{stationCode}
...
...
@@ -277,7 +277,7 @@
FROM
fan_warning_record
<where>
disposotion_state = '
未处置
'
disposotion_state = '
待确认
'
<if
test=
"subSystem != null and subSystem != ''"
>
AND sub_system = #{subSystem}
</if>
...
...
@@ -299,7 +299,7 @@
${tableName}
WHERE
index_address = #{indexAddress}
AND disposotion_state = '
未处置
'
AND disposotion_state = '
待确认
'
and gateway_id = #{fanGatewayId}
ORDER BY
ts DESC
...
...
@@ -329,7 +329,7 @@
FROM
pv_warning_record
<where>
disposotion_state = '
未处置
'
disposotion_state = '
待确认
'
<if
test=
"equipmentName != null and equipmentName != ''"
>
AND equipment_name = #{equipmentName}
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanWarningRecord.xml
View file @
fe3b967a
...
...
@@ -273,8 +273,8 @@
warning_name as warningName,
count(1) as num
from analysis_data.fan_warning_record a
where (a.disposotion_state = '
未处置
')
or (a.disposotion_state = '已
处置
' and a.ts >(now()-3d -8h ))
where (a.disposotion_state = '
待确认
')
or (a.disposotion_state = '已
确认
' and a.ts >(now()-3d -8h ))
group by arae,
warning_name
...
...
@@ -325,7 +325,7 @@
analysis_data.fan_warning_record
) a
<where>
( (a.disposotionstate = '
未处置') or (a.disposotionstate = '已处置
' and a.ts >( now()- 3d - 8h )))
( (a.disposotionstate = '
待确认') or (a.disposotionstate = '已确认
' and a.ts >( now()- 3d - 8h )))
<if
test=
"arae != '' and arae != null"
>
and a.arae like #{arae}
</if>
...
...
@@ -389,8 +389,8 @@
analysis_data.fan_warning_record
) a
<where>
( a.disposotionState = '
未处置
'
or (a.disposotionState = '已
处置
' and a.ts > ( now() - 3D - 8h )))
( a.disposotionState = '
待确认
'
or (a.disposotionState = '已
确认
' and a.ts > ( now() - 3D - 8h )))
<if
test=
"arae != '' and arae != null"
>
and a.arae like #{arae}
</if>
...
...
@@ -540,8 +540,8 @@
count(1) as num,
station
from analysis_data.fan_warning_record a
where (a.disposotion_state = '
未处置
')
or (a.disposotion_state = '已
处置
' and a.ts >(now()-3d -8h ))
where (a.disposotion_state = '
待确认
')
or (a.disposotion_state = '已
确认
' and a.ts >(now()-3d -8h ))
group by arae,
warning_name,station
union all
...
...
@@ -550,8 +550,8 @@
count(1) as num,
station
from analysis_data.pv_warning_record a
where (a.disposotion_state = '
未处置
')
or (a.disposotion_state = '已
处置
' and a.ts >(now()-3d -8h ))
where (a.disposotion_state = '
待确认
')
or (a.disposotion_state = '已
确认
' and a.ts >(now()-3d -8h ))
group by arae,
warning_name,station ) b
<where>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/PvWarningRecord.xml
View file @
fe3b967a
...
...
@@ -291,8 +291,8 @@
warning_name as warningName,
count(1) as num
from analysis_data.pv_warning_record a
where (a.disposotion_state = '
未处置
')
or (a.disposotion_state = '已
处置
' and a.ts >(now()-3d -8h ))
where (a.disposotion_state = '
待确认
')
or (a.disposotion_state = '已
确认
' and a.ts >(now()-3d -8h ))
group by arae,
warning_name
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
View file @
fe3b967a
...
...
@@ -217,7 +217,10 @@
ifnull(c.station_name, '') AS stationName,
ifnull(a.rec_date, '') as recDate,
a.sequence_nbr as objectId,
b.project_name as unitName
b.project_name as unitName,
case when a.qrcode_color = 'red' then 1
when a.qrcode_color = 'yellow' then 2
else 3 end as sort
FROM
person_basic a
INNER JOIN station_basic c ON a.project_org_code = c.project_org_code
...
...
@@ -237,7 +240,7 @@
AND a.qrcode_color != #{ne}
</if>
</where>
ORDER BY a.rec_date DESC
ORDER BY
sort asc,
a.rec_date DESC
limit #{current},#{size}
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonBasicServiceImpl.java
View file @
fe3b967a
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.feign.AmosFeignService
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jxiop.api.Enum.QrcodeColorEnum
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.CustomizeItems
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.PersonBasicDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.RiskBizInfoVo
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.RiskDynamicDetailsVo
;
...
...
@@ -79,7 +80,7 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
PersonAccountFedMapper
personAccountFedMapper
;
public
RiskBizInfoVo
fetchData
(
PersonBasic
personBasic
,
PersonAccount
personAccount
)
{
public
RiskBizInfoVo
fetchData
(
PersonBasic
personBasic
,
PersonAccount
personAccount
,
String
content
)
{
RiskBizInfoVo
riskBizInfoVo
=
new
RiskBizInfoVo
();
riskBizInfoVo
.
setWarningObjectName
(
personAccount
.
getProjectName
()
+
personBasic
.
getPostName
()
+
personAccount
.
getName
());
riskBizInfoVo
.
setWarningObjectCode
(
String
.
valueOf
(
personBasic
.
getSequenceNbr
()));
...
...
@@ -91,6 +92,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
dynamicDetailsVo
.
setTabName
(
"预警详情"
);
detailsVos
.
add
(
dynamicDetailsVo
);
riskBizInfoVo
.
setDynamicDetails
(
detailsVos
);
CustomizeItems
customizeItems
=
new
CustomizeItems
();
customizeItems
.
setWarningContent
(
content
);
riskBizInfoVo
.
setCustomizeItems
(
customizeItems
);
return
riskBizInfoVo
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/PersonYardTimeTask.java
View file @
fe3b967a
...
...
@@ -66,8 +66,7 @@ public class PersonYardTimeTask {
private
StationBasicMapper
stationBasicMapper
;
@Scheduled
(
cron
=
"0 0 0 1/1 * ? "
)
@Scheduled
(
cron
=
"${person.yard.cron:0 0 0 1/1 * ?}"
)
public
void
timeYardTimeTask
()
{
if
(!
redisUtils
.
hasKey
(
Constants
.
JXIOP_DICT_POST
)
||
!
redisUtils
.
hasKey
(
Constants
.
JXIOP_DICT_CERTIFICATES
))
{
personBasicService
.
addRedisPostAndCerInfo
();
...
...
@@ -103,7 +102,10 @@ public class PersonYardTimeTask {
//人员资质信息
Integer
isInMonth
=
0
;
Integer
isOver
=
0
;
// 过期的证书
List
<
String
>
overCertificateList
=
new
ArrayList
<>();
// 临期证书
List
<
String
>
inMonthCertificateList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
personCertificateList
))
{
for
(
PersonCertificate
item
:
personCertificateList
)
{
int
validPeriod
=
StringUtils
.
isEmpty
(
item
.
getValidPeriod
())
?
3
:
Integer
.
parseInt
(
item
.
getValidPeriod
());
...
...
@@ -111,12 +113,14 @@ public class PersonYardTimeTask {
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
-
1
)
{
isOver
=
1
;
overCertificateList
.
add
(
item
.
getCertificateName
());
}
try
{
if
(
list
.
contains
(
item
.
getCertificateName
())
&&
DateUtils
.
dateBetweenIncludeToday
(
new
Date
(),
date
)
<
Integer
.
valueOf
(
certificatesMap
.
get
(
item
.
getCertificateName
()))
&&
DateUtils
.
dateCompare
(
date
,
new
Date
())
==
1
)
{
isInMonth
=
1
;
inMonthCertificateList
.
add
(
item
.
getCertificateName
());
}
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
...
...
@@ -124,44 +128,71 @@ public class PersonYardTimeTask {
list
.
remove
(
item
.
getCertificateName
());
}
}
String
qrcodeDescOld
=
personBasic
.
getQrcodeDesc
();
// 缺证
List
<
String
>
noCertificateList
=
new
ArrayList
<>(
list
);
List
<
String
>
strings
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
overCertificateList
))
{
strings
.
add
(
"过期证书:"
+
String
.
join
(
","
,
overCertificateList
));
}
if
(
CollectionUtils
.
isNotEmpty
(
inMonthCertificateList
))
{
strings
.
add
(
"临期证书:"
+
String
.
join
(
","
,
inMonthCertificateList
));
}
if
(
CollectionUtils
.
isNotEmpty
(
noCertificateList
))
{
strings
.
add
(
"缺少证书:"
+
String
.
join
(
","
,
noCertificateList
));
}
String
join
=
""
;
if
(
CollectionUtils
.
isNotEmpty
(
strings
))
{
join
=
String
.
join
(
";"
,
strings
);
}
String
missingCertificateOld
=
personBasic
.
getMissingCertificate
();
personBasic
.
setMissingCertificate
(
join
);
String
qrcodeColorOld
=
personBasic
.
getQrcodeColor
();
if
(
CollectionUtils
.
isEmpty
(
list
)
&&
isInMonth
==
0
&&
isOver
==
0
)
{
personBasic
.
setQrcodeColor
(
QrcodeColorEnum
.
GREEN
.
getCode
());
personBasic
.
setQrcodeDesc
(
"证书齐全"
);
}
else
if
(
CollectionUtils
.
isEmpty
(
list
)
&&
isOver
==
1
)
{
personBasic
.
setQrcodeDate
(
new
Date
());
}
else
if
((
CollectionUtils
.
isEmpty
(
list
)
&&
isOver
==
1
)
||
(
CollectionUtils
.
isNotEmpty
(
list
)))
{
personBasic
.
setQrcodeColor
(
QrcodeColorEnum
.
RED
.
getCode
());
personBasic
.
setQrcodeDesc
(
"证书不全"
);
personBasic
.
setQrcodeDate
(
new
Date
());
}
else
if
(
CollectionUtils
.
isEmpty
(
list
)
&&
isOver
==
0
&&
isInMonth
==
1
)
{
personBasic
.
setQrcodeColor
(
QrcodeColorEnum
.
YELLOW
.
getCode
());
personBasic
.
setQrcodeDesc
(
"证书临期"
);
personBasic
.
setQrcodeDate
(
new
Date
());
}
if
(
StringUtils
.
isEmpty
(
qrcodeDescOld
)
||
!
qrcodeDescOld
.
equals
(
personBasic
.
getQrcodeDesc
()
))
{
if
(
!
join
.
equals
(
missingCertificateOld
))
{
personBasic
.
setRecDate
(
new
Date
());
personBasicService
.
updateById
(
personBasic
);
this
.
personBasicMapper
.
updateById
(
personBasic
);
if
((
"证书不全"
.
equals
(
personBasic
.
getQrcodeDesc
())
||
"证书临期"
.
equals
(
personBasic
.
getQrcodeDesc
())))
{
BizMessage
bizMessage
=
new
BizMessage
();
bizMessage
.
setIndexKey
(
"RYFM"
);
bizMessage
.
setIndexValue
(
personBasic
.
getPostName
()
+
personBasic
.
getQrcodeDesc
());
RiskBizInfoVo
riskBizInfoVo
=
personBasicService
.
fetchData
(
personBasic
,
personAccount
);
RiskBizInfoVo
riskBizInfoVo
=
personBasicService
.
fetchData
(
personBasic
,
personAccount
,
join
);
bizMessage
.
setBizInfo
(
riskBizInfoVo
);
bizMessage
.
setDataSource
(
"人员赋码"
);
try
{
emqKeeper
.
getMqttClient
().
publish
(
PersonBasicServiceImpl
.
RYFM_DATA_MQTT_TOPIC
,
JSON
.
toJSONString
(
bizMessage
).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
}
}
else
if
(
"证书齐全"
.
equals
(
personBasic
.
getQrcodeDesc
()))
{
HashMap
<
String
,
String
>
personMap
=
new
HashMap
<>();
personMap
.
put
(
"objectId"
,
String
.
valueOf
(
personBasic
.
getSequenceNbr
()));
personMap
.
put
(
"qrCodeColor"
,
qrcodeColorOld
);
personMap
.
put
(
"warningObjectType"
,
"RYFM"
);
personMap
.
put
(
"sourceAttribution"
,
personBasic
.
getProjectOrgCode
());
personMap
.
put
(
"sourceAttributionDesc"
,
personAccount
.
getProjectName
());
try
{
emqKeeper
.
getMqttClient
().
publish
(
PersonBasicServiceImpl
.
RYFM_GREEN
,
JSON
.
toJSONString
(
personMap
).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
else
if
(
"证书齐全"
.
equals
(
personBasic
.
getQrcodeDesc
()))
{
HashMap
<
String
,
String
>
personMap
=
new
HashMap
<>();
personMap
.
put
(
"objectId"
,
String
.
valueOf
(
personBasic
.
getSequenceNbr
()));
personMap
.
put
(
"qrCodeColor"
,
qrcodeColorOld
);
personMap
.
put
(
"warningObjectType"
,
"RYFM"
);
personMap
.
put
(
"sourceAttribution"
,
personBasic
.
getProjectOrgCode
());
personMap
.
put
(
"sourceAttributionDesc"
,
personAccount
.
getProjectName
());
personMap
.
put
(
"warningSourceType"
,
"人员赋码"
);
try
{
emqKeeper
.
getMqttClient
().
publish
(
PersonBasicServiceImpl
.
RYFM_GREEN
,
JSON
.
toJSONString
(
personMap
).
getBytes
(
StandardCharsets
.
UTF_8
),
2
,
false
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
}
}
}
});
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/mapper/cluster/SjglZsjZsbtzMapper.xml
View file @
fe3b967a
...
...
@@ -102,7 +102,10 @@
ifnull(a.QRCODE_COLOR, '') AS qrCodeColor,
ifnull(b.COMPANY_NAME, '') AS stationName,
ifnull(a.UPDATE_STAMP, '') as recDate,
a.SBBM as objectId
a.SBBM as objectId,
(case when a.QRCODE_COLOR = 'red' then 1
when a.QRCODE_COLOR = 'yellow' then 2
else 3 end) as sort
FROM
sjgl_zsj_zsbtz a
INNER JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
...
...
@@ -120,7 +123,7 @@
AND a.QRCODE_COLOR != #{ne}
</if>
</where>
ORDER BY a.UPDATE_STAMP DESC
ORDER BY
sort asc,
a.UPDATE_STAMP DESC
limit #{current},#{size}
</select>
...
...
@@ -153,7 +156,10 @@
ifnull(b.COMPANY_NAME, '') AS stationName,
ifnull(a.CREATE_TIME, '') as recDate,
a.DBID AS objectId,
c.SBBM as jobId
c.SBBM as jobId,
case when a.QRCODE_COLOR = 'red' then 1
when a.QRCODE_COLOR = 'yellow' then 2
else 3 end as sort
FROM
fdgl_job_main a
INNER JOIN privilege_company b ON a.WERKS = b.COMPANY_CODE and b.IS_DELETED = false AND b.`LEVEL` = 'station'
...
...
@@ -172,7 +178,7 @@
AND a.QRCODE_COLOR != #{ne}
</if>
</where>
ORDER BY a.CREATE_TIME DESC
ORDER BY
sort asc,
a.CREATE_TIME DESC
limit #{current},#{size}
</select>
...
...
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