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
3bde7cb7
Commit
3bde7cb7
authored
Sep 07, 2024
by
chenjiuping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常订单查询
parent
01c23c6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
16 deletions
+60
-16
OrderExceptionServiceImpl.java
...der/service/orderException/OrderExceptionServiceImpl.java
+44
-11
OrderExceptionQueryVO.java
...module/order/vo/orderException/OrderExceptionQueryVO.java
+13
-5
OrderExceptionMapper.xml
.../resources/mapper/orderException/OrderExceptionMapper.xml
+3
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderException/OrderExceptionServiceImpl.java
View file @
3bde7cb7
...
@@ -35,13 +35,11 @@ import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
...
@@ -35,13 +35,11 @@ import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
import
cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO
;
import
cn.iocoder.yudao.module.member.api.user.dto.UserRespDTO
;
import
cn.iocoder.yudao.module.order.convert.orderException.OrderExceptionConvert
;
import
cn.iocoder.yudao.module.order.convert.orderException.OrderExceptionConvert
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.zTest
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderConsignor.OrderConsignorDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderException.OrderExceptionDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderException.OrderExceptionDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderExceptionChannelPrice.OrderExceptionChannelPriceDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderExceptionChannelPrice.OrderExceptionChannelPriceDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderExceptionResult.OrderExceptionResultDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderExceptionResult.OrderExceptionResultDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.dal.mysql.order.ZTestMapper2
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderException.OrderExceptionMapper
;
import
cn.iocoder.yudao.module.order.dal.mysql.orderException.OrderExceptionMapper
;
import
cn.iocoder.yudao.module.order.enums.OrderAbnormalStateEnum
;
import
cn.iocoder.yudao.module.order.enums.OrderAbnormalStateEnum
;
import
cn.iocoder.yudao.module.order.enums.OrderExceptionEnum
;
import
cn.iocoder.yudao.module.order.enums.OrderExceptionEnum
;
...
@@ -417,13 +415,20 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -417,13 +415,20 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
queryWrapper
.
eqIfPresent
(
"o.is_external_warehouse"
,
reqVo
.
getIsExternalWarehouse
());
queryWrapper
.
eqIfPresent
(
"o.is_external_warehouse"
,
reqVo
.
getIsExternalWarehouse
());
queryWrapper
.
eqIfPresent
(
"o.is_cargo_control"
,
reqVo
.
getIsCargoControl
());
queryWrapper
.
eqIfPresent
(
"o.is_cargo_control"
,
reqVo
.
getIsCargoControl
());
queryWrapper
.
eqIfPresent
(
"o.transport_id"
,
reqVo
.
getTransportId
());
queryWrapper
.
eqIfPresent
(
"o.transport_id"
,
reqVo
.
getTransportId
());
if
(
StringUtils
.
isNotBlank
(
reqVo
.
getOriginId
())
)
{
if
(
null
!=
reqVo
.
getOriginId
()
&&
reqVo
.
getOriginId
().
size
()
>
0
)
{
queryWrapper
.
eq
IfPresent
(
"wl.start_warehouse_id"
,
reqVo
.
getOriginId
());
queryWrapper
.
in
IfPresent
(
"wl.start_warehouse_id"
,
reqVo
.
getOriginId
());
}
}
if
(
null
!=
reqVo
.
getDestinationId
()
&&
reqVo
.
getDestinationId
().
size
()
>
0
)
{
if
(
null
!=
reqVo
.
getDestinationId
()
&&
reqVo
.
getDestinationId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"wl.dest_warehouse_id"
,
reqVo
.
getDestinationId
());
queryWrapper
.
inIfPresent
(
"wl.dest_warehouse_id"
,
reqVo
.
getDestinationId
());
}
}
if
(
null
!=
reqVo
.
getDestCityId
()
&&
reqVo
.
getDestCityId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"eo.objective_id"
,
reqVo
.
getDestCityId
());
}
if
(
null
!=
reqVo
.
getDestCountryId
()
&&
reqVo
.
getDestCountryId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"eo.objective_country_id"
,
reqVo
.
getDestCountryId
());
}
if
(
null
!=
reqVo
.
getOrderExceptionType
()
&&
reqVo
.
getOrderExceptionType
().
size
()
>
0
)
{
if
(
null
!=
reqVo
.
getOrderExceptionType
()
&&
reqVo
.
getOrderExceptionType
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"e.order_exception_type"
,
reqVo
.
getOrderExceptionType
());
queryWrapper
.
inIfPresent
(
"e.order_exception_type"
,
reqVo
.
getOrderExceptionType
());
}
}
...
@@ -477,7 +482,12 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -477,7 +482,12 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
queryWrapper
.
inIfPresent
(
"o.package_type"
,
reqVo
.
getPackageType
().
split
(
","
));
queryWrapper
.
inIfPresent
(
"o.package_type"
,
reqVo
.
getPackageType
().
split
(
","
));
}
}
queryWrapper
.
eq
(
null
!=
reqVo
.
getChannelId
(),
"o.channel_id"
,
reqVo
.
getChannelId
());
//queryWrapper.eq(null != reqVo.getChannelId(), "o.channel_id", reqVo.getChannelId());
queryWrapper
.
in
(
null
!=
reqVo
.
getChannelIdList
(),
"o.channel_id"
,
reqVo
.
getChannelIdList
());
//跟进客服
queryWrapper
.
in
(
null
!=
reqVo
.
getCustomerServiceIdList
(),
"su.customer_service_id"
,
reqVo
.
getCustomerServiceIdList
());
queryWrapper
.
orderByDesc
(
"e.id"
);
queryWrapper
.
orderByDesc
(
"e.id"
);
...
@@ -2504,13 +2514,20 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -2504,13 +2514,20 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
queryWrapper
.
eqIfPresent
(
"a.is_cargo_control"
,
queryWrapper
.
eqIfPresent
(
"a.is_cargo_control"
,
reqVo
.
getIsCargoControl
());
reqVo
.
getIsCargoControl
());
queryWrapper
.
eqIfPresent
(
"a.transport_id"
,
reqVo
.
getTransportId
());
queryWrapper
.
eqIfPresent
(
"a.transport_id"
,
reqVo
.
getTransportId
());
if
(
StringUtils
.
isNotBlank
(
reqVo
.
getOriginId
())
)
{
if
(
null
!=
reqVo
.
getOriginId
()
&&
reqVo
.
getOriginId
().
size
()
>
0
)
{
queryWrapper
.
eq
IfPresent
(
"wl.start_warehouse_id"
,
reqVo
.
getOriginId
());
queryWrapper
.
in
IfPresent
(
"wl.start_warehouse_id"
,
reqVo
.
getOriginId
());
}
}
if
(
null
!=
reqVo
.
getDestinationId
()
&&
reqVo
.
getDestinationId
().
size
()
>
0
)
{
if
(
null
!=
reqVo
.
getDestinationId
()
&&
reqVo
.
getDestinationId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"wl.dest_warehouse_id"
,
reqVo
.
getDestinationId
());
queryWrapper
.
inIfPresent
(
"wl.dest_warehouse_id"
,
reqVo
.
getDestinationId
());
}
}
if
(
null
!=
reqVo
.
getDestCityId
()
&&
reqVo
.
getDestCityId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"eo.objective_id"
,
reqVo
.
getDestCityId
());
}
if
(
null
!=
reqVo
.
getDestCountryId
()
&&
reqVo
.
getDestCountryId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"eo.objective_country_id"
,
reqVo
.
getDestCountryId
());
}
queryWrapper
.
eqIfPresent
(
"s.order_exception_status"
,
reqVo
.
getOrderExceptionStatus
());
queryWrapper
.
eqIfPresent
(
"s.order_exception_status"
,
reqVo
.
getOrderExceptionStatus
());
if
(
StringUtils
.
isNotBlank
(
reqVo
.
getConsignor
()))
{
if
(
StringUtils
.
isNotBlank
(
reqVo
.
getConsignor
()))
{
queryWrapper
.
eq
(
"oc.customer_id"
,
reqVo
.
getConsignor
());
queryWrapper
.
eq
(
"oc.customer_id"
,
reqVo
.
getConsignor
());
...
@@ -2570,7 +2587,12 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -2570,7 +2587,12 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
queryWrapper
.
inIfPresent
(
"a.package_type"
,
reqVo
.
getPackageType
().
split
(
","
));
queryWrapper
.
inIfPresent
(
"a.package_type"
,
reqVo
.
getPackageType
().
split
(
","
));
}
}
queryWrapper
.
eq
(
null
!=
reqVo
.
getChannelId
(),
"a.channel_id"
,
reqVo
.
getChannelId
());
//渠道支持多选queryWrapper.eq(null != reqVo.getChannelId(), "a.channel_id", reqVo.getChannelId());
queryWrapper
.
in
(
null
!=
reqVo
.
getChannelIdList
(),
"a.channel_id"
,
reqVo
.
getChannelIdList
());
//跟进客服
queryWrapper
.
in
(
null
!=
reqVo
.
getCustomerServiceIdList
(),
"su.customer_service_id"
,
reqVo
.
getCustomerServiceIdList
());
queryWrapper
.
orderByDesc
(
"b.id"
);
queryWrapper
.
orderByDesc
(
"b.id"
);
...
@@ -2620,12 +2642,18 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -2620,12 +2642,18 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
queryWrapper
.
eqIfPresent
(
"a.is_external_warehouse"
,
reqVo
.
getIsExternalWarehouse
());
queryWrapper
.
eqIfPresent
(
"a.is_external_warehouse"
,
reqVo
.
getIsExternalWarehouse
());
queryWrapper
.
eqIfPresent
(
"a.is_cargo_control"
,
reqVo
.
getIsCargoControl
());
queryWrapper
.
eqIfPresent
(
"a.is_cargo_control"
,
reqVo
.
getIsCargoControl
());
queryWrapper
.
eqIfPresent
(
"a.transport_id"
,
reqVo
.
getTransportId
());
queryWrapper
.
eqIfPresent
(
"a.transport_id"
,
reqVo
.
getTransportId
());
if
(
StringUtils
.
isNotBlank
(
reqVo
.
getOriginId
())
)
{
if
(
null
!=
reqVo
.
getOriginId
()
&&
reqVo
.
getOriginId
().
size
()
>
0
)
{
queryWrapper
.
eq
IfPresent
(
"wl.start_warehouse_id"
,
reqVo
.
getOriginId
());
queryWrapper
.
in
IfPresent
(
"wl.start_warehouse_id"
,
reqVo
.
getOriginId
());
}
}
if
(
null
!=
reqVo
.
getDestinationId
()
&&
reqVo
.
getDestinationId
().
size
()
>
0
)
{
if
(
null
!=
reqVo
.
getDestinationId
()
&&
reqVo
.
getDestinationId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"wl.dest_warehouse_id"
,
reqVo
.
getDestinationId
());
queryWrapper
.
inIfPresent
(
"wl.dest_warehouse_id"
,
reqVo
.
getDestinationId
());
}
}
if
(
null
!=
reqVo
.
getDestCityId
()
&&
reqVo
.
getDestCityId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"eo.objective_id"
,
reqVo
.
getDestCityId
());
}
if
(
null
!=
reqVo
.
getDestCountryId
()
&&
reqVo
.
getDestCountryId
().
size
()
>
0
)
{
queryWrapper
.
inIfPresent
(
"eo.objective_country_id"
,
reqVo
.
getDestCountryId
());
}
queryWrapper
.
eqIfPresent
(
"s.order_exception_status"
,
reqVo
.
getOrderExceptionStatus
());
queryWrapper
.
eqIfPresent
(
"s.order_exception_status"
,
reqVo
.
getOrderExceptionStatus
());
if
(
StringUtils
.
isNotBlank
(
reqVo
.
getConsignor
()))
{
if
(
StringUtils
.
isNotBlank
(
reqVo
.
getConsignor
()))
{
...
@@ -2677,7 +2705,12 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
...
@@ -2677,7 +2705,12 @@ public class OrderExceptionServiceImpl extends AbstractService<OrderExceptionMap
queryWrapper
.
inIfPresent
(
"a.package_type"
,
reqVo
.
getPackageType
().
split
(
","
));
queryWrapper
.
inIfPresent
(
"a.package_type"
,
reqVo
.
getPackageType
().
split
(
","
));
}
}
queryWrapper
.
eq
(
null
!=
reqVo
.
getChannelId
(),
"a.channel_id"
,
reqVo
.
getChannelId
());
//queryWrapper.eq(null != reqVo.getChannelId(), "a.channel_id", reqVo.getChannelId());
queryWrapper
.
in
(
null
!=
reqVo
.
getChannelIdList
(),
"a.channel_id"
,
reqVo
.
getChannelIdList
());
//跟进客服
queryWrapper
.
in
(
null
!=
reqVo
.
getCustomerServiceIdList
(),
"su.customer_service_id"
,
reqVo
.
getCustomerServiceIdList
());
StatisticsOrderVO
vo
=
orderExceptionMapper
.
statisticsExceptionOrder
(
queryWrapper
,
reqVo
.
getOrderExceptionType
(),
startTime
,
endTime
);
StatisticsOrderVO
vo
=
orderExceptionMapper
.
statisticsExceptionOrder
(
queryWrapper
,
reqVo
.
getOrderExceptionType
(),
startTime
,
endTime
);
if
(
Objects
.
nonNull
(
vo
))
{
if
(
Objects
.
nonNull
(
vo
))
{
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/orderException/OrderExceptionQueryVO.java
View file @
3bde7cb7
...
@@ -18,10 +18,10 @@ public class OrderExceptionQueryVO {
...
@@ -18,10 +18,10 @@ public class OrderExceptionQueryVO {
@ApiModelProperty
(
value
=
"运输方式id"
)
@ApiModelProperty
(
value
=
"运输方式id"
)
private
Integer
transportId
;
private
Integer
transportId
;
@ApiModelProperty
(
value
=
"始发
地
"
)
@ApiModelProperty
(
value
=
"始发
仓
"
)
private
String
originId
;
private
List
<
String
>
originId
;
@ApiModelProperty
(
value
=
"目的
地
"
)
@ApiModelProperty
(
value
=
"目的
仓
"
)
private
List
<
String
>
destinationId
;
private
List
<
String
>
destinationId
;
@ApiModelProperty
(
value
=
"订单id"
)
@ApiModelProperty
(
value
=
"订单id"
)
...
@@ -101,7 +101,15 @@ public class OrderExceptionQueryVO {
...
@@ -101,7 +101,15 @@ public class OrderExceptionQueryVO {
@ApiModelProperty
(
value
=
"特需"
)
@ApiModelProperty
(
value
=
"特需"
)
private
String
packageType
;
private
String
packageType
;
@ApiModelProperty
(
value
=
"渠道"
)
@ApiModelProperty
(
value
=
"渠道
集合
"
)
private
L
ong
channelId
;
private
L
ist
<
Long
>
channelIdList
;
@ApiModelProperty
(
value
=
"跟进客服"
)
private
List
<
Long
>
customerServiceIdList
;
@ApiModelProperty
(
value
=
"目的国"
)
private
List
<
Long
>
destCountryId
;
@ApiModelProperty
(
value
=
"目的城市"
)
private
List
<
Long
>
destCityId
;
}
}
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/orderException/OrderExceptionMapper.xml
View file @
3bde7cb7
...
@@ -79,6 +79,8 @@
...
@@ -79,6 +79,8 @@
LEFT JOIN ecw_order_consignee oe ON oe.order_id = a.order_id
LEFT JOIN ecw_order_consignee oe ON oe.order_id = a.order_id
LEFT JOIN ecw_warehouse_line wl on a.line_id = wl.id
LEFT JOIN ecw_warehouse_line wl on a.line_id = wl.id
LEFT JOIN ecw_warehouse dest_warehouse on wl.dest_warehouse_id = dest_warehouse.id
LEFT JOIN ecw_warehouse dest_warehouse on wl.dest_warehouse_id = dest_warehouse.id
left join ecw_order_objective eo on a.order_id = eo.order_id
LEFT JOIN system_user su on a.salesman_id = su.id
${ew.customSqlSegment}
${ew.customSqlSegment}
</select>
</select>
...
@@ -207,6 +209,7 @@
...
@@ -207,6 +209,7 @@
LEFT JOIN ecw_order_consignee oe ON oe.order_id = a.order_id
LEFT JOIN ecw_order_consignee oe ON oe.order_id = a.order_id
LEFT JOIN ecw_warehouse_line wl on a.line_id = wl.id
LEFT JOIN ecw_warehouse_line wl on a.line_id = wl.id
LEFT JOIN ecw_warehouse dest_warehouse on wl.dest_warehouse_id = dest_warehouse.id
LEFT JOIN ecw_warehouse dest_warehouse on wl.dest_warehouse_id = dest_warehouse.id
left join ecw_order_objective eo on a.order_id = eo.order_id
left join (select it.order_id AS order_id,
left join (select it.order_id AS order_id,
SUM(
SUM(
IFNULL(
IFNULL(
...
...
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