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
9c66a7b6
Commit
9c66a7b6
authored
May 21, 2024
by
liuzeheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
到港时间筛选
parent
b18c6126
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
120 additions
and
8 deletions
+120
-8
OrderWarehouseInServiceImpl.java
...service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
+30
-6
BoxMapper.java
...cn/iocoder/yudao/module/shipment/dal/mysql/BoxMapper.java
+65
-2
BoxSettlementQueryVO.java
...er/yudao/module/shipment/vo/box/BoxSettlementQueryVO.java
+25
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderWarehouseIn/OrderWarehouseInServiceImpl.java
View file @
9c66a7b6
...
@@ -1290,17 +1290,41 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
...
@@ -1290,17 +1290,41 @@ public class OrderWarehouseInServiceImpl extends AbstractService<OrderWarehouseI
if
(!
isSplitOrderChildren
&&
finishReqVO
.
getUpdateCustomer
()
&&
isNotRollbackIn
)
{
if
(!
isSplitOrderChildren
&&
finishReqVO
.
getUpdateCustomer
()
&&
isNotRollbackIn
)
{
Set
<
Long
>
idSet
=
new
HashSet
<>();
Set
<
Long
>
idSet
=
new
HashSet
<>();
idSet
.
add
(
orderDO
.
getCustomerId
());
idSet
.
add
(
orderDO
.
getCustomerId
());
//订单发货人
OrderConsignorDO
orderConsignorDO2
=
orderConsignorService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsignorDO
>().
eq
(
OrderConsignorDO:
:
getOrderId
,
orderDO
.
getOrderId
())
OrderConsignorDO
orderConsignorDO2
=
orderConsignorService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsignorDO
>().
eq
(
OrderConsignorDO:
:
getOrderId
,
orderDO
.
getOrderId
())
.
orderByDesc
(
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
.
orderByDesc
(
OrderConsignorDO:
:
getId
).
last
(
"limit 1"
));
if
(
orderConsignorDO2
!=
null
&&
orderConsignorDO2
.
getCustomerId
()
!=
null
)
{
//订单收货人
idSet
.
add
(
orderConsignorDO2
.
getCustomerId
());
}
OrderConsigneeDO
orderConsigneeDO2
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
orderDO
.
getOrderId
())
OrderConsigneeDO
orderConsigneeDO2
=
orderConsigneeService
.
getOne
(
new
LambdaQueryWrapper
<
OrderConsigneeDO
>().
eq
(
OrderConsigneeDO:
:
getOrderId
,
orderDO
.
getOrderId
())
.
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
.
orderByDesc
(
OrderConsigneeDO:
:
getId
).
last
(
"limit 1"
));
if
(
orderConsigneeDO2
!=
null
&&
orderConsigneeDO2
.
getCustomerId
()
!=
null
)
{
idSet
.
add
(
orderConsigneeDO2
.
getCustomerId
());
if
(
orderConsignorDO2
!=
null
&&
orderConsignorDO2
.
getCustomerId
()
!=
null
&&
orderConsigneeDO2
!=
null
&&
orderConsigneeDO2
.
getCustomerId
()
!=
null
){
//获取发货人客户经理
CustomerDO
consignorCustomer
=
customerService
.
getById
(
orderConsignorDO2
.
getCustomerId
())
;
//获取收货人客户经理
CustomerDO
consigneeCustomer
=
customerService
.
getById
(
orderConsigneeDO2
.
getCustomerId
())
;
//订单的发货人、收货人同属一个客户经理,则两个客户经理都延期,否则只延期订单中业绩归属方客户
if
(
consignorCustomer
!=
null
&&
consigneeCustomer
!=
null
&&
Objects
.
nonNull
(
consignorCustomer
.
getCustomerService
())
&&
Objects
.
nonNull
(
consigneeCustomer
.
getCustomerService
())
&&
(
consignorCustomer
.
getCustomerService
().
equals
(
consigneeCustomer
.
getCustomerService
())
||
consignorCustomer
.
getCustomerService
()
==
consigneeCustomer
.
getCustomerService
()))
{
if
(
orderConsignorDO2
!=
null
&&
orderConsignorDO2
.
getCustomerId
()
!=
null
)
{
idSet
.
add
(
orderConsignorDO2
.
getCustomerId
());
}
if
(
orderConsigneeDO2
!=
null
&&
orderConsigneeDO2
.
getCustomerId
()
!=
null
)
{
idSet
.
add
(
orderConsigneeDO2
.
getCustomerId
());
}
}
}
}
// //旧逻辑 2024-05-21
// if (orderConsignorDO2 != null && orderConsignorDO2.getCustomerId() != null) {
// idSet.add(orderConsignorDO2.getCustomerId());
// }
//
// if (orderConsigneeDO2 != null && orderConsigneeDO2.getCustomerId() != null) {
// idSet.add(orderConsigneeDO2.getCustomerId());
// }
for
(
Long
id
:
idSet
)
{
for
(
Long
id
:
idSet
)
{
customerService
.
updateCustomerByFinishWarehouseIn
(
id
,
orderId
,
orderDO
!=
null
?
orderDO
.
getOrderNo
()
:
""
,
orderDO
.
getRucangTime
());
customerService
.
updateCustomerByFinishWarehouseIn
(
id
,
orderId
,
orderDO
!=
null
?
orderDO
.
getOrderNo
()
:
""
,
orderDO
.
getRucangTime
());
}
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/dal/mysql/BoxMapper.java
View file @
9c66a7b6
...
@@ -408,9 +408,30 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
...
@@ -408,9 +408,30 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
beginJSDate
=
DateUtil
.
format
(
vo
.
getBeginJsDate
(),
"yyyy-MM-dd HH:mm:ss"
);
beginJSDate
=
DateUtil
.
format
(
vo
.
getBeginJsDate
(),
"yyyy-MM-dd HH:mm:ss"
);
endJsDate
=
DateUtil
.
format
(
vo
.
getEndJsDate
(),
"yyyy-MM-dd HH:mm:ss"
);
endJsDate
=
DateUtil
.
format
(
vo
.
getEndJsDate
(),
"yyyy-MM-dd HH:mm:ss"
);
}
}
String
beginDaogangTime
=
null
;
String
endDaogangTime
=
null
;
if
(
vo
.
getBeginDaogangTime
()!=
null
){
beginDaogangTime
=
DateUtil
.
format
(
vo
.
getBeginDaogangTime
(),
"yyyy-MM-dd HH:mm:ss"
);
endDaogangTime
=
DateUtil
.
format
(
vo
.
getEndDaogangTime
(),
"yyyy-MM-dd HH:mm:ss"
);
}
String
beginQingguanTime
=
null
;
String
endQingguanTime
=
null
;
if
(
vo
.
getBeginQingguanTime
()!=
null
){
beginQingguanTime
=
DateUtil
.
format
(
vo
.
getBeginQingguanTime
(),
"yyyy-MM-dd HH:mm:ss"
);
endQingguanTime
=
DateUtil
.
format
(
vo
.
getEndQingguanTime
(),
"yyyy-MM-dd HH:mm:ss"
);
}
String
beginUlWarehouseTime
=
null
;
String
endUlWarehouseTime
=
null
;
if
(
vo
.
getBeginQingguanTime
()!=
null
){
beginUlWarehouseTime
=
DateUtil
.
format
(
vo
.
getBeginUlWarehouseTime
(),
"yyyy-MM-dd HH:mm:ss"
);
endUlWarehouseTime
=
DateUtil
.
format
(
vo
.
getEndUlWarehouseTime
(),
"yyyy-MM-dd HH:mm:ss"
);
}
IPage
<
BoxDO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
IPage
<
BoxDO
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
return
boxSettlePage
(
mpPage
,
vo
.
getStartWarehouseIdList
(),
vo
.
getDestWarehouseIdList
(),
return
boxSettlePage
(
mpPage
,
vo
.
getStartWarehouseIdList
(),
vo
.
getDestWarehouseIdList
(),
vo
.
getSelfNo
(),
vo
.
getBoxStatus
(),
vo
.
getSlStatus
(),
beginJSDate
,
endJsDate
);
vo
.
getSelfNo
(),
vo
.
getBoxStatus
(),
vo
.
getSlStatus
(),
beginJSDate
,
endJsDate
,
beginDaogangTime
,
endDaogangTime
,
beginQingguanTime
,
endQingguanTime
,
beginUlWarehouseTime
,
endUlWarehouseTime
);
// return selectPage(page, boxQuery);
// return selectPage(page, boxQuery);
}
}
...
@@ -424,6 +445,11 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
...
@@ -424,6 +445,11 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
"<when test = 'beginJsDate != null or endJsDate != null'>"
,
"<when test = 'beginJsDate != null or endJsDate != null'>"
,
", ecw_box_settlement settlement "
,
", ecw_box_settlement settlement "
,
"</when>"
,
"</when>"
,
"<when test = 'beginUlWarehouseTime != null or endUlWarehouseTime != null'>"
,
", ecw_box_clearance clearance "
,
"</when>"
,
"WHERE"
,
"WHERE"
,
"box.deleted = 0 and box.pr_status > 21"
,
"box.deleted = 0 and box.pr_status > 21"
,
...
@@ -431,6 +457,10 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
...
@@ -431,6 +457,10 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
"and box.id = settlement.shipment_id and settlement.deleted = 0"
,
"and box.id = settlement.shipment_id and settlement.deleted = 0"
,
"</when>"
,
"</when>"
,
"<when test = 'beginUlWarehouseTime != null or endUlWarehouseTime != null'>"
,
"and box.id = clearance.shipment_id and clearance.deleted = 0"
,
"</when>"
,
"<when test = 'beginJsDate != null'>"
,
"<when test = 'beginJsDate != null'>"
,
"and settlement.sl_settled_time >= #{beginJsDate}"
,
"and settlement.sl_settled_time >= #{beginJsDate}"
,
"</when>"
,
"</when>"
,
...
@@ -439,6 +469,31 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
...
@@ -439,6 +469,31 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
"and settlement.sl_settled_time <= #{endJsDate}"
,
"and settlement.sl_settled_time <= #{endJsDate}"
,
"</when>"
,
"</when>"
,
"<when test = 'beginDaogangTime != null'>"
,
"and box.dg_date >= #{beginDaogangTime}"
,
"</when>"
,
"<when test = 'endDaogangTime != null'>"
,
"and box.dg_date <= #{endDaogangTime}"
,
"</when>"
,
"<when test = 'beginQingguanTime != null'>"
,
"and box.qg_date >= #{beginQingguanTime}"
,
"</when>"
,
"<when test = 'endQingguanTime != null'>"
,
"and box.qg_date <= #{endQingguanTime}"
,
"</when>"
,
"<when test = 'beginUlWarehouseTime != null'>"
,
"and clearance.cl_clear_time >= #{beginUlWarehouseTime}"
,
"</when>"
,
"<when test = 'endUlWarehouseTime != null'>"
,
"and clearance.cl_clear_time <= #{endUlWarehouseTime}"
,
"</when>"
,
"<when test = 'selfNo != null and selfNo != \"\" '>"
,
"<when test = 'selfNo != null and selfNo != \"\" '>"
,
"and box.self_no LIKE concat('%',#{selfNo},'%')"
,
"and box.self_no LIKE concat('%',#{selfNo},'%')"
,
"</when>"
,
"</when>"
,
...
@@ -474,7 +529,15 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
...
@@ -474,7 +529,15 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
@Param
(
"boxStatus"
)
Integer
boxStatus
,
@Param
(
"boxStatus"
)
Integer
boxStatus
,
@Param
(
"slStatus"
)
Integer
slStatus
,
@Param
(
"slStatus"
)
Integer
slStatus
,
@Param
(
"beginJsDate"
)
String
beginJsDate
,
@Param
(
"beginJsDate"
)
String
beginJsDate
,
@Param
(
"endJsDate"
)
String
endJsDate
);
@Param
(
"endJsDate"
)
String
endJsDate
,
@Param
(
"beginDaogangTime"
)
String
beginDaogangTime
,
@Param
(
"endDaogangTime"
)
String
endDaogangTime
,
@Param
(
"beginQingguanTime"
)
String
beginQingguanTime
,
@Param
(
"endQingguanTime"
)
String
endQingguanTime
,
@Param
(
"beginUlWarehouseTime"
)
String
beginUlWarehouseTime
,
@Param
(
"endUlWarehouseTime"
)
String
endUlWarehouseTime
);
@Select
(
"SELECT box.* from ecw_box box left join ecw_box_agent agent on box.id = agent.shipment_id\n"
+
@Select
(
"SELECT box.* from ecw_box box left join ecw_box_agent agent on box.id = agent.shipment_id\n"
+
"where box.pr_status = 25 and agent.agent_id is null and box.deleted=0"
)
"where box.pr_status = 25 and agent.agent_id is null and box.deleted=0"
)
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/vo/box/BoxSettlementQueryVO.java
View file @
9c66a7b6
...
@@ -37,4 +37,29 @@ public class BoxSettlementQueryVO {
...
@@ -37,4 +37,29 @@ public class BoxSettlementQueryVO {
@ApiModelProperty
(
value
=
"出货状态"
)
@ApiModelProperty
(
value
=
"出货状态"
)
private
Integer
boxStatus
;
private
Integer
boxStatus
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始到港时间"
)
private
Date
beginDaogangTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束到港时间"
)
private
Date
endDaogangTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始清关时间"
)
private
Date
beginQingguanTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束清关时间"
)
private
Date
endQingguanTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始卸柜/到仓时间"
)
private
Date
beginUlWarehouseTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束卸柜/到仓时间"
)
private
Date
endUlWarehouseTime
;
}
}
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