Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-api-boot
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-api-boot
Commits
2f25667e
提交
2f25667e
authored
5月 26, 2022
作者:
17607474349
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:
1、合并tml分支
上级
31bc9e8a
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
46 行增加
和
31 行删除
+46
-31
RiskPush.java
app/src/main/java/com/yiring/app/domain/risk/RiskPush.java
+19
-21
MockPositionMessageJob.java
.../main/java/com/yiring/app/job/MockPositionMessageJob.java
+19
-0
RiskPushConditionParam.java
...ava/com/yiring/app/param/risk/RiskPushConditionParam.java
+2
-3
RiskPushSaveParam.java
...ain/java/com/yiring/app/param/risk/RiskPushSaveParam.java
+2
-3
RiskPushVo.java
app/src/main/java/com/yiring/app/vo/risk/RiskPushVo.java
+2
-2
build.gradle
build.gradle
+2
-2
没有找到文件。
app/src/main/java/com/yiring/app/domain/risk/RiskPush.java
浏览文件 @
2f25667e
...
...
@@ -39,10 +39,8 @@ public class RiskPush extends BasicEntity implements Serializable {
@ManyToOne
WorkArea
workArea
;
@Comment
(
"风险等级"
)
@Enumerated
(
EnumType
.
STRING
)
Level
level
;
@Comment
(
"风险等级:1-红色风险,2-橙色风险,3-黄色风险,4-蓝色风险"
)
Integer
level
;
// @Comment("撤离推送")
// @Builder.Default
// @OneToMany(mappedBy = "riskPush")
...
...
@@ -53,21 +51,21 @@ public class RiskPush extends BasicEntity implements Serializable {
// @OneToMany(mappedBy = "riskPush")
// Set<RiskHandlePush> handlePush = new HashSet<>(0);
@SuppressWarnings
({
"unused"
})
public
enum
Level
{
RED
(
"红色预警"
),
ORANGE
(
"橙色预警"
),
YELLOW
(
"黄色预警"
),
BLUE
(
"蓝色预警"
);
final
String
text
;
Level
(
String
text
)
{
this
.
text
=
text
;
}
public
String
text
()
{
return
this
.
text
;
}
}
//
@SuppressWarnings({ "unused" })
//
public enum Level {
//
RED("红色预警"),
//
ORANGE("橙色预警"),
//
YELLOW("黄色预警"),
//
BLUE("蓝色预警");
//
//
final String text;
//
//
Level(String text) {
//
this.text = text;
//
}
//
//
public String text() {
//
return this.text;
//
}
//
}
}
app/src/main/java/com/yiring/app/job/MockPositionMessageJob.java
浏览文件 @
2f25667e
...
...
@@ -84,6 +84,12 @@ public class MockPositionMessageJob {
}
}
@XxlJob
(
"MockMeterDetectHandler"
)
public
void
MockMeterDetectHandler
()
{
JSONObject
extra
=
toJSON
(
XxlJobHelper
.
getJobParam
());
log
.
info
(
"[Mock] MeterDetect: {}, {}"
,
mockMeterDetectMessage
(
extra
),
extra
);
}
public
JSONObject
send
(
JSONObject
body
)
{
if
(
rabbitmq
.
isMock
())
{
rabbitTemplate
.
convertAndSend
(
rabbitmq
.
getQueueName
(),
body
.
toJSONString
());
...
...
@@ -183,4 +189,17 @@ public class MockPositionMessageJob {
body
.
put
(
"params"
,
params
);
return
send
(
body
);
}
private
JSONObject
mockMeterDetectMessage
(
JSONObject
extra
)
{
JSONObject
params
=
new
JSONObject
();
params
.
put
(
"locationNum"
,
"4376"
);
params
.
put
(
"newestMonitor"
,
1L
);
params
.
put
(
"time"
,
LocalDateTime
.
now
());
params
.
putAll
(
extra
);
JSONObject
body
=
new
JSONObject
();
body
.
put
(
"method"
,
"meterDetect"
);
body
.
put
(
"params"
,
params
);
return
send
(
body
);
}
}
app/src/main/java/com/yiring/app/param/risk/RiskPushConditionParam.java
浏览文件 @
2f25667e
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
app
.
param
.
risk
;
import
com.yiring.app.domain.risk.RiskPush
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serial
;
...
...
@@ -31,6 +30,6 @@ public class RiskPushConditionParam implements Serializable {
@ApiModelProperty
(
value
=
"工区id"
,
example
=
"1"
)
Long
workId
;
@ApiModelProperty
(
value
=
"风险等级"
,
example
=
"
RED/ORANGE/YELLOW/BLUE
"
)
RiskPush
.
Level
level
;
@ApiModelProperty
(
value
=
"风险等级"
,
example
=
"
1-红色风险,2-橙色风险,3-黄色风险,4-蓝色风险
"
)
Integer
level
;
}
app/src/main/java/com/yiring/app/param/risk/RiskPushSaveParam.java
浏览文件 @
2f25667e
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
app
.
param
.
risk
;
import
com.yiring.app.domain.risk.RiskPush
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serial
;
...
...
@@ -33,7 +32,7 @@ public class RiskPushSaveParam implements Serializable {
@NotNull
(
message
=
"工区id不能为空"
)
Long
workId
;
@ApiModelProperty
(
value
=
"风险等级"
,
example
=
"
RED/ORANGE/YELLOW/BLUE
"
,
required
=
true
)
@ApiModelProperty
(
value
=
"风险等级"
,
example
=
"
1-红色风险,2-橙色风险,3-黄色风险,4-蓝色风险
"
,
required
=
true
)
@NotNull
(
message
=
"风险等级不能为空"
)
RiskPush
.
Level
level
;
Integer
level
;
}
app/src/main/java/com/yiring/app/vo/risk/RiskPushVo.java
浏览文件 @
2f25667e
...
...
@@ -39,7 +39,7 @@ public class RiskPushVo implements Serializable {
WorkAreaVo
workAreaVo
;
@ApiModelProperty
(
value
=
"风险等级"
,
example
=
"红、橙、黄、蓝"
)
String
level
;
Integer
level
;
@ApiModelProperty
(
value
=
"撤离推送总数"
,
example
=
"1"
)
String
withdrawalPush
;
...
...
@@ -48,6 +48,6 @@ public class RiskPushVo implements Serializable {
String
handlePush
;
public
static
RiskPushVo
transform
(
RiskPush
riskPush
)
{
return
RiskPushVo
.
builder
().
id
(
riskPush
.
getId
()).
level
(
riskPush
.
getLevel
()
.
text
()
).
build
();
return
RiskPushVo
.
builder
().
id
(
riskPush
.
getId
()).
level
(
riskPush
.
getLevel
()).
build
();
}
}
build.gradle
浏览文件 @
2f25667e
...
...
@@ -6,7 +6,7 @@ buildscript {
// https://start.spring.io/
springCloudVersion
=
'2021.0.2'
// https://mvnrepository.com/artifact/com.github.xiaoymin/knife4j-spring-boot-starter
knife4jVersion
=
'
3.0.3
'
knife4jVersion
=
'
2.0.9
'
// https://mvnrepository.com/artifact/io.swagger/swagger-annotations
swaggerAnnotationsVersion
=
'1.6.6'
// https://mvnrepository.com/artifact/cn.dev33/sa-token-spring-boot-starter
...
...
@@ -14,7 +14,7 @@ buildscript {
// https://mvnrepository.com/artifact/cn.hutool/hutool-all
hutoolVersion
=
'5.8.0'
// https://mvnrepository.com/artifact/com.alibaba/fastjson
fastJsonVersion
=
'
2.0.3.graal
'
fastJsonVersion
=
'
1.2.80
'
// https://mvnrepository.com/artifact/com.xuxueli/xxl-job-core
xxlJobVersion
=
'2.3.0'
// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论