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
5a41bced
Commit
5a41bced
authored
Aug 29, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'order-update' into dev
parents
db8172a4
9cff5ef7
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1002 additions
and
213 deletions
+1002
-213
OrderMapper.java
...coder/yudao/module/order/dal/mysql/order/OrderMapper.java
+2
-2
ContainerNumberOrderExcelExportListener.java
...tener/export/ContainerNumberOrderExcelExportListener.java
+1
-1
OrderQueryService.java
...r/yudao/module/order/service/order/OrderQueryService.java
+1
-1
OrderQueryServiceImpl.java
...odule/order/service/order/impl/OrderQueryServiceImpl.java
+4
-7
OrderQueryVO.java
.../cn/iocoder/yudao/module/order/vo/order/OrderQueryVO.java
+192
-0
OrderMapper.xml
...rder-core/src/main/resources/mapper/order/OrderMapper.xml
+798
-198
OrderController.java
.../module/order/controller/admin/order/OrderController.java
+4
-4
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/order/OrderMapper.java
View file @
5a41bced
...
...
@@ -646,12 +646,12 @@ public interface OrderMapper extends AbstractMapper<OrderDO> {
List
<
OrderBackPageVO
>
orderList
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
OrderQueryVO
query
);
List
<
OrderBackPageVO
>
myOrderPageList
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
OrderQuery
DT
O
query
);
List
<
OrderBackPageVO
>
myOrderPageList
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
OrderQuery
V
O
query
);
long
orderCount
(
@Param
(
"query"
)
OrderQueryVO
query
);
long
myOrderCount
(
@Param
(
"query"
)
OrderQuery
DT
O
query
);
long
myOrderCount
(
@Param
(
"query"
)
OrderQuery
V
O
query
);
List
<
OrderExcelVO
>
exportOrderExcelList
(
@Param
(
"start"
)
int
start
,
@Param
(
"size"
)
int
size
,
@Param
(
"query"
)
OrderQueryVO
query
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/listener/export/ContainerNumberOrderExcelExportListener.java
View file @
5a41bced
...
...
@@ -61,7 +61,7 @@ public class ContainerNumberOrderExcelExportListener {
PageVO
page
=
new
PageVO
();
page
.
setRows
(
10000
);
page
.
setPage
(
1
);
OrderQuery
DTO
query
=
JSONObject
.
parseObject
(
event
.
getRequestParams
(),
OrderQueryDT
O
.
class
);
OrderQuery
VO
query
=
JSONObject
.
parseObject
(
event
.
getRequestParams
(),
OrderQueryV
O
.
class
);
query
.
setLang
(
event
.
getLang
());
PageResult
<
OrderBackPageVO
>
orderPage
=
orderQueryService
.
myOrderPage
(
query
,
page
);
if
(
CollectionUtil
.
isNotEmpty
(
orderPage
.
getList
()))
{
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/OrderQueryService.java
View file @
5a41bced
...
...
@@ -154,7 +154,7 @@ public interface OrderQueryService {
PageResult
<
OrderBackPageVO
>
orderPage
(
OrderQueryVO
query
,
PageVO
page
);
PageResult
<
OrderBackPageVO
>
myOrderPage
(
OrderQuery
DT
O
query
,
PageVO
page
);
PageResult
<
OrderBackPageVO
>
myOrderPage
(
OrderQuery
V
O
query
,
PageVO
page
);
long
orderCount
(
OrderQueryVO
query
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
View file @
5a41bced
...
...
@@ -966,18 +966,17 @@ public class OrderQueryServiceImpl implements OrderQueryService {
}
@Override
public
PageResult
<
OrderBackPageVO
>
myOrderPage
(
OrderQuery
DT
O
query
,
PageVO
page
)
{
public
PageResult
<
OrderBackPageVO
>
myOrderPage
(
OrderQuery
V
O
query
,
PageVO
page
)
{
if
(
Objects
.
isNull
(
query
.
getLang
()))
{
query
.
setLang
(
I18nMessage
.
getLang
());
}
caseStatus
(
query
.
getStatus
(),
query
);
//
caseStatus(query.getStatus(), query);
IPage
<
OrderBackPageVO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
long
total
=
orderMapper
.
myOrderCount
(
query
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
int
start
=
(
page
.
getPage
()
-
1
)
*
page
.
getRows
();
int
size
=
page
.
getRows
();
List
<
OrderBackPageVO
>
list
=
orderMapper
.
myOrderPageList
(
start
,
size
,
query
);
long
total
=
orderMapper
.
myOrderCount
(
query
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPage
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
...
...
@@ -1005,8 +1004,6 @@ public class OrderQueryServiceImpl implements OrderQueryService {
private
void
combinedState
(
Integer
asStatus
,
OrderQueryDTO
query
,
List
<
Integer
>
statusList
)
{
switch
(
asStatus
)
{
case
12325
:
//this.status = 12;
...
...
@@ -1158,7 +1155,7 @@ public class OrderQueryServiceImpl implements OrderQueryService {
@Override
public
PageResult
<
OrderBackPageVO
>
deptOrderPage1
(
OrderQueryDTO
query
,
PageVO
page
)
{
query
.
setLang
(
I18nMessage
.
getLang
());
caseStatus
(
query
.
getStatus
(),
query
);
//
caseStatus(query.getStatus(), query);
IPage
<
OrderBackPageVO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
long
total
=
orderMapper
.
deptOrderCount1
(
query
);
log
.
warn
(
I18nMessage
.
getLang
().
toString
());
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/order/OrderQueryVO.java
View file @
5a41bced
package
cn
.
iocoder
.
yudao
.
module
.
order
.
vo
.
order
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.*
;
...
...
@@ -538,6 +539,50 @@ public class OrderQueryVO {
@ApiModelProperty
(
value
=
"是否在公海"
)
private
Boolean
isInOpenSea
;
@ApiModelProperty
(
value
=
"订单异常状态(字典 order_abnormal_state)"
)
private
List
<
Integer
>
abnormalStates
;
@ApiModelProperty
(
value
=
"订单异常状态(字典 order_abnormal_state)"
)
private
List
<
Long
>
objectiveIds
;
@ApiModelProperty
(
value
=
"始发仓IDs"
)
private
List
<
Long
>
startWarehouseIds
;
@ApiModelProperty
(
value
=
"目的仓IDs"
)
private
List
<
Long
>
destWarehouseIds
;
@ApiModelProperty
(
value
=
"目的国ids"
)
private
List
<
Long
>
destCountryIds
;
@ApiModelProperty
(
value
=
"入仓类型"
)
private
List
<
Integer
>
warehouseTypes
;
@ApiModelProperty
(
value
=
"报关类别:我司全代:1,自单代报:2,混合报关:3"
)
private
List
<
Integer
>
customsTypes
;
@ApiModelProperty
(
value
=
"审核类型(字典 order_approval_type) 0 为正常"
)
private
List
<
Integer
>
auditTypeList
;
@ApiModelProperty
(
value
=
"订单状态详情见字典:order_status"
)
private
List
<
Integer
>
statusList
;
@ApiModelProperty
(
value
=
"订单异常状态(字典 order_abnormal_state)"
)
private
List
<
Integer
>
abnormalStateList
;
@ApiModelProperty
(
value
=
"订单入仓状态(字典 order_warehouse_in_status)"
)
private
List
<
Integer
>
inWarehouseStateList
;
@ApiModelProperty
(
value
=
"订单出货状态(字典 order_shipment_state)"
)
private
List
<
Integer
>
shipmentStateList
;
@ApiModelProperty
(
value
=
"空运可出货状态:0 默认值 1 待出 2 可出 3 备货中 4 已备货 10 可出、备货中、已备货 11 待出、可出、备货中、已备货 12 可出、备货中"
)
private
List
<
Integer
>
airShipmentList
;
@ApiModelProperty
(
value
=
"内部转换状态字段"
)
private
List
<
Integer
>
asStatusList
;
@ApiModelProperty
(
value
=
"是否预警控货订单: 1 是"
)
private
Integer
warningOrder
;
...
...
@@ -550,11 +595,25 @@ public class OrderQueryVO {
}
}
public
void
setAsStatusList
(
List
<
Integer
>
asStatusList
)
{
this
.
asStatusList
=
asStatusList
;
if
(
CollectionUtil
.
isNotEmpty
(
this
.
asStatusList
))
{
for
(
Integer
asStatus
:
asStatusList
)
{
combinedStateList
(
asStatus
,
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
)
&&
CollectionUtil
.
isNotEmpty
(
this
.
asStatusList
))
{
for
(
Integer
asStatus
:
asStatusList
)
{
combinedStateList
(
asStatus
,
this
.
transportId
);
}
}
}
private
void
combinedState
(
Integer
asStatus
,
Integer
transportId
)
{
...
...
@@ -623,6 +682,139 @@ public class OrderQueryVO {
}
}
private
void
combinedStateList
(
Integer
asStatus
,
Integer
transportId
)
{
switch
(
asStatus
)
{
case
12325
:
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
12
);
this
.
shipmentStateList
.
add
(
325
);
break
;
case
10501
:
// 空运待出
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
airShipmentList
)){
this
.
airShipmentList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
auditTypeList
)){
this
.
auditTypeList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
abnormalStateList
)){
this
.
abnormalStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
5
);
this
.
airShipmentList
.
add
(
1
);
this
.
auditTypeList
.
add
(
0
);
this
.
abnormalStateList
.
add
(
0
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
break
;
case
10502
:
// 空运可出
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
airShipmentList
)){
this
.
airShipmentList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
5
);
this
.
airShipmentList
.
add
(
12
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
break
;
case
10503
:
// 空运已备货
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
airShipmentList
)){
this
.
airShipmentList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
5
);
this
.
airShipmentList
.
add
(
4
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
break
;
case
10504
:
// 待排单
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
airShipmentList
)){
this
.
airShipmentList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
auditTypeList
)){
this
.
auditTypeList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
abnormalStateList
)){
this
.
abnormalStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
5
);
this
.
auditTypeList
.
add
(
0
);
this
.
abnormalStateList
.
add
(
0
);
if
(
Objects
.
nonNull
(
transportId
)
&&
transportId
==
3
)
{
// 空运无需判断备货状态 可出、备货中、已备货
this
.
airShipmentList
.
add
(
10
);
}
else
{
// 兼容空运已入仓的可出、备货中、已备货,且无异常无审批,海运的已入仓无异常无审批
this
.
airShipmentList
.
add
(
20
);
}
break
;
case
132411
:
// 空运已出货
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
32
);
this
.
shipmentStateList
.
add
(
411
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
break
;
case
132412
:
// 空运已出仓
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
32
);
this
.
shipmentStateList
.
add
(
412
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
break
;
case
132409
:
// 空运已理货
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
32
);
this
.
shipmentStateList
.
add
(
409
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
break
;
case
118428
:
// 空运已到港
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
32
);
this
.
shipmentStateList
.
add
(
428
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
break
;
}
}
public
void
setShipmentState
(
Integer
shipmentState
)
{
if
(
Objects
.
nonNull
(
shipmentState
))
{
...
...
yudao-module-order/yudao-module-order-core/src/main/resources/mapper/order/OrderMapper.xml
View file @
5a41bced
This diff is collapsed.
Click to expand it.
yudao-module-order/yudao-module-order-rest/src/main/java/cn/iocoder/yudao/module/order/controller/admin/order/OrderController.java
View file @
5a41bced
...
...
@@ -318,7 +318,7 @@ public class OrderController {
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得订单分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:order:query')")
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
getOrderPage
(
OrderQuery
DT
O
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
getOrderPage
(
OrderQuery
V
O
query
,
PageVO
page
)
{
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
myOrderPage
(
query
,
page
);
return
success
(
pageResult
);
...
...
@@ -336,7 +336,7 @@ public class OrderController {
@GetMapping
(
"/my/page"
)
@ApiOperation
(
"获得我的订单分页"
)
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
myOrderPage
(
OrderQuery
DT
O
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
myOrderPage
(
OrderQuery
V
O
query
,
PageVO
page
)
{
Long
salesmanId
=
SecurityFrameworkUtils
.
getLoginUserId
();
// 获取当前登录用户ID
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
// query.setSalesmanId(salesmanId);
...
...
@@ -350,11 +350,11 @@ public class OrderController {
@GetMapping
(
"/dept-order-page"
)
@ApiOperation
(
"部门订单分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:order:query')")
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
getDeptOrderPage
(
OrderQuery
DT
O
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
OrderBackPageVO
>>
getDeptOrderPage
(
OrderQuery
V
O
query
,
PageVO
page
)
{
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
query
.
setUserType
(
UserTypeEnum
.
ADMIN
.
getValue
());
query
.
setDeptId
(
Objects
.
isNull
(
loginUser
)
?
0L
:
loginUser
.
getDeptId
());
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
deptOrderPage
1
(
query
,
page
);
PageResult
<
OrderBackPageVO
>
pageResult
=
orderQueryService
.
deptOrderPage
(
query
,
page
);
return
success
(
pageResult
);
}
...
...
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