Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
af4f8ebb
提交
af4f8ebb
authored
8月 29, 2024
作者:
杨启发
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
导出履约进度
上级
5b71e935
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
101 行增加
和
1 行删除
+101
-1
CarrierPerformanceProgressController.java
...ller/pc/carrier/CarrierPerformanceProgressController.java
+12
-1
PerformanceProgressService.java
...m/clx/performance/service/PerformanceProgressService.java
+4
-0
PerformanceProgressServiceImpl.java
...formance/service/impl/PerformanceProgressServiceImpl.java
+85
-0
没有找到文件。
performance-web/src/main/java/com/clx/performance/controller/pc/carrier/CarrierPerformanceProgressController.java
浏览文件 @
af4f8ebb
...
@@ -16,9 +16,13 @@ import io.swagger.annotations.Api;
...
@@ -16,9 +16,13 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
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.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
import
java.util.List
;
...
@@ -79,5 +83,12 @@ public class CarrierPerformanceProgressController {
...
@@ -79,5 +83,12 @@ public class CarrierPerformanceProgressController {
return
Result
.
ok
(
list
);
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
浏览文件 @
af4f8ebb
...
@@ -5,11 +5,13 @@ import com.clx.open.sdk.callback.message.OrderInfoMessage;
...
@@ -5,11 +5,13 @@ import com.clx.open.sdk.callback.message.OrderInfoMessage;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.PerformanceProgress
;
import
com.clx.performance.model.PerformanceProgress
;
import
com.clx.performance.param.pc.PageCarrierOrderChildParam
;
import
com.clx.performance.param.pc.carrier.PagePerformanceProgress
;
import
com.clx.performance.param.pc.carrier.PagePerformanceProgress
;
import
com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam
;
import
com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam
;
import
com.clx.performance.vo.pc.PerformanceProgressDetailVO
;
import
com.clx.performance.vo.pc.PerformanceProgressDetailVO
;
import
com.clx.performance.vo.pc.PerformanceProgressOperationLogVO
;
import
com.clx.performance.vo.pc.PerformanceProgressOperationLogVO
;
import
com.clx.performance.vo.pc.PerformanceProgressVO
;
import
com.clx.performance.vo.pc.PerformanceProgressVO
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
java.util.List
;
import
java.util.List
;
...
@@ -39,4 +41,6 @@ public interface PerformanceProgressService {
...
@@ -39,4 +41,6 @@ public interface PerformanceProgressService {
void
dealPerformanceProgress4OrderGoods
(
OrderGoods
data
);
void
dealPerformanceProgress4OrderGoods
(
OrderGoods
data
);
void
dealPerformanceProgress4OrderChild
(
OrderChild
data
);
void
dealPerformanceProgress4OrderChild
(
OrderChild
data
);
SXSSFWorkbook
exportPerformanceProgress
(
PagePerformanceProgress
param
);
}
}
performance-web/src/main/java/com/clx/performance/service/impl/PerformanceProgressServiceImpl.java
浏览文件 @
af4f8ebb
...
@@ -29,13 +29,19 @@ import com.clx.performance.model.OrderChild;
...
@@ -29,13 +29,19 @@ import com.clx.performance.model.OrderChild;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.PerformanceProgress
;
import
com.clx.performance.model.PerformanceProgress
;
import
com.clx.performance.model.PerformanceProgressLog
;
import
com.clx.performance.model.PerformanceProgressLog
;
import
com.clx.performance.param.pc.PageCarrierOrderChildParam
;
import
com.clx.performance.param.pc.carrier.PagePerformanceProgress
;
import
com.clx.performance.param.pc.carrier.PagePerformanceProgress
;
import
com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam
;
import
com.clx.performance.param.pc.carrier.UpdatePerformanceProgressParam
;
import
com.clx.performance.service.PerformanceProgressLogService
;
import
com.clx.performance.service.PerformanceProgressLogService
;
import
com.clx.performance.service.PerformanceProgressService
;
import
com.clx.performance.service.PerformanceProgressService
;
import
com.clx.performance.struct.PerformanceProgressLogStruct
;
import
com.clx.performance.struct.PerformanceProgressLogStruct
;
import
com.clx.performance.struct.PerformanceProgressStruct
;
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.utils.gd.GdService
;
import
com.clx.performance.vo.pc.PageCarrierOrderChildVO
;
import
com.clx.performance.vo.pc.PerformanceProgressDetailVO
;
import
com.clx.performance.vo.pc.PerformanceProgressDetailVO
;
import
com.clx.performance.vo.pc.PerformanceProgressOperationLogVO
;
import
com.clx.performance.vo.pc.PerformanceProgressOperationLogVO
;
import
com.clx.performance.vo.pc.PerformanceProgressVO
;
import
com.clx.performance.vo.pc.PerformanceProgressVO
;
...
@@ -49,6 +55,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -49,6 +55,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.exception.ExceptionUtils
;
import
org.apache.commons.lang.exception.ExceptionUtils
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -531,6 +538,84 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
...
@@ -531,6 +538,84 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
return
performanceProgressStruct
.
convertList
(
performanceProgressDao
.
listInField
(
PerformanceProgress:
:
getOrderNo
,
orderNoList
));
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"
,
10000
));
fieldList
.
add
(
new
ExcelField
(
19
,
"到站量(吨)"
,
"sumUnloadWeight"
,
10000
));
fieldList
.
add
(
new
ExcelField
(
20
,
"在途量(吨)"
,
"sumOnTheWayWeight"
,
10000
));
fieldList
.
add
(
new
ExcelField
(
21
,
"今日预计完成(吨)"
,
"todayExpectComplete"
,
10000
));
// 组装数据
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
()));
dataList
.
add
(
rowData
);
}
ExcelSheet
excelSheet
=
new
ExcelSheet
(
"履约进度"
,
"履约进度"
,
fieldList
,
dataList
);
//创建excel
return
ExcelUtil
.
create
(
excelSheet
);
}
// 计算接单率
// 计算接单率
public
BigDecimal
calcOrderedRate
(
BigDecimal
orderedWeight
,
BigDecimal
pendingWeight
){
public
BigDecimal
calcOrderedRate
(
BigDecimal
orderedWeight
,
BigDecimal
pendingWeight
){
//接单率 = 接单吨数 / 挂单吨数
//接单率 = 接单吨数 / 挂单吨数
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论