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
90526643
Commit
90526643
authored
Apr 16, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改提货单状态逻辑判断
parent
a45fd369
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
39 deletions
+42
-39
BoxMapper.java
...cn/iocoder/yudao/module/shipment/dal/mysql/BoxMapper.java
+42
-39
No files found.
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/dal/mysql/BoxMapper.java
View file @
90526643
...
...
@@ -36,28 +36,28 @@ import org.apache.ibatis.annotations.Select;
/**
* 出货 Mapper
*
* @author lalala
*/
@Mapper
public
interface
BoxMapper
extends
AbstractMapper
<
BoxDO
>
{
default
PageResult
<
BoxBackVO
>
selectPage1
(
PageVO
page
,
Object
object
)
{
if
(
object
instanceof
BoxQueryVO
)
{
BoxQueryVO
vo
=
(
BoxQueryVO
)
object
;
if
(
StringUtils
.
isEmpty
(
vo
.
getTransportType
()))
{
BoxQueryVO
vo
=
(
BoxQueryVO
)
object
;
if
(
StringUtils
.
isEmpty
(
vo
.
getTransportType
()))
{
vo
.
setTransportType
(
null
);
}
List
<
Long
>
warehouseIdList
=
vo
.
getWarehouseIdList
();
String
lastSql
=
null
;
if
(
vo
.
getLadingBillStatus
()
!=
null
)
{
if
(
vo
.
getLadingBillStatus
()
==
0
)
{
if
(
vo
.
getLadingBillStatus
()
!=
null
)
{
if
(
vo
.
getLadingBillStatus
()
==
0
)
{
lastSql
=
" having ladingCount=0"
;
}
else
if
(
vo
.
getLadingBillStatus
()
==
1
)
{
}
else
if
(
vo
.
getLadingBillStatus
()
==
1
)
{
lastSql
=
" having ladingCount <> orderCount and ladingCount > 0"
;
}
else
if
(
vo
.
getLadingBillStatus
()
==
2
)
{
}
else
if
(
vo
.
getLadingBillStatus
()
==
2
)
{
lastSql
=
" having ladingCount = orderCount and ladingCount > 0"
;
}
}
...
...
@@ -160,9 +160,9 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
Long
orderCount
=
(
Long
)
recordMap
.
get
(
"orderCount"
);
Long
ladingCount
=
(
Long
)
recordMap
.
get
(
"ladingCount"
);
boxEntity
.
setLadingBillStatus
(
0
);
if
(
orderCount
!=
0
)
{
if
(
ladingCount
>
0
)
{
if
(
ladingCount
>=
orderCount
)
{
if
(
orderCount
!=
0
)
{
if
(
ladingCount
>
0
)
{
if
(
ladingCount
>=
orderCount
)
{
boxEntity
.
setLadingBillStatus
(
2
);
}
else
{
boxEntity
.
setLadingBillStatus
(
1
);
...
...
@@ -181,19 +181,19 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
default
PageResult
<
BoxBackVO
>
selectPage2
(
PageVO
page
,
Object
object
)
{
if
(
object
instanceof
BoxQueryVO
)
{
BoxQueryVO
vo
=
(
BoxQueryVO
)
object
;
if
(
StringUtils
.
isEmpty
(
vo
.
getTransportType
()))
{
BoxQueryVO
vo
=
(
BoxQueryVO
)
object
;
if
(
StringUtils
.
isEmpty
(
vo
.
getTransportType
()))
{
vo
.
setTransportType
(
null
);
}
List
<
Long
>
warehouseIdList
=
vo
.
getWarehouseIdList
();
String
lastSql
=
null
;
if
(
vo
.
getLadingBillStatus
()
!=
null
)
{
if
(
vo
.
getLadingBillStatus
()
==
0
)
{
if
(
vo
.
getLadingBillStatus
()
!=
null
)
{
if
(
vo
.
getLadingBillStatus
()
==
0
)
{
lastSql
=
" and ladingCount=0"
;
}
else
if
(
vo
.
getLadingBillStatus
()
==
1
)
{
}
else
if
(
vo
.
getLadingBillStatus
()
==
1
)
{
lastSql
=
" and ladingCount <> orderCount and ladingCount > 0"
;
}
else
if
(
vo
.
getLadingBillStatus
()
==
2
)
{
}
else
if
(
vo
.
getLadingBillStatus
()
==
2
)
{
lastSql
=
" and ladingCount = orderCount and ladingCount > 0"
;
}
}
...
...
@@ -215,7 +215,7 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
.
eq
(
vo
.
getDestWarehouseId
()
!=
null
,
BoxDO:
:
getDestWarehouseId
,
vo
.
getDestWarehouseId
())
.
eq
(
vo
.
getTransportType
()
!=
null
,
BoxDO:
:
getTransportType
,
vo
.
getTransportType
())
.
eq
(
vo
.
getDestinationClearance
()
!=
null
,
BoxDO:
:
getDestinationClearance
,
vo
.
getDestinationClearance
())
.
eq
(
vo
.
getDeliveryType
()
!=
null
,
BoxDO:
:
getDeliveryType
,
vo
.
getDeliveryType
())
.
eq
(
vo
.
getDeliveryType
()
!=
null
,
BoxDO:
:
getDeliveryType
,
vo
.
getDeliveryType
())
.
in
(
CollectionUtil
.
isNotEmpty
(
vo
.
getTransportTypeList
()),
BoxDO:
:
getTransportType
,
vo
.
getTransportTypeList
())
.
eq
(
vo
.
getShippingChannelId
()
!=
null
,
BoxDO:
:
getShippingChannelId
,
vo
.
getShippingChannelId
())
.
and
(
CollectionUtil
.
isNotEmpty
(
warehouseIdList
),
...
...
@@ -307,9 +307,12 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
Long
orderCount
=
(
Long
)
recordMap
.
get
(
"orderCount"
);
Long
ladingCount
=
(
Long
)
recordMap
.
get
(
"ladingCount"
);
boxEntity
.
setLadingBillStatus
(
0
);
if
(
orderCount
!=
0
)
{
if
(
ladingCount
>
0
)
{
if
(
orderCount
.
equals
(
ladingCount
))
{
if
(
orderCount
!=
0
)
{
if
(
ladingCount
>
0
)
{
if
(
orderCount
.
equals
(
ladingCount
))
{
boxEntity
.
setLadingBillStatus
(
2
);
}
else
if
(
orderCount
<
ladingCount
)
{
//lanbm 2024-04-16 添加的逻辑,提单有可能补单
boxEntity
.
setLadingBillStatus
(
2
);
}
else
{
boxEntity
.
setLadingBillStatus
(
1
);
...
...
@@ -327,11 +330,10 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
}
@Override
default
List
<
BoxDO
>
selectList
(
Object
object
)
{
if
(
object
instanceof
BoxQueryVO
)
{
BoxQueryVO
vo
=
(
BoxQueryVO
)
object
;
BoxQueryVO
vo
=
(
BoxQueryVO
)
object
;
return
selectList
(
new
LambdaQuery
<
BoxDO
>()
.
eqIfPresent
(
BoxDO:
:
getId
,
vo
.
getId
())
.
eqIfPresent
(
BoxDO:
:
getSelfNo
,
vo
.
getSelfNo
())
...
...
@@ -389,7 +391,7 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
@Param
(
"warehouseIdList"
)
Set
<
Long
>
warehouseIdList
,
@Param
(
"selfNo"
)
String
selfNo
,
@Param
(
"transportTypeList"
)
Collection
<
String
>
transportTypeList
);
);
default
IPage
<
BoxDO
>
selectSettlementPage
(
PageVO
page
,
BoxSettlementQueryVO
vo
)
{
// LambdaQueryWrapper<BoxDO> boxQuery = new LambdaQuery<BoxDO>()
...
...
@@ -402,7 +404,7 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
String
beginJSDate
=
null
;
String
endJsDate
=
null
;
if
(
vo
.
getBeginJsDate
()
!=
null
)
{
if
(
vo
.
getBeginJsDate
()
!=
null
)
{
beginJSDate
=
DateUtil
.
format
(
vo
.
getBeginJsDate
(),
"yyyy-MM-dd HH:mm:ss"
);
endJsDate
=
DateUtil
.
format
(
vo
.
getEndJsDate
(),
"yyyy-MM-dd HH:mm:ss"
);
}
...
...
@@ -411,6 +413,7 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
vo
.
getSelfNo
(),
vo
.
getBoxStatus
(),
vo
.
getSlStatus
(),
beginJSDate
,
endJsDate
);
// return selectPage(page, boxQuery);
}
@ResultType
(
BoxDO
.
class
)
@Select
({
"<script>"
,
...
...
@@ -465,13 +468,13 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
"</script>"
})
IPage
<
BoxDO
>
boxSettlePage
(
@Param
(
"mpPage"
)
IPage
<
BoxDO
>
page
,
@Param
(
"startWarehouseIdList"
)
Collection
<
Long
>
startWarehouseIdList
,
@Param
(
"destWarehouseIdList"
)
Collection
<
Long
>
destWarehouseIdList
,
@Param
(
"selfNo"
)
String
selfNo
,
@Param
(
"boxStatus"
)
Integer
boxStatus
,
@Param
(
"slStatus"
)
Integer
slStatus
,
@Param
(
"beginJsDate"
)
String
beginJsDate
,
@Param
(
"endJsDate"
)
String
endJsDate
);
@Param
(
"startWarehouseIdList"
)
Collection
<
Long
>
startWarehouseIdList
,
@Param
(
"destWarehouseIdList"
)
Collection
<
Long
>
destWarehouseIdList
,
@Param
(
"selfNo"
)
String
selfNo
,
@Param
(
"boxStatus"
)
Integer
boxStatus
,
@Param
(
"slStatus"
)
Integer
slStatus
,
@Param
(
"beginJsDate"
)
String
beginJsDate
,
@Param
(
"endJsDate"
)
String
endJsDate
);
@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"
)
...
...
@@ -510,16 +513,16 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
@Param
(
"minNumber"
)
Integer
minNumber
);
Long
getMinNumDeleteBox
(
@Param
(
"startWarehouseId"
)
Long
startWarehouseId
,
@Param
(
"startCountryId"
)
Long
startCountryId
,
@Param
(
"destCountryId"
)
Long
destCountryId
);
@Param
(
"startCountryId"
)
Long
startCountryId
,
@Param
(
"destCountryId"
)
Long
destCountryId
);
@Override
default
PageResult
<
BoxDO
>
selectPage
(
PageVO
page
,
Object
object
)
{
if
(
object
instanceof
BoxQueryVO
)
{
BoxQueryVO
vo
=
(
BoxQueryVO
)
object
;
if
(
StringUtils
.
isEmpty
(
vo
.
getTransportType
()))
{
BoxQueryVO
vo
=
(
BoxQueryVO
)
object
;
if
(
StringUtils
.
isEmpty
(
vo
.
getTransportType
()))
{
vo
.
setTransportType
(
null
);
}
List
<
Long
>
warehouseIdList
=
vo
.
getWarehouseIdList
();
...
...
@@ -585,8 +588,8 @@ public interface BoxMapper extends AbstractMapper<BoxDO> {
"</script>"
})
IPage
<
BoxDO
>
tallyAirPage
(
@Param
(
"mpPage"
)
IPage
<
BoxDO
>
page
,
@Param
(
"warehouseIdList"
)
Set
<
Long
>
warehouseIdList
,
@Param
(
"selfNo"
)
String
selfNo
,
@Param
(
"transportTypeList"
)
Collection
<
String
>
transportTypeList
@Param
(
"warehouseIdList"
)
Set
<
Long
>
warehouseIdList
,
@Param
(
"selfNo"
)
String
selfNo
,
@Param
(
"transportTypeList"
)
Collection
<
String
>
transportTypeList
);
}
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