Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TMS_APP
Project overview
Project overview
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
chew
TMS_APP
Commits
c569fa72
Commit
c569fa72
authored
Jul 01, 2026
by
chew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询剩余工作
parent
b266b6df
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
119 additions
and
4 deletions
+119
-4
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/controller/OutboundController.java
.../module/cargo/outbound/controller/OutboundController.java
+8
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dao/OutboundOrderHeaderMapper.java
.../module/cargo/outbound/dao/OutboundOrderHeaderMapper.java
+9
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/OrderQueryReq.java
...gwin/tms_app/module/cargo/outbound/dto/OrderQueryReq.java
+19
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/service/OutboundOrderService.java
...p/module/cargo/outbound/service/OutboundOrderService.java
+3
-4
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/service/impl/OutboundOrderServiceImpl.java
...cargo/outbound/service/impl/OutboundOrderServiceImpl.java
+13
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/vo/OrderWithPendingVo.java
.../tms_app/module/cargo/outbound/vo/OrderWithPendingVo.java
+20
-0
src/main/resources/mapper/cargo/outbound/OutboundOrderHeaderMapper.xml
...urces/mapper/cargo/outbound/OutboundOrderHeaderMapper.xml
+47
-0
No files found.
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/controller/OutboundController.java
View file @
c569fa72
...
@@ -8,6 +8,7 @@ import com.ekingwin.tms_app.module.cargo.outbound.entity.OutboundTracecode;
...
@@ -8,6 +8,7 @@ import com.ekingwin.tms_app.module.cargo.outbound.entity.OutboundTracecode;
import
com.ekingwin.tms_app.module.cargo.outbound.service.OutboundOrderService
;
import
com.ekingwin.tms_app.module.cargo.outbound.service.OutboundOrderService
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.BoxInfoVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.BoxInfoVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.CustomerProductSummaryVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.CustomerProductSummaryVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OrderWithPendingVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OutboundOrderVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OutboundOrderVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -135,4 +136,11 @@ public class OutboundController {
...
@@ -135,4 +136,11 @@ public class OutboundController {
outboundOrderService
.
scanTracecode
(
req
,
userId
);
outboundOrderService
.
scanTracecode
(
req
,
userId
);
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
}
}
@PostMapping
(
"/orders/pending"
)
public
Result
<
IPage
<
OrderWithPendingVo
>>
listOrdersWithPending
(
@RequestBody
@Valid
OrderQueryReq
req
,
@RequestAttribute
(
"userId"
)
String
userId
)
{
return
Result
.
success
(
outboundOrderService
.
getOrderWithPending
(
req
));
}
}
}
\ No newline at end of file
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dao/OutboundOrderHeaderMapper.java
View file @
c569fa72
...
@@ -3,6 +3,7 @@ package com.ekingwin.tms_app.module.cargo.outbound.dao;
...
@@ -3,6 +3,7 @@ package com.ekingwin.tms_app.module.cargo.outbound.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.CustomerProductSummaryVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.CustomerProductSummaryVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.entity.OutboundOrderHeader
;
import
com.ekingwin.tms_app.module.cargo.outbound.entity.OutboundOrderHeader
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OrderWithPendingVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OutboundOrderVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OutboundOrderVo
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -30,4 +31,12 @@ public interface OutboundOrderHeaderMapper extends BaseMapper<OutboundOrderHeade
...
@@ -30,4 +31,12 @@ public interface OutboundOrderHeaderMapper extends BaseMapper<OutboundOrderHeade
@Param
(
"endTime"
)
Date
endTime
@Param
(
"endTime"
)
Date
endTime
);
);
List
<
OrderWithPendingVo
>
selectOrderWithPending
(
@Param
(
"customerName"
)
String
customerName
,
@Param
(
"orderNo"
)
String
orderNo
,
@Param
(
"status"
)
String
status
,
@Param
(
"startTime"
)
Date
startTime
,
@Param
(
"endTime"
)
Date
endTime
);
}
}
\ No newline at end of file
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/OrderQueryReq.java
0 → 100644
View file @
c569fa72
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
dto
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
public
class
OrderQueryReq
{
private
String
customerName
;
private
String
orderNo
;
private
String
status
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
startTime
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endTime
;
private
Integer
pageNum
=
1
;
private
Integer
pageSize
=
10
;
}
\ No newline at end of file
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/service/OutboundOrderService.java
View file @
c569fa72
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
service
;
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.CustomerProductQueryReq
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.*
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.OutboundOrderQueryReq
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.TallyCommitReq
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.TracecodeScanReq
;
import
com.ekingwin.tms_app.module.cargo.outbound.entity.OutboundOrderDetail
;
import
com.ekingwin.tms_app.module.cargo.outbound.entity.OutboundOrderDetail
;
import
com.ekingwin.tms_app.module.cargo.outbound.entity.OutboundTracecode
;
import
com.ekingwin.tms_app.module.cargo.outbound.entity.OutboundTracecode
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.BoxInfoVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.BoxInfoVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.CustomerProductSummaryVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.CustomerProductSummaryVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OrderWithPendingVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OutboundOrderVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OutboundOrderVo
;
import
java.util.List
;
import
java.util.List
;
...
@@ -28,4 +26,5 @@ public interface OutboundOrderService {
...
@@ -28,4 +26,5 @@ public interface OutboundOrderService {
public
void
commitTally
(
TallyCommitReq
req
,
String
operatorId
);
public
void
commitTally
(
TallyCommitReq
req
,
String
operatorId
);
public
void
scanTracecode
(
TracecodeScanReq
req
,
String
operatorId
);
public
void
scanTracecode
(
TracecodeScanReq
req
,
String
operatorId
);
public
IPage
<
OrderWithPendingVo
>
getOrderWithPending
(
OrderQueryReq
req
);
}
}
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/service/impl/OutboundOrderServiceImpl.java
View file @
c569fa72
...
@@ -8,6 +8,7 @@ import com.ekingwin.tms_app.module.cargo.outbound.dao.*;
...
@@ -8,6 +8,7 @@ import com.ekingwin.tms_app.module.cargo.outbound.dao.*;
import
com.ekingwin.tms_app.module.cargo.outbound.service.OutboundOrderService
;
import
com.ekingwin.tms_app.module.cargo.outbound.service.OutboundOrderService
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.BoxInfoVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.BoxInfoVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.CustomerProductSummaryVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.CustomerProductSummaryVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OrderWithPendingVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OutboundOrderVo
;
import
com.ekingwin.tms_app.module.cargo.outbound.vo.OutboundOrderVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -140,4 +141,16 @@ public class OutboundOrderServiceImpl implements OutboundOrderService {
...
@@ -140,4 +141,16 @@ public class OutboundOrderServiceImpl implements OutboundOrderService {
trace
.
setScannedTime
(
new
Date
());
trace
.
setScannedTime
(
new
Date
());
tracecodeMapper
.
updateById
(
trace
);
tracecodeMapper
.
updateById
(
trace
);
}
}
public
IPage
<
OrderWithPendingVo
>
getOrderWithPending
(
OrderQueryReq
req
)
{
Page
<
OrderWithPendingVo
>
page
=
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
());
page
.
setRecords
(
orderHeaderMapper
.
selectOrderWithPending
(
req
.
getCustomerName
(),
req
.
getOrderNo
(),
req
.
getStatus
(),
req
.
getStartTime
(),
req
.
getEndTime
()
));
return
page
;
}
}
}
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/vo/OrderWithPendingVo.java
0 → 100644
View file @
c569fa72
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
vo
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
OrderWithPendingVo
{
private
String
orderNo
;
private
String
customerName
;
private
String
customerCode
;
private
Integer
totalLines
;
private
Integer
tallyLines
;
private
Integer
remainLines
;
// 剩余行数
private
BigDecimal
progressPct
;
// 进度百分比
private
String
status
;
private
String
statusCn
;
// 中文状态
private
String
pendingItems
;
// 未理货明细(如 "商品A(5); 商品B(3)")
private
String
pendingBoxes
;
// 未理货箱号(逗号分隔)
private
Integer
pendingTraces
;
// 未理货追溯码数量
}
\ No newline at end of file
src/main/resources/mapper/cargo/outbound/OutboundOrderHeaderMapper.xml
View file @
c569fa72
...
@@ -103,4 +103,51 @@
...
@@ -103,4 +103,51 @@
q.TOTAL_QTY
q.TOTAL_QTY
ORDER BY d.item_name
ORDER BY d.item_name
</select>
</select>
<select
id=
"selectOrderWithPending"
resultType=
"com.ekingwin.tms_app.module.cargo.outbound.vo.OrderWithPendingVo"
>
SELECT
h.order_no AS orderNo,
h.customer_name AS customerName,
h.customer_code AS customerCode,
h.total_lines AS totalLines,
h.tally_lines AS tallyLines,
(h.total_lines - h.tally_lines) AS remainLines,
ROUND(h.tally_lines / NULLIF(h.total_lines, 0) * 100, 1) AS progressPct,
h.status,
DECODE(h.status, 'PENDING','待理货','TALLYING','理货中','DONE','已完成', h.status) AS statusCn,
-- 未理货明细
(SELECT LISTAGG(ol.item_name || '(' || (ol.order_qty - ol.tally_qty) || ')', '; ')
WITHIN GROUP (ORDER BY ol.line_no)
FROM T_DOC_outbound_scan_DETAIL ol
WHERE ol.order_no = h.order_no AND ol.status != 'DONE') AS pendingItems,
-- 未理货箱号
(SELECT LISTAGG(b.box_no, ',') WITHIN GROUP (ORDER BY b.box_no)
FROM T_DOC_outbound_box b
WHERE b.order_no = h.order_no AND b.status != 'DONE') AS pendingBoxes,
-- 未理货追溯码数
(SELECT COUNT(*)
FROM T_DOC_outbound_tracecode t
WHERE t.order_no = h.order_no AND t.status = 'PENDING') AS pendingTraces
FROM T_DOC_outbound_scan_HEADER h
WHERE 1=1
<if
test=
"customerName != null and customerName != ''"
>
AND h.customer_name LIKE '%' || #{customerName} || '%'
</if>
<if
test=
"orderNo != null and orderNo != ''"
>
AND h.order_no = #{orderNo}
</if>
<if
test=
"status != null and status != ''"
>
AND h.status = #{status}
</if>
<if
test=
"startTime != null"
>
AND h.create_time >= #{startTime, jdbcType=TIMESTAMP}
</if>
<if
test=
"endTime != null"
>
AND h.create_time
<![CDATA[ <= ]]>
#{endTime, jdbcType=TIMESTAMP}
</if>
<!-- 如果默认不查已完成,可加 -->
<!-- AND h.status != 'DONE' -->
ORDER BY h.status, h.create_time DESC
</select>
</mapper>
</mapper>
\ No newline at end of file
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