Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
19c2ae01
提交
19c2ae01
authored
8月 29, 2024
作者:
李瑞鑫
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/v23.7_export_performance_progress_20240829'
上级
480927d1
3b37b803
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
120 行增加
和
2 行删除
+120
-2
CarrierPerformanceProgressController.java
...ller/pc/carrier/CarrierPerformanceProgressController.java
+12
-1
PerformanceProgressService.java
...m/clx/performance/service/PerformanceProgressService.java
+3
-0
PerformanceProgressServiceImpl.java
...formance/service/impl/PerformanceProgressServiceImpl.java
+105
-1
没有找到文件。
performance-web/src/main/java/com/clx/performance/controller/pc/carrier/CarrierPerformanceProgressController.java
浏览文件 @
19c2ae01
...
...
@@ -16,9 +16,13 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
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
javax.servlet.http.HttpServletResponse
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
...
...
@@ -79,5 +83,12 @@ public class CarrierPerformanceProgressController {
return
Result
.
ok
(
list
);
}
@ApiOperation
(
value
=
"导出履约进度"
,
notes
=
"<br>By:杨启发"
)
@PostMapping
(
"/exportPerformanceProgress"
)
public
void
exportPerformanceProgress
(
@RequestBody
PagePerformanceProgress
param
,
HttpServletResponse
response
)
throws
Exception
{
try
(
SXSSFWorkbook
workbook
=
performanceProgressService
.
exportPerformanceProgress
(
param
))
{
response
.
setHeader
(
HttpHeaders
.
CONTENT_TYPE
,
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
workbook
.
write
(
response
.
getOutputStream
());
}
}
}
performance-web/src/main/java/com/clx/performance/service/PerformanceProgressService.java
浏览文件 @
19c2ae01
...
...
@@ -10,6 +10,7 @@ import com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam;
import
com.clx.performance.vo.pc.PerformanceProgressDetailVO
;
import
com.clx.performance.vo.pc.PerformanceProgressOperationLogVO
;
import
com.clx.performance.vo.pc.PerformanceProgressVO
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
java.util.List
;
...
...
@@ -39,4 +40,6 @@ public interface PerformanceProgressService {
void
dealPerformanceProgress4OrderGoods
(
OrderGoods
data
);
void
dealPerformanceProgress4OrderChild
(
OrderChild
data
);
SXSSFWorkbook
exportPerformanceProgress
(
PagePerformanceProgress
param
);
}
performance-web/src/main/java/com/clx/performance/service/impl/PerformanceProgressServiceImpl.java
浏览文件 @
19c2ae01
...
...
@@ -31,10 +31,15 @@ import com.clx.performance.model.PerformanceProgress;
import
com.clx.performance.model.PerformanceProgressLog
;
import
com.clx.performance.param.pc.carrier.PagePerformanceProgress
;
import
com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam
;
import
com.clx.performance.service.OrderGoodsService
;
import
com.clx.performance.service.PerformanceProgressLogService
;
import
com.clx.performance.service.PerformanceProgressService
;
import
com.clx.performance.struct.PerformanceProgressLogStruct
;
import
com.clx.performance.struct.PerformanceProgressStruct
;
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.utils.gd.GdService
;
import
com.clx.performance.vo.pc.PerformanceProgressDetailVO
;
import
com.clx.performance.vo.pc.PerformanceProgressOperationLogVO
;
...
...
@@ -49,6 +54,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.exception.ExceptionUtils
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -80,7 +86,7 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
private
final
OrderService
orderService
;
private
final
ThirdAppConfig
thirdAppConfig
;
private
final
OrderFeign
orderFeign
;
private
final
OrderGoodsService
orderGoodsService
;
public
static
List
<
Integer
>
inProcessStatusList
;
public
static
List
<
Integer
>
endStatusList
;
public
static
List
<
Integer
>
allStatusList
;
...
...
@@ -447,6 +453,7 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
firstPendingTime
=
item
.
getPendingOrderTime
();
pendingWeight
=
pendingWeight
.
add
(
item
.
getExtractWeight
());
}
PerformanceProgress
update
=
new
PerformanceProgress
();
update
.
setId
(
optional
.
get
().
getId
());
...
...
@@ -531,6 +538,103 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
return
performanceProgressStruct
.
convertList
(
performanceProgressDao
.
listInField
(
PerformanceProgress:
:
getOrderNo
,
orderNoList
));
}
@Override
public
SXSSFWorkbook
exportPerformanceProgress
(
PagePerformanceProgress
param
)
{
param
.
setPage
(
1
);
param
.
setPageSize
(
1000000
);
IPage
<
PerformanceProgressVO
>
page
=
pagePerformanceProgress
(
param
);
List
<
PerformanceProgressVO
>
list
=
page
.
getRecords
();
// 组装表头
List
<
ExcelField
>
fieldList
=
new
ArrayList
<>();
fieldList
.
add
(
new
ExcelField
(
0
,
"序号"
,
"index"
,
2000
));
fieldList
.
add
(
new
ExcelField
(
1
,
"货源地"
,
"sendAddressShorter"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
2
,
"标准地址"
,
"sendSystemAddressShorter"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
3
,
"物流经理"
,
"seniorLogisticsManagerName"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
4
,
"货物类型"
,
"goodsTypeName"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
5
,
"货物名称"
,
"goodsName"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
6
,
"煤源位置"
,
"sendAddress"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
7
,
"是否C类煤源"
,
"sendOverStandardMsg"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
8
,
"司机运费(元/吨)"
,
"driverFreightPrice"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
9
,
"任务吨数(吨)"
,
"taskWeight"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
10
,
"挂单吨数(吨)"
,
"pendingWeight"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
11
,
"接单车数"
,
"orderedTruckNum"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
12
,
"到达货源地车数"
,
"arriveSendTruckNum"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
13
,
"装车车数"
,
"loadTruckNum"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
14
,
"卸车车数"
,
"unloadTruckNum"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
15
,
"在途车数"
,
"onTheWayTruckNum"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
16
,
"接单率(%)"
,
"orderedRate"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
17
,
"任务完成率(%)"
,
"taskCompleteRatio"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
18
,
"矿发量(吨)"
,
"sumLoadWeight"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
19
,
"到站量(吨)"
,
"sumUnloadWeight"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
20
,
"在途量(吨)"
,
"sumOnTheWayWeight"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
21
,
"今日预计完成(吨)"
,
"todayExpectComplete"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
22
,
"异常备注"
,
"abnormalRemark"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
23
,
"履约异常原因"
,
"performanceAbnormalReason"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
24
,
"调度备注/跟进措施"
,
"dispatchFollow"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
25
,
"重车运距(公里)"
,
"orderDistance"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
26
,
"可拉运时间段"
,
"transportTimeSlot"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
27
,
"挂单时间"
,
"pendingTime"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
28
,
"交易要求到站时间"
,
"tradeRequireArriveStationTime"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
29
,
"物流预计到站时间"
,
"transportExpectArriveStationTime"
,
5000
));
fieldList
.
add
(
new
ExcelField
(
30
,
"测算运费"
,
"predictionFreightPrice"
,
5000
));
// 组装数据
List
<
List
<
ExcelData
>>
dataList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
PerformanceProgressVO
vo
=
list
.
get
(
i
);
List
<
ExcelData
>
rowData
=
new
ArrayList
<>();
rowData
.
add
(
new
ExcelData
(
i
+
1
));
rowData
.
add
(
new
ExcelData
(
vo
.
getSendAddressShorter
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getSendSystemAddressShorter
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getSeniorLogisticsManagerName
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getGoodsTypeName
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getGoodsName
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getSendAddress
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getSendOverStandardMsg
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getDriverFreightPrice
()==
null
?
null
:
vo
.
getDriverFreightPrice
().
movePointLeft
(
2
)));
rowData
.
add
(
new
ExcelData
(
vo
.
getTaskWeight
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getPendingWeight
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getOrderedTruckNum
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getArriveSendTruckNum
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getLoadTruckNum
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getUnloadTruckNum
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getOnTheWayTruckNum
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getOrderedRate
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getTaskCompleteRatio
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getSumLoadWeight
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getSumUnloadWeight
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getSumOnTheWayWeight
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getTodayExpectComplete
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getAbnormalRemark
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getPerformanceAbnormalReason
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getDispatchFollow
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getOrderDistance
()+
""
));
rowData
.
add
(
new
ExcelData
(
vo
.
getTransportTimeSlot
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getPendingTime
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getTradeRequireArriveStationTime
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getTransportExpectArriveStationTime
()));
rowData
.
add
(
new
ExcelData
(
vo
.
getPredictionFreightPrice
()==
null
?
null
:
vo
.
getPredictionFreightPrice
().
movePointLeft
(
2
)));
dataList
.
add
(
rowData
);
}
ExcelSheet
excelSheet
=
new
ExcelSheet
(
"履约进度"
,
"履约进度"
,
fieldList
,
dataList
);
//创建excel
return
ExcelUtil
.
create
(
excelSheet
);
}
// 计算接单率
public
BigDecimal
calcOrderedRate
(
BigDecimal
orderedWeight
,
BigDecimal
pendingWeight
){
//接单率 = 接单吨数 / 挂单吨数
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论