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
bc694f54
Commit
bc694f54
authored
Jul 02, 2026
by
chew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通过条码查询客户信息
parent
7b7a9e97
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
182 additions
and
0 deletions
+182
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/controller/ScanController.java
..._app/module/cargo/outbound/controller/ScanController.java
+25
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dao/ScanMapper.java
...kingwin/tms_app/module/cargo/outbound/dao/ScanMapper.java
+12
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/ItemDetail.java
...kingwin/tms_app/module/cargo/outbound/dto/ItemDetail.java
+26
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/ScanExecuteReq.java
...win/tms_app/module/cargo/outbound/dto/ScanExecuteReq.java
+9
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/ScanExecuteResp.java
...in/tms_app/module/cargo/outbound/dto/ScanExecuteResp.java
+14
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/service/ScanService.java
...in/tms_app/module/cargo/outbound/service/ScanService.java
+8
-0
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/service/impl/ScanServiceImpl.java
...p/module/cargo/outbound/service/impl/ScanServiceImpl.java
+46
-0
src/main/resources/mapper/cargo/outbound/ScanMapper.xml
src/main/resources/mapper/cargo/outbound/ScanMapper.xml
+42
-0
No files found.
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/controller/ScanController.java
0 → 100644
View file @
bc694f54
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
controller
;
import
com.ekingwin.tms_app.common.dto.Result
;
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.service.ScanService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
@RestController
@RequestMapping
(
"/cargo/outbound/scan"
)
public
class
ScanController
{
@Autowired
private
ScanService
scanService
;
@PostMapping
(
"/execute"
)
public
Result
<
ScanExecuteResp
>
executeScan
(
@RequestBody
@Valid
ScanExecuteReq
req
)
{
return
Result
.
success
(
scanService
.
executeScan
(
req
));
}
}
\ No newline at end of file
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dao/ScanMapper.java
0 → 100644
View file @
bc694f54
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
dao
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.Map
;
@Mapper
public
interface
ScanMapper
{
void
executeScan
(
Map
<
String
,
Object
>
params
);
}
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/ItemDetail.java
0 → 100644
View file @
bc694f54
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
dto
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
ItemDetail
{
// 通用字段
private
String
itemCode
;
private
String
itemName
;
private
BigDecimal
orderQty
;
private
BigDecimal
tallyQty
;
private
BigDecimal
remainQty
;
private
String
status
;
private
String
matchType
;
// 可区分 1V1/1VN 等
// 一对一 专用字段
private
BigDecimal
expectQty
;
// 箱内应有数
// 订单概况 专用字段
private
Long
detailId
;
private
Integer
lineNo
;
private
String
barcode
;
private
String
isOddLot
;
private
String
oddLotCn
;
private
String
inBoxes
;
// LISTAGG 箱号
}
\ No newline at end of file
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/ScanExecuteReq.java
0 → 100644
View file @
bc694f54
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
dto
;
import
lombok.Data
;
@Data
public
class
ScanExecuteReq
{
private
Long
sessionId
;
private
String
scanCode
;
}
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/dto/ScanExecuteResp.java
0 → 100644
View file @
bc694f54
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
dto
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
ScanExecuteResp
{
private
String
scanType
;
// 码类型
private
String
matchType
;
// 1V1 / 1VN / ORDER_VIEW
private
String
result
;
// PASS / FAIL / WARN
private
String
message
;
// 提示信息
private
List
<
ItemDetail
>
items
;
}
\ No newline at end of file
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/service/ScanService.java
0 → 100644
View file @
bc694f54
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
service
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.ScanExecuteReq
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.ScanExecuteResp
;
public
interface
ScanService
{
ScanExecuteResp
executeScan
(
ScanExecuteReq
req
);
}
src/main/java/com/ekingwin/tms_app/module/cargo/outbound/service/impl/ScanServiceImpl.java
0 → 100644
View file @
bc694f54
package
com
.
ekingwin
.
tms_app
.
module
.
cargo
.
outbound
.
service
.
impl
;
import
com.ekingwin.tms_app.module.cargo.outbound.dao.ScanMapper
;
import
com.ekingwin.tms_app.module.cargo.outbound.dto.ItemDetail
;
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.service.ScanService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
public
class
ScanServiceImpl
implements
ScanService
{
@Autowired
private
ScanMapper
scanMapper
;
@Override
public
ScanExecuteResp
executeScan
(
ScanExecuteReq
req
)
{
// 1. 构造参数 Map
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"p_session_id"
,
req
.
getSessionId
());
params
.
put
(
"p_scan_code"
,
req
.
getScanCode
());
// 输出参数占位,MyBatis 会自动填充
params
.
put
(
"p_out_scan_type"
,
null
);
params
.
put
(
"p_out_match_type"
,
null
);
params
.
put
(
"p_out_items"
,
null
);
params
.
put
(
"p_out_result"
,
null
);
params
.
put
(
"p_out_message"
,
null
);
// 2. 调用存储过程
scanMapper
.
executeScan
(
params
);
// 3. 提取输出参数
ScanExecuteResp
resp
=
new
ScanExecuteResp
();
resp
.
setScanType
((
String
)
params
.
get
(
"p_out_scan_type"
));
resp
.
setMatchType
((
String
)
params
.
get
(
"p_out_match_type"
));
resp
.
setResult
((
String
)
params
.
get
(
"p_out_result"
));
resp
.
setMessage
((
String
)
params
.
get
(
"p_out_message"
));
resp
.
setItems
((
List
<
ItemDetail
>)
params
.
get
(
"p_out_items"
));
return
resp
;
}
}
\ No newline at end of file
src/main/resources/mapper/cargo/outbound/ScanMapper.xml
0 → 100644
View file @
bc694f54
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.ekingwin.tms_app.module.cargo.outbound.dao.ScanMapper"
>
<!-- 游标结果映射(根据实际返回列定义) -->
<resultMap
id=
"itemDetailMap"
type=
"com.ekingwin.tms_app.module.cargo.outbound.dto.ItemDetail"
>
<!-- 通用列 -->
<result
column=
"item_code"
property=
"itemCode"
/>
<result
column=
"item_name"
property=
"itemName"
/>
<result
column=
"order_qty"
property=
"orderQty"
/>
<result
column=
"tally_qty"
property=
"tallyQty"
/>
<result
column=
"remain_qty"
property=
"remainQty"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"match_type"
property=
"matchType"
/>
<!-- ORDER_VIEW 专用 -->
<result
column=
"detail_id"
property=
"detailId"
/>
<result
column=
"line_no"
property=
"lineNo"
/>
<result
column=
"barcode"
property=
"barcode"
/>
<result
column=
"is_odd_lot"
property=
"isOddLot"
/>
<result
column=
"odd_lot_cn"
property=
"oddLotCn"
/>
<result
column=
"in_boxes"
property=
"inBoxes"
/>
<!-- 1V1 专用 -->
<result
column=
"expect_qty"
property=
"expectQty"
/>
<!-- 1VN 专用 -->
<result
column=
"batch_no"
property=
"batchNo"
/>
<result
column=
"lot_no"
property=
"lotNo"
/>
<result
column=
"box_odd_lot"
property=
"boxOddLot"
/>
</resultMap>
<!-- 调用存储过程 -->
<select
id=
"executeScan"
statementType=
"CALLABLE"
parameterType=
"map"
>
{call PAK_OUTBOUND_SCAN.P_SCAN_EXECUTE(
#{p_session_id, mode=IN, jdbcType=NUMERIC},
#{p_scan_code, mode=IN, jdbcType=VARCHAR},
#{p_out_scan_type, mode=OUT, jdbcType=VARCHAR},
#{p_out_match_type, mode=OUT, jdbcType=VARCHAR},
#{p_out_items, mode=OUT, jdbcType=CURSOR, javaType=java.sql.ResultSet, resultMap=itemDetailMap},
#{p_out_result, mode=OUT, jdbcType=VARCHAR},
#{p_out_message, mode=OUT, jdbcType=VARCHAR}
)}
</select>
</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