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
cb3ec39f
Commit
cb3ec39f
authored
Nov 06, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-fix' into release
parents
2aea7108
decae2ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+8
-8
BoxAirNumberRecordServiceImpl.java
...ice/boxAirNumberRecord/BoxAirNumberRecordServiceImpl.java
+10
-8
No files found.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
cb3ec39f
...
...
@@ -660,19 +660,19 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
// 更新
BoxDO
updateObj
=
BoxConvert
.
INSTANCE
.
convert
(
updateReqVO
);
if
(
StringUtils
.
equals
(
TransportTypeEnum
.
AIR
.
getType
(),
transportType
))
{
if
(!
Objects
.
equals
(
channelId
,
boxDO
.
getShippingChannelId
()
)
||
!
Objects
.
equals
(
oldDestId
,
newDestId
))
{
if
(!
Objects
.
equals
(
channelId
,
oldChannelId
)
||
!
Objects
.
equals
(
oldDestId
,
newDestId
))
{
// 当箱子的渠道或者目的变更时,都需要重新生成自编号
// 先将原有的自编号记录做使用状态变更处理
String
selfNo
=
""
;
if
(!
Objects
.
equals
(
oldDestId
,
newDestId
)
)
{
//
String selfNo = "";
// if (!Objects.equals(oldDestId, newDestId) || !Objects.equals(oldDestId, newDestId)
) {
// 目的国变更,需要切换自编号
boxAirNumberRecordService
.
updateBoxAirNumberRecordUsedStatus
(
boxDO
.
getSelfNo
());
// 再重新获取自编号
selfNo
=
getAirOrderNo
(
channelId
,
newDestId
,
transportType
);
}
else
{
// 不是目的国变更,那么只是渠道变更,渠道变更只需要更新自编号规则,将原有记录更新
selfNo
=
chargeChannelAirOrderNo
(
boxDO
.
getSelfNo
(),
channelId
,
newDestId
,
transportType
);
}
String
selfNo
=
getAirOrderNo
(
channelId
,
newDestId
,
transportType
);
//
} else {
//
// 不是目的国变更,那么只是渠道变更,渠道变更只需要更新自编号规则,将原有记录更新
//
selfNo = chargeChannelAirOrderNo(boxDO.getSelfNo(), channelId, newDestId, transportType);
//
}
updateObj
.
setSelfNo
(
selfNo
);
}
}
else
{
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxAirNumberRecord/BoxAirNumberRecordServiceImpl.java
View file @
cb3ec39f
...
...
@@ -91,18 +91,19 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
BoxAirNumberRecordDO
boxAirNumberRecordDO
=
boxAirNumberRecordMapper
.
selectOne
(
new
LambdaQueryWrapper
<
BoxAirNumberRecordDO
>()
.
eq
(
BoxAirNumberRecordDO:
:
getTransportType
,
transportType
)
.
eq
(
BoxAirNumberRecordDO:
:
getDestCountryCode
,
destCountryCode
)
.
eq
(
BoxAirNumberRecordDO:
:
getChannelCode
,
channelCode
)
.
eq
(
BoxAirNumberRecordDO:
:
getUsed
,
0
)
.
orderByAsc
(
BoxAirNumberRecordDO:
:
getId
).
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
boxAirNumberRecordDO
))
{
// 修改自编号逻辑
if
(!
StringUtils
.
equals
(
channelCode
,
boxAirNumberRecordDO
.
getChannelCode
()))
{
String
newNumber
=
CodeUtils
.
chargeChannelAirSelfNumbers
(
destCountryCode
,
channelCode
,
boxAirNumberRecordDO
.
getChannelCode
(),
boxAirNumberRecordDO
.
getNumber
());
boxAirNumberRecordDO
.
setDestId
(
destId
);
boxAirNumberRecordDO
.
setDestCountryCode
(
destCountryCode
);
boxAirNumberRecordDO
.
setNumber
(
newNumber
);
boxAirNumberRecordDO
.
setChannelCode
(
channelCode
);
boxAirNumberRecordDO
.
setChannelId
(
channelId
);
}
//
if (!StringUtils.equals(channelCode, boxAirNumberRecordDO.getChannelCode())) {
//
String newNumber = CodeUtils.chargeChannelAirSelfNumbers(destCountryCode, channelCode, boxAirNumberRecordDO.getChannelCode(), boxAirNumberRecordDO.getNumber());
//
boxAirNumberRecordDO.setDestId(destId);
//
boxAirNumberRecordDO.setDestCountryCode(destCountryCode);
//
boxAirNumberRecordDO.setNumber(newNumber);
//
boxAirNumberRecordDO.setChannelCode(channelCode);
//
boxAirNumberRecordDO.setChannelId(channelId);
//
}
// 如果有未使用的编号记录,则直接更新为使用状态后返回
boxAirNumberRecordDO
.
setUsed
(
Boolean
.
TRUE
);
boxAirNumberRecordDO
.
setUpdater
(
String
.
valueOf
(
userId
));
...
...
@@ -148,6 +149,7 @@ public class BoxAirNumberRecordServiceImpl extends AbstractService<BoxAirNumberR
.
eq
(
BoxAirNumberRecordDO:
:
getNumber
,
number
)
.
eq
(
BoxAirNumberRecordDO:
:
getTransportType
,
transportType
)
.
eq
(
BoxAirNumberRecordDO:
:
getDestCountryCode
,
destCountryCode
)
.
eq
(
BoxAirNumberRecordDO:
:
getChannelCode
,
channelCode
)
.
orderByAsc
(
BoxAirNumberRecordDO:
:
getId
).
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
boxAirNumberRecordDO
))
{
// 修改自编号逻辑
...
...
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