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
0301639b
Commit
0301639b
authored
Nov 06, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询未使用的记录编号时要区分公共渠道编号和非公共渠道编号参数
parent
14a5f2ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
19 deletions
+14
-19
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+8
-16
BoxAirNumberRecordService.java
...service/boxAirNumberRecord/BoxAirNumberRecordService.java
+1
-1
BoxAirNumberRecordServiceImpl.java
...ice/boxAirNumberRecord/BoxAirNumberRecordServiceImpl.java
+5
-2
No files found.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
0301639b
...
...
@@ -647,17 +647,9 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
if
(
StringUtils
.
equals
(
TransportTypeEnum
.
AIR
.
getType
(),
transportType
))
{
if
(!
Objects
.
equals
(
channelId
,
oldChannelId
)
||
!
Objects
.
equals
(
oldDestId
,
newDestId
))
{
// 当箱子的渠道或者目的变更时,都需要重新生成自编号
// 先将原有的自编号记录做使用状态变更处理
// String selfNo = "";
// if (!Objects.equals(oldDestId, newDestId) || !Objects.equals(oldDestId, newDestId) ) {
// 目的国变更,需要切换自编号
boxAirNumberRecordService
.
updateBoxAirNumberRecordUsedStatus
(
boxDO
.
getSelfNo
());
// 再重新获取自编号
boxAirNumberRecordService
.
updateBoxAirNumberRecordUsedStatus
(
boxDO
.
getSelfNo
());
// 再重新获取自编号
String
selfNo
=
getAirOrderNo
(
channelId
,
newDestId
,
transportType
);
// } else {
// // 不是目的国变更,那么只是渠道变更,渠道变更只需要更新自编号规则,将原有记录更新
// selfNo = chargeChannelAirOrderNo(boxDO.getSelfNo(), channelId, newDestId, transportType);
// }
updateObj
.
setSelfNo
(
selfNo
);
}
}
else
{
...
...
@@ -1966,7 +1958,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
orderSeaTimeEnum
=
OrderSeaTimeEnum
.
SEA_CLEARED
;
break
;
case
UNLOADED:
if
(
Objects
.
isNull
(
businessTime
)){
if
(
Objects
.
isNull
(
businessTime
))
{
// 到仓业务时间为空时,不更新订单到仓动态
return
;
}
...
...
@@ -2006,7 +1998,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
orderAirTimeEnum
=
OrderAirTimeEnum
.
AIR_ARRIVED
;
break
;
case
TO_WAREHOUSED:
if
(
Objects
.
isNull
(
businessTime
)){
if
(
Objects
.
isNull
(
businessTime
))
{
// 到仓业务时间为空时,不在做订单到仓动态更新
return
;
}
...
...
@@ -4966,7 +4958,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
BoxOrderMarkUpVO
boxOrderMarkUpVO
=
JSON
.
parseObject
(
details
,
BoxOrderMarkUpVO
.
class
);
zTest
z
=
new
zTest
();
zTest
z
=
new
zTest
();
z
.
setTestname
(
"开始调用 handleAirOrderBatchMarkup"
);
z
.
setCreatedate
(
new
Date
());
zTestMapper2
.
insert
(
z
);
...
...
@@ -4998,9 +4990,9 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
public
void
checkIsInClearance
(
Long
shipmentId
,
Long
orderId
)
{
BoxClearanceOrderDO
clearanceOrderDO
=
boxClearanceOrderService
.
getOne
(
new
LambdaQueryWrapper
<
BoxClearanceOrderDO
>()
.
eq
(
BoxClearanceOrderDO:
:
getShipmentId
,
shipmentId
)
.
eq
(
BoxClearanceOrderDO:
:
getOrderId
,
orderId
)
);
.
eq
(
BoxClearanceOrderDO:
:
getShipmentId
,
shipmentId
)
.
eq
(
BoxClearanceOrderDO:
:
getOrderId
,
orderId
)
);
if
(
clearanceOrderDO
==
null
)
{
throw
new
ServiceException
(
500
,
"订单不是已清关状态"
);
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxAirNumberRecord/BoxAirNumberRecordService.java
View file @
0301639b
...
...
@@ -12,7 +12,7 @@ import cn.iocoder.yudao.module.shipment.dal.dataobject.boxAirNumberRecord.BoxAir
*/
public
interface
BoxAirNumberRecordService
extends
IService
<
BoxAirNumberRecordDO
>
{
public
static
List
<
String
>
PUBLIC_CHANNEL_CODE_LIST
=
Arrays
.
asList
(
"AF"
,
"AS"
,
"AN"
);
/**
* 获得空运出货单编号记录
*
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxAirNumberRecord/BoxAirNumberRecordServiceImpl.java
View file @
0301639b
...
...
@@ -42,8 +42,6 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
@Resource
private
ApplicationContext
applicationContext
;
static
List
<
String
>
PUBLIC_CHANNEL_CODE_LIST
=
Arrays
.
asList
(
"AF"
,
"AS"
,
"AN"
);
@Override
public
BoxAirNumberRecordDO
getBoxAirNumberRecord
(
Long
id
)
{
return
boxAirNumberRecordMapper
.
selectById
(
id
);
...
...
@@ -90,10 +88,12 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
throw
exception
(
CHANNEL_CODE_NOT_SET
,
I18nMessage
.
getLang
()
==
0
?
event
.
getNameZh
()
:
event
.
getNameEn
());
}
String
channelCode
=
event
.
getCode
();
// 注意:这里查询未使用的记录编号时要区分公共渠道编号和非公共渠道编号参数
BoxAirNumberRecordDO
boxAirNumberRecordDO
=
boxAirNumberRecordMapper
.
selectOne
(
new
LambdaQueryWrapper
<
BoxAirNumberRecordDO
>()
.
eq
(
BoxAirNumberRecordDO:
:
getTransportType
,
transportType
)
.
eq
(
BoxAirNumberRecordDO:
:
getDestCountryCode
,
destCountryCode
)
.
eq
(!
PUBLIC_CHANNEL_CODE_LIST
.
contains
(
channelCode
),
BoxAirNumberRecordDO:
:
getChannelCode
,
channelCode
)
.
in
(
PUBLIC_CHANNEL_CODE_LIST
.
contains
(
channelCode
),
BoxAirNumberRecordDO:
:
getChannelCode
,
PUBLIC_CHANNEL_CODE_LIST
)
.
eq
(
BoxAirNumberRecordDO:
:
getUsed
,
0
)
.
orderByAsc
(
BoxAirNumberRecordDO:
:
getId
).
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
boxAirNumberRecordDO
))
{
...
...
@@ -152,6 +152,7 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
.
eq
(
BoxAirNumberRecordDO:
:
getTransportType
,
transportType
)
.
eq
(
BoxAirNumberRecordDO:
:
getDestCountryCode
,
destCountryCode
)
.
eq
(!
PUBLIC_CHANNEL_CODE_LIST
.
contains
(
channelCode
),
BoxAirNumberRecordDO:
:
getChannelCode
,
channelCode
)
.
in
(
PUBLIC_CHANNEL_CODE_LIST
.
contains
(
channelCode
),
BoxAirNumberRecordDO:
:
getChannelCode
,
PUBLIC_CHANNEL_CODE_LIST
)
.
orderByAsc
(
BoxAirNumberRecordDO:
:
getId
).
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
boxAirNumberRecordDO
))
{
// 修改自编号逻辑
...
...
@@ -177,10 +178,12 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
private
BoxAirNumberRecordDO
generateNewBoxAirNumberRecordDO
(
Integer
transportType
,
Long
destId
,
Long
channelId
,
String
destCountryCode
,
String
channelCode
,
Long
userId
)
{
BoxAirNumberRecordDO
boxAirNumberRecordDO
;
// 先获取最大的自编号
// 注意:这里查询未使用的记录编号时要区分公共渠道编号和非公共渠道编号参数
BoxAirNumberRecordDO
maxBoxAirNumberRecordDO
=
boxAirNumberRecordMapper
.
selectOne
(
new
LambdaQueryWrapper
<
BoxAirNumberRecordDO
>()
.
eq
(
BoxAirNumberRecordDO:
:
getTransportType
,
transportType
)
.
eq
(
BoxAirNumberRecordDO:
:
getDestCountryCode
,
destCountryCode
)
.
eq
(!
PUBLIC_CHANNEL_CODE_LIST
.
contains
(
channelCode
),
BoxAirNumberRecordDO:
:
getChannelCode
,
channelCode
)
.
in
(
PUBLIC_CHANNEL_CODE_LIST
.
contains
(
channelCode
),
BoxAirNumberRecordDO:
:
getChannelCode
,
PUBLIC_CHANNEL_CODE_LIST
)
.
orderByDesc
(
BoxAirNumberRecordDO:
:
getId
).
last
(
"limit 1"
));
// 根据最大的自编号生成最新的自编号
String
preChannelCode
=
""
;
...
...
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