Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
574f762a
提交
574f762a
authored
10月 12, 2023
作者:
aiqingguo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
承运结算单建表
上级
b0dd1f3d
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
68 行增加
和
0 行删除
+68
-0
IntegralTruckController.java
...lx/performance/controller/pc/IntegralTruckController.java
+9
-0
IntegralStatisticsDao.java
...n/java/com/clx/performance/dao/IntegralStatisticsDao.java
+3
-0
IntegralTruckDao.java
...c/main/java/com/clx/performance/dao/IntegralTruckDao.java
+3
-0
IntegralStatisticsDaoImpl.java
...m/clx/performance/dao/impl/IntegralStatisticsDaoImpl.java
+8
-0
IntegralTruckDaoImpl.java
...va/com/clx/performance/dao/impl/IntegralTruckDaoImpl.java
+7
-0
IntegralTruckMapper.java
.../java/com/clx/performance/mapper/IntegralTruckMapper.java
+11
-0
IntegralTruckService.java
...ava/com/clx/performance/service/IntegralTruckService.java
+3
-0
IntegralTruckServiceImpl.java
...lx/performance/service/impl/IntegralTruckServiceImpl.java
+24
-0
没有找到文件。
performance-web/src/main/java/com/clx/performance/controller/pc/IntegralTruckController.java
浏览文件 @
574f762a
...
@@ -2,6 +2,7 @@ package com.clx.performance.controller.pc;
...
@@ -2,6 +2,7 @@ package com.clx.performance.controller.pc;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.clx.performance.param.pc.IntegralTruckAddParam
;
import
com.clx.performance.param.pc.IntegralTruckAddParam
;
import
com.clx.performance.param.pc.PageIntegralTruckRankParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.service.IntegralTruckService
;
import
com.clx.performance.service.IntegralTruckService
;
import
com.clx.performance.vo.pc.IntegralTruckVO
;
import
com.clx.performance.vo.pc.IntegralTruckVO
;
...
@@ -67,4 +68,12 @@ public class IntegralTruckController {
...
@@ -67,4 +68,12 @@ public class IntegralTruckController {
return
Result
.
ok
(
integralTruckService
.
getTruckCount
(
truckEchelon
));
return
Result
.
ok
(
integralTruckService
.
getTruckCount
(
truckEchelon
));
}
}
@ApiOperation
(
value
=
"获取车辆积分排名"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"pageTruckRank"
,
method
=
RequestMethod
.
POST
)
public
Result
<
PageData
<
IntegralTruckVO
>>
pageTruckRank
(
@RequestBody
@Validated
PageIntegralTruckRankParam
param
)
{
IPage
<
IntegralTruckVO
>
page
=
integralTruckService
.
pageTruckRank
(
param
);
return
Result
.
page
(
page
.
getRecords
(),
page
.
getTotal
(),
page
.
getPages
());
}
}
}
performance-web/src/main/java/com/clx/performance/dao/IntegralStatisticsDao.java
浏览文件 @
574f762a
...
@@ -31,4 +31,7 @@ public interface IntegralStatisticsDao extends BaseDao<IntegralStatisticsMapper,
...
@@ -31,4 +31,7 @@ public interface IntegralStatisticsDao extends BaseDao<IntegralStatisticsMapper,
List
<
IntegralStatistics
>
selectByStatisticsDate
(
@Param
(
"statisticsDate"
)
String
statisticsDate
);
List
<
IntegralStatistics
>
selectByStatisticsDate
(
@Param
(
"statisticsDate"
)
String
statisticsDate
);
List
<
IntegralStatistics
>
selectListByStatisticsDateAndTruckNoList
(
@Param
(
"statisticsDate"
)
String
statisticsDate
,
@Param
(
"list"
)
List
<
String
>
truckNoList
);
}
}
performance-web/src/main/java/com/clx/performance/dao/IntegralTruckDao.java
浏览文件 @
574f762a
...
@@ -3,6 +3,7 @@ package com.clx.performance.dao;
...
@@ -3,6 +3,7 @@ package com.clx.performance.dao;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.clx.performance.mapper.IntegralTruckMapper
;
import
com.clx.performance.mapper.IntegralTruckMapper
;
import
com.clx.performance.model.IntegralTruck
;
import
com.clx.performance.model.IntegralTruck
;
import
com.clx.performance.param.pc.PageIntegralTruckRankParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.vo.pc.IntegralTruckVO
;
import
com.clx.performance.vo.pc.IntegralTruckVO
;
import
com.msl.common.base.Optional
;
import
com.msl.common.base.Optional
;
...
@@ -32,4 +33,6 @@ public interface IntegralTruckDao extends BaseDao<IntegralTruckMapper, IntegralT
...
@@ -32,4 +33,6 @@ public interface IntegralTruckDao extends BaseDao<IntegralTruckMapper, IntegralT
List
<
IntegralTruck
>
listByTruckNoList
(
@Param
(
"truckNoList"
)
List
<
String
>
truckNoList
);
List
<
IntegralTruck
>
listByTruckNoList
(
@Param
(
"truckNoList"
)
List
<
String
>
truckNoList
);
IPage
<
IntegralTruckVO
>
pageTruckRank
(
PageIntegralTruckRankParam
param
);
}
}
performance-web/src/main/java/com/clx/performance/dao/impl/IntegralStatisticsDaoImpl.java
浏览文件 @
574f762a
...
@@ -67,4 +67,12 @@ public class IntegralStatisticsDaoImpl extends BaseDaoImpl<IntegralStatisticsMap
...
@@ -67,4 +67,12 @@ public class IntegralStatisticsDaoImpl extends BaseDaoImpl<IntegralStatisticsMap
.
eq
(
IntegralStatistics:
:
getStatisticsDate
,
statisticsDate
)
.
eq
(
IntegralStatistics:
:
getStatisticsDate
,
statisticsDate
)
.
orderByDesc
(
IntegralStatistics:
:
getIntegral
));
.
orderByDesc
(
IntegralStatistics:
:
getIntegral
));
}
}
@Override
public
List
<
IntegralStatistics
>
selectListByStatisticsDateAndTruckNoList
(
String
statisticsDate
,
List
<
String
>
truckNoList
)
{
return
list
(
lQrWrapper
()
.
eq
(
IntegralStatistics:
:
getStatisticsDate
,
statisticsDate
)
.
in
(
IntegralStatistics:
:
getTruckNo
,
truckNoList
));
}
}
}
performance-web/src/main/java/com/clx/performance/dao/impl/IntegralTruckDaoImpl.java
浏览文件 @
574f762a
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.clx.performance.dao.IntegralTruckDao
;
import
com.clx.performance.dao.IntegralTruckDao
;
import
com.clx.performance.mapper.IntegralTruckMapper
;
import
com.clx.performance.mapper.IntegralTruckMapper
;
import
com.clx.performance.model.IntegralTruck
;
import
com.clx.performance.model.IntegralTruck
;
import
com.clx.performance.param.pc.PageIntegralTruckRankParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.vo.pc.IntegralTruckVO
;
import
com.clx.performance.vo.pc.IntegralTruckVO
;
import
com.msl.common.base.Optional
;
import
com.msl.common.base.Optional
;
...
@@ -70,4 +71,10 @@ public class IntegralTruckDaoImpl extends BaseDaoImpl<IntegralTruckMapper, Integ
...
@@ -70,4 +71,10 @@ public class IntegralTruckDaoImpl extends BaseDaoImpl<IntegralTruckMapper, Integ
return
list
(
lQrWrapper
().
in
(
IntegralTruck:
:
getTruckNo
,
truckNoList
));
return
list
(
lQrWrapper
().
in
(
IntegralTruck:
:
getTruckNo
,
truckNoList
));
}
}
@Override
public
IPage
<
IntegralTruckVO
>
pageTruckRank
(
PageIntegralTruckRankParam
param
)
{
baseMapper
.
pageTruckRank
(
Page
.
of
(
param
.
getPage
(),
param
.
getPageSize
()));
return
null
;
}
}
}
performance-web/src/main/java/com/clx/performance/mapper/IntegralTruckMapper.java
浏览文件 @
574f762a
...
@@ -34,4 +34,14 @@ public interface IntegralTruckMapper extends BaseMapper<IntegralTruck> {
...
@@ -34,4 +34,14 @@ public interface IntegralTruckMapper extends BaseMapper<IntegralTruck> {
@SelectProvider
(
type
=
IntegralTruckSqlProvider
.
class
,
method
=
"pageByParam"
)
@SelectProvider
(
type
=
IntegralTruckSqlProvider
.
class
,
method
=
"pageByParam"
)
IPage
<
IntegralTruckVO
>
pageByParam
(
@Param
(
"page"
)
Page
<
IntegralTruckVO
>
page
,
@Param
(
"param"
)
PageIntegralTruckParam
param
);
IPage
<
IntegralTruckVO
>
pageByParam
(
@Param
(
"page"
)
Page
<
IntegralTruckVO
>
page
,
@Param
(
"param"
)
PageIntegralTruckParam
param
);
@Select
(
"select id, truck_no, rank, "
+
" id, truck_no, "
+
" driver_name, driver_mobile, "
+
" echelon, integral, rank, "
+
" date_format(create_time, '%Y-%m-%d %H:%i:%s') as createTime, "
+
" date_format(modified_time, '%Y-%m-%d %H:%i:%s') as modifiedTime "
+
" from integral_truck "
+
" order by integral desc, create_time desc "
)
IPage
<
IntegralTruckVO
>
pageTruckRank
(
@Param
(
"page"
)
Page
<
IntegralTruckVO
>
page
);
}
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/service/IntegralTruckService.java
浏览文件 @
574f762a
...
@@ -2,6 +2,7 @@ package com.clx.performance.service;
...
@@ -2,6 +2,7 @@ package com.clx.performance.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.clx.performance.param.pc.IntegralTruckAddParam
;
import
com.clx.performance.param.pc.IntegralTruckAddParam
;
import
com.clx.performance.param.pc.PageIntegralTruckRankParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.vo.pc.IntegralTruckVO
;
import
com.clx.performance.vo.pc.IntegralTruckVO
;
...
@@ -14,4 +15,6 @@ public interface IntegralTruckService {
...
@@ -14,4 +15,6 @@ public interface IntegralTruckService {
IntegralTruckVO
getTruckDriverInfo
(
String
truckNo
);
IntegralTruckVO
getTruckDriverInfo
(
String
truckNo
);
Integer
getTruckCount
(
Integer
truckEchelon
);
Integer
getTruckCount
(
Integer
truckEchelon
);
IPage
<
IntegralTruckVO
>
pageTruckRank
(
PageIntegralTruckRankParam
param
);
}
}
performance-web/src/main/java/com/clx/performance/service/impl/IntegralTruckServiceImpl.java
浏览文件 @
574f762a
...
@@ -10,6 +10,7 @@ import com.clx.performance.model.IntegralStatistics;
...
@@ -10,6 +10,7 @@ import com.clx.performance.model.IntegralStatistics;
import
com.clx.performance.model.IntegralTruck
;
import
com.clx.performance.model.IntegralTruck
;
import
com.clx.performance.param.pc.IntegralTruckAddParam
;
import
com.clx.performance.param.pc.IntegralTruckAddParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.param.pc.PageIntegralTruckParam
;
import
com.clx.performance.param.pc.PageIntegralTruckRankParam
;
import
com.clx.performance.service.IntegralMqService
;
import
com.clx.performance.service.IntegralMqService
;
import
com.clx.performance.service.IntegralRecordService
;
import
com.clx.performance.service.IntegralRecordService
;
import
com.clx.performance.service.IntegralStatisticsService
;
import
com.clx.performance.service.IntegralStatisticsService
;
...
@@ -23,6 +24,10 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -23,6 +24,10 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Slf4j
@Slf4j
@Service
@Service
@AllArgsConstructor
@AllArgsConstructor
...
@@ -114,4 +119,23 @@ public class IntegralTruckServiceImpl implements IntegralTruckService {
...
@@ -114,4 +119,23 @@ public class IntegralTruckServiceImpl implements IntegralTruckService {
return
count
;
return
count
;
}
}
@Override
public
IPage
<
IntegralTruckVO
>
pageTruckRank
(
PageIntegralTruckRankParam
param
)
{
IPage
<
IntegralTruckVO
>
page
=
integralTruckDao
.
pageTruckRank
(
param
);
List
<
String
>
truckNoList
=
page
.
getRecords
().
stream
().
map
(
item
->
item
.
getTruckNo
()).
collect
(
Collectors
.
toList
());
if
(!
truckNoList
.
isEmpty
())
{
List
<
IntegralStatistics
>
statisticsList
=
integralStatisticsDao
.
selectListByStatisticsDateAndTruckNoList
(
LocalDateTimeUtils
.
getWeekStart
(),
truckNoList
);
Map
<
String
,
Integer
>
rankMap
=
statisticsList
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getTruckNo
(),
item
->
item
.
getRank
()));
for
(
IntegralTruckVO
item
:
page
.
getRecords
())
{
item
.
setRank
(
rankMap
.
get
(
item
.
getTruckNo
()));
}
}
return
page
;
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论