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
f90d60a8
Commit
f90d60a8
authored
Jul 02, 2026
by
chew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整理货为数组参入 并讲错误返回
parent
5c99c47d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/controller/ScanController.java
..._app/module/cargo/outbound/controller/ScanController.java
+32
-4
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/ManualTallyUpdateResp.java
..._app/module/cargo/outbound/dto/ManualTallyUpdateResp.java
+2
-0
No files found.
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/controller/ScanController.java
View file @
f90d60a8
...
@@ -6,14 +6,19 @@ import com.ekingwin.tms_app.module.cargo.outbound.dto.ManualTallyUpdateResp;
...
@@ -6,14 +6,19 @@ import com.ekingwin.tms_app.module.cargo.outbound.dto.ManualTallyUpdateResp;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.ScanExecuteReq
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.ScanExecuteReq
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.ScanExecuteResp
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.ScanExecuteResp
;
import
com.ekingwin.tms_app.module.cargo.outbound.service.ScanService
;
import
com.ekingwin.tms_app.module.cargo.outbound.service.ScanService
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
@Log4j2
@RestController
@RestController
@RequestMapping
(
"/cargo/outbound/scan"
)
@RequestMapping
(
"/cargo/outbound/scan"
)
public
class
ScanController
{
public
class
ScanController
{
...
@@ -28,9 +33,32 @@ public class ScanController {
...
@@ -28,9 +33,32 @@ public class ScanController {
@PostMapping
(
"/manual/update"
)
@PostMapping
(
"/manual/update"
)
public
Result
<
ManualTallyUpdateResp
>
manualTallyUpdate
(
@RequestBody
@Valid
ManualTallyUpdateReq
req
)
{
public
Result
<
List
<
ManualTallyUpdateResp
>>
manualTallyUpdate
(
@RequestBody
@Valid
List
<
ManualTallyUpdateReq
>
reqList
)
{
if
(
CollectionUtils
.
isEmpty
(
reqList
))
{
return
Result
.
success
(
Collections
.
emptyList
());
}
List
<
ManualTallyUpdateResp
>
resultList
=
new
ArrayList
<>();
for
(
ManualTallyUpdateReq
req
:
reqList
)
{
ManualTallyUpdateResp
resp
=
new
ManualTallyUpdateResp
();
resp
.
setOrderNo
(
req
.
getOrderNo
().
toString
());
// 假设 req 有 orderNo 字段
try
{
ManualTallyUpdateResp
serviceResp
=
scanService
.
manualTallyUpdate
(
req
);
// 如果 service 返回了结果,直接使用
if
(
StringUtils
.
isNotBlank
(
serviceResp
.
getResult
()))
{
resp
.
setOrderNo
(
serviceResp
.
getOrderNo
());
resp
.
setResult
(
serviceResp
.
getResult
());
resp
.
setSuccess
(
"500"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"人工理货更新失败, orderNo: {}"
,
req
.
getOrderNo
(),
e
);
resp
.
setResult
(
"系统异常: "
+
e
.
getMessage
());
resp
.
setSuccess
(
"500"
);
}
resultList
.
add
(
resp
);
}
ManualTallyUpdateResp
resp
=
scanService
.
manualTallyUpdate
(
req
);
return
Result
.
success
(
resultList
);
return
Result
.
success
(
resp
);
}
}
}
}
\ No newline at end of file
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/ManualTallyUpdateResp.java
View file @
f90d60a8
...
@@ -5,4 +5,6 @@ import lombok.Data;
...
@@ -5,4 +5,6 @@ import lombok.Data;
@Data
@Data
public
class
ManualTallyUpdateResp
{
public
class
ManualTallyUpdateResp
{
private
String
result
;
// 存储过程返回的 p_out_result 信息
private
String
result
;
// 存储过程返回的 p_out_result 信息
private
String
orderNo
;
//
private
String
success
;
//
}
}
\ 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