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
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
...
...
@@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
...
@@ -11,7 +13,6 @@ import java.math.BigDecimal;
import
java.util.*
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
public
class
OrderQueryDTO
{
...
...
@@ -102,7 +103,8 @@ public class OrderQueryDTO {
private
Integer
payType
;
@ApiModelProperty
(
value
=
"订单状态详情见字典:order_status"
)
private
Integer
status
;
//private Integer [] status;
private
List
<
Integer
>
status
;
@ApiModelProperty
(
value
=
"订单异常状态(字典 order_abnormal_state)"
)
private
List
<
Integer
>
abnormalState
;
...
...
@@ -518,33 +520,76 @@ public class OrderQueryDTO {
private
Boolean
isDisplayGuanlianStatus
=
false
;
@ApiModelProperty
(
value
=
"内部转换状态字段"
)
private
Integer
asStatus
;
//private Integer[] asStatus;
private
List
<
Integer
>
asStatus
;
private
List
<
Integer
>
statusList
;
public
void
setStatus
(
List
<
Integer
>
status
)
{
this
.
status
=
status
;
this
.
asStatus
=
status
;
if
(
CollectionUtils
.
isNotEmpty
(
this
.
asStatus
)
)
{
asStatus
.
forEach
(
statu
->{
combinedState
(
statu
,
this
.
transportId
);
});
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
this
.
asStatus
=
status
;
if
(
Objects
.
nonNull
(
this
.
asStatus
)
&&
asStatus
>
10000
)
{
combinedState
(
this
.
asStatus
,
this
.
transportId
);
}
}
// public void setStatus(Integer [] status) {
// this.status= status ;
// this.asStatus =status;
//
// if (this.status.length>0) {
// for(int i=0;i<status.length;i++){
// System.out.print(asStatus[i]);
// if(status[i]>10000){
// combinedState(status[i], this.transportId);
// }
//
// }
//
//
// }
//
// }
public
void
setTransportId
(
Integer
transportId
)
{
this
.
transportId
=
transportId
;
if
(
Objects
.
nonNull
(
transportId
)
&&
Objects
.
nonNull
(
this
.
asStatus
))
{
combinedState
(
this
.
asStatus
,
this
.
transportId
);
if
(
Objects
.
nonNull
(
transportId
)
&&
CollectionUtils
.
isNotEmpty
(
this
.
asStatus
))
{
asStatus
.
forEach
(
statu
->{
combinedState
(
statu
,
this
.
transportId
);
});
}
// if(Objects.nonNull(transportId) ){
// if (this.asStatus.length>0) {
// for(int i=0;i<asStatus.length;i++){
// combinedState(asStatus[i], this.transportId);
// }
//
//
// }
//
// }
}
private
void
combinedState
(
Integer
asStatus
,
Integer
transportId
)
{
this
.
statusList
=
new
ArrayList
<>()
;
switch
(
asStatus
)
{
case
12325
:
this
.
status
=
12
;
//this.status = 12;
this
.
statusList
.
add
(
12
)
;
this
.
shipmentState
=
325
;
break
;
case
10501
:
// 空运待出
this
.
status
=
5
;
//this.status = 5;
this
.
statusList
.
add
(
5
)
;
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
this
.
airShipment
=
1
;
//this.auditType = 0;
...
...
@@ -566,19 +611,22 @@ public class OrderQueryDTO {
break
;
case
10502
:
// 空运可出
this
.
status
=
5
;
//this.status = 5;
this
.
statusList
.
add
(
5
)
;
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
this
.
airShipment
=
12
;
// 可出、备货中
break
;
case
10503
:
// 空运已备货
this
.
status
=
5
;
//this.status = 5;
this
.
statusList
.
add
(
5
)
;
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
this
.
airShipment
=
4
;
// 已备货
break
;
case
10504
:
// 待排单
this
.
status
=
5
;
//this.status = 5;
this
.
statusList
.
add
(
5
)
;
if
(
Objects
.
nonNull
(
transportId
)
&&
transportId
==
3
)
{
// 空运无需判断备货状态 可出、备货中、已备货
this
.
airShipment
=
10
;
...
...
@@ -604,32 +652,142 @@ public class OrderQueryDTO {
break
;
case
132411
:
// 空运已出货
this
.
status
=
32
;
//this.status = 32;
this
.
statusList
.
add
(
32
)
;
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
this
.
shipmentState
=
411
;
break
;
case
132412
:
// 空运已出仓
this
.
status
=
32
;
//this.status = 32;
this
.
statusList
.
add
(
32
)
;
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
this
.
shipmentState
=
412
;
break
;
case
132409
:
// 空运已理货
this
.
status
=
32
;
//this.status = 32;
this
.
statusList
.
add
(
32
)
;
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
this
.
shipmentState
=
409
;
break
;
case
118428
:
// 空运已到港
this
.
status
=
18
;
//this.status = 18;
this
.
statusList
.
add
(
18
)
;
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
this
.
shipmentState
=
428
;
break
;
}
}
//旧代码
// public void setStatus(Integer status) {
// this.status = status;
// this.asStatus = status;
// if (Objects.nonNull(this.asStatus) && asStatus > 10000) {
// combinedState(this.asStatus, this.transportId);
// }
// }
//
// public void setTransportId(Integer transportId) {
// this.transportId = transportId;
// if (Objects.nonNull(transportId) && Objects.nonNull(this.asStatus)) {
// combinedState(this.asStatus, this.transportId);
// }
// }
// private void combinedState(Integer asStatus, Integer transportId) {
// switch (asStatus) {
// case 12325:
// this.status = 12;
// this.shipmentState = 325;
// break;
// case 10501:
// // 空运待出
// this.status = 5;
// this.transportId = 3; // 空运待出查询,只查空运的订单
// this.airShipment = 1;
// //this.auditType = 0;
// if(CollectionUtils.isEmpty(auditType)){
// this.auditType= new ArrayList<>();
// this.auditType.add(0);
// }else {
// this.auditType.add(0);
// }
//
// //this.abnormalState = 0;
// if(CollectionUtils.isEmpty(abnormalState)){
// this.abnormalState = new ArrayList<>();
// this.abnormalState.add(0) ;
// }else {
// this.abnormalState.add(0) ;
// }
//
// break;
// case 10502:
// // 空运可出
// this.status = 5;
// this.transportId = 3; // 空运待出查询,只查空运的订单
// this.airShipment = 12; // 可出、备货中
// break;
// case 10503:
// // 空运已备货
// this.status = 5;
// this.transportId = 3; // 空运待出查询,只查空运的订单
// this.airShipment = 4; // 已备货
// break;
// case 10504:
// // 待排单
// this.status = 5;
// if (Objects.nonNull(transportId) && transportId == 3) {
// // 空运无需判断备货状态 可出、备货中、已备货
// this.airShipment = 10;
// }else {
// // 兼容空运已入仓的可出、备货中、已备货,且无异常无审批,海运的已入仓无异常无审批
// this.airShipment = 20;
// }
// //this.auditType = 0;
// if(CollectionUtils.isEmpty(auditType)){
// this.auditType = new ArrayList<>();
// this.auditType.add(0) ;
// }else {
// this.auditType.add(0) ;
// }
// //this.abnormalState = 0;
//
// if(CollectionUtils.isEmpty(abnormalState)){
// this.abnormalState = new ArrayList<>();
// this.abnormalState.add(0) ;
// }else {
// this.abnormalState.add(0) ;
// }
// break;
// case 132411:
// // 空运已出货
// this.status = 32;
// this.transportId = 3; // 空运待出查询,只查空运的订单
// this.shipmentState = 411;
// break;
// case 132412:
// // 空运已出仓
// this.status = 32;
// this.transportId = 3; // 空运待出查询,只查空运的订单
// this.shipmentState = 412;
// break;
// case 132409:
// // 空运已理货
// this.status = 32;
// this.transportId = 3; // 空运待出查询,只查空运的订单
// this.shipmentState = 409;
// break;
// case 118428:
// // 空运已到港
// this.status = 18;
// this.transportId = 3; // 空运待出查询,只查空运的订单
// this.shipmentState = 428;
// break;
// }
// }
public
void
setShipmentState
(
Integer
shipmentState
)
{
if
(
Objects
.
nonNull
(
shipmentState
))
{
this
.
shipmentState
=
shipmentState
;
...
...
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
...
...
@@ -3327,69 +3327,123 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
List
<
ProductPriceStepDO
>
fullPriceStepList
=
new
ArrayList
<>(
);
ProductPriceStepDO
freightPriceStep
=
new
ProductPriceStepDO
();
ProductPriceStepDO
clear
=
new
ProductPriceStepDO
();
if
(
CollectionUtil
.
isEmpty
(
respVO
.
getFreightPriceStepList
())
){
BeanUtils
.
copyProperties
(
price
,
freightPriceStep
);
freightPriceStep
.
setStartNum
(
BigDecimal
.
valueOf
(
0
));
freightPriceStep
.
setEndNum
(
BigDecimal
.
valueOf
(
0
))
;
freightPriceStep
.
setRankNum
(
1
);
freightPriceStep
.
setWeightUnit
(
price
.
getTransportPriceUnit
());
freightPriceStep
.
setProductPriceId
(
price
.
getId
())
;
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getSpecialList
())
){
List
<
ProductPriceStepSpecialDO
>
specialDOList
=
new
ArrayList
<>();
respVO
.
getSpecialList
().
forEach
(
sp
->{
ProductPriceStepSpecialDO
d
=
new
ProductPriceStepSpecialDO
();
BeanUtils
.
copyProperties
(
sp
,
d
);
specialDOList
.
add
(
d
)
;
});
specialDOList
.
stream
().
distinct
();
freightPriceStep
.
setSpecialList
(
specialDOList
)
;
}
//
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getFreightPricePackagingList
())){
List
<
ProductPriceStepPackagingDO
>
stepPackagingDOS
=
new
ArrayList
<>();
respVO
.
getFreightPricePackagingList
().
forEach
(
pack
->{
ProductPriceStepPackagingDO
packagingDO
=
new
ProductPriceStepPackagingDO
()
;
if
(
createReqVO
.
getPriceType
()==
1
){
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getFullPricePackagingList
())){
List
<
ProductPriceStepPackagingDO
>
specialDOList
=
new
ArrayList
<>();
respVO
.
getFullPricePackagingList
().
forEach
(
pack
->{
ProductPriceStepDO
packagingDO
=
new
ProductPriceStepDO
()
;
BeanUtils
.
copyProperties
(
pack
,
packagingDO
);
stepPackagingDOS
.
add
(
packagingDO
)
;
packagingDO
.
setId
(
null
);
packagingDO
.
setStartNum
(
BigDecimal
.
valueOf
(
0
));
packagingDO
.
setEndNum
(
BigDecimal
.
valueOf
(
0
));
packagingDO
.
setWeightUnit
(
price
.
getTransportPriceUnit
());
// packagingDO.setTransportPrice(pack.getPackagingPrice());
// packagingDO.setTransportPriceUnit(pack.getPackagingPriceUnit());
// packagingDO.setTransportVolumeUnit(pack.getPackagingVolumeUnit());
packagingDO
.
setAllPrice
(
pack
.
getPackagingPrice
());
packagingDO
.
setAllPriceUnit
(
pack
.
getPackagingPriceUnit
())
;
packagingDO
.
setAllVolumeUnit
(
pack
.
getPackagingVolumeUnit
());
fullPriceStepList
.
add
(
packagingDO
)
;
});
stepPackagingDOS
.
stream
().
distinct
();
freightPriceStep
.
setPackagingList
(
stepPackagingDOS
)
;
createReqVO
.
setFullPriceStepList
(
fullPriceStepList
);
}
freightPriceStepList
.
add
(
freightPriceStep
);
createReqVO
.
setFreightPriceStepList
(
freightPriceStepList
);
}
else
{
createReqVO
.
setFreightPriceStepList
(
respVO
.
getFreightPriceStepList
())
;
}
if
(
CollectionUtil
.
isEmpty
(
respVO
.
getFreightPriceStepList
())
){
BeanUtils
.
copyProperties
(
price
,
freightPriceStep
);
freightPriceStep
.
setStartNum
(
BigDecimal
.
valueOf
(
0
));
freightPriceStep
.
setEndNum
(
BigDecimal
.
valueOf
(
0
))
;
freightPriceStep
.
setRankNum
(
1
);
freightPriceStep
.
setWeightUnit
(
price
.
getTransportPriceUnit
());
freightPriceStep
.
setProductPriceId
(
price
.
getId
())
;
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getSpecialList
())
){
List
<
ProductPriceStepSpecialDO
>
specialDOList
=
new
ArrayList
<>();
respVO
.
getSpecialList
().
forEach
(
sp
->{
ProductPriceStepSpecialDO
d
=
new
ProductPriceStepSpecialDO
();
BeanUtils
.
copyProperties
(
sp
,
d
);
specialDOList
.
add
(
d
)
;
});
specialDOList
.
stream
().
distinct
();
freightPriceStep
.
setSpecialList
(
specialDOList
)
;
}
//
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getFreightPricePackagingList
())){
List
<
ProductPriceStepPackagingDO
>
stepPackagingDOS
=
new
ArrayList
<>();
respVO
.
getFreightPricePackagingList
().
forEach
(
pack
->{
ProductPriceStepPackagingDO
packagingDO
=
new
ProductPriceStepPackagingDO
()
;
BeanUtils
.
copyProperties
(
pack
,
packagingDO
);
stepPackagingDOS
.
add
(
packagingDO
)
;
});
stepPackagingDOS
.
stream
().
distinct
();
freightPriceStep
.
setPackagingList
(
stepPackagingDOS
)
;
}
if
(
respVO
.
getPriceType
()==
1
){
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getFullPricePackagingList
())){
List
<
ProductPriceStepPackagingDO
>
specialDOList
=
new
ArrayList
<>();
respVO
.
getFullPricePackagingList
().
forEach
(
pack
->{
ProductPriceStepPackagingDO
packagingDO
=
new
ProductPriceStepPackagingDO
()
;
BeanUtils
.
copyProperties
(
pack
,
packagingDO
);
packagingDO
.
setId
(
null
);
specialDOList
.
add
(
packagingDO
)
;
});
if
(
CollectionUtil
.
isEmpty
(
respVO
.
getClearancePriceStepList
())
){
BeanUtils
.
copyProperties
(
price
,
clear
);
clear
.
setStartNum
(
BigDecimal
.
valueOf
(
0
));
clear
.
setEndNum
(
BigDecimal
.
valueOf
(
0
))
;
clear
.
setRankNum
(
2
);
clear
.
setWeightUnit
(
price
.
getClearancePriceUnit
());
clear
.
setProductPriceId
(
price
.
getId
())
;
freightPriceStep
.
setPackagingList
(
specialDOList
)
;
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getClearancePricePackagingList
())
){
List
<
ProductPriceStepPackagingDO
>
stepPackagingDOS
=
new
ArrayList
<>();
respVO
.
getClearancePricePackagingList
().
forEach
(
pack
->{
ProductPriceStepPackagingDO
packagingDO
=
new
ProductPriceStepPackagingDO
()
;
BeanUtils
.
copyProperties
(
pack
,
packagingDO
);
stepPackagingDOS
.
add
(
packagingDO
)
;
}
);
stepPackagingDOS
.
stream
().
distinct
();
c
lear
.
setPackagingList
(
stepPackagingDOS
)
;
}
}
else
{
}
freightPriceStepList
.
add
(
freightPriceStep
);
createReqVO
.
setFreightPriceStepList
(
freightPriceStepList
);
}
else
{
c
reateReqVO
.
setFreightPriceStepList
(
respVO
.
getFreightPriceStepList
()
)
;
}
clearancePriceStepList
.
add
(
clear
);
createReqVO
.
setClearancePriceStepList
(
clearancePriceStepList
);
}
else
{
createReqVO
.
setClearancePriceStepList
(
respVO
.
getClearancePriceStepList
())
;
if
(
CollectionUtil
.
isEmpty
(
respVO
.
getClearancePriceStepList
())
){
BeanUtils
.
copyProperties
(
price
,
clear
);
clear
.
setStartNum
(
BigDecimal
.
valueOf
(
0
));
clear
.
setEndNum
(
BigDecimal
.
valueOf
(
0
))
;
clear
.
setRankNum
(
2
);
clear
.
setWeightUnit
(
price
.
getClearancePriceUnit
());
clear
.
setProductPriceId
(
price
.
getId
())
;
if
(
CollectionUtil
.
isNotEmpty
(
respVO
.
getClearancePricePackagingList
())
){
List
<
ProductPriceStepPackagingDO
>
stepPackagingDOS
=
new
ArrayList
<>();
respVO
.
getClearancePricePackagingList
().
forEach
(
pack
->{
ProductPriceStepPackagingDO
packagingDO
=
new
ProductPriceStepPackagingDO
()
;
BeanUtils
.
copyProperties
(
pack
,
packagingDO
);
stepPackagingDOS
.
add
(
packagingDO
)
;
});
stepPackagingDOS
.
stream
().
distinct
();
clear
.
setPackagingList
(
stepPackagingDOS
)
;
}
clearancePriceStepList
.
add
(
clear
);
createReqVO
.
setClearancePriceStepList
(
clearancePriceStepList
);
}
else
{
createReqVO
.
setClearancePriceStepList
(
respVO
.
getClearancePriceStepList
())
;
}
}
// if(CollectionUtil.isNotEmpty(respVO.getFullPricePackagingList())){
//
// respVO.getFullPricePackagingList().forEach(pack->{
// ProductPriceStepDO packagingDO = new ProductPriceStepDO() ;
// BeanUtils.copyProperties(pack,packagingDO);
// packagingDO.setId(null);
//
// packagingDO.setTransportPrice(pack.getPackagingPrice());
// packagingDO.setTransportPriceUnit(pack.getPackagingPriceUnit());
//
// fullPriceStepList.add(packagingDO) ;
// });
//
// createReqVO.setFullPriceStepList(fullPriceStepList);
// }
//ProductDO productDO = checkUpdateStatus(lineChannelList, createReqVO.getProductId());
ProductDO
productDO
=
productService
.
getProduct
(
createReqVO
.
getProductId
());
...
...
@@ -3779,6 +3833,10 @@ public class ProductPriceServiceImpl extends AbstractService<ProductPriceMapper,
}
}
}
}
// List<ProductPriceSpecialDO> priceSpecialInsert = new ArrayList<>();
// List<ProductPriceSpecialDO> priceSpecialUpdate = new ArrayList<>();
...
...
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