Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
dfcaa567
Commit
dfcaa567
authored
Mar 05, 2025
by
332784038@qq.com
Committed by
wux
Mar 20, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量加价页面的订单列表返回订单额外费用数据
parent
2c0bb8b3
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
732 additions
and
0 deletions
+732
-0
OrderQueryServiceImpl.java
...odule/order/service/order/impl/OrderQueryServiceImpl.java
+24
-0
OrderMarkupVO.java
...cn/iocoder/yudao/module/order/vo/order/OrderMarkupVO.java
+685
-0
ReceivableMapper.java
.../module/wealth/dal/mysql/receivable/ReceivableMapper.java
+2
-0
ReceivableService.java
...o/module/wealth/service/receivable/ReceivableService.java
+9
-0
ReceivableServiceImpl.java
...dule/wealth/service/receivable/ReceivableServiceImpl.java
+4
-0
ReceivableMapper.xml
...src/main/resources/mapper/receivable/ReceivableMapper.xml
+8
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
View file @
dfcaa567
...
...
@@ -1062,6 +1062,30 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return
orderMapper
.
selectList
(
query
);
}
@Override
public
List
<
OrderMarkupVO
>
shipmentBatchMarkupOrderList
(
OrderQueryVO
query
)
{
if
(
Objects
.
isNull
(
query
.
getLang
()))
{
query
.
setLang
(
I18nMessage
.
getLang
());
}
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
List
<
OrderMarkupVO
>
list
=
orderMapper
.
shipmentBatchMarkupOrderList
(
query
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
// 需要将商品信息中的特价状态做判断处理,保存到订单信息中
for
(
OrderMarkupVO
orderMarkupVO
:
list
)
{
if
(
CollectionUtil
.
isNotEmpty
(
orderMarkupVO
.
getOrderItemBackVOList
()))
{
// 为订单添加最早入仓时间和最后入仓时间值
orderMarkupVO
.
setFirstInTime
(
orderMarkupVO
.
getOrderItemBackVOList
().
stream
().
min
(
Comparator
.
comparing
(
OrderItemBackVO:
:
getFirstInTime
)).
get
().
getFirstInTime
());
orderMarkupVO
.
setLastInTime
(
orderMarkupVO
.
getOrderItemBackVOList
().
stream
().
max
(
Comparator
.
comparing
(
OrderItemBackVO:
:
getLastInTime
)).
get
().
getLastInTime
());
// 当订单项产品有任何一个有特价标记时,那么订单标记为特价
orderMarkupVO
.
setSpecialPriceType
(
orderMarkupVO
.
getOrderItemBackVOList
().
stream
().
anyMatch
(
item
->
item
.
getSpecialPriceType
()
||
item
.
getSplitCustomPriceType
()
||
item
.
getSpecialCommission
()
||
item
.
getChannelManualPricing
()));
}
// 额外费用
orderMarkupVO
.
setExtraCosts
(
receivableService
.
getExtraReceivableByOrderId
(
orderMarkupVO
.
getOrderId
()));
}
}
return
list
;
}
@Override
public
PageResult
<
OrderBackPageVO
>
orderPage
(
OrderQueryVO
query
,
PageVO
page
)
{
if
(
Objects
.
isNull
(
query
.
getLang
()))
{
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/order/OrderMarkupVO.java
0 → 100644
View file @
dfcaa567
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
order
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.common.util.spring.enums.UserTypeEnum
;
import
cn.iocoder.yudao.framework.i18n.core.I18nMessage
;
import
cn.iocoder.yudao.module.order.dto.OrderRemindExceptionDto
;
import
cn.iocoder.yudao.module.order.enums.OrderAbnormalStateEnum
;
import
cn.iocoder.yudao.module.order.enums.OrderStatusEnum
;
import
cn.iocoder.yudao.module.order.enums.OrderStatusMsgEnum
;
import
cn.iocoder.yudao.module.order.vo.orderItem.OrderItemBackVO
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.math.BigDecimal
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
* 订单 Response VO
*
* @author 系统管理员
*/
@Data
@ApiModel
(
"管理后台 - 订单 OrderBackPageVO VO"
)
@Slf4j
public
class
OrderMarkupVO
{
@ExcelProperty
(
"主键ID"
)
@ApiModelProperty
(
value
=
"主键ID"
,
required
=
true
)
private
Long
orderId
;
@ExcelProperty
(
"订单编号"
)
@ApiModelProperty
(
value
=
"订单编号"
,
required
=
true
)
private
String
orderNo
;
@ExcelProperty
(
"提单编号"
)
@ApiModelProperty
(
value
=
"提单编号"
)
private
String
tidanNo
;
@ExcelProperty
(
"父编号"
)
@ApiModelProperty
(
value
=
"父编号"
)
private
String
parentNumber
;
/**
* 父订单id
*/
@ApiModelProperty
(
value
=
"父订单id"
)
private
Long
parentOrderId
;
@ApiModelProperty
(
value
=
"初始母订单id"
)
private
Long
initialParentOrderId
;
@ApiModelProperty
(
value
=
"初始母订单编号"
)
private
String
initialParentOrderNo
;
@ExcelProperty
(
"货柜自编号"
)
@ApiModelProperty
(
value
=
"货柜自编号"
)
private
String
containerNumber
;
@ExcelProperty
(
"运输方式id"
)
@ApiModelProperty
(
value
=
"运输方式id"
,
required
=
true
)
private
Integer
transportId
;
@ApiModelProperty
(
value
=
"订单服务类型(可多选):1 集运服务 2 海外仓"
)
private
String
type
;
@ApiModelProperty
(
value
=
"订单属性:1 普货 2 重货 3 泡货"
)
private
Integer
orderType
;
@ApiModelProperty
(
value
=
"客户经理ID"
)
private
Long
salesmanId
;
@ApiModelProperty
(
value
=
"业务员名称"
)
private
String
salesmanName
;
@ApiModelProperty
(
value
=
"客户经理所属部门ID"
)
private
Long
deptId
;
@ApiModelProperty
(
value
=
"用户ID"
)
private
Long
userId
;
@ExcelProperty
(
"唛头"
)
@ApiModelProperty
(
value
=
"唛头"
)
private
String
marks
;
@ExcelProperty
(
"产品备案属性:1有牌,2无牌,3中性,4混牌"
)
@ApiModelProperty
(
value
=
"产品备案属性:1有牌,2无牌,3中性,4混牌"
)
private
Integer
productRecord
;
@ExcelProperty
(
"是否控货"
)
@ApiModelProperty
(
value
=
"是否控货"
)
private
Boolean
isCargoControl
;
@ExcelProperty
(
"0 控货中;1 已放完货;2 部分控货"
)
@ApiModelProperty
(
value
=
"0 控货中;1 已放完货;2 部分控货"
)
private
Integer
cargoControlStatus
;
@ExcelProperty
(
"报关类别:我司全代:1,自单代报:2,混合报关:3"
)
@ApiModelProperty
(
value
=
"报关类别:我司全代:1,自单代报:2,混合报关:3"
)
private
Integer
customsType
;
@ExcelProperty
(
"订单状态详情见字典"
)
@ApiModelProperty
(
value
=
"订单状态详情见字典:order_status"
)
private
Integer
status
;
@ExcelProperty
(
"订单异常状态"
)
@ApiModelProperty
(
value
=
"订单异常状态(字典 order_abnormal_state)"
)
private
Integer
abnormalState
;
@ExcelProperty
(
"订单入仓状态"
)
@ApiModelProperty
(
value
=
"订单入仓状态(字典 order_warehouse_in_status)"
)
private
Integer
inWarehouseState
;
@ExcelProperty
(
"订单出货状态"
)
@ApiModelProperty
(
value
=
"订单出货状态(字典 order_shipment_state)"
)
private
Integer
shipmentState
;
@ExcelProperty
(
"审核类型(字典 order_approval_type) 0 为正常"
)
@ApiModelProperty
(
value
=
"审核类型(字典 order_approval_type) 0 为正常"
)
private
Integer
auditType
;
@ExcelProperty
(
"审核结果"
)
@ApiModelProperty
(
value
=
"审核结果"
)
private
String
auditResult
;
@ExcelProperty
(
"入仓数量"
)
@ApiModelProperty
(
value
=
"入仓数量"
)
private
Integer
sumQuantity
;
@ExcelProperty
(
"入仓件数"
)
@ApiModelProperty
(
value
=
"入仓件数"
,
required
=
true
)
private
Integer
sumNum
;
@ExcelProperty
(
"入仓体积"
)
@ApiModelProperty
(
value
=
"入仓体积"
,
required
=
true
)
private
BigDecimal
sumVolume
;
@ExcelProperty
(
"入仓重量"
)
@ApiModelProperty
(
value
=
"入仓重量"
,
required
=
true
)
private
BigDecimal
sumWeight
;
@ApiModelProperty
(
value
=
"重货体积"
)
private
BigDecimal
wVolume
;
@ApiModelProperty
(
value
=
"泡货重量"
)
private
BigDecimal
vWeight
;
@ExcelProperty
(
"下单的客户id"
)
@ApiModelProperty
(
value
=
"下单的客户id"
,
required
=
true
)
private
Long
customerId
;
/**
* 完成入仓的入仓体积
*/
@ApiModelProperty
(
value
=
"完成入仓的入仓体积"
)
private
BigDecimal
sumVolumeFinishedWarehouseIn
;
/**
* 完成入仓的入仓重量
*/
@ApiModelProperty
(
value
=
"完成入仓的入仓重量"
)
private
BigDecimal
sumWeightFinishedWarehouseIn
;
@ExcelProperty
(
"总件数"
)
@ApiModelProperty
(
value
=
"总件数"
,
required
=
true
)
private
Integer
totalNum
;
@ExcelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
true
)
private
Date
createTime
;
@ExcelProperty
(
"收货人客户id"
)
@ApiModelProperty
(
value
=
"收货人客户id"
)
private
Long
consigneeCustomerId
;
@ExcelProperty
(
"收货人客户编号"
)
@ApiModelProperty
(
value
=
"收货人客户编号"
)
private
String
consigneeCustomerNumber
;
@ExcelProperty
(
"收货人跟进客服"
)
@ApiModelProperty
(
value
=
"收货人跟进客服"
)
private
String
consigneeFollowCustomerService
;
@ExcelProperty
(
"收货人姓名"
)
@ApiModelProperty
(
value
=
"收货人姓名"
)
private
String
consigneeName
;
@ExcelProperty
(
"收货人姓名(英文)"
)
@ApiModelProperty
(
value
=
"收货人姓名(英文)"
)
private
String
consigneeNameEn
;
@ExcelProperty
(
"收货人手机"
)
@ApiModelProperty
(
value
=
"收货人手机"
)
private
String
consigneePhone
;
@ApiModelProperty
(
value
=
"收货人手机国家区号"
)
private
String
consigneeCountryCode
;
@ExcelProperty
(
"发货人客户id"
)
@ApiModelProperty
(
value
=
"发货人客户id"
)
private
Long
consignorCustomerId
;
@ExcelProperty
(
"发货人客户编号"
)
@ApiModelProperty
(
value
=
"发货人客户编号"
)
private
String
consignorCustomerNumber
;
@ExcelProperty
(
"发货人跟进客服"
)
@ApiModelProperty
(
value
=
"发货人跟进客服"
)
private
String
consignorFollowCustomerService
;
@ExcelProperty
(
"发货人姓名"
)
@ApiModelProperty
(
value
=
"发货人姓名"
)
private
String
consignorName
;
@ExcelProperty
(
"发货人姓名(英文)"
)
@ApiModelProperty
(
value
=
"发货人姓名(英文)"
)
private
String
consignorNameEn
;
@ExcelProperty
(
"发货人手机"
)
@ApiModelProperty
(
value
=
"发货人手机"
)
private
String
consignorPhone
;
@ApiModelProperty
(
value
=
"发货人手机国家区号"
)
private
String
consignorCountryCode
;
@ExcelProperty
(
"控货人姓名"
)
@ApiModelProperty
(
value
=
"控货人姓名"
)
private
String
cargoControlName
;
@ExcelProperty
(
"控货人姓名(英文)"
)
@ApiModelProperty
(
value
=
"控货人姓名(英文)"
)
private
String
cargoControlNameEn
;
@ExcelProperty
(
"控货人手机"
)
@ApiModelProperty
(
value
=
"控货人手机"
)
private
String
cargoControlPhone
;
@ExcelProperty
(
"控货人手机国家区号"
)
@ApiModelProperty
(
value
=
"控货人手机国家区号"
)
private
String
cargoControlCountryCode
;
@ExcelProperty
(
value
=
"特需类型"
)
@ApiModelProperty
(
value
=
"特需类型"
)
private
String
advanceType
;
@ApiModelProperty
(
value
=
"始发地ID"
)
private
Long
departureId
;
@ApiModelProperty
(
value
=
"目的地ID"
)
private
Long
objectiveId
;
@ApiModelProperty
(
value
=
"始发地名称"
)
private
String
departureName
;
@ApiModelProperty
(
value
=
"目的地名称"
)
private
String
objectiveName
;
@ApiModelProperty
(
value
=
"始发仓库ID"
)
private
Long
startWarehouseId
;
@ApiModelProperty
(
value
=
"目的仓库ID"
)
private
Long
dstWarehouseId
;
@ExcelProperty
(
value
=
"始发仓库"
)
@ApiModelProperty
(
value
=
"始发仓库"
)
private
String
startWarehouseName
;
@ExcelProperty
(
value
=
"目的仓库"
)
@ApiModelProperty
(
value
=
"目的仓库"
)
private
String
dstWarehouseName
;
@ApiModelProperty
(
value
=
"调仓始发仓id"
)
private
Long
adjustToStartWarehouseId
;
/**
* 调仓目的仓
*/
@ApiModelProperty
(
value
=
"调仓目的仓id"
)
private
Long
adjustToDestWarehouseId
;
@ExcelProperty
(
"调仓后的始发仓"
)
@ApiModelProperty
(
value
=
"调仓后的始发仓"
)
private
String
adjustToStartWarehouseName
;
@ExcelProperty
(
"调仓后的目的仓"
)
@ApiModelProperty
(
value
=
"调仓后的目的仓"
)
private
String
adjustToDestWarehouseName
;
@ApiModelProperty
(
value
=
"目的地调仓-始发仓id"
)
private
Long
destAdjustToStartWarehouseId
;
@ApiModelProperty
(
value
=
"目的地调仓-目的仓id"
)
private
Long
destAdjustToDestWarehouseId
;
@ExcelProperty
(
"目的地调-始发仓"
)
@ApiModelProperty
(
value
=
"目的地调仓-始发仓"
)
private
String
destAdjustToStartWarehouseName
;
@ExcelProperty
(
"目的地调仓-目的仓"
)
@ApiModelProperty
(
value
=
"目的地调仓-目的仓"
)
private
String
destAdjustToDestWarehouseName
;
@ApiModelProperty
(
value
=
"不阻塞流程的异常说明(支持多个异常说明)"
)
private
String
exceptionReason
;
@ApiModelProperty
(
value
=
"不阻塞流程的异常说明(支持多个异常说明)"
)
private
List
<
OrderRemindExceptionDto
>
remindExceptionDtoList
;
@ApiModelProperty
(
value
=
"是否有异常(此处为不阻塞流程的异常)"
)
private
Boolean
isException
=
Boolean
.
FALSE
;
@ApiModelProperty
(
value
=
"费用清单及下单统计"
)
@ExcelIgnore
private
String
cost
;
@ApiModelProperty
(
value
=
"费用清单及下单统计VO"
)
@ExcelIgnore
private
CostVO
costVO
;
@ExcelProperty
(
value
=
"费用清单"
)
private
String
feeCost
;
@ApiModelProperty
(
value
=
"首次入仓时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
firstInTime
;
@ApiModelProperty
(
value
=
"最后入仓时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
lastInTime
;
@ApiModelProperty
(
value
=
"是否特价"
)
private
Boolean
specialPriceType
;
@ApiModelProperty
(
value
=
"已装柜时间/到仓时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
loadTime
;
@ApiModelProperty
(
value
=
"已卸柜/出仓时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
unloadTime
;
@ApiModelProperty
(
value
=
"是否限制修改收货人"
)
private
Boolean
isLimitUpdateConsignee
;
@ApiModelProperty
(
value
=
"放货锁定收货人到期时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
lockConsigneeTime
;
@ApiModelProperty
(
value
=
"放货锁定收货人天数"
)
private
Integer
lockConsigneeDay
;
@ApiModelProperty
(
value
=
"提货状态:0 未提货 1 部分提货 2 已提货"
)
private
Integer
pickState
;
/**
* 渠道名称
*/
@ApiModelProperty
(
value
=
"渠道名称"
)
private
String
channelName
;
/**
* 是否为我控货
*/
@ApiModelProperty
(
value
=
"是否为我控货"
)
private
Boolean
cargoController
=
Boolean
.
FALSE
;
/**
* 是否为我发货
*/
@ApiModelProperty
(
value
=
"是否为我发货"
)
private
Boolean
deliverGoods
=
Boolean
.
FALSE
;
/**
* 是否为我收货
*/
@ApiModelProperty
(
value
=
"是否为我收货"
)
private
Boolean
receiving
=
Boolean
.
FALSE
;
@ApiModelProperty
(
value
=
"是否外部仓"
)
private
Boolean
isExternalWarehouse
=
Boolean
.
FALSE
;
/**
* 报价单ID
*/
@ApiModelProperty
(
value
=
"报价单ID"
)
private
Long
offerId
;
@ApiModelProperty
(
value
=
"报价单号"
)
private
String
offerNo
;
/**
* 报价单状态
*/
@ApiModelProperty
(
value
=
"报价单状态"
)
private
Integer
offerStatus
;
/**
* 状态说明
*/
@ApiModelProperty
(
value
=
"状态说明"
)
private
String
statusText
;
/**
* 动态
*/
@ApiModelProperty
(
value
=
"动态"
)
private
String
statusMsg
;
/**
* 关联订单状态
*/
@ApiModelProperty
(
value
=
"关联订单状态"
)
private
String
guanLianOrderStatus
;
@ApiModelProperty
(
value
=
"关联订单状态"
)
private
List
<
GuanLianOrderStatusVO
>
guanLianOrderStatusVOList
;
@ApiModelProperty
(
value
=
"目的港清关:1 我司 2 客户"
)
private
Integer
portDestCustomsClear
;
@ApiModelProperty
(
value
=
"发货方式:1 多票 2 单票"
)
private
Integer
deliveryWay
;
@ApiModelProperty
(
value
=
"清关证书备注"
)
private
String
customsClearCertRemarks
;
@ApiModelProperty
(
value
=
"空运可出货状态: 0 默认值 1 待出 2 可出 3 备货中 4 已备货"
)
private
Integer
airShipment
;
@ApiModelProperty
(
value
=
"特价泡重"
)
private
BigDecimal
specialVWeight
;
@ApiModelProperty
(
value
=
"是否处理了渠道特性异常"
)
private
Boolean
handlerChannelAttrException
;
@ApiModelProperty
(
value
=
"打包前入仓重量"
)
private
BigDecimal
weightBeforePack
;
@ApiModelProperty
(
value
=
"打包后入仓重量"
)
private
BigDecimal
weightAfterPack
;
@ApiModelProperty
(
value
=
"备货重量阀值"
)
private
BigDecimal
stockOverWeightLimit
;
@ApiModelProperty
(
value
=
"拆单子订单是作为独立订单计算(拆单业务只要涉及到空运即将所有拆单后的子订单作为独立订单来计算)"
)
private
Boolean
splitSeparateOrder
=
false
;
@ApiModelProperty
(
value
=
"是否显示提单金额"
)
private
Boolean
displayBillLadingPrice
=
true
;
/**
* 状态key(前端在订单列表做权限按钮判断)
*/
@ApiModelProperty
(
value
=
"订单列表权限按钮判断状态key"
)
private
Integer
statusKey
;
/**
* 端口 {@link UserTypeEnum}
*/
@ApiModelProperty
(
value
=
"端口(默认管理端)"
)
private
Integer
userType
=
2
;
@ApiModelProperty
(
value
=
"语言"
)
private
Integer
lang
;
@ApiModelProperty
(
value
=
"订单关联产品信息"
)
List
<
OrderItemBackVO
>
orderItemBackVOList
;
@ApiModelProperty
(
value
=
"到仓件数"
)
private
Integer
checkNum
;
@ApiModelProperty
(
value
=
"到仓数量"
)
private
Integer
checkQuantity
;
@ApiModelProperty
(
value
=
"到仓体积"
)
private
BigDecimal
checkVolume
;
@ApiModelProperty
(
value
=
"到仓重量"
)
private
BigDecimal
checkWeight
;
public
void
setGuanLianOrderStatus
(
String
guanLianOrderStatus
)
{
this
.
guanLianOrderStatus
=
guanLianOrderStatus
;
if
(
StringUtils
.
isNotBlank
(
guanLianOrderStatus
))
{
this
.
guanLianOrderStatusVOList
=
JSONObject
.
parseArray
(
guanLianOrderStatus
,
GuanLianOrderStatusVO
.
class
);
this
.
getOrderDesc
();
}
}
public
void
setGuanLianOrderStatusVOList
(
List
<
GuanLianOrderStatusVO
>
guanLianOrderStatusVOList
)
{
this
.
guanLianOrderStatusVOList
=
guanLianOrderStatusVOList
;
if
(
CollectionUtil
.
isNotEmpty
(
guanLianOrderStatusVOList
))
{
this
.
guanLianOrderStatus
=
JSONObject
.
toJSONString
(
guanLianOrderStatusVOList
);
}
}
public
void
setOrderNo
(
String
orderNo
)
{
this
.
orderNo
=
orderNo
.
contains
(
"DRAFT"
)
?
null
:
orderNo
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
Integer
lang
=
Objects
.
nonNull
(
this
.
lang
)
?
this
.
lang
:
I18nMessage
.
getLang
();
switch
(
lang
)
{
case
0
:
this
.
statusText
=
OrderStatusEnum
.
valueOf
(
status
).
getNameZh
();
break
;
case
1
:
this
.
statusText
=
OrderStatusEnum
.
valueOf
(
status
).
getNameEn
();
break
;
case
2
:
this
.
statusText
=
OrderStatusEnum
.
valueOf
(
status
).
getNameFr
();
break
;
default
:
this
.
statusText
=
OrderStatusEnum
.
valueOf
(
status
).
getNameZh
();
}
this
.
getOrderDesc
();
}
public
void
setAbnormalState
(
Integer
abnormalState
)
{
this
.
abnormalState
=
abnormalState
;
this
.
getOrderDesc
();
}
public
void
setInWarehouseState
(
Integer
inWarehouseState
)
{
this
.
inWarehouseState
=
inWarehouseState
;
this
.
getOrderDesc
();
}
public
void
setAirShipment
(
Integer
airShipment
)
{
this
.
airShipment
=
airShipment
;
this
.
getOrderDesc
();
}
public
void
setShipmentState
(
Integer
shipmentState
)
{
this
.
shipmentState
=
shipmentState
;
this
.
getOrderDesc
();
}
public
void
setPickState
(
Integer
pickState
)
{
this
.
pickState
=
pickState
;
if
(
Objects
.
nonNull
(
pickState
)
&&
pickState
>
0
)
{
// 当提货状态不未空时,判断提货状态是否需要转化为对应的原有主状态中的提货状态
this
.
status
=
pickState
==
1
?
21
:
20
;
Integer
lang
=
Objects
.
nonNull
(
this
.
lang
)
?
this
.
lang
:
I18nMessage
.
getLang
();
this
.
statusText
=
lang
==
0
?
OrderStatusEnum
.
valueOf
(
this
.
status
).
getNameZh
()
:
OrderStatusEnum
.
valueOf
(
this
.
status
).
getNameEn
();
}
this
.
getOrderDesc
();
}
public
void
setAuditType
(
Integer
auditType
)
{
this
.
auditType
=
auditType
;
this
.
getOrderDesc
();
}
public
void
setAuditResult
(
String
auditResult
)
{
this
.
auditResult
=
auditResult
;
this
.
getOrderDesc
();
}
public
void
setLang
(
Integer
lang
)
{
this
.
lang
=
lang
;
if
(
StringUtils
.
isNotBlank
(
this
.
exceptionReason
)
&&
Objects
.
nonNull
(
lang
))
{
this
.
remindExceptionDtoList
=
JSONObject
.
parseArray
(
this
.
exceptionReason
,
OrderRemindExceptionDto
.
class
)
.
stream
()
.
peek
(
ern
->
ern
.
setReason
(
lang
==
0
?
I18nMessage
.
getZhMessage
(
ern
.
getReason
())
:
I18nMessage
.
getEnMessage
(
ern
.
getReason
())))
.
collect
(
Collectors
.
toList
());
}
this
.
getOrderDesc
();
}
public
void
setExceptionReason
(
String
exceptionReason
)
{
this
.
exceptionReason
=
exceptionReason
;
if
(
StringUtils
.
isNotBlank
(
exceptionReason
)
&&
Objects
.
nonNull
(
this
.
lang
))
{
this
.
remindExceptionDtoList
=
JSONObject
.
parseArray
(
exceptionReason
,
OrderRemindExceptionDto
.
class
)
.
stream
()
.
peek
(
ern
->
ern
.
setReason
(
lang
==
0
?
I18nMessage
.
getZhMessage
(
ern
.
getReason
())
:
I18nMessage
.
getEnMessage
(
ern
.
getReason
())))
.
collect
(
Collectors
.
toList
());
}
this
.
getOrderDesc
();
}
private
void
getOrderDesc
()
{
// TODO 这里的文案国际化现在只支持两种语言,如果需要支持更多的语言,需要优化
Integer
lang
=
Objects
.
nonNull
(
this
.
lang
)
?
this
.
lang
:
I18nMessage
.
getLang
();
if
(
null
!=
this
.
status
&&
this
.
status
.
equals
(
OrderStatusEnum
.
CANCEL
.
getValue
())
&&
this
.
userType
!=
null
)
{
String
message
=
this
.
userType
==
2
?
OrderStatusMsgEnum
.
CANCEL
.
getAdminSourceName
()
:
OrderStatusMsgEnum
.
CANCEL
.
getCustomerSourceName
();
this
.
statusMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
message
)
:
I18nMessage
.
getEnMessage
(
message
);
}
else
if
(
null
!=
this
.
abnormalState
&&
this
.
abnormalState
>
0
)
{
this
.
statusKey
=
10000
;
OrderAbnormalStateEnum
abnormalStateEnum
=
OrderAbnormalStateEnum
.
valueOf
(
abnormalState
);
if
(
Objects
.
isNull
(
abnormalStateEnum
))
{
this
.
statusMsg
=
lang
==
0
?
"未知异常"
:
"UNKNOWN_EXCEPTION"
;
}
else
{
this
.
statusMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
abnormalStateEnum
.
getDesc
())
:
I18nMessage
.
getEnMessage
(
abnormalStateEnum
.
getDesc
());
}
}
else
if
(
StringUtils
.
isNotBlank
(
this
.
auditResult
))
{
this
.
statusMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
auditResult
)
:
I18nMessage
.
getEnMessage
(
auditResult
);
}
else
if
(
CollectionUtil
.
isNotEmpty
(
this
.
remindExceptionDtoList
)
&&
this
.
remindExceptionDtoList
.
size
()
>
0
)
{
this
.
statusMsg
=
remindExceptionDtoList
.
get
(
0
).
getReason
();
}
else
if
(
null
!=
this
.
status
&&
this
.
status
==
5
&&
CollectionUtil
.
isNotEmpty
(
this
.
guanLianOrderStatusVOList
))
{
// 已入仓的订单才展示关联异常信息
// 如果查询返回了关联订单状态,表示需要显示关联订单状态,关联订单状态冗余的是国际化key值
// 排序
this
.
guanLianOrderStatusVOList
=
this
.
guanLianOrderStatusVOList
.
stream
().
sorted
(
Comparator
.
comparing
(
GuanLianOrderStatusVO:
:
getType
)).
collect
(
Collectors
.
toList
());
GuanLianOrderStatusVO
guanlianOrderStatusVO
=
guanLianOrderStatusVOList
.
get
(
0
);
switch
(
guanlianOrderStatusVO
.
getType
())
{
case
1
:
// 关联异常状态封装,订单状态显示“关联单#订单号#,#异常名称#”Associated order %s, %s
String
abnormalMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
"guanlian.order.abnormalState"
)
:
I18nMessage
.
getEnMessage
(
"guanlian.order.abnormalState"
);
this
.
statusMsg
=
String
.
format
(
abnormalMsg
,
guanlianOrderStatusVO
.
getOrderNo
(),
I18nMessage
.
getMessage
(
guanlianOrderStatusVO
.
getStatusMsg
()));
break
;
case
2
:
// 关联审批状态封装,订单状态显示“关联单#订单号##审核状态#”
String
auditMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
"guanlian.order.audit"
)
:
I18nMessage
.
getEnMessage
(
"guanlian.order.audit"
);
this
.
statusMsg
=
String
.
format
(
auditMsg
,
guanlianOrderStatusVO
.
getOrderNo
(),
I18nMessage
.
getMessage
(
guanlianOrderStatusVO
.
getStatusMsg
()));
break
;
case
3
:
// 关联未入仓状态封装,订单状态显示“关联单#订单号#未入仓”
String
waitWarehouseInMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
guanlianOrderStatusVO
.
getStatusMsg
())
:
I18nMessage
.
getEnMessage
(
guanlianOrderStatusVO
.
getStatusMsg
());
this
.
statusMsg
=
String
.
format
(
waitWarehouseInMsg
,
guanlianOrderStatusVO
.
getOrderNo
());
break
;
default
:
this
.
statusMsg
=
lang
==
0
?
I18nMessage
.
getZhMessage
(
guanlianOrderStatusVO
.
getStatusMsg
())
:
I18nMessage
.
getEnMessage
(
guanlianOrderStatusVO
.
getStatusMsg
());
}
}
else
if
(
null
!=
this
.
status
&&
null
!=
this
.
inWarehouseState
&&
null
!=
this
.
shipmentState
&&
null
!=
this
.
airShipment
&&
null
!=
this
.
transportId
)
{
this
.
statusMsg
=
OrderStatusMsgEnum
.
getMsg
(
this
.
pickState
,
this
.
status
,
this
.
inWarehouseState
,
this
.
shipmentState
,
this
.
airShipment
,
this
.
transportId
,
this
.
userType
,
lang
);
// this.statusKey = OrderStatusMsgEnum.getStatusKey(this.status, this.inWarehouseState, this.shipmentState);
}
}
public
String
getCost
()
{
return
cost
;
}
public
void
setCost
(
String
cost
)
{
this
.
cost
=
cost
;
if
(
StringUtils
.
isNotBlank
(
cost
))
{
this
.
costVO
=
JSONObject
.
parseObject
(
this
.
cost
,
CostVO
.
class
);
}
}
public
void
setCostVO
(
CostVO
costVO
)
{
this
.
costVO
=
costVO
;
this
.
cost
=
JSONObject
.
toJSONString
(
costVO
);
}
public
CostVO
getCostVO
()
{
return
JSONObject
.
parseObject
(
this
.
cost
,
CostVO
.
class
);
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receivable/ReceivableMapper.java
View file @
dfcaa567
...
...
@@ -354,4 +354,6 @@ public interface ReceivableMapper extends AbstractMapper<ReceivableDO> {
List
<
Long
>
getAllBoxId
();
List
<
Long
>
getDestWarehouseIdListByDestCity
(
@Param
(
"destCity"
)
List
<
Long
>
destCity
);
List
<
ReceivableBackVO
>
getExtraReceivableByOrderId
(
@Param
(
"orderId"
)
Long
orderId
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableService.java
View file @
dfcaa567
...
...
@@ -144,6 +144,15 @@ public interface ReceivableService extends IService<ReceivableDO> {
*/
List
<
ReceivableBackVO
>
getReceivableByOrderId
(
Long
orderId
);
/**
* 根据订单id获得额外应收款(注:订单本身计算得出的运费、清关费、保价费除外的其他费用都属于额外费用)
*
* @param orderId 订单ID
* @return 应收款列表
*/
List
<
ReceivableBackVO
>
getExtraReceivableByOrderId
(
Long
orderId
);
/**
* 获得应收款列表, 用于 Excel 导出
*
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
View file @
dfcaa567
...
...
@@ -323,6 +323,10 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
return
receivableBackVOList
;
}
@Override
public
List
<
ReceivableBackVO
>
getExtraReceivableByOrderId
(
Long
orderId
)
{
return
receivableMapper
.
getExtraReceivableByOrderId
(
orderId
);
}
@Override
public
List
<
ReceivableDO
>
getReceivableList
(
ReceivableQueryVO
query
)
{
...
...
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableMapper.xml
View file @
dfcaa567
...
...
@@ -705,4 +705,12 @@
</if>
GROUP BY r.id
</select>
<select
id=
"getExtraReceivableByOrderId"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receivable.ReceivableBackVO"
>
SELECT r.*
FROM ecw_receivable r
WHERE r.deleted = 0
AND r.fee_source > 1
AND r.order_id = #{orderId}
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment