Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
5b5ae1fa
提交
5b5ae1fa
authored
10月 23, 2024
作者:
刘海泉
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/v30.2_break_contract_20241021' into dev_jdk17
上级
b5d05bb4
bad0cb89
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
450 行增加
和
36 行删除
+450
-36
OrderChildExceptionReportController.java
...mance/controller/OrderChildExceptionReportController.java
+0
-33
OrderChildExceptionReportController.java
...ce/controller/pc/OrderChildExceptionReportController.java
+79
-0
OrderChildExceptionReportDao.java
...com/clx/performance/dao/OrderChildExceptionReportDao.java
+4
-0
OrderChildExceptionReportDaoImpl.java
...erformance/dao/impl/OrderChildExceptionReportDaoImpl.java
+19
-0
OrderChildExceptionReport.java
.../com/clx/performance/model/OrderChildExceptionReport.java
+5
-1
OrderChildExceptionReportService.java
...performance/service/OrderChildExceptionReportService.java
+13
-0
OrderChildExceptionReportServiceImpl.java
...ce/service/impl/OrderChildExceptionReportServiceImpl.java
+108
-2
OrderChildExceptionReportStruct.java
...x/performance/struct/OrderChildExceptionReportStruct.java
+7
-0
PageExceptionReportParam.java
...om/clx/performance/param/pc/PageExceptionReportParam.java
+46
-0
TransferDriverBreakContractParam.java
...erformance/param/pc/TransferDriverBreakContractParam.java
+29
-0
OrderChildExceptionReportVO.java
...om/clx/performance/vo/pc/OrderChildExceptionReportVO.java
+140
-0
没有找到文件。
clx-performance-web/src/main/java/com/clx/performance/controller/OrderChildExceptionReportController.java
deleted
100644 → 0
浏览文件 @
b5d05bb4
package
com
.
clx
.
performance
.
controller
;
import
com.clx.performance.param.pc.DealExceptionReportParam
;
import
com.clx.performance.service.OrderChildExceptionReportService
;
import
com.msl.common.result.Result
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Slf4j
@RestController
@RequestMapping
(
value
=
"/pc/carrier/exceptionReport"
)
@Validated
@Tag
(
name
=
"承运端-异常上报"
)
@AllArgsConstructor
public
class
OrderChildExceptionReportController
{
private
final
OrderChildExceptionReportService
orderChildExceptionReportService
;
@Deprecated
@Operation
(
summary
=
"异常上报处理"
,
description
=
"<br>By:刘海泉"
)
public
Result
<?>
updateDealExceptionReport
(
@RequestBody
@Validated
DealExceptionReportParam
param
)
{
orderChildExceptionReportService
.
updateDealExceptionReport
(
param
);
return
Result
.
ok
();
}
}
clx-performance-web/src/main/java/com/clx/performance/controller/pc/OrderChildExceptionReportController.java
0 → 100644
浏览文件 @
5b5ae1fa
package
com
.
clx
.
performance
.
controller
.
pc
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.performance.param.pc.DealExceptionReportParam
;
import
com.clx.performance.param.pc.PageExceptionReportParam
;
import
com.clx.performance.param.pc.TransferDriverBreakContractParam
;
import
com.clx.performance.service.OrderChildExceptionReportService
;
import
com.clx.performance.vo.pc.OrderChildExceptionReportVO
;
import
com.msl.common.base.PageData
;
import
com.msl.common.convertor.aspect.UnitCovert
;
import
com.msl.common.result.Result
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
jakarta.servlet.http.HttpServletResponse
;
import
jakarta.validation.constraints.NotNull
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.io.IOException
;
@Slf4j
@RestController
@RequestMapping
(
value
=
"/pc/carrier/exceptionReport"
)
@Validated
@Tag
(
name
=
"承运端-异常上报"
)
@AllArgsConstructor
public
class
OrderChildExceptionReportController
{
private
final
OrderChildExceptionReportService
orderChildExceptionReportService
;
@Operation
(
summary
=
"异常上报处理"
,
description
=
"<br>By:刘海泉"
)
@PostMapping
(
value
=
"updateDealExceptionReport"
)
public
Result
<
Object
>
updateDealExceptionReport
(
@RequestBody
@Validated
DealExceptionReportParam
param
)
{
orderChildExceptionReportService
.
updateDealExceptionReport
(
param
);
return
Result
.
ok
();
}
@Operation
(
summary
=
"异常上报分页列表"
,
description
=
"<br>By:刘海泉"
)
@PostMapping
(
value
=
"pageExceptionReport"
)
@UnitCovert
(
param
=
false
)
public
Result
<
PageData
<
OrderChildExceptionReportVO
>>
pageExceptionReport
(
@RequestBody
@Validated
PageExceptionReportParam
param
)
{
Page
<
OrderChildExceptionReportVO
>
page
=
orderChildExceptionReportService
.
pageExceptionReport
(
param
);
return
Result
.
page
(
page
.
getRecords
(),
page
.
getTotal
(),
page
.
getPages
());
}
@Operation
(
summary
=
"导出异常上报分页列表"
,
description
=
"<br>By:刘海泉"
)
@PostMapping
(
value
=
"exportExceptionReport"
)
public
Result
<
Object
>
exportExceptionReport
(
@RequestBody
@Validated
PageExceptionReportParam
param
,
HttpServletResponse
response
)
throws
IOException
{
SXSSFWorkbook
workbook
=
orderChildExceptionReportService
.
exportExceptionReport
(
param
);
response
.
setHeader
(
HttpHeaders
.
CONTENT_TYPE
,
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
workbook
.
write
(
response
.
getOutputStream
());
return
Result
.
ok
();
}
@Operation
(
summary
=
"异常上报详情接口"
,
description
=
"<br>By:刘海泉"
)
@PostMapping
(
value
=
"getExceptionReport"
)
public
Result
<
OrderChildExceptionReportVO
>
getExceptionReport
(
@RequestParam
(
"id"
)
@NotNull
(
message
=
"id不能为空"
)
Integer
id
)
{
return
Result
.
ok
(
orderChildExceptionReportService
.
getExceptionReport
(
id
));
}
@Operation
(
summary
=
"转司机违约"
,
description
=
"<br>By:刘海泉"
)
@PostMapping
(
value
=
"transferDriverBreakContract"
)
public
Result
<
Object
>
transferDriverBreakContract
(
@RequestBody
@Validated
TransferDriverBreakContractParam
param
)
{
orderChildExceptionReportService
.
transferDriverBreakContract
(
param
);
return
Result
.
ok
();
}
}
clx-performance-web/src/main/java/com/clx/performance/dao/OrderChildExceptionReportDao.java
浏览文件 @
5b5ae1fa
package
com
.
clx
.
performance
.
dao
;
package
com
.
clx
.
performance
.
dao
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.clx.performance.param.pc.PageExceptionReportParam
;
import
com.msl.common.dao.BaseDao
;
import
com.msl.common.dao.BaseDao
;
import
com.clx.performance.mapper.OrderChildExceptionReportMapper
;
import
com.clx.performance.mapper.OrderChildExceptionReportMapper
;
import
com.clx.performance.model.OrderChildExceptionReport
;
import
com.clx.performance.model.OrderChildExceptionReport
;
...
@@ -11,4 +13,6 @@ import com.clx.performance.model.OrderChildExceptionReport;
...
@@ -11,4 +13,6 @@ import com.clx.performance.model.OrderChildExceptionReport;
*/
*/
public
interface
OrderChildExceptionReportDao
extends
BaseDao
<
OrderChildExceptionReportMapper
,
OrderChildExceptionReport
,
Integer
>
{
public
interface
OrderChildExceptionReportDao
extends
BaseDao
<
OrderChildExceptionReportMapper
,
OrderChildExceptionReport
,
Integer
>
{
OrderChildExceptionReport
findByThirdReportNoAndSource
(
Integer
source
,
String
thirdReportNo
);
OrderChildExceptionReport
findByThirdReportNoAndSource
(
Integer
source
,
String
thirdReportNo
);
IPage
<
OrderChildExceptionReport
>
pageExceptionReport
(
PageExceptionReportParam
param
);
}
}
clx-performance-web/src/main/java/com/clx/performance/dao/impl/OrderChildExceptionReportDaoImpl.java
浏览文件 @
5b5ae1fa
package
com
.
clx
.
performance
.
dao
.
impl
;
package
com
.
clx
.
performance
.
dao
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.performance.param.pc.PageExceptionReportParam
;
import
com.msl.common.dao.impl.BaseDaoImpl
;
import
com.msl.common.dao.impl.BaseDaoImpl
;
import
com.clx.performance.dao.OrderChildExceptionReportDao
;
import
com.clx.performance.dao.OrderChildExceptionReportDao
;
import
com.clx.performance.mapper.OrderChildExceptionReportMapper
;
import
com.clx.performance.mapper.OrderChildExceptionReportMapper
;
import
com.clx.performance.model.OrderChildExceptionReport
;
import
com.clx.performance.model.OrderChildExceptionReport
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.Objects
;
/**
/**
* @author kavin
* @author kavin
* Date 2024-10-22
* Date 2024-10-22
...
@@ -21,4 +27,17 @@ public class OrderChildExceptionReportDaoImpl extends BaseDaoImpl<OrderChildExce
...
@@ -21,4 +27,17 @@ public class OrderChildExceptionReportDaoImpl extends BaseDaoImpl<OrderChildExce
query
.
eq
(
OrderChildExceptionReport
::
getThirdReportNo
,
thirdReportNo
);
query
.
eq
(
OrderChildExceptionReport
::
getThirdReportNo
,
thirdReportNo
);
return
baseMapper
.
selectOne
(
query
);
return
baseMapper
.
selectOne
(
query
);
}
}
@Override
public
IPage
<
OrderChildExceptionReport
>
pageExceptionReport
(
PageExceptionReportParam
param
)
{
LambdaQueryWrapper
<
OrderChildExceptionReport
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
StringUtils
.
isNotBlank
(
param
.
getThirdReportNo
()),
OrderChildExceptionReport
::
getThirdReportNo
,
param
.
getThirdReportNo
());
query
.
eq
(
Objects
.
nonNull
(
param
.
getSource
()),
OrderChildExceptionReport
::
getSource
,
param
.
getSource
());
query
.
eq
(
Objects
.
nonNull
(
param
.
getStatus
()),
OrderChildExceptionReport
::
getStatus
,
param
.
getStatus
());
query
.
eq
(
StringUtils
.
isNotBlank
(
param
.
getChildNo
()),
OrderChildExceptionReport
::
getChildNo
,
param
.
getChildNo
());
query
.
eq
(
StringUtils
.
isNotBlank
(
param
.
getTruckNoOrMobile
()),
OrderChildExceptionReport
::
getTruckNoOrMobile
,
param
.
getTruckNoOrMobile
());
query
.
ge
(
StringUtils
.
isNotBlank
(
param
.
getBeginTime
()),
OrderChildExceptionReport
::
getCreateTime
,
param
.
getBeginTime
());
query
.
le
(
StringUtils
.
isNotBlank
(
param
.
getEndTime
()),
OrderChildExceptionReport
::
getCreateTime
,
param
.
getEndTime
());
return
baseMapper
.
selectPage
(
Page
.
of
(
param
.
getPage
(),
param
.
getPageSize
()),
query
);
}
}
}
clx-performance-web/src/main/java/com/clx/performance/model/OrderChildExceptionReport.java
浏览文件 @
5b5ae1fa
...
@@ -68,6 +68,10 @@ public class OrderChildExceptionReport implements HasKey<Integer> {
...
@@ -68,6 +68,10 @@ public class OrderChildExceptionReport implements HasKey<Integer> {
@Schema
(
description
=
"异常上报时间"
)
@Schema
(
description
=
"异常上报时间"
)
private
LocalDateTime
reportTime
;
private
LocalDateTime
reportTime
;
@TableField
(
"reason"
)
@Schema
(
description
=
"异常原因描述"
)
private
String
reason
;
@TableField
(
"deal_user_code"
)
@TableField
(
"deal_user_code"
)
@Schema
(
description
=
"处理人用户编码"
)
@Schema
(
description
=
"处理人用户编码"
)
private
Long
dealUserCode
;
private
Long
dealUserCode
;
...
@@ -82,7 +86,7 @@ public class OrderChildExceptionReport implements HasKey<Integer> {
...
@@ -82,7 +86,7 @@ public class OrderChildExceptionReport implements HasKey<Integer> {
@TableField
(
"deal_result"
)
@TableField
(
"deal_result"
)
@Schema
(
description
=
"处理结果"
)
@Schema
(
description
=
"处理结果"
)
private
String
dealResult
;
private
Integer
dealResult
;
@TableField
(
"transfer_driver_break_contract"
)
@TableField
(
"transfer_driver_break_contract"
)
@Schema
(
description
=
"是否转司机违约 1:是"
)
@Schema
(
description
=
"是否转司机违约 1:是"
)
...
...
clx-performance-web/src/main/java/com/clx/performance/service/OrderChildExceptionReportService.java
浏览文件 @
5b5ae1fa
package
com
.
clx
.
performance
.
service
;
package
com
.
clx
.
performance
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.open.sdk.request.action.*
;
import
com.clx.open.sdk.request.action.*
;
import
com.clx.performance.param.pc.DealExceptionReportParam
;
import
com.clx.performance.param.pc.DealExceptionReportParam
;
import
com.clx.performance.param.pc.PageExceptionReportParam
;
import
com.clx.performance.param.pc.TransferDriverBreakContractParam
;
import
com.clx.performance.vo.pc.OrderChildExceptionReportVO
;
import
com.msl.common.result.Result
;
import
com.msl.common.result.Result
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
/**
/**
* @author kavin
* @author kavin
...
@@ -23,4 +28,12 @@ public interface OrderChildExceptionReportService {
...
@@ -23,4 +28,12 @@ public interface OrderChildExceptionReportService {
Result
<
Object
>
mslWithdrawExceptionReport
(
MslWithdrawExceptionReportAction
action
);
Result
<
Object
>
mslWithdrawExceptionReport
(
MslWithdrawExceptionReportAction
action
);
void
updateDealExceptionReport
(
DealExceptionReportParam
param
);
void
updateDealExceptionReport
(
DealExceptionReportParam
param
);
Page
<
OrderChildExceptionReportVO
>
pageExceptionReport
(
PageExceptionReportParam
param
);
SXSSFWorkbook
exportExceptionReport
(
PageExceptionReportParam
param
);
OrderChildExceptionReportVO
getExceptionReport
(
Integer
id
);
void
transferDriverBreakContract
(
TransferDriverBreakContractParam
param
);
}
}
clx-performance-web/src/main/java/com/clx/performance/service/impl/OrderChildExceptionReportServiceImpl.java
浏览文件 @
5b5ae1fa
...
@@ -2,6 +2,8 @@ package com.clx.performance.service.impl;
...
@@ -2,6 +2,8 @@ package com.clx.performance.service.impl;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.open.sdk.callback.OpenCallBackClient
;
import
com.clx.open.sdk.callback.OpenCallBackClient
;
import
com.clx.open.sdk.callback.message.MslExceptionReportDealMessage
;
import
com.clx.open.sdk.callback.message.MslExceptionReportDealMessage
;
import
com.clx.open.sdk.callback.message.SmbExceptionReportDealMessage
;
import
com.clx.open.sdk.callback.message.SmbExceptionReportDealMessage
;
...
@@ -17,9 +19,17 @@ import com.clx.performance.enums.SyncPlatformEnum;
...
@@ -17,9 +19,17 @@ import com.clx.performance.enums.SyncPlatformEnum;
import
com.clx.performance.model.OrderChildExceptionReport
;
import
com.clx.performance.model.OrderChildExceptionReport
;
import
com.clx.performance.model.OrderChildExceptionReportDealLog
;
import
com.clx.performance.model.OrderChildExceptionReportDealLog
;
import
com.clx.performance.param.pc.DealExceptionReportParam
;
import
com.clx.performance.param.pc.DealExceptionReportParam
;
import
com.clx.performance.param.pc.PageExceptionReportParam
;
import
com.clx.performance.param.pc.TransferDriverBreakContractParam
;
import
com.clx.performance.service.OrderChildExceptionReportService
;
import
com.clx.performance.service.OrderChildExceptionReportService
;
import
com.clx.performance.struct.OrderChildExceptionReportStruct
;
import
com.clx.performance.struct.OrderChildExceptionReportStruct
;
import
com.clx.performance.utils.LocalDateTimeUtils
;
import
com.clx.performance.utils.LocalDateTimeUtils
;
import
com.clx.performance.utils.excel.ExcelData
;
import
com.clx.performance.utils.excel.ExcelField
;
import
com.clx.performance.utils.excel.ExcelSheet
;
import
com.clx.performance.utils.excel.ExcelUtil
;
import
com.clx.performance.vo.pc.OrderChildExceptionReportVO
;
import
com.msl.common.base.Optional
;
import
com.msl.common.exception.ServiceSystemException
;
import
com.msl.common.exception.ServiceSystemException
;
import
com.msl.common.result.Result
;
import
com.msl.common.result.Result
;
import
com.msl.common.utils.DateUtils
;
import
com.msl.common.utils.DateUtils
;
...
@@ -29,10 +39,12 @@ import lombok.AllArgsConstructor;
...
@@ -29,10 +39,12 @@ import lombok.AllArgsConstructor;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -106,7 +118,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
...
@@ -106,7 +118,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
report
.
setDealTime
(
LocalDateTime
.
now
());
report
.
setDealTime
(
LocalDateTime
.
now
());
report
.
setDealUser
(
SyncPlatformEnum
.
Source
.
getNameByCode
(
source
));
report
.
setDealUser
(
SyncPlatformEnum
.
Source
.
getNameByCode
(
source
));
report
.
setStatus
(
CarrierExceptionReportEnum
.
Status
.
PROCESSED
.
getCode
());
report
.
setStatus
(
CarrierExceptionReportEnum
.
Status
.
PROCESSED
.
getCode
());
report
.
setDealResult
(
ExceptionReportEnum
.
DealResult
.
getNameByCode
(
breakContractParty
)
);
report
.
setDealResult
(
breakContractParty
);
orderChildExceptionReportDao
.
updateEntityByKey
(
report
);
orderChildExceptionReportDao
.
updateEntityByKey
(
report
);
}
}
...
@@ -199,7 +211,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
...
@@ -199,7 +211,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
UserSessionData
loginUserInfo
=
TokenUtil
.
getLoginUserInfo
();
UserSessionData
loginUserInfo
=
TokenUtil
.
getLoginUserInfo
();
report
.
setStatus
(
CarrierExceptionReportEnum
.
Status
.
PROCESSED
.
getCode
());
report
.
setStatus
(
CarrierExceptionReportEnum
.
Status
.
PROCESSED
.
getCode
());
report
.
setDealTime
(
LocalDateTime
.
now
());
report
.
setDealTime
(
LocalDateTime
.
now
());
report
.
setDealResult
(
ExceptionReportEnum
.
DealResult
.
CARRIER_BREAK_CONTRACT
.
get
Nam
e
());
report
.
setDealResult
(
ExceptionReportEnum
.
DealResult
.
CARRIER_BREAK_CONTRACT
.
get
Cod
e
());
report
.
setDealUserCode
(
loginUserInfo
.
getUserNo
());
report
.
setDealUserCode
(
loginUserInfo
.
getUserNo
());
report
.
setDealUser
(
loginUserInfo
.
getUserName
());
report
.
setDealUser
(
loginUserInfo
.
getUserName
());
...
@@ -242,4 +254,98 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
...
@@ -242,4 +254,98 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
}
}
}
}
@Override
public
Page
<
OrderChildExceptionReportVO
>
pageExceptionReport
(
PageExceptionReportParam
param
)
{
IPage
<
OrderChildExceptionReport
>
page
=
orderChildExceptionReportDao
.
pageExceptionReport
(
param
);
return
orderChildExceptionReportStruct
.
convertPage
(
page
);
}
@Override
public
SXSSFWorkbook
exportExceptionReport
(
PageExceptionReportParam
param
)
{
param
.
setPage
(
1
);
param
.
setPageSize
(
1000000
);
Page
<
OrderChildExceptionReportVO
>
page
=
pageExceptionReport
(
param
);
List
<
OrderChildExceptionReportVO
>
list
=
page
.
getRecords
();
// 组装表头
List
<
ExcelField
>
fieldList
=
new
ArrayList
<>();
fieldList
.
add
(
new
ExcelField
(
0
,
"异常上报编号"
,
"reportNo"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
1
,
"三方异常上报编号"
,
"thirdReportNo"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
2
,
"来源"
,
"sourceMsg"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
3
,
"异常类别"
,
"exceptionCategory"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
4
,
"异常类型"
,
"exceptionType"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
5
,
"车牌号/手机号"
,
"truckNoOrMobile"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
6
,
"运单编号"
,
"childNo"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
7
,
"状态"
,
"statusMsg"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
8
,
"扣罚金额"
,
"deductionAmount"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
9
,
"异常上报时间"
,
"reportTime"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
10
,
"创建时间"
,
"createTime"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
11
,
"处理人"
,
"dealUser"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
11
,
"处理时间"
,
"dealTime"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
11
,
"处理结果"
,
"dealResult"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
11
,
"是否转司机违约"
,
"transferDriverBreakContractMsg"
,
5000
));
// 组装数据
List
<
List
<
ExcelData
>>
dataList
=
new
ArrayList
<>();
for
(
OrderChildExceptionReportVO
vo
:
list
)
{
List
<
ExcelData
>
rowData
=
new
ArrayList
<>();
rowData
.
add
(
new
ExcelData
(
vo
.
getReportNo
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getThirdReportNo
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getSourceMsg
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getExceptionCategory
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getExceptionType
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getTruckNoOrMobile
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getChildNo
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getStatusMsg
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getDeductionAmount
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getReportTime
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getCreateTime
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getDealUser
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getDealTime
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getDealResultMsg
(),
"-"
));
rowData
.
add
(
new
ExcelData
(
vo
.
getTransferDriverBreakContractMsg
(),
"-"
));
dataList
.
add
(
rowData
);
}
ExcelSheet
excelSheet
=
new
ExcelSheet
(
"异常上报处理"
,
"异常上报处理"
,
fieldList
,
dataList
);
//创建excel
return
ExcelUtil
.
create
(
excelSheet
);
}
@Override
public
OrderChildExceptionReportVO
getExceptionReport
(
Integer
id
)
{
OrderChildExceptionReport
report
=
orderChildExceptionReportDao
.
getEntityByKey
(
id
).
orElseThrow
(
ResultEnum
.
DATA_NOT_FIND
);
OrderChildExceptionReportVO
vo
=
orderChildExceptionReportStruct
.
convert
(
report
);
Optional
<
OrderChildExceptionReportDealLog
>
limitOneByField
=
orderChildExceptionReportDealLogDao
.
getLimitOneByField
(
OrderChildExceptionReportDealLog:
:
getReportNo
,
report
.
getReportNo
());
if
(
limitOneByField
.
isPresent
())
{
OrderChildExceptionReportDealLog
dealLog
=
limitOneByField
.
get
();
vo
.
setVideoUrlList
(
JSON
.
parseArray
(
dealLog
.
getVideoUrl
(),
String
.
class
));
vo
.
setPictureUrlList
(
JSON
.
parseArray
(
dealLog
.
getPictureUrl
(),
String
.
class
));
}
return
vo
;
}
@Override
public
void
transferDriverBreakContract
(
TransferDriverBreakContractParam
param
)
{
OrderChildExceptionReport
report
=
orderChildExceptionReportDao
.
getEntityByKey
(
param
.
getId
()).
orElseThrow
(
ResultEnum
.
DATA_NOT_FIND
);
if
(
Objects
.
equals
(
report
.
getStatus
(),
CarrierExceptionReportEnum
.
Status
.
PROCESSED
.
getCode
())
&&
Objects
.
equals
(
report
.
getDealResult
(),
ExceptionReportEnum
.
DealResult
.
CARRIER_BREAK_CONTRACT
.
getCode
())){
throw
new
ServiceSystemException
(
ResultEnum
.
DATA_ERROR
);
}
//@TODO 创建司机违约记录
report
.
setTransferDriverBreakContract
(
1
);
orderChildExceptionReportDao
.
updateEntityByKey
(
report
);
}
}
}
clx-performance-web/src/main/java/com/clx/performance/struct/OrderChildExceptionReportStruct.java
浏览文件 @
5b5ae1fa
package
com
.
clx
.
performance
.
struct
;
package
com
.
clx
.
performance
.
struct
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.open.sdk.request.action.MslSyncExceptionReportInfoAction
;
import
com.clx.open.sdk.request.action.MslSyncExceptionReportInfoAction
;
import
com.clx.open.sdk.request.action.SmbSyncExceptionReportInfoAction
;
import
com.clx.open.sdk.request.action.SmbSyncExceptionReportInfoAction
;
import
com.clx.performance.model.OrderChildExceptionReport
;
import
com.clx.performance.model.OrderChildExceptionReport
;
import
com.clx.performance.vo.pc.OrderChildExceptionReportVO
;
import
com.msl.common.utils.DateStructUtil
;
import
com.msl.common.utils.DateStructUtil
;
import
com.msl.common.utils.DateUtils
;
import
com.msl.common.utils.DateUtils
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mapper
;
...
@@ -12,4 +15,8 @@ public interface OrderChildExceptionReportStruct {
...
@@ -12,4 +15,8 @@ public interface OrderChildExceptionReportStruct {
OrderChildExceptionReport
convertInfoSmbAction
(
SmbSyncExceptionReportInfoAction
action
);
OrderChildExceptionReport
convertInfoSmbAction
(
SmbSyncExceptionReportInfoAction
action
);
OrderChildExceptionReport
convertInfoMslAction
(
MslSyncExceptionReportInfoAction
action
);
OrderChildExceptionReport
convertInfoMslAction
(
MslSyncExceptionReportInfoAction
action
);
Page
<
OrderChildExceptionReportVO
>
convertPage
(
IPage
<
OrderChildExceptionReport
>
page
);
OrderChildExceptionReportVO
convert
(
OrderChildExceptionReport
report
);
}
}
performance-api/src/main/java/com/clx/performance/param/pc/PageExceptionReportParam.java
0 → 100644
浏览文件 @
5b5ae1fa
package
com
.
clx
.
performance
.
param
.
pc
;
import
com.msl.common.base.PageParam
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @ClassName PageExceptionReportParam
* @Description
* @Author kavin
* @Date 2024/10/23 13:31
* @Version 1.0
*/
@Getter
@Setter
public
class
PageExceptionReportParam
extends
PageParam
{
@Schema
(
description
=
"三方异常上报编号"
)
private
String
thirdReportNo
;
@Schema
(
description
=
"来源 1:数煤宝 3:供应链"
)
private
Integer
source
;
@Schema
(
description
=
"运单编号"
)
private
String
childNo
;
@Schema
(
description
=
"车牌号/手机号"
)
private
String
truckNoOrMobile
;
@Schema
(
description
=
"状态:1:待处理 2:申诉中 3:已处理 4:已撤回"
)
private
Integer
status
;
@Schema
(
description
=
"开始时间"
)
private
String
beginTime
;
@Schema
(
description
=
"结束时间"
)
private
String
endTime
;
}
performance-api/src/main/java/com/clx/performance/param/pc/TransferDriverBreakContractParam.java
0 → 100644
浏览文件 @
5b5ae1fa
package
com
.
clx
.
performance
.
param
.
pc
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
jakarta.validation.constraints.NotBlank
;
import
jakarta.validation.constraints.NotNull
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* @ClassName TransferDriverBreakContractParam
* @Description
* @Author kavin
* @Date 2024/10/23 14:39
* @Version 1.0
*/
@Getter
@Setter
public
class
TransferDriverBreakContractParam
{
@NotNull
(
message
=
"异常记录ID不能为空"
)
@Schema
(
description
=
"异常记录ID"
)
private
Integer
id
;
@NotBlank
(
message
=
"违约原因不能为空"
)
@Schema
(
description
=
"违约原因"
)
private
String
reason
;
}
performance-api/src/main/java/com/clx/performance/vo/pc/OrderChildExceptionReportVO.java
0 → 100644
浏览文件 @
5b5ae1fa
package
com
.
clx
.
performance
.
vo
.
pc
;
import
com.clx.open.sdk.enums.ExceptionReportEnum
;
import
com.clx.performance.enums.CarrierExceptionReportEnum
;
import
com.clx.performance.enums.SyncPlatformEnum
;
import
com.msl.common.convertor.type.MoneyOutConvert
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author kavin
* Date 2024-10-22
* Time 10:38
*/
@Getter
@Setter
public
class
OrderChildExceptionReportVO
{
private
Integer
id
;
@Schema
(
description
=
"异常上报编号"
)
private
String
reportNo
;
@Schema
(
description
=
"三方异常上报编号"
)
private
String
thirdReportNo
;
@Schema
(
description
=
"来源"
)
private
Integer
source
;
@Schema
(
description
=
"来源描述"
)
private
String
sourceMsg
;
public
String
getSourceMsg
(){
return
SyncPlatformEnum
.
Source
.
getNameByCode
(
source
);
}
@Schema
(
description
=
"异常类别"
)
private
String
exceptionCategory
;
@Schema
(
description
=
"异常类型"
)
private
String
exceptionType
;
@Schema
(
description
=
"车牌号/手机号"
)
private
String
truckNoOrMobile
;
@Schema
(
description
=
"运单编号"
)
private
String
childNo
;
@Schema
(
description
=
"状态:1:待处理 2:申诉中 3:已处理 4:已撤回"
)
private
Integer
status
;
@Schema
(
description
=
"状态:1:待处理 2:申诉中 3:已处理 4:已撤回"
)
private
String
statusMsg
;
public
String
getStatusMsg
(){
return
CarrierExceptionReportEnum
.
Status
.
getMsgByCode
(
status
);
}
@Schema
(
description
=
"扣罚金额"
)
@MoneyOutConvert
private
BigDecimal
deductionAmount
;
@Schema
(
description
=
"异常上报时间"
)
private
String
reportTime
;
@Schema
(
description
=
"异常描述"
)
private
String
reason
;
@Schema
(
description
=
"处理人用户编码"
)
private
Long
dealUserCode
;
@Schema
(
description
=
"处理人用户姓名"
)
private
String
dealUser
;
@Schema
(
description
=
"处理时间"
)
private
String
dealTime
;
@Schema
(
description
=
"处理结果 1:承运违约 2:承运不违约 "
)
private
Integer
dealResult
;
@Schema
(
description
=
"处理结果 1:承运违约 2:承运不违约"
)
private
String
dealResultMsg
;
@Schema
(
description
=
"处理结果"
)
public
String
getDealResultMsg
(){
return
ExceptionReportEnum
.
DealResult
.
getNameByCode
(
dealResult
);
}
@Schema
(
description
=
"是否转司机违约 1:是"
)
private
Integer
transferDriverBreakContract
;
@Schema
(
description
=
"是否转司机违约 1:是"
)
private
String
transferDriverBreakContractMsg
;
public
String
transferDriverBreakContractMsg
(){
if
(
Objects
.
nonNull
(
transferDriverBreakContract
)){
return
"是"
;
}
else
{
return
"-"
;
}
}
@Schema
(
description
=
"创建时间"
)
private
String
createTime
;
@Schema
(
description
=
"图片"
)
private
List
<
String
>
pictureUrlList
;
@Schema
(
description
=
"视频"
)
private
List
<
String
>
videoUrlList
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论