Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
9e13efb7
提交
9e13efb7
authored
8月 09, 2024
作者:
jiangwujie
浏览文件
操作
浏览文件
下载
差异文件
feature(电子围栏): merge to dev
上级
f3e7ed3d
a1f6f2d4
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
204 行增加
和
17 行删除
+204
-17
AppEnum.java
...-api/src/main/java/com/clx/performance/enums/AppEnum.java
+1
-0
OrderChildEnum.java
...c/main/java/com/clx/performance/enums/OrderChildEnum.java
+80
-0
PerformanceResultEnum.java
...java/com/clx/performance/enums/PerformanceResultEnum.java
+15
-0
OrderChildLoadRangeCheckParam.java
.../performance/param/app/OrderChildLoadRangeCheckParam.java
+0
-16
OrderChildLoadRangeCheckResultVO.java
.../performance/vo/app/OrderChildLoadRangeCheckResultVO.java
+17
-0
DriverNoticeConfigVO.java
.../java/com/clx/performance/vo/pc/DriverNoticeConfigVO.java
+4
-0
LoadAppConfig.java
...c/main/java/com/clx/performance/config/LoadAppConfig.java
+32
-0
AppDriverOrderChildController.java
...ormance/controller/app/AppDriverOrderChildController.java
+1
-1
OrderChildMessageNoticeJob.java
...a/com/clx/performance/job/OrderChildMessageNoticeJob.java
+39
-0
OrderChild.java
...b/src/main/java/com/clx/performance/model/OrderChild.java
+13
-0
OrderChildService.java
...n/java/com/clx/performance/service/OrderChildService.java
+2
-0
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+0
-0
没有找到文件。
performance-api/src/main/java/com/clx/performance/enums/AppEnum.java
浏览文件 @
9e13efb7
...
@@ -16,6 +16,7 @@ public enum AppEnum {
...
@@ -16,6 +16,7 @@ public enum AppEnum {
public
enum
UniqueIdentifier
{
public
enum
UniqueIdentifier
{
SMART_WEIGHT
(
1
,
"场站-smart-weight"
),
SMART_WEIGHT
(
1
,
"场站-smart-weight"
),
PURCHASE_MANAGE
(
2
,
"供应链-purchase-manage"
),
;
;
...
...
performance-api/src/main/java/com/clx/performance/enums/OrderChildEnum.java
浏览文件 @
9e13efb7
...
@@ -228,4 +228,84 @@ public enum OrderChildEnum {
...
@@ -228,4 +228,84 @@ public enum OrderChildEnum {
}
}
}
}
/**
* 驶入驶离货源地状态
*/
@Getter
@AllArgsConstructor
public
enum
EnterExitSendStatus
{
INIT
(
0
,
"到达货源地"
),
DRIVE_IN
(
1
,
"驶入"
),
DRIVE_OUT
(
2
,
"驶离"
);
private
final
Integer
code
;
private
final
String
name
;
public
static
Optional
<
EnterExitSendStatus
>
getByCode
(
Integer
code
)
{
return
Arrays
.
stream
(
values
()).
filter
(
e
->
e
.
code
.
equals
(
code
)).
findFirst
();
}
public
static
String
getMsgByCode
(
int
code
)
{
return
getByCode
(
code
).
map
(
EnterExitSendStatus:
:
getName
).
orElse
(
null
);
}
}
/**
* 驶离通知状态
*/
@Getter
@AllArgsConstructor
public
enum
ExitNoticeStatus
{
NOT_NOTIFIED
(
0
,
"到达货源地"
),
NOTIFIED
(
1
,
"驶入"
);
private
final
Integer
code
;
private
final
String
name
;
public
static
Optional
<
ExitNoticeStatus
>
getByCode
(
Integer
code
)
{
return
Arrays
.
stream
(
values
()).
filter
(
e
->
e
.
code
.
equals
(
code
)).
findFirst
();
}
public
static
String
getMsgByCode
(
int
code
)
{
return
getByCode
(
code
).
map
(
ExitNoticeStatus:
:
getName
).
orElse
(
null
);
}
}
/**
* 驶入驶离货源地状态
*/
@Getter
@AllArgsConstructor
public
enum
RemoveLoadLimitStatus
{
NOT_REMOVED
(
0
,
"未解除"
),
REMOVED
(
1
,
"已解除"
),
;
private
final
Integer
code
;
private
final
String
name
;
public
static
Optional
<
RemoveLoadLimitStatus
>
getByCode
(
Integer
code
)
{
return
Arrays
.
stream
(
values
()).
filter
(
e
->
e
.
code
.
equals
(
code
)).
findFirst
();
}
public
static
String
getMsgByCode
(
int
code
)
{
return
getByCode
(
code
).
map
(
RemoveLoadLimitStatus:
:
getName
).
orElse
(
null
);
}
}
@Getter
@AllArgsConstructor
public
enum
NeedAlertEnum
{
OK
(
0
,
"不用弹窗"
),
FAIL
(
1
,
"需要弹"
);
private
final
int
code
;
private
final
String
msg
;
}
}
}
performance-api/src/main/java/com/clx/performance/enums/PerformanceResultEnum.java
浏览文件 @
9e13efb7
...
@@ -4,6 +4,9 @@ import com.msl.common.enums.ResultEnum;
...
@@ -4,6 +4,9 @@ import com.msl.common.enums.ResultEnum;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
import
java.util.Arrays
;
import
java.util.Optional
;
@Getter
@Getter
@AllArgsConstructor
@AllArgsConstructor
...
@@ -203,4 +206,16 @@ public enum PerformanceResultEnum implements ResultEnum {
...
@@ -203,4 +206,16 @@ public enum PerformanceResultEnum implements ResultEnum {
;
;
private
final
int
code
;
private
final
int
code
;
private
final
String
msg
;
private
final
String
msg
;
public
static
Optional
<
PerformanceResultEnum
>
getByCode
(
Integer
code
)
{
return
Arrays
.
stream
(
values
()).
filter
(
e
->
e
.
code
==
(
code
)).
findFirst
();
}
public
static
String
getMsgByCode
(
Integer
code
)
{
return
getByCode
(
code
).
map
(
PerformanceResultEnum:
:
getMsg
).
orElse
(
null
);
}
public
static
PerformanceResultEnum
getEnumByCode
(
Integer
code
)
{
return
getByCode
(
code
).
orElse
(
null
);
}
}
}
performance-api/src/main/java/com/clx/performance/param/app/OrderChildLoadRangeCheckParam.java
浏览文件 @
9e13efb7
...
@@ -17,26 +17,10 @@ import java.math.BigDecimal;
...
@@ -17,26 +17,10 @@ import java.math.BigDecimal;
@NoArgsConstructor
@NoArgsConstructor
public
class
OrderChildLoadRangeCheckParam
{
public
class
OrderChildLoadRangeCheckParam
{
@ApiModelProperty
(
value
=
"货单编号"
,
example
=
"100000000"
)
@NotBlank
(
message
=
"货单编号不能为空"
)
private
String
orderGoodsNo
;
@ApiModelProperty
(
value
=
"运单编号"
,
example
=
"100000000"
)
@ApiModelProperty
(
value
=
"运单编号"
,
example
=
"100000000"
)
@NotBlank
(
message
=
"运单编号不能为空"
)
@NotBlank
(
message
=
"运单编号不能为空"
)
private
String
childNo
;
private
String
childNo
;
@ApiModelProperty
(
value
=
"车辆id"
,
example
=
"1"
)
@NotNull
(
message
=
"车辆id空"
)
private
Integer
truckId
;
@ApiModelProperty
(
value
=
"车牌号"
,
example
=
"1"
)
@NotNull
(
message
=
"车牌号不能为空"
)
private
String
truckNo
;
@ApiModelProperty
(
value
=
"司机用户编号"
,
example
=
"1"
)
@NotNull
(
message
=
"司机用户编号空"
)
private
Long
driverUserNo
;
@ApiModelProperty
(
"纬度"
)
@ApiModelProperty
(
"纬度"
)
private
BigDecimal
latitude
;
private
BigDecimal
latitude
;
...
...
performance-api/src/main/java/com/clx/performance/vo/app/OrderChildLoadRangeCheckResultVO.java
浏览文件 @
9e13efb7
package
com
.
clx
.
performance
.
vo
.
app
;
package
com
.
clx
.
performance
.
vo
.
app
;
import
com.clx.performance.enums.OrderChildEnum
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.msl.common.result.Result
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.Setter
;
import
java.util.Objects
;
/**
/**
* 是否需要监装结果VO
* 是否需要监装结果VO
*/
*/
...
@@ -22,4 +27,15 @@ public class OrderChildLoadRangeCheckResultVO {
...
@@ -22,4 +27,15 @@ public class OrderChildLoadRangeCheckResultVO {
@ApiModelProperty
(
value
=
"错误信息"
,
example
=
"错误"
)
@ApiModelProperty
(
value
=
"错误信息"
,
example
=
"错误"
)
private
String
msg
;
private
String
msg
;
public
Result
<
OrderChildLoadRangeCheckResultVO
>
toResult
()
{
if
(
Objects
.
equals
(
code
,
OrderChildEnum
.
NeedAlertEnum
.
OK
.
getCode
()))
{
return
Result
.
ok
();
}
else
{
Result
<
OrderChildLoadRangeCheckResultVO
>
result
=
Result
.
fail
(
PerformanceResultEnum
.
getEnumByCode
(
code
));
result
.
setData
(
this
);
result
.
setMsg
(
msg
);
return
result
;
}
}
}
}
\ No newline at end of file
performance-api/src/main/java/com/clx/performance/vo/pc/DriverNoticeConfigVO.java
浏览文件 @
9e13efb7
...
@@ -28,4 +28,8 @@ public class DriverNoticeConfigVO {
...
@@ -28,4 +28,8 @@ public class DriverNoticeConfigVO {
@ApiModelProperty
(
value
=
"启用状态:0禁用 1启用"
)
@ApiModelProperty
(
value
=
"启用状态:0禁用 1启用"
)
private
Integer
status
;
private
Integer
status
;
public
Integer
getNoticeTriggerDistanceMeter
()
{
return
noticeTriggerDistance
!=
null
?
noticeTriggerDistance
.
multiply
(
new
BigDecimal
(
1000
)).
intValue
()
:
0
;
}
}
}
performance-web/src/main/java/com/clx/performance/config/LoadAppConfig.java
0 → 100644
浏览文件 @
9e13efb7
package
com
.
clx
.
performance
.
config
;
import
com.clx.performance.dao.AppDao
;
import
com.clx.performance.enums.AppEnum
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.model.App
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @Author liruixin
* @create 2024-01-10 13:19
*/
@Component
public
class
LoadAppConfig
{
private
App
app
;
@Autowired
private
AppDao
appDao
;
public
App
getApp
()
{
if
(
app
==
null
)
{
app
=
appDao
.
getOneByField
(
App:
:
getUniqueIdentifier
,
AppEnum
.
UniqueIdentifier
.
PURCHASE_MANAGE
.
getCode
()).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);;
}
return
app
;
}
}
performance-web/src/main/java/com/clx/performance/controller/app/AppDriverOrderChildController.java
浏览文件 @
9e13efb7
...
@@ -198,7 +198,7 @@ public class AppDriverOrderChildController {
...
@@ -198,7 +198,7 @@ public class AppDriverOrderChildController {
@ApiOperation
(
value
=
"司机端装货范围检查拦截"
,
notes
=
"<br>By:姜武杰"
)
@ApiOperation
(
value
=
"司机端装货范围检查拦截"
,
notes
=
"<br>By:姜武杰"
)
@PostMapping
(
"/loadRangeCheck"
)
@PostMapping
(
"/loadRangeCheck"
)
public
Result
<
OrderChildLoadRangeCheckResultVO
>
loadRangeCheck
(
@RequestBody
@Validated
OrderChildLoadRangeCheckParam
param
)
{
public
Result
<
OrderChildLoadRangeCheckResultVO
>
loadRangeCheck
(
@RequestBody
@Validated
OrderChildLoadRangeCheckParam
param
)
{
return
Result
.
ok
(
orderChildService
.
loadRangeCheck
(
param
)
);
return
orderChildService
.
loadRangeCheck
(
param
).
toResult
(
);
}
}
@ApiOperation
(
value
=
"是否需要弹出监装信息"
,
notes
=
"<br>By:姜武杰"
)
@ApiOperation
(
value
=
"是否需要弹出监装信息"
,
notes
=
"<br>By:姜武杰"
)
@PostMapping
(
"/needAlertSuperviseInfo"
)
@PostMapping
(
"/needAlertSuperviseInfo"
)
...
...
performance-web/src/main/java/com/clx/performance/job/OrderChildMessageNoticeJob.java
0 → 100644
浏览文件 @
9e13efb7
package
com
.
clx
.
performance
.
job
;
import
com.clx.performance.service.OrderChildService
;
import
com.msl.common.job.JobLog
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.exception.ExceptionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* 运单监控实时位置耗时信息job
* @author jiangwujie
*/
@Slf4j
@Component
public
class
OrderChildMessageNoticeJob
{
@Autowired
OrderChildService
orderChildService
;
/**
* 运单监控实时位置耗时信息
*/
@XxlJob
(
"orderChildMessageNotice"
)
public
void
orderChildMessageNotice
()
{
try
{
log
.
info
(
"开始实时计算进行中的运单的实时位置计算任务================================================"
);
orderChildService
.
orderChildMessageNotice
();
log
.
info
(
"结束实时计算进行中的运单的实时位置计算任务================================================"
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"定时任务计算进行中的运单的实时位置失败,异常原因:{}"
,
ExceptionUtils
.
getStackTrace
(
e
));
JobLog
.
error
(
"定时任务计算进行中的运单的实时位置失败,异常原因====================="
,
e
);
}
}
}
performance-web/src/main/java/com/clx/performance/model/OrderChild.java
浏览文件 @
9e13efb7
...
@@ -106,6 +106,19 @@ public class OrderChild implements HasKey<Integer> {
...
@@ -106,6 +106,19 @@ public class OrderChild implements HasKey<Integer> {
private
BigDecimal
deposit
;
//接单保证金(分/车)
private
BigDecimal
deposit
;
//接单保证金(分/车)
private
LocalDateTime
poundAuditTime
;
//磅单审核通过时间
private
LocalDateTime
poundAuditTime
;
//磅单审核通过时间
/**
* 驶入驶离货源地状态 0 初始 1 驶入 2 驶离
*/
private
Integer
enterExitSendStatus
;
/**
* 驶离通知状态 0 未通知 1 已通知
*/
private
Integer
exitNoticeStatus
;
/**
* 是否解除监装限制 0 未解除 1 解除
*/
private
Integer
removeLoadLimitStatus
;
private
LocalDateTime
createTime
;
//创建时间
private
LocalDateTime
createTime
;
//创建时间
private
LocalDateTime
modifiedTime
;
//修改时间
private
LocalDateTime
modifiedTime
;
//修改时间
...
...
performance-web/src/main/java/com/clx/performance/service/OrderChildService.java
浏览文件 @
9e13efb7
...
@@ -114,4 +114,6 @@ public interface OrderChildService {
...
@@ -114,4 +114,6 @@ public interface OrderChildService {
List
<
HistoryLineTranVolumeChartVO
>
getHistoryLineTransportVolume
(
String
orderNo
);
List
<
HistoryLineTranVolumeChartVO
>
getHistoryLineTransportVolume
(
String
orderNo
);
OrderChildLoadRangeCheckResultVO
loadRangeCheck
(
OrderChildLoadRangeCheckParam
param
);
OrderChildLoadRangeCheckResultVO
loadRangeCheck
(
OrderChildLoadRangeCheckParam
param
);
void
orderChildMessageNotice
();
}
}
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
9e13efb7
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论