Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
84aad68a
提交
84aad68a
authored
11月 14, 2023
作者:
aiqingguo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
车辆信息上报优化
上级
7ef33231
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
65 行增加
和
22 行删除
+65
-22
IntegralRecordEnum.java
...om/clx/performance/enums/integral/IntegralRecordEnum.java
+7
-14
IntegralRecordDao.java
.../main/java/com/clx/performance/dao/IntegralRecordDao.java
+3
-0
IntegralRecordDaoImpl.java
...a/com/clx/performance/dao/impl/IntegralRecordDaoImpl.java
+5
-0
IntegraRecordMapper.java
.../java/com/clx/performance/mapper/IntegraRecordMapper.java
+4
-0
IntegralRecordService.java
...va/com/clx/performance/service/IntegralRecordService.java
+2
-0
IntegralRecordServiceImpl.java
...x/performance/service/impl/IntegralRecordServiceImpl.java
+32
-0
IntegralTruckServiceImpl.java
...lx/performance/service/impl/IntegralTruckServiceImpl.java
+6
-2
CollectTruckServiceImpl.java
...ormance/service/impl/collect/CollectTruckServiceImpl.java
+6
-6
没有找到文件。
performance-api/src/main/java/com/clx/performance/enums/integral/IntegralRecordEnum.java
浏览文件 @
84aad68a
...
@@ -31,7 +31,7 @@ public enum IntegralRecordEnum {
...
@@ -31,7 +31,7 @@ public enum IntegralRecordEnum {
ORDER_CHILD_PLATFORM_COMPENSATION
(
25
,
"平台补偿"
),
ORDER_CHILD_PLATFORM_COMPENSATION
(
25
,
"平台补偿"
),
REPORT_TRUCK_INFO
(
50
,
"提交基础信息"
),
//
REPORT_TRUCK_INFO(50, "提交基础信息"),
REPORT_REFUEL
(
51
,
"油表上报"
),
REPORT_REFUEL
(
51
,
"油表上报"
),
REPORT_TRAFFIC
(
52
,
"上报交通拥堵"
),
REPORT_TRAFFIC
(
52
,
"上报交通拥堵"
),
REPORT_SEND_ADDRESS_WAIT
(
53
,
"上报货源地需要排队"
),
REPORT_SEND_ADDRESS_WAIT
(
53
,
"上报货源地需要排队"
),
...
@@ -41,6 +41,12 @@ public enum IntegralRecordEnum {
...
@@ -41,6 +41,12 @@ public enum IntegralRecordEnum {
REPORT_QUALITY
(
57
,
"上报煤炭质量问题"
),
REPORT_QUALITY
(
57
,
"上报煤炭质量问题"
),
REPORT_ABNORMAL
(
58
,
"上报拉运异常问题"
),
REPORT_ABNORMAL
(
58
,
"上报拉运异常问题"
),
REPORT_SEND_ADDRESS_INFO
(
59
,
"上报货源地情况"
),
REPORT_SEND_ADDRESS_INFO
(
59
,
"上报货源地情况"
),
REPORT_TRUCK_INFO_OF_UNLOAD_TYPE
(
61
,
"提交基础信息"
),
REPORT_TRUCK_INFO_OF_AUTO_LOAN
(
62
,
"提交基础信息"
),
REPORT_TRUCK_INFO_OF_PARK_ADDRESS
(
63
,
"提交基础信息"
),
;
;
private
Integer
value
;
private
Integer
value
;
...
@@ -49,7 +55,6 @@ public enum IntegralRecordEnum {
...
@@ -49,7 +55,6 @@ public enum IntegralRecordEnum {
// 取消
// 取消
public
static
final
List
<
Integer
>
DRIVER_REPORT_lIST
=
Arrays
.
asList
(
public
static
final
List
<
Integer
>
DRIVER_REPORT_lIST
=
Arrays
.
asList
(
Type
.
REPORT_TRUCK_INFO
.
value
,
Type
.
REPORT_REFUEL
.
value
,
Type
.
REPORT_REFUEL
.
value
,
Type
.
REPORT_TRAFFIC
.
value
,
Type
.
REPORT_TRAFFIC
.
value
,
Type
.
REPORT_SEND_ADDRESS_WAIT
.
value
,
Type
.
REPORT_SEND_ADDRESS_WAIT
.
value
,
...
@@ -60,18 +65,6 @@ public enum IntegralRecordEnum {
...
@@ -60,18 +65,6 @@ public enum IntegralRecordEnum {
Type
.
REPORT_ABNORMAL
.
value
Type
.
REPORT_ABNORMAL
.
value
);
);
// 取消
public
static
final
List
<
Integer
>
PLATFORM_CANCEL_lIST
=
Arrays
.
asList
(
Type
.
REPORT_TRUCK_INFO
.
value
,
Type
.
REPORT_REFUEL
.
value
,
Type
.
REPORT_TRAFFIC
.
value
,
Type
.
REPORT_SEND_ADDRESS_WAIT
.
value
,
Type
.
REPORT_SEND_ADDRESS_NO_WAIT
.
value
,
Type
.
REPORT_RECEIVE_ADDRESS_WAIT
.
value
,
Type
.
REPORT_RECEIVE_ADDRESS_NO_WAIT
.
value
,
Type
.
REPORT_QUALITY
.
value
,
Type
.
REPORT_ABNORMAL
.
value
);
}
}
performance-web/src/main/java/com/clx/performance/dao/IntegralRecordDao.java
浏览文件 @
84aad68a
...
@@ -23,6 +23,9 @@ public interface IntegralRecordDao extends BaseDao<IntegraRecordMapper, Integral
...
@@ -23,6 +23,9 @@ public interface IntegralRecordDao extends BaseDao<IntegraRecordMapper, Integral
Integer
sumIntegral
(
@Param
(
"statisticsId"
)
Integer
statisticsId
);
Integer
sumIntegral
(
@Param
(
"statisticsId"
)
Integer
statisticsId
);
IntegralRecord
selectByStatisticsIdAndType
(
@Param
(
"statisticsId"
)
Integer
statisticsId
,
@Param
(
"type"
)
Integer
type
);
IntegralRecord
selectByStatisticsIdAndType
(
@Param
(
"statisticsId"
)
Integer
statisticsId
,
@Param
(
"type"
)
Integer
type
);
int
existByTruckNoAndType
(
@Param
(
"truckNo"
)
String
truckNo
,
@Param
(
"type"
)
Integer
type
);
Integer
sumByStatisticsIdAndTypes
(
@Param
(
"statisticsId"
)
Integer
statisticsId
,
@Param
(
"list"
)
List
<
Integer
>
typeList
);
Integer
sumByStatisticsIdAndTypes
(
@Param
(
"statisticsId"
)
Integer
statisticsId
,
@Param
(
"list"
)
List
<
Integer
>
typeList
);
Integer
sumByStatisticsIdAndTypeAndTime
(
@Param
(
"statisticsId"
)
Integer
statisticsId
,
Integer
sumByStatisticsIdAndTypeAndTime
(
@Param
(
"statisticsId"
)
Integer
statisticsId
,
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/IntegralRecordDaoImpl.java
浏览文件 @
84aad68a
...
@@ -45,6 +45,11 @@ public class IntegralRecordDaoImpl extends BaseDaoImpl<IntegraRecordMapper, Inte
...
@@ -45,6 +45,11 @@ public class IntegralRecordDaoImpl extends BaseDaoImpl<IntegraRecordMapper, Inte
);
);
}
}
@Override
public
int
existByTruckNoAndType
(
String
truckNo
,
Integer
type
)
{
return
baseMapper
.
existByTruckNoAndType
(
truckNo
,
type
);
}
@Override
@Override
public
Integer
sumByStatisticsIdAndTypes
(
Integer
statisticsId
,
List
<
Integer
>
typeList
)
{
public
Integer
sumByStatisticsIdAndTypes
(
Integer
statisticsId
,
List
<
Integer
>
typeList
)
{
return
baseMapper
.
sumByStatisticsIdAndTypes
(
statisticsId
,
typeList
);
return
baseMapper
.
sumByStatisticsIdAndTypes
(
statisticsId
,
typeList
);
...
...
performance-web/src/main/java/com/clx/performance/mapper/IntegraRecordMapper.java
浏览文件 @
84aad68a
...
@@ -48,4 +48,7 @@ public interface IntegraRecordMapper extends BaseMapper<IntegralRecord> {
...
@@ -48,4 +48,7 @@ public interface IntegraRecordMapper extends BaseMapper<IntegralRecord> {
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
);
@Param
(
"endTime"
)
String
endTime
);
@Select
(
"SELECT IFNULL((SELECT 1 FROM integral_record WHERE truck_no=#{truckNo} and type=#{type} LIMIT 1),0)"
)
int
existByTruckNoAndType
(
@Param
(
"truckNo"
)
String
truckNo
,
@Param
(
"type"
)
Integer
type
);
}
}
\ No newline at end of file
performance-web/src/main/java/com/clx/performance/service/IntegralRecordService.java
浏览文件 @
84aad68a
...
@@ -12,6 +12,8 @@ public interface IntegralRecordService {
...
@@ -12,6 +12,8 @@ public interface IntegralRecordService {
void
addDriverReportRecord
(
AppIntegralRuleVO
ruleInfo
,
String
truckNo
,
Integer
type
,
Integer
integral
,
String
remark
);
void
addDriverReportRecord
(
AppIntegralRuleVO
ruleInfo
,
String
truckNo
,
Integer
type
,
Integer
integral
,
String
remark
);
void
addDriverTruckReportRecord
(
AppIntegralRuleVO
ruleInfo
,
String
truckNo
,
Integer
type
,
Integer
integral
,
String
remark
);
void
addPlatformCompensationRecord
(
String
truckNo
);
void
addPlatformCompensationRecord
(
String
truckNo
);
IntegralRecord
save
(
Integer
statisticsId
,
LocalDateTime
statisticsDate
,
String
truckNo
,
Integer
type
,
Integer
integral
,
String
remark
);
IntegralRecord
save
(
Integer
statisticsId
,
LocalDateTime
statisticsDate
,
String
truckNo
,
Integer
type
,
Integer
integral
,
String
remark
);
...
...
performance-web/src/main/java/com/clx/performance/service/impl/IntegralRecordServiceImpl.java
浏览文件 @
84aad68a
...
@@ -104,6 +104,38 @@ public class IntegralRecordServiceImpl implements IntegralRecordService {
...
@@ -104,6 +104,38 @@ public class IntegralRecordServiceImpl implements IntegralRecordService {
}
}
@Override
public
void
addDriverTruckReportRecord
(
AppIntegralRuleVO
ruleInfo
,
String
truckNo
,
Integer
type
,
Integer
integral
,
String
remark
)
{
String
statisticsDate
=
LocalDateTimeUtils
.
getWeekStart
();
IntegralTruck
truck
=
integralTruckDao
.
getByTruckNo
(
truckNo
).
orNull
();
if
(
truck
==
null
)
{
return
;}
// 查找最新统计
IntegralStatistics
statistics
=
integralStatisticsDao
.
selectByTruckNoAndStatisticsDate
(
truckNo
,
statisticsDate
).
orNull
();
if
(
statistics
==
null
)
{
return
;}
int
exist
=
integralRecordDao
.
existByTruckNoAndType
(
truckNo
,
type
);
if
(
exist
>
0
){
log
.
info
(
"上报积分重复,本次无效, truckNo:{}, type:{}, integral:{}, remark:{}"
,
truckNo
,
type
,
integral
,
remark
);
return
;
}
// 更新积分
statistics
.
setIntegral
(
statistics
.
getIntegral
()+
integral
);
integralStatisticsDao
.
updateIntegral
(
statistics
);
truck
.
setIntegral
(
statistics
.
getIntegral
());
integralTruckDao
.
updateIntegral
(
truck
);
// 新增积分记录
IntegralRecord
record
=
save
(
statistics
.
getId
(),
statistics
.
getStatisticsDate
(),
statistics
.
getTruckNo
(),
type
,
integral
,
remark
);
// 发送mq (新增积分记录)
integralMqService
.
integralRecordAdd
(
record
.
getStatisticsId
(),
record
.
getTruckNo
(),
record
.
getType
(),
record
.
getIntegral
(),
record
.
getRemark
());
}
@Override
@Override
public
void
addPlatformCompensationRecord
(
String
truckNo
)
{
public
void
addPlatformCompensationRecord
(
String
truckNo
)
{
...
...
performance-web/src/main/java/com/clx/performance/service/impl/IntegralTruckServiceImpl.java
浏览文件 @
84aad68a
...
@@ -217,7 +217,7 @@ public class IntegralTruckServiceImpl implements IntegralTruckService {
...
@@ -217,7 +217,7 @@ public class IntegralTruckServiceImpl implements IntegralTruckService {
IntegralRecordEnum
.
Type
.
ORDER_CHILD_ARRIVE_SEND_ADDRESS_TIMEOUT_CANCEL
.
getValue
()
IntegralRecordEnum
.
Type
.
ORDER_CHILD_ARRIVE_SEND_ADDRESS_TIMEOUT_CANCEL
.
getValue
()
);
);
List
<
Integer
>
reportTypeList
=
Arrays
.
asList
(
List
<
Integer
>
reportTypeList
=
Arrays
.
asList
(
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_REFUEL
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_REFUEL
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_TRAFFIC
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_TRAFFIC
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_SEND_ADDRESS_WAIT
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_SEND_ADDRESS_WAIT
.
getValue
(),
...
@@ -226,7 +226,11 @@ public class IntegralTruckServiceImpl implements IntegralTruckService {
...
@@ -226,7 +226,11 @@ public class IntegralTruckServiceImpl implements IntegralTruckService {
IntegralRecordEnum
.
Type
.
REPORT_RECEIVE_ADDRESS_NO_WAIT
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_RECEIVE_ADDRESS_NO_WAIT
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_QUALITY
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_QUALITY
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_ABNORMAL
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_ABNORMAL
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_SEND_ADDRESS_INFO
.
getValue
()
IntegralRecordEnum
.
Type
.
REPORT_SEND_ADDRESS_INFO
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO_OF_UNLOAD_TYPE
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO_OF_AUTO_LOAN
.
getValue
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO_OF_PARK_ADDRESS
.
getValue
()
);
);
for
(
Map
.
Entry
<
String
,
List
<
IntegralRecord
>>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
IntegralRecord
>>
entry
:
map
.
entrySet
())
{
Integer
orderChildCompleteIntegral
=
0
;
Integer
orderChildCompleteIntegral
=
0
;
...
...
performance-web/src/main/java/com/clx/performance/service/impl/collect/CollectTruckServiceImpl.java
浏览文件 @
84aad68a
...
@@ -66,8 +66,8 @@ public class CollectTruckServiceImpl implements CollectTruckService {
...
@@ -66,8 +66,8 @@ public class CollectTruckServiceImpl implements CollectTruckService {
AppIntegralRuleVO
ruleInfo
=
integralRuleService
.
getRuleInfo
();
AppIntegralRuleVO
ruleInfo
=
integralRuleService
.
getRuleInfo
();
// 报存积分
// 报存积分
integralRecordService
.
addDriver
ReportRecord
(
ruleInfo
,
truck
.
getTruckNo
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
.
getValue
(),
integralRecordService
.
addDriver
TruckReportRecord
(
ruleInfo
,
truck
.
getTruckNo
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO_OF_UNLOAD_TYPE
.
getValue
(),
ruleInfo
.
getDriverReportRule
().
getIntegralTruck
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
.
getMsg
());
ruleInfo
.
getDriverReportRule
().
getIntegralTruck
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
_OF_UNLOAD_TYPE
.
getMsg
());
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -100,8 +100,8 @@ public class CollectTruckServiceImpl implements CollectTruckService {
...
@@ -100,8 +100,8 @@ public class CollectTruckServiceImpl implements CollectTruckService {
AppIntegralRuleVO
ruleInfo
=
integralRuleService
.
getRuleInfo
();
AppIntegralRuleVO
ruleInfo
=
integralRuleService
.
getRuleInfo
();
// 报存积分
// 报存积分
integralRecordService
.
addDriver
ReportRecord
(
ruleInfo
,
truck
.
getTruckNo
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
.
getValue
(),
integralRecordService
.
addDriver
TruckReportRecord
(
ruleInfo
,
truck
.
getTruckNo
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO_OF_AUTO_LOAN
.
getValue
(),
ruleInfo
.
getDriverReportRule
().
getIntegralTruck
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
.
getMsg
());
ruleInfo
.
getDriverReportRule
().
getIntegralTruck
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
_OF_AUTO_LOAN
.
getMsg
());
}
}
...
@@ -134,8 +134,8 @@ public class CollectTruckServiceImpl implements CollectTruckService {
...
@@ -134,8 +134,8 @@ public class CollectTruckServiceImpl implements CollectTruckService {
AppIntegralRuleVO
ruleInfo
=
integralRuleService
.
getRuleInfo
();
AppIntegralRuleVO
ruleInfo
=
integralRuleService
.
getRuleInfo
();
// 报存积分
// 报存积分
integralRecordService
.
addDriver
ReportRecord
(
ruleInfo
,
truck
.
getTruckNo
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
.
getValue
(),
integralRecordService
.
addDriver
TruckReportRecord
(
ruleInfo
,
truck
.
getTruckNo
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO_OF_PARK_ADDRESS
.
getValue
(),
ruleInfo
.
getDriverReportRule
().
getIntegralTruck
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
.
getMsg
());
ruleInfo
.
getDriverReportRule
().
getIntegralTruck
(),
IntegralRecordEnum
.
Type
.
REPORT_TRUCK_INFO
_OF_PARK_ADDRESS
.
getMsg
());
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论