Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
6e69d748
提交
6e69d748
authored
5月 08, 2024
作者:
艾庆国
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
运单预警
上级
f9913ffb
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
31 行增加
和
23 行删除
+31
-23
VehicleWarnConfigEnum.java
.../performance/enums/vehiclewarn/VehicleWarnConfigEnum.java
+1
-1
VehicleWarnChildDaoImpl.java
...ormance/dao/impl/vehiclewarn/VehicleWarnChildDaoImpl.java
+8
-0
VehicleWarnInfoDaoImpl.java
...formance/dao/impl/vehiclewarn/VehicleWarnInfoDaoImpl.java
+13
-0
VehicleWarnChildDao.java
.../clx/performance/dao/vehiclewarn/VehicleWarnChildDao.java
+1
-0
VehicleWarnInfoDao.java
...m/clx/performance/dao/vehiclewarn/VehicleWarnInfoDao.java
+3
-0
VehicleWarnChild.java
...m/clx/performance/model/vehiclewarn/VehicleWarnChild.java
+1
-0
VehicleWarnSendAddressWarnServiceImpl.java
...pl/vehiclewarn/VehicleWarnSendAddressWarnServiceImpl.java
+2
-11
GdService.java
...src/main/java/com/clx/performance/utils/gd/GdService.java
+2
-11
没有找到文件。
performance-api/src/main/java/com/clx/performance/enums/vehiclewarn/VehicleWarnConfigEnum.java
浏览文件 @
6e69d748
...
...
@@ -18,7 +18,7 @@ public enum VehicleWarnConfigEnum {
GOTO_RECEIVE_TIMEOUT
(
4
,
"运单-前往目的地超时"
),
PARK_TIMEOUT
(
5
,
"运单-停留超时"
),
YES
(
6
,
"运单-敏感区停留"
),
SENSITIVE_AREA_PARK_TIMEOUT
(
6
,
"运单-敏感区停留"
),
LOAD_TIMEOUT
(
7
,
"运单-装车超时"
),
UNLOAD_TIMEOUT
(
8
,
"运单-卸车超时"
),
DELAY
(
9
,
"运单-运单延误"
),
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/vehiclewarn/VehicleWarnChildDaoImpl.java
浏览文件 @
6e69d748
...
...
@@ -23,6 +23,14 @@ public class VehicleWarnChildDaoImpl extends BaseDaoImpl<VehicleWarnChildMapper,
);
}
@Override
public
boolean
updateReceiveAddressDistance
(
VehicleWarnChild
item
)
{
return
update
(
lUdWrapper
()
.
eq
(
VehicleWarnChild:
:
getId
,
item
.
getId
())
.
set
(
VehicleWarnChild:
:
getTraceTime
,
item
.
getTraceTime
())
);
}
@Override
public
Optional
<
VehicleWarnChild
>
findByChildNo
(
String
childNo
)
{
return
Optional
.
of
(
childNo
)
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/vehiclewarn/VehicleWarnInfoDaoImpl.java
浏览文件 @
6e69d748
...
...
@@ -3,6 +3,7 @@ package com.clx.performance.dao.impl.vehiclewarn;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.performance.dao.vehiclewarn.VehicleWarnInfoDao
;
import
com.clx.performance.enums.vehiclewarn.VehicleWarnInfoEnum
;
import
com.clx.performance.mapper.vehiclewarn.VehicleWarnInfoMapper
;
import
com.clx.performance.model.vehiclewarn.VehicleWarnInfo
;
import
com.clx.performance.param.pc.vehiclewarn.PageVehicleWarnInfoParam
;
...
...
@@ -50,6 +51,18 @@ public class VehicleWarnInfoDaoImpl extends BaseDaoImpl<VehicleWarnInfoMapper, V
.
map
(
super
::
getOne
);
}
@Override
public
Optional
<
VehicleWarnInfo
>
findEnableByChildNoAndWarnConfigType
(
String
childNo
,
Integer
warnConfigType
)
{
return
Optional
.
of
(
childNo
)
.
map
(
item
->
lQrWrapper
()
.
eq
(
VehicleWarnInfo:
:
getChildNo
,
childNo
)
.
eq
(
VehicleWarnInfo:
:
getWarnConfigId
,
warnConfigType
)
.
ne
(
VehicleWarnInfo:
:
getStatus
,
VehicleWarnInfoEnum
.
Status
.
RESOLVE
.
getCode
())
.
last
(
"limit 1"
)
)
.
map
(
super
::
getOne
);
}
@Override
public
Optional
<
VehicleWarnInfo
>
findByWarnConfigType
(
Integer
warnConfigType
)
{
return
Optional
.
of
(
warnConfigType
)
...
...
performance-web/src/main/java/com/clx/performance/dao/vehiclewarn/VehicleWarnChildDao.java
浏览文件 @
6e69d748
...
...
@@ -10,6 +10,7 @@ import java.util.List;
public
interface
VehicleWarnChildDao
extends
BaseDao
<
VehicleWarnChildMapper
,
VehicleWarnChild
,
Integer
>
{
boolean
updateTraceTime
(
VehicleWarnChild
item
);
boolean
updateReceiveAddressDistance
(
VehicleWarnChild
item
);
Optional
<
VehicleWarnChild
>
findByChildNo
(
String
childNo
);
List
<
VehicleWarnChild
>
ListTruckNoOfTrace
();
...
...
performance-web/src/main/java/com/clx/performance/dao/vehiclewarn/VehicleWarnInfoDao.java
浏览文件 @
6e69d748
...
...
@@ -14,6 +14,9 @@ public interface VehicleWarnInfoDao extends BaseDao<VehicleWarnInfoMapper, Vehic
Optional
<
VehicleWarnInfo
>
findById
(
Integer
id
);
Optional
<
VehicleWarnInfo
>
findByChildNoAndWarnConfigType
(
String
childNo
,
Integer
warnConfigType
);
Optional
<
VehicleWarnInfo
>
findEnableByChildNoAndWarnConfigType
(
String
childNo
,
Integer
warnConfigType
);
Optional
<
VehicleWarnInfo
>
findByWarnConfigType
(
Integer
warnConfigType
);
IPage
<
VehicleWarnInfo
>
pageByParam
(
PageVehicleWarnInfoParam
param
);
...
...
performance-web/src/main/java/com/clx/performance/model/vehiclewarn/VehicleWarnChild.java
浏览文件 @
6e69d748
...
...
@@ -38,6 +38,7 @@ public class VehicleWarnChild implements HasKey<Integer> {
private
Integer
arriveSendExpectTime
;
//预计到达货源地时间 (min)
private
Integer
arriveReceiveExpectTime
;
//预计到达目的地时间 (min)
private
LocalDateTime
takeTime
;
//接单时间
private
Integer
receiveAddressDistance
;
//距离目的地距离(m)
private
LocalDateTime
traceTime
;
//轨迹更新时间
private
Integer
traceStatus
;
//轨迹更新状态:0禁止 1启用
private
Integer
wanStatus
;
//预警更新状态:0禁用 1启用
...
...
performance-web/src/main/java/com/clx/performance/service/impl/vehiclewarn/VehicleWarnSendAddressWarnServiceImpl.java
浏览文件 @
6e69d748
...
...
@@ -72,15 +72,11 @@ public class VehicleWarnSendAddressWarnServiceImpl implements VehicleWarnSendAdd
}
private
void
doGotoSendAddressTimeout
(
OrderChild
orderChild
,
VehicleWarnChild
vehicleWarnChild
,
VehicleWarnConfig
vehicleWarnConfig
,
long
expectTime
,
Integer
needTime
){
VehicleWarnInfo
vehicleWarnInfo
=
vehicleWarnInfoDao
.
findByChildNoAndWarnConfigType
(
vehicleWarnChild
.
getChildNo
(),
vehicleWarnConfig
.
getId
()).
orNull
();
VehicleWarnInfo
vehicleWarnInfo
=
vehicleWarnInfoDao
.
find
Enable
ByChildNoAndWarnConfigType
(
vehicleWarnChild
.
getChildNo
(),
vehicleWarnConfig
.
getId
()).
orNull
();
// 暂停检测
boolean
suspend
=
suspendCheck
(
vehicleWarnChild
,
vehicleWarnConfig
.
getId
());
// 已处理
if
(
vehicleWarnInfo
!=
null
&&
Objects
.
equals
(
vehicleWarnInfo
.
getStatus
(),
VehicleWarnInfoEnum
.
Status
.
RESOLVE
.
getCode
())){
return
;
}
// 已暂停
if
(
vehicleWarnInfo
!=
null
&&
Objects
.
equals
(
vehicleWarnInfo
.
getStatus
(),
VehicleWarnInfoEnum
.
Status
.
SUSPEND
.
getCode
())){
if
(
suspend
)
{
return
;}
...
...
@@ -160,12 +156,7 @@ public class VehicleWarnSendAddressWarnServiceImpl implements VehicleWarnSendAdd
}
private
void
doArriveSendAddressTimeout
(
OrderChild
orderChild
,
VehicleWarnChild
vehicleWarnChild
,
VehicleWarnConfig
vehicleWarnConfig
){
VehicleWarnInfo
vehicleWarnInfo
=
vehicleWarnInfoDao
.
findByChildNoAndWarnConfigType
(
vehicleWarnChild
.
getChildNo
(),
vehicleWarnConfig
.
getId
()).
orNull
();
// 已处理
if
(
vehicleWarnInfo
!=
null
&&
Objects
.
equals
(
vehicleWarnInfo
.
getStatus
(),
VehicleWarnInfoEnum
.
Status
.
RESOLVE
.
getCode
())){
return
;
}
VehicleWarnInfo
vehicleWarnInfo
=
vehicleWarnInfoDao
.
findEnableByChildNoAndWarnConfigType
(
vehicleWarnChild
.
getChildNo
(),
vehicleWarnConfig
.
getId
()).
orNull
();
// 暂停检测
boolean
suspend
=
suspendCheck
(
vehicleWarnChild
,
vehicleWarnConfig
.
getId
());
...
...
performance-web/src/main/java/com/clx/performance/utils/gd/GdService.java
浏览文件 @
6e69d748
...
...
@@ -33,33 +33,24 @@ public class GdService {
private
static
final
String
REGEO_API
=
"https://restapi.amap.com/v3/geocode/regeo"
;
//逆地理编码
private
static
final
Integer
STRATEGY_DEFAULT
=
32
;
private
static
final
Integer
STRATEGY_33
=
10
;
private
String
gaodeKey
=
"b2550e16bbc7bf9f6cd168e0f21709fc"
;
public
List
<
GdRouteDTO
>
getRoute
(
BigDecimal
originLongitude
,
BigDecimal
originLatitude
,
BigDecimal
destinationLongitude
,
BigDecimal
destinationLatitude
,
Integer
strategy
)
{
return
getRoute
(
gaodeKey
,
strategy
,
originLongitude
,
originLatitude
,
destinationLongitude
,
destinationLatitude
);
}
public
List
<
GdRouteDTO
>
getRoute
(
BigDecimal
originLongitude
,
BigDecimal
originLatitude
,
BigDecimal
destinationLongitude
,
BigDecimal
destinationLatitude
)
{
return
getRoute
(
gaodeKey
,
STRATEGY_DEFAULT
,
originLongitude
,
originLatitude
,
destinationLongitude
,
destinationLatitude
);
return
getRoute
(
gaodeKey
,
originLongitude
,
originLatitude
,
destinationLongitude
,
destinationLatitude
);
}
public
static
List
<
GdRouteDTO
>
getRoute
(
String
key
,
Integer
strategy
,
BigDecimal
originLongitude
,
BigDecimal
originLatitude
,
public
static
List
<
GdRouteDTO
>
getRoute
(
String
key
,
BigDecimal
originLongitude
,
BigDecimal
originLatitude
,
BigDecimal
destinationLongitude
,
BigDecimal
destinationLatitude
)
{
//log.info("高德线路规划开始");
List
<
GdRouteDTO
>
routeList
=
new
ArrayList
<>();
String
url
=
DIRECTION_API
+
"?origin="
+
originLongitude
.
doubleValue
()+
","
+
originLatitude
.
doubleValue
()
+
"&destination="
+
destinationLongitude
.
doubleValue
()+
","
+
destinationLatitude
.
doubleValue
()
+
"&strategy="
+
strategy
+
"&output=json&key="
+
key
+
"&extensions=base&show_fields=cost,tmcs"
;
//解析返回的结果
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论