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
9f702dca
Commit
9f702dca
authored
May 01, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
空数据判断、查询修改
parent
f1954200
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
495 additions
and
94 deletions
+495
-94
OrderQueryDTO.java
...java/cn/iocoder/yudao/module/order/dto/OrderQueryDTO.java
+179
-21
ErrorCodeConstants.java
.../iocoder/yudao/module/order/enums/ErrorCodeConstants.java
+2
-0
OrderQueryServiceImpl.java
...odule/order/service/order/impl/OrderQueryServiceImpl.java
+162
-0
OrderMapper.xml
...rder-core/src/main/resources/mapper/order/OrderMapper.xml
+16
-16
ProductPriceServiceImpl.java
...product/service/product/impl/ProductPriceServiceImpl.java
+109
-51
BoxOrderCheckInfoServiceImpl.java
...rvice/boxOrderCheckInfo/BoxOrderCheckInfoServiceImpl.java
+3
-0
BoxPkgOrderServiceImpl.java
.../shipment/service/boxPkgOrder/BoxPkgOrderServiceImpl.java
+22
-6
messages.properties
yudao-server/src/main/resources/i18n/messages.properties
+1
-0
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+1
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dto/OrderQueryDTO.java
View file @
9f702dca
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/enums/ErrorCodeConstants.java
View file @
9f702dca
...
...
@@ -392,4 +392,6 @@ public interface ErrorCodeConstants {
ErrorCode
NO_WAREHOUSE_IN_CAN_NOT_PACKED
=
new
ErrorCode
(
1004001152
,
"no.warehouse.in.can.not.packed"
);
ErrorCode
ORDER_IS_PRE_INSTALLED
=
new
ErrorCode
(
1004001153
,
"order.is.pre.installed"
);
ErrorCode
ORDER_IS_NOT_PRE_INSTALLED
=
new
ErrorCode
(
1004001154
,
"order.is.not.pre.installed"
);
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
View file @
9f702dca
...
...
@@ -91,8 +91,10 @@ import com.alibaba.excel.write.metadata.WriteSheet;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.swagger.models.auth.In
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -880,6 +882,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
if
(
Objects
.
isNull
(
query
.
getLang
()))
{
query
.
setLang
(
I18nMessage
.
getLang
());
}
caseStatus
(
query
.
getStatus
(),
query
);
IPage
<
OrderBackPageVO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
...
...
@@ -890,6 +893,163 @@ public class OrderQueryServiceImpl implements OrderQueryService {
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
public
void
caseStatus
(
List
<
Integer
>
status
,
OrderQueryDTO
query
){
if
(
CollectionUtils
.
isNotEmpty
(
status
)
)
{
List
<
Integer
>
statusList
=
new
ArrayList
<>()
;
status
.
forEach
(
statu
->{
if
(
statu
>
10000
){
combinedState
(
statu
,
query
,
statusList
);
}
});
statusList
.
stream
().
distinct
();
List
<
Integer
>
list
=
new
ArrayList
<>()
;
list
.
addAll
(
status
.
stream
().
filter
(
s
->
s
<
10000
).
collect
(
Collectors
.
toList
()))
;
list
.
addAll
(
statusList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()));
query
.
setStatusList
(
list
)
;
}
}
private
void
combinedState
(
Integer
asStatus
,
OrderQueryDTO
query
,
List
<
Integer
>
statusList
)
{
switch
(
asStatus
)
{
case
12325
:
//this.status = 12;
statusList
.
add
(
12
);
query
.
setShipmentState
(
325
);
break
;
case
10501
:
// 空运待出
//this.status = 5;
statusList
.
add
(
5
);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if
(
Objects
.
nonNull
(
query
.
getTransportId
())){
query
.
setTransportId
(
3
);
}
query
.
setAirShipment
(
1
);
//this.auditType = 0;
if
(
CollectionUtils
.
isEmpty
(
query
.
getAuditType
())){
List
<
Integer
>
audits
=
new
ArrayList
<>();
query
.
setAuditType
(
audits
)
;
query
.
getAuditType
().
add
(
0
)
;
}
else
{
query
.
getAuditType
().
add
(
0
)
;
}
//this.abnormalState = 0;
if
(
CollectionUtils
.
isEmpty
(
query
.
getAbnormalState
())){
List
<
Integer
>
audits
=
new
ArrayList
<>();
query
.
setAbnormalState
(
audits
);
query
.
getAbnormalState
().
add
(
0
)
;
}
else
{
query
.
getAbnormalState
().
add
(
0
)
;
}
break
;
case
10502
:
// 空运可出
//this.status = 5;
statusList
.
add
(
5
);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if
(
Objects
.
nonNull
(
query
.
getTransportId
())){
query
.
setTransportId
(
3
);
}
query
.
setAirShipment
(
12
)
;
// 可出、备货中
break
;
case
10503
:
// 空运已备货
//this.status = 5;
statusList
.
add
(
5
);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if
(
Objects
.
nonNull
(
query
.
getTransportId
())){
query
.
setTransportId
(
3
);
}
query
.
setAirShipment
(
4
)
;
// 已备货
break
;
case
10504
:
// 待排单
//this.status = 5;
statusList
.
add
(
5
);
if
(
Objects
.
nonNull
(
query
.
getTransportId
())
&&
query
.
getTransportId
()
==
3
)
{
// 空运无需判断备货状态 可出、备货中、已备货
query
.
setAirShipment
(
10
)
;
}
else
{
// 兼容空运已入仓的可出、备货中、已备货,且无异常无审批,海运的已入仓无异常无审批
query
.
setAirShipment
(
20
)
;
}
//this.auditType = 0;
if
(
CollectionUtils
.
isEmpty
(
query
.
getAuditType
())){
List
<
Integer
>
audits
=
new
ArrayList
<>();
query
.
setAuditType
(
audits
)
;
query
.
getAuditType
().
add
(
0
);
}
else
{
query
.
getAuditType
().
add
(
0
)
;
}
//this.abnormalState = 0;
if
(
CollectionUtils
.
isEmpty
(
query
.
getAbnormalState
())){
List
<
Integer
>
audits
=
new
ArrayList
<>();
query
.
setAbnormalState
(
audits
);
query
.
getAbnormalState
().
add
(
0
)
;
}
else
{
query
.
getAbnormalState
().
add
(
0
)
;
}
break
;
case
132411
:
// 空运已出货
//this.status = 32;
statusList
.
add
(
32
);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if
(
Objects
.
nonNull
(
query
.
getTransportId
())){
query
.
setTransportId
(
3
);
}
query
.
setShipmentState
(
411
);
break
;
case
132412
:
// 空运已出仓
//this.status = 32;
statusList
.
add
(
32
);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if
(
Objects
.
nonNull
(
query
.
getTransportId
())){
query
.
setTransportId
(
3
);
}
query
.
setShipmentState
(
412
);
break
;
case
132409
:
// 空运已理货
//this.status = 32;
statusList
.
add
(
32
);
// 空运待出查询,只查空运的订单
if
(
Objects
.
nonNull
(
query
.
getTransportId
())){
query
.
setTransportId
(
3
);
}
query
.
setShipmentState
(
409
);
break
;
case
118428
:
// 空运已到港
//this.status = 18;
statusList
.
add
(
18
);
//query.setTransportId(3); // 空运待出查询,只查空运的订单
if
(
Objects
.
nonNull
(
query
.
getTransportId
())){
query
.
setTransportId
(
3
);
}
query
.
setShipmentState
(
428
);
break
;
}
}
@Override
public
long
orderCount
(
OrderQueryVO
query
)
{
return
orderMapper
.
orderCount
(
query
);
...
...
@@ -910,6 +1070,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
@Override
public
PageResult
<
OrderBackPageVO
>
deptOrderPage1
(
OrderQueryDTO
query
,
PageVO
page
)
{
query
.
setLang
(
I18nMessage
.
getLang
());
caseStatus
(
query
.
getStatus
(),
query
);
IPage
<
OrderBackPageVO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
long
total
=
orderMapper
.
deptOrderCount1
(
query
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
...
...
@@ -1509,6 +1670,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
@Override
public
StatisticsOrderVO
statisticsMyOrder
(
OrderQueryDTO
query
)
{
caseStatus
(
query
.
getStatus
(),
query
);
StatisticsOrderVO
vo
=
orderMapper
.
statisticsMyOrder
(
query
);
if
(
Objects
.
nonNull
(
vo
))
{
vo
.
setTotalVolume
(
new
BigDecimal
(
vo
.
getTotalVolume
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
());
...
...
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderMapper.xml
View file @
9f702dca
...
...
@@ -1003,26 +1003,26 @@
</if>
</if>
<!-- <if test="query.status != null and query.status.size()>0">--
>
<if
test=
"query.statusList != null and query.statusList.size()>0"
>
<!-- <if test="query.status != null and query.status != '' and query.status.size()==1 ">--
>
<!-- AND o.`status` =-->
<!-- <foreach item='status' index="index" collection='query.status' >--
>
<!-- #{status}-->
<!-- </foreach>--
>
<!-- </if>--
>
<if
test=
"query.statusList != null and query.statusList != '' and query.statusList.size()==1 "
>
AND o.`status` =
<foreach
item=
'status'
index=
"index"
collection=
'query.statusList'
>
#{status}
</foreach
>
</if
>
<!-- <if test="query.status != null and query.status != '' and query.status.size()>1 ">--
>
<!-- AND o.`status` in-->
<!-- <foreach item='status' index="index" collection='query.status' open='(' separator=',' close=')'>--
>
<!-- #{status}-->
<!-- </foreach>--
>
<!-- </if>--
>
<if
test=
"query.statusList != null and query.statusList != '' and query.statusList.size()>1 "
>
AND o.`status` in
<foreach
item=
'status'
index=
"index"
collection=
'query.statusList'
open=
'('
separator=
','
close=
')'
>
#{status}
</foreach
>
</if
>
<!-- </if>-->
<if
test=
"query.status != null"
>
AND o.`status` = #{query.status}
</if>
<!-- <if test="query.status != null">-->
<!-- AND o.`status` = #{query.status}-->
<!-- </if>-->
<!-- <if test="query.abnormalState != null">-->
<!-- <choose>-->
<!-- <when test="query.abnormalState != 0">-->
...
...
yudao-module-product/yudao-module-product-core/src/main/java/cn/iocoder/yudao/module/product/service/product/impl/ProductPriceServiceImpl.java
View file @
9f702dca
This diff is collapsed.
Click to expand it.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxOrderCheckInfo/BoxOrderCheckInfoServiceImpl.java
View file @
9f702dca
...
...
@@ -181,6 +181,9 @@ public class BoxOrderCheckInfoServiceImpl extends AbstractService<BoxOrderCheckI
}
else
if
(
createReqVO
.
getType
()
==
1
)
{
//合包
List
<
BoxPkgOrderDO
>
boxPkgOrderDOS
=
boxPkgOrderService
.
selectList
(
BoxPkgOrderDO:
:
getPkgId
,
createReqVO
.
getPkgId
());
orderIdList
=
boxPkgOrderDOS
.
stream
().
map
(
BoxPkgOrderDO:
:
getOrderId
).
collect
(
Collectors
.
toSet
());
if
(
orderIdList
.
isEmpty
()
||
CollectionUtil
.
isEmpty
(
orderIdList
)){
throw
exception
(
ErrorCodeConstants
.
ORDER_IS_NOT_PRE_INSTALLED
);
}
orderDOList
=
orderQueryService
.
getOrderList
(
orderIdList
);
boolean
isParentOrder
=
false
;
if
(!
orderIdList
.
contains
(
orderId
))
{
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxPkgOrder/BoxPkgOrderServiceImpl.java
View file @
9f702dca
...
...
@@ -83,14 +83,30 @@ public class BoxPkgOrderServiceImpl extends AbstractService<BoxPkgOrderMapper, B
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
String
scanOrderNoCreate
(
BoxPkgOrderScanCodeVO
createReqVO
){
BoxPkgOrderCreateReqVO
vo
=
new
BoxPkgOrderCreateReqVO
();
Long
orderId
=
orderService
.
getOrderIdByOrderNo
(
createReqVO
.
getOrderNo
());
vo
.
setOrderId
(
orderId
);
BoxMergePkgDO
boxMergePkgDO
=
boxMergePkgService
.
selectOne
(
new
LambdaQueryWrapperX
<
BoxMergePkgDO
>().
eq
(
BoxMergePkgDO:
:
getPkgNum
,
createReqVO
.
getPkgNum
()));
vo
.
setPkgId
(
boxMergePkgDO
.
getId
())
;
if
(
vo
.
getOrderId
()!=
null
&&
vo
.
getPkgId
()!=
null
){
//订单和包裹id 不为空,调用装箱方法
this
.
create
(
vo
);
String
orderNumCode
=
createReqVO
.
getOrderNo
();
int
position
=
orderNumCode
.
lastIndexOf
(
"-"
);
if
(
position
>=
0
)
{
String
orderNumber
=
orderNumCode
.
substring
(
0
,
position
);
Long
orderId
=
orderService
.
getOrderIdByOrderNo
(
orderNumber
);
vo
.
setOrderId
(
orderId
);
BoxMergePkgDO
boxMergePkgDO
=
boxMergePkgService
.
selectOne
(
new
LambdaQueryWrapperX
<
BoxMergePkgDO
>().
eq
(
BoxMergePkgDO:
:
getPkgNum
,
createReqVO
.
getPkgNum
()));
vo
.
setPkgId
(
boxMergePkgDO
.
getId
())
;
if
(
vo
.
getOrderId
()!=
null
&&
vo
.
getPkgId
()!=
null
){
//订单和包裹id 不为空,调用装箱方法
this
.
create
(
vo
);
}
}
else
if
(!
createReqVO
.
getOrderNo
().
contains
(
"-"
)){
Long
orderId
=
orderService
.
getOrderIdByOrderNo
(
createReqVO
.
getOrderNo
());
vo
.
setOrderId
(
orderId
);
BoxMergePkgDO
boxMergePkgDO
=
boxMergePkgService
.
selectOne
(
new
LambdaQueryWrapperX
<
BoxMergePkgDO
>().
eq
(
BoxMergePkgDO:
:
getPkgNum
,
createReqVO
.
getPkgNum
()));
vo
.
setPkgId
(
boxMergePkgDO
.
getId
())
;
if
(
vo
.
getOrderId
()!=
null
&&
vo
.
getPkgId
()!=
null
){
//订单和包裹id 不为空,调用装箱方法
this
.
create
(
vo
);
}
}
// 返回
return
"success"
;
}
...
...
yudao-server/src/main/resources/i18n/messages.properties
View file @
9f702dca
...
...
@@ -260,3 +260,4 @@ case.num.in.merge.pkg=
order.already.in.merge.pkg
=
customer.is.new.or.old.no.change
=
order.is.pre.installed
=
order.is.not.pre.installed
=
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
9f702dca
...
...
@@ -1000,3 +1000,4 @@ case.num.in.merge.pkg=\u6B64\u7BB1\u5DF2\u88AB\u5408\u5305\uFF0C\u8BF7\u626B\u63
order.already.in.merge.pkg
=
\u
8BA2
\u5355\u
5DF2
\u5728\u5408\u5305\u
7BB1
\u
4E0B
customer.is.new.or.old.no.change
=
\u
5BA2
\u6237\u
5F53
\u
524D
\u
4E1A
\u
7EE9
\u
7C7B
\u
578B
\u
662F{}
\u
5BA2
\u6237\u
FF0C
\u
4E0D
\u9700\u8981\u
66F4
\u
65B0
order.is.pre.installed
=
\u
8BA2
\u5355\u
5DF2
\u9884\u
88C5
order.is.not.pre.installed
=
\u
8BA2
\u5355\u
672A
\u
88C5
\u
7BB1
\u
FF0C
\u
4E0D
\u
80FD
\u5408\u5305
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