Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
09b392e2
提交
09b392e2
authored
11月 21, 2023
作者:
liuhaiquan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/v7.0_small_version_fix_20231120' into…
Merge remote-tracking branch 'origin/v7.0_small_version_fix_20231120' into v7.0_small_version_fix_20231120
上级
4f509920
b078f811
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
211 行增加
和
124 行删除
+211
-124
LargeScreenController.java
.../clx/performance/controller/pc/LargeScreenController.java
+12
-3
LargeScreenService.java
.../java/com/clx/performance/service/LargeScreenService.java
+14
-0
OrderChildService.java
...n/java/com/clx/performance/service/OrderChildService.java
+0
-3
LargeScreenServiceImpl.java
.../clx/performance/service/impl/LargeScreenServiceImpl.java
+142
-0
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+0
-81
bootstrap.yml
performance-web/src/main/resources/bootstrap.yml
+36
-36
JobTest.java
...rmance-web/src/test/java/com/clx/performance/JobTest.java
+7
-1
没有找到文件。
performance-web/src/main/java/com/clx/performance/controller/pc/LargeScreenController.java
浏览文件 @
09b392e2
package
com
.
clx
.
performance
.
controller
.
pc
;
package
com
.
clx
.
performance
.
controller
.
pc
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.clx.performance.service.LargeScreenService
;
import
com.clx.performance.service.OrderChildService
;
import
com.clx.performance.service.OrderChildService
;
import
com.clx.user.feign.DriverFeign
;
import
com.clx.user.feign.DriverFeign
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -10,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -10,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.List
;
...
@@ -22,19 +24,25 @@ import java.util.List;
...
@@ -22,19 +24,25 @@ import java.util.List;
@Api
(
tags
=
"PC-大屏"
)
@Api
(
tags
=
"PC-大屏"
)
public
class
LargeScreenController
{
public
class
LargeScreenController
{
private
final
OrderChildService
orderChild
Service
;
private
final
LargeScreenService
largeScreen
Service
;
@ApiOperation
(
value
=
"空车列表"
,
notes
=
"<br>By:胡宇帆"
)
@ApiOperation
(
value
=
"空车列表"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/emptyCarList"
)
@GetMapping
(
"/emptyCarList"
)
public
String
emptyCarList
()
{
public
String
emptyCarList
()
{
return
JSONUtil
.
toJsonStr
(
orderChild
Service
.
emptyCarList
());
return
JSONUtil
.
toJsonStr
(
largeScreen
Service
.
emptyCarList
());
}
}
@ApiOperation
(
value
=
"重车列表"
,
notes
=
"<br>By:胡宇帆"
)
@ApiOperation
(
value
=
"重车列表"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/weightCarList"
)
@GetMapping
(
"/weightCarList"
)
public
String
weightCarList
()
{
public
String
weightCarList
()
{
return
JSONUtil
.
toJsonStr
(
orderChildService
.
weightCarList
());
return
JSONUtil
.
toJsonStr
(
largeScreenService
.
weightCarList
());
}
@ApiOperation
(
value
=
"收货地址"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/receiveAddress"
)
public
String
receiveAddress
(
@RequestParam
(
value
=
"addressId"
)
Integer
addressId
)
{
return
largeScreenService
.
receiveAddress
(
addressId
);
}
}
}
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/service/LargeScreenService.java
0 → 100644
浏览文件 @
09b392e2
package
com
.
clx
.
performance
.
service
;
import
cn.hutool.json.JSONObject
;
import
java.util.List
;
public
interface
LargeScreenService
{
List
<
JSONObject
>
weightCarList
();
List
<
JSONObject
>
emptyCarList
();
String
receiveAddress
(
Integer
addressId
);
}
performance-web/src/main/java/com/clx/performance/service/OrderChildService.java
浏览文件 @
09b392e2
...
@@ -81,7 +81,4 @@ public interface OrderChildService {
...
@@ -81,7 +81,4 @@ public interface OrderChildService {
DriverCancelOrderChildInfo
driverCancelOrderChildInfo
(
String
orderChildNo
);
DriverCancelOrderChildInfo
driverCancelOrderChildInfo
(
String
orderChildNo
);
List
<
JSONObject
>
weightCarList
();
List
<
JSONObject
>
emptyCarList
();
}
}
performance-web/src/main/java/com/clx/performance/service/impl/LargeScreenServiceImpl.java
0 → 100644
浏览文件 @
09b392e2
package
com
.
clx
.
performance
.
service
.
impl
;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONObject
;
import
com.clx.order.feign.AddressFeign
;
import
com.clx.order.vo.feign.FeignAddressVO
;
import
com.clx.order.vo.feign.SystemAddressVO
;
import
com.clx.performance.dao.OrderChildDao
;
import
com.clx.performance.dto.zjxl.TruckTraceDTO
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.service.LargeScreenService
;
import
com.clx.performance.utils.zjxl.ZjxlGpsService
;
import
com.clx.user.feign.DriverFeign
;
import
com.msl.common.base.Optional
;
import
com.msl.common.enums.ResultEnum
;
import
com.msl.common.result.Result
;
import
com.msl.common.utils.DateUtils
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDateTime
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Service
@Slf4j
@AllArgsConstructor
public
class
LargeScreenServiceImpl
implements
LargeScreenService
{
private
final
ZjxlGpsService
zjxlGpsService
;
private
final
DriverFeign
driverFeign
;
private
final
AddressFeign
addressFeign
;
private
final
OrderChildDao
orderChildDao
;
@Override
public
List
<
JSONObject
>
emptyCarList
()
{
List
<
String
>
data
=
driverFeign
.
driverTruckList
().
getData
();
String
now
=
DateUtils
.
formatDateTime
(
LocalDateTime
.
now
(),
"yyyy-MM-dd HH:mm:ss"
).
get
();
List
<
OrderChild
>
orderChildList
=
orderChildDao
.
selectListWithEmptyCarList
();
if
(
CollectionUtils
.
isEmpty
(
orderChildList
))
{
return
null
;
}
List
<
String
>
list
=
orderChildList
.
stream
().
map
(
OrderChild:
:
getTruckNo
).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
result
=
new
LinkedList
<>();
int
index
=
0
;
for
(
String
truckNo
:
data
)
{
if
(
list
.
contains
(
truckNo
))
{
continue
;
}
List
<
TruckTraceDTO
>
truckTrace
=
zjxlGpsService
.
getTruckTrace
(
truckNo
,
now
,
now
);
if
(
CollectionUtils
.
isNotEmpty
(
truckTrace
))
{
JSONObject
jsonObject
=
new
JSONObject
();
BigDecimal
[]
location
=
truckTrace
.
get
(
truckTrace
.
size
()
-
1
).
getLocation
();
BigDecimal
longitude
=
location
[
0
].
setScale
(
4
,
BigDecimal
.
ROUND_DOWN
);
BigDecimal
latitude
=
location
[
1
].
setScale
(
4
,
BigDecimal
.
ROUND_DOWN
);
jsonObject
.
set
(
"id"
,
++
index
);
jsonObject
.
set
(
"lng"
,
longitude
);
jsonObject
.
set
(
"lat"
,
latitude
);
jsonObject
.
set
(
"info"
,
""
);
jsonObject
.
set
(
"value"
,
""
);
jsonObject
.
set
(
"iconField"
,
"ok"
);
result
.
add
(
jsonObject
);
}
}
return
result
;
}
@Override
public
List
<
JSONObject
>
weightCarList
()
{
List
<
String
>
data
=
driverFeign
.
driverTruckList
().
getData
();
String
now
=
DateUtils
.
formatDateTime
(
LocalDateTime
.
now
(),
"yyyy-MM-dd HH:mm:ss"
).
get
();
List
<
OrderChild
>
orderChildList
=
orderChildDao
.
selectListWithEmptyCarList
();
if
(
CollectionUtils
.
isEmpty
(
orderChildList
))
{
return
null
;
}
List
<
String
>
list
=
orderChildList
.
stream
().
map
(
OrderChild:
:
getTruckNo
).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
result
=
new
LinkedList
<>();
int
index
=
0
;
for
(
String
truckNo
:
data
)
{
if
(!
list
.
contains
(
truckNo
))
{
continue
;
}
List
<
TruckTraceDTO
>
truckTrace
=
zjxlGpsService
.
getTruckTrace
(
truckNo
,
now
,
now
);
if
(
CollectionUtils
.
isNotEmpty
(
truckTrace
))
{
JSONObject
jsonObject
=
new
JSONObject
();
BigDecimal
[]
location
=
truckTrace
.
get
(
truckTrace
.
size
()
-
1
).
getLocation
();
BigDecimal
longitude
=
location
[
0
].
setScale
(
4
,
BigDecimal
.
ROUND_DOWN
);
BigDecimal
latitude
=
location
[
1
].
setScale
(
4
,
BigDecimal
.
ROUND_DOWN
);
jsonObject
.
set
(
"id"
,
++
index
);
jsonObject
.
set
(
"lng"
,
longitude
);
jsonObject
.
set
(
"lat"
,
latitude
);
jsonObject
.
set
(
"info"
,
""
);
jsonObject
.
set
(
"value"
,
""
);
jsonObject
.
set
(
"iconField"
,
"ok"
);
result
.
add
(
jsonObject
);
}
}
return
result
;
}
@Override
public
String
receiveAddress
(
Integer
addressId
)
{
SystemAddressVO
vo
=
Optional
.
of
(
addressFeign
.
getSystemReceiveAddress
(
addressId
)).
filter
(
Result:
:
succeed
)
.
map
(
Result:
:
getData
).
orElseThrow
(
PerformanceResultEnum
.
HTTP_ERROR
);
JSONArray
jsonArray
=
new
JSONArray
();
String
name
=
vo
.
getAddressShorter
();
BigDecimal
longitude
=
vo
.
getLongitude
().
setScale
(
4
,
RoundingMode
.
DOWN
);
BigDecimal
latitude
=
vo
.
getLatitude
().
setScale
(
4
,
RoundingMode
.
DOWN
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
set
(
"id"
,
addressId
);
jsonObject
.
set
(
"lng"
,
longitude
);
jsonObject
.
set
(
"lat"
,
latitude
);
jsonObject
.
set
(
"name"
,
name
);
jsonObject
.
set
(
"value"
,
""
);
jsonObject
.
set
(
"iconField"
,
"ok"
);
jsonArray
.
add
(
jsonObject
);
return
jsonArray
.
toString
();
}
}
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
09b392e2
...
@@ -155,11 +155,6 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -155,11 +155,6 @@ public class OrderChildServiceImpl implements OrderChildService {
@Autowired
@Autowired
private
FeignPaymentService
feignPaymentService
;
private
FeignPaymentService
feignPaymentService
;
@Autowired
private
ZjxlGpsService
zjxlGpsService
;
@Autowired
private
DriverFeign
driverFeign
;
@Override
@Override
public
SaveOrderChildVO
saveOrderChild
(
OrderChildSaveParam
param
)
{
public
SaveOrderChildVO
saveOrderChild
(
OrderChildSaveParam
param
)
{
...
@@ -2109,80 +2104,4 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -2109,80 +2104,4 @@ public class OrderChildServiceImpl implements OrderChildService {
}
}
@Override
public
List
<
JSONObject
>
emptyCarList
()
{
List
<
String
>
data
=
driverFeign
.
driverTruckList
().
getData
();
String
now
=
DateUtils
.
formatDateTime
(
LocalDateTime
.
now
(),
"yyyy-MM-dd HH:mm:ss"
).
get
();
List
<
OrderChild
>
orderChildList
=
orderChildDao
.
selectListWithEmptyCarList
();
if
(
CollectionUtils
.
isEmpty
(
orderChildList
))
{
return
null
;
}
List
<
String
>
list
=
orderChildList
.
stream
().
map
(
OrderChild:
:
getTruckNo
).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
result
=
new
LinkedList
<>();
int
index
=
0
;
for
(
String
truckNo
:
data
)
{
if
(
list
.
contains
(
truckNo
))
{
continue
;
}
List
<
TruckTraceDTO
>
truckTrace
=
zjxlGpsService
.
getTruckTrace
(
truckNo
,
now
,
now
);
if
(
CollectionUtils
.
isNotEmpty
(
truckTrace
)){
JSONObject
jsonObject
=
new
JSONObject
();
BigDecimal
[]
location
=
truckTrace
.
get
(
truckTrace
.
size
()
-
1
).
getLocation
();
BigDecimal
longitude
=
location
[
0
].
setScale
(
4
,
BigDecimal
.
ROUND_DOWN
);
BigDecimal
latitude
=
location
[
1
].
setScale
(
4
,
BigDecimal
.
ROUND_DOWN
);
jsonObject
.
set
(
"id"
,
++
index
);
jsonObject
.
set
(
"lng"
,
longitude
);
jsonObject
.
set
(
"lat"
,
latitude
);
jsonObject
.
set
(
"info"
,
""
);
jsonObject
.
set
(
"value"
,
""
);
jsonObject
.
set
(
"iconField"
,
"ok"
);
result
.
add
(
jsonObject
);
}
}
return
result
;
}
@Override
public
List
<
JSONObject
>
weightCarList
()
{
List
<
String
>
data
=
driverFeign
.
driverTruckList
().
getData
();
String
now
=
DateUtils
.
formatDateTime
(
LocalDateTime
.
now
(),
"yyyy-MM-dd HH:mm:ss"
).
get
();
List
<
OrderChild
>
orderChildList
=
orderChildDao
.
selectListWithEmptyCarList
();
if
(
CollectionUtils
.
isEmpty
(
orderChildList
))
{
return
null
;
}
List
<
String
>
list
=
orderChildList
.
stream
().
map
(
OrderChild:
:
getTruckNo
).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
result
=
new
LinkedList
<>();
int
index
=
0
;
for
(
String
truckNo
:
data
)
{
if
(!
list
.
contains
(
truckNo
))
{
continue
;
}
List
<
TruckTraceDTO
>
truckTrace
=
zjxlGpsService
.
getTruckTrace
(
truckNo
,
now
,
now
);
if
(
CollectionUtils
.
isNotEmpty
(
truckTrace
)){
JSONObject
jsonObject
=
new
JSONObject
();
BigDecimal
[]
location
=
truckTrace
.
get
(
truckTrace
.
size
()
-
1
).
getLocation
();
BigDecimal
longitude
=
location
[
0
].
setScale
(
4
,
BigDecimal
.
ROUND_DOWN
);
BigDecimal
latitude
=
location
[
1
].
setScale
(
4
,
BigDecimal
.
ROUND_DOWN
);
jsonObject
.
set
(
"id"
,
++
index
);
jsonObject
.
set
(
"lng"
,
longitude
);
jsonObject
.
set
(
"lat"
,
latitude
);
jsonObject
.
set
(
"info"
,
""
);
jsonObject
.
set
(
"value"
,
""
);
jsonObject
.
set
(
"iconField"
,
"ok"
);
result
.
add
(
jsonObject
);
}
}
return
result
;
}
}
}
performance-web/src/main/resources/bootstrap.yml
浏览文件 @
09b392e2
#server:
server
:
# port: 80
port
:
80
# servlet:
servlet
:
# context-path: /${spring.application.name}
context-path
:
/${spring.application.name}
#
#spring:
spring
:
# profiles:
profiles
:
# active: dev
active
:
dev
# application:
application
:
# name: clx-performance
name
:
clx-performance
# main:
main
:
# allow-bean-definition-overriding: true
allow-bean-definition-overriding
:
true
#
# cloud:
cloud
:
# nacos:
nacos
:
# discovery:
discovery
:
# server-addr: nacos.devclx.cn:8848
server-addr
:
nacos.devclx.cn:8848
# username: nacos
username
:
nacos
# password: nacos
password
:
nacos
# register-enabled: true
register-enabled
:
true
# namespace: new-clx-dev
namespace
:
new-clx-dev
#
# # namespace: ${spring.profiles.active}
# namespace: ${spring.profiles.active}
# config:
config
:
# file-extension: yml
file-extension
:
yml
# server-addr: nacos.devclx.cn:8848
server-addr
:
nacos.devclx.cn:8848
# username: nacos
username
:
nacos
# password: nacos
password
:
nacos
# shared-configs:
shared-configs
:
# # - common-redis-${spring.profiles.active}.yml
# - common-redis-${spring.profiles.active}.yml
# # - common-mq-${spring.profiles.active}.yml
# - common-mq-${spring.profiles.active}.yml
# # - common-druid-${spring.profiles.active}.yml
# - common-druid-${spring.profiles.active}.yml
# # - common-satoken-${spring.profiles.active}.yml
# - common-satoken-${spring.profiles.active}.yml
# # - common-esign-${spring.profiles.active}.yml
# - common-esign-${spring.profiles.active}.yml
# namespace: new-clx-dev
namespace
:
new-clx-dev
\ No newline at end of file
\ No newline at end of file
performance-web/src/test/java/com/clx/performance/JobTest.java
浏览文件 @
09b392e2
package
com
.
clx
.
performance
;
package
com
.
clx
.
performance
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.clx.order.feign.OrderFeign
;
import
com.clx.order.feign.OrderFeign
;
import
com.clx.order.vo.feign.OrderOwnTruckVo
;
import
com.clx.order.vo.feign.OrderOwnTruckVo
;
...
@@ -8,6 +9,7 @@ import com.clx.performance.component.OrderGoodsStatusLazyComponent;
...
@@ -8,6 +9,7 @@ import com.clx.performance.component.OrderGoodsStatusLazyComponent;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.dao.OrderGoodsDao
;
import
com.clx.performance.dao.OrderGoodsDao
;
import
com.clx.performance.param.mq.OrderCancelMqParam
;
import
com.clx.performance.param.mq.OrderCancelMqParam
;
import
com.clx.performance.service.LargeScreenService
;
import
com.clx.performance.service.OrderCancelService
;
import
com.clx.performance.service.OrderCancelService
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
...
@@ -49,9 +51,13 @@ public class JobTest {
...
@@ -49,9 +51,13 @@ public class JobTest {
@Autowired
@Autowired
private
OrderCancelService
orderCancelService
;
private
OrderCancelService
orderCancelService
;
@Autowired
private
LargeScreenService
largeScreenService
;
@Test
@Test
public
void
test1
()
{
public
void
test1
()
{
JSONObject
jsonObject
=
largeScreenService
.
receiveAddress
(
27
);
System
.
out
.
println
(
jsonObject
);
// OrderCancelMqParam mqParam = new OrderCancelMqParam();
// OrderCancelMqParam mqParam = new OrderCancelMqParam();
// mqParam.setType("2");
// mqParam.setType("2");
// mqParam.setOrderNo("123");
// mqParam.setOrderNo("123");
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论