Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
94f4970a
提交
94f4970a
authored
9月 11, 2024
作者:
刘海泉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加已挂单吨数统计的sdkFeign接口
上级
20e62f33
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
68 行增加
和
14 行删除
+68
-14
PerformanceSDKFeign.java
...n/java/com/clx/performance/feign/PerformanceSDKFeign.java
+8
-1
PerformanceSdkFeignController.java
...mance/controller/feign/PerformanceSdkFeignController.java
+13
-9
OrderService.java
.../java/com/clx/performance/extranal/user/OrderService.java
+3
-1
OrderServiceImpl.java
.../clx/performance/extranal/user/impl/OrderServiceImpl.java
+38
-2
PerformanceProgressService.java
...m/clx/performance/service/PerformanceProgressService.java
+4
-0
PerformanceProgressServiceImpl.java
...formance/service/impl/PerformanceProgressServiceImpl.java
+2
-1
没有找到文件。
performance-api/src/main/java/com/clx/performance/feign/PerformanceSDKFeign.java
浏览文件 @
94f4970a
package
com
.
clx
.
performance
.
feign
;
import
com.clx.open.sdk.request.action.GetOrderBreakContractOwnerRuleFileAction
;
import
com.clx.open.sdk.request.dto.OrderCanExtractWeightDTO
;
import
com.clx.open.sdk.request.action.QueryPerformanceProgressAction
;
import
com.clx.open.sdk.request.action.QueryPerformanceProgressLogAction
;
import
com.clx.open.sdk.request.dto.BatchOrderStatisticsDTO
;
import
com.clx.open.sdk.request.dto.BatchOrderStatisticsInfoDTO
;
import
com.clx.open.sdk.request.dto.OrderCanExtractWeightDTO
;
import
com.clx.open.sdk.request.dto.OwnerCancelResidueWeightDTO
;
import
com.clx.performance.param.pc.OrderCancelParam
;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
...
...
@@ -58,4 +59,10 @@ public interface PerformanceSDKFeign {
@GetMapping
(
"clx-performance/feign/sdk/queryTaskStatisticsInfo"
)
Result
<
BatchOrderStatisticsInfoDTO
>
queryTaskStatisticsInfo
(
@RequestParam
(
"orderNoList"
)
@NotEmpty
(
message
=
"订单编号集合不能为空"
)
List
<
String
>
orderNoList
);
@GetMapping
(
"clx-performance/feign/sdk/queryOrderStatistics"
)
Result
<
BatchOrderStatisticsDTO
>
queryOrderStatistics
(
@RequestParam
(
"orderNoList"
)
@NotEmpty
(
message
=
"订单编号集合不能为空"
)
List
<
String
>
orderNoList
);
}
performance-web/src/main/java/com/clx/performance/controller/feign/PerformanceSdkFeignController.java
浏览文件 @
94f4970a
package
com
.
clx
.
performance
.
controller
.
feign
;
import
com.clx.open.sdk.request.action.GetOrderBreakContractOwnerRuleFileAction
;
import
com.clx.open.sdk.request.dto.OrderCanExtractWeightDTO
;
import
com.clx.open.sdk.request.action.GetOwnerAccountInfoAction
;
import
com.clx.open.sdk.request.action.QueryPerformanceProgressAction
;
import
com.clx.open.sdk.request.action.QueryPerformanceProgressLogAction
;
import
com.clx.open.sdk.request.dto.BatchOrderStatisticsDTO
;
import
com.clx.open.sdk.request.dto.BatchOrderStatisticsInfoDTO
;
import
com.clx.open.sdk.request.dto.Order
StatisticsInfo
DTO
;
import
com.clx.open.sdk.request.dto.Order
CanExtractWeight
DTO
;
import
com.clx.open.sdk.request.dto.OwnerCancelResidueWeightDTO
;
import
com.clx.performance.extranal.user.OrderService
;
import
com.clx.performance.param.pc.OrderCancelParam
;
import
com.clx.performance.service.OrderCancelService
;
import
com.clx.performance.service.OrderGoodsService
;
import
com.clx.performance.service.OrderWeightService
;
import
com.clx.performance.service.OwnerAccountService
;
import
com.clx.performance.service.PerformanceProgressService
;
import
com.clx.performance.service.*
;
import
com.clx.performance.service.breakcontract.BreakContractOwnerRuleService
;
import
com.clx.performance.vo.feign.OrderExtractWeightVO
;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
...
...
@@ -31,11 +26,11 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotEmpty
;
import
java.util.List
;
import
static
com
.
clx
.
performance
.
enums
.
PerformanceProgressEnum
.
LogType
.
PERFORMANCE_ABNORMAL_REASON
;
import
javax.validation.constraints.NotBlank
;
@Slf4j
@RestController
...
...
@@ -121,4 +116,13 @@ public class PerformanceSdkFeignController {
@NotEmpty
(
message
=
"订单编号集合不能为空"
)
List
<
String
>
orderNoList
){
return
Result
.
ok
(
orderService
.
queryTaskStatisticsInfo
(
orderNoList
));
}
@ApiOperation
(
value
=
"查询订单相关统计"
,
notes
=
"<br>By:刘海泉"
)
@GetMapping
(
"/queryOrderStatistics"
)
Result
<
BatchOrderStatisticsDTO
>
queryOrderStatistics
(
@RequestParam
(
"orderNoList"
)
@NotEmpty
(
message
=
"订单编号集合不能为空"
)
List
<
String
>
orderNoList
){
return
Result
.
ok
(
orderService
.
queryOrderStatistics
(
orderNoList
));
}
}
performance-web/src/main/java/com/clx/performance/extranal/user/OrderService.java
浏览文件 @
94f4970a
package
com
.
clx
.
performance
.
extranal
.
user
;
import
com.clx.open.sdk.request.dto.BatchOrderStatisticsDTO
;
import
com.clx.open.sdk.request.dto.BatchOrderStatisticsInfoDTO
;
import
com.clx.open.sdk.request.dto.OrderStatisticsInfoDTO
;
import
com.clx.order.vo.feign.FeignOrderInfoVO
;
import
com.msl.common.base.Optional
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -22,4 +22,6 @@ public interface OrderService {
BatchOrderStatisticsInfoDTO
queryTaskStatisticsInfo
(
List
<
String
>
orderNoList
);
BatchOrderStatisticsDTO
queryOrderStatistics
(
List
<
String
>
orderNoList
);
}
performance-web/src/main/java/com/clx/performance/extranal/user/impl/OrderServiceImpl.java
浏览文件 @
94f4970a
package
com
.
clx
.
performance
.
extranal
.
user
.
impl
;
import
com.clx.open.sdk.request.dto.BatchOrderStatisticsDTO
;
import
com.clx.open.sdk.request.dto.BatchOrderStatisticsInfoDTO
;
import
com.clx.open.sdk.request.dto.OrderStatisticsDTO
;
import
com.clx.open.sdk.request.dto.OrderStatisticsInfoDTO
;
import
com.clx.order.feign.OrderFeign
;
import
com.clx.order.vo.feign.FeignOrderInfoVO
;
...
...
@@ -11,6 +13,8 @@ import com.clx.performance.enums.OrderGoodsStatusEnum;
import
com.clx.performance.extranal.user.OrderService
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.service.PerformanceProgressService
;
import
com.clx.performance.utils.spring.ApplicationContextUtils
;
import
com.msl.common.base.Optional
;
import
com.msl.common.result.Result
;
import
lombok.AllArgsConstructor
;
...
...
@@ -20,8 +24,6 @@ import org.springframework.stereotype.Service;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Slf4j
...
...
@@ -132,4 +134,38 @@ public class OrderServiceImpl implements OrderService {
returnResult
.
setList
(
new
ArrayList
<>(
result
.
values
()));
return
returnResult
;
}
@Override
public
BatchOrderStatisticsDTO
queryOrderStatistics
(
List
<
String
>
orderNoList
)
{
BatchOrderStatisticsDTO
returnResult
=
new
BatchOrderStatisticsDTO
();
//构建结果集
Map
<
String
,
OrderStatisticsDTO
>
result
=
new
HashMap
<>();
orderNoList
.
forEach
(
item
->{
OrderStatisticsDTO
dto
=
new
OrderStatisticsDTO
();
dto
.
setOrderNo
(
item
);
dto
.
setPendingWeight
(
BigDecimal
.
ZERO
);
result
.
put
(
item
,
dto
);
});
List
<
OrderGoods
>
orderGoods
=
orderGoodsDao
.
listInField
(
OrderGoods:
:
getOrderNo
,
orderNoList
);
if
(
CollectionUtils
.
isEmpty
(
orderGoods
)){
returnResult
.
setList
(
new
ArrayList
<>(
result
.
values
()));
return
returnResult
;
}
//计算已挂单吨数
for
(
OrderGoods
orderGood
:
orderGoods
)
{
if
(
Objects
.
equals
(
orderGood
.
getOrderGoodsStatus
(),
OrderGoodsStatusEnum
.
Status
.
CANCEL
.
getCode
())){
continue
;
}
OrderStatisticsDTO
dto
=
result
.
get
(
orderGood
.
getOrderNo
());
BigDecimal
pendingWeight
=
ApplicationContextUtils
.
getBean
(
PerformanceProgressService
.
class
).
calcPendingWeight
(
orderGood
);
dto
.
setPendingWeight
(
dto
.
getPendingWeight
().
add
(
pendingWeight
));
result
.
put
(
orderGood
.
getOrderNo
(),
dto
);
}
returnResult
.
setList
(
new
ArrayList
<>(
result
.
values
()));
return
returnResult
;
}
}
performance-web/src/main/java/com/clx/performance/service/PerformanceProgressService.java
浏览文件 @
94f4970a
...
...
@@ -12,6 +12,7 @@ import com.clx.performance.vo.pc.PerformanceProgressOperationLogVO;
import
com.clx.performance.vo.pc.PerformanceProgressVO
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
...
...
@@ -39,6 +40,9 @@ public interface PerformanceProgressService {
void
dealPerformanceProgress4OrderGoods
(
OrderGoods
data
);
//计算履约进度表货单的挂单吨数
BigDecimal
calcPendingWeight
(
OrderGoods
item
);
void
dealPerformanceProgress4OrderChild
(
OrderChild
data
);
SXSSFWorkbook
exportPerformanceProgress
(
PagePerformanceProgress
param
);
...
...
performance-web/src/main/java/com/clx/performance/service/impl/PerformanceProgressServiceImpl.java
浏览文件 @
94f4970a
...
...
@@ -462,7 +462,8 @@ public class PerformanceProgressServiceImpl implements PerformanceProgressServi
}
//计算履约进度表货单的挂单吨数
private
BigDecimal
calcPendingWeight
(
OrderGoods
item
){
@Override
public
BigDecimal
calcPendingWeight
(
OrderGoods
item
){
if
(
Objects
.
equals
(
item
.
getOrderGoodsStatus
(),
OrderGoodsStatusEnum
.
Status
.
CANCEL
.
getCode
())){
return
Objects
.
nonNull
(
item
.
getAlreadyTransportWeight
())?
item
.
getAlreadyTransportWeight
():
BigDecimal
.
ZERO
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论