Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
smart-rack-base
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
耿迪迪
smart-rack-base
Commits
18fd14d2
Commit
18fd14d2
authored
Oct 17, 2025
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库websocket同步物料信息
parent
8a67af0d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
9 deletions
+30
-9
TShelfStorageLocationController.java
...web/controller/shelf/TShelfStorageLocationController.java
+1
-5
TRackMaterialRelationMapper.java
...g/system/mapper/material/TRackMaterialRelationMapper.java
+7
-0
ITShelfApiServiceImpl.java
...hong/system/service/impl/shelf/ITShelfApiServiceImpl.java
+10
-3
ITShelfApiService.java
...va/com/zehong/system/service/shelf/ITShelfApiService.java
+1
-1
TRackMaterialRelationMapper.xml
...resources/mapper/material/TRackMaterialRelationMapper.xml
+5
-0
index.vue
...base-web/src/views/pcbamanage/pcbashelflocation/index.vue
+3
-0
index.vue
...web/src/views/producemange/produceshelflocation/index.vue
+3
-0
No files found.
smart-rack-base-admin/src/main/java/com/zehong/web/controller/shelf/TShelfStorageLocationController.java
View file @
18fd14d2
...
@@ -111,11 +111,7 @@ public class TShelfStorageLocationController extends BaseController
...
@@ -111,11 +111,7 @@ public class TShelfStorageLocationController extends BaseController
*/
*/
@PostMapping
(
"/rackInOutput"
)
@PostMapping
(
"/rackInOutput"
)
public
AjaxResult
rackInOutput
(
@RequestBody
String
param
)
{
public
AjaxResult
rackInOutput
(
@RequestBody
String
param
)
{
String
result
=
shelfApiService
.
rackInOutput
(
param
);
shelfApiService
.
rackInOutput
(
param
);
JSONObject
resultJson
=
JSONObject
.
parseObject
(
result
);
if
(
"1"
.
equals
(
resultJson
.
getString
(
"FLAG"
)))
{
return
AjaxResult
.
error
(
resultJson
.
getString
(
"MESSAGE"
));
}
return
AjaxResult
.
success
();
return
AjaxResult
.
success
();
}
}
...
...
smart-rack-base-system/src/main/java/com/zehong/system/mapper/material/TRackMaterialRelationMapper.java
View file @
18fd14d2
...
@@ -19,6 +19,13 @@ public interface TRackMaterialRelationMapper
...
@@ -19,6 +19,13 @@ public interface TRackMaterialRelationMapper
*/
*/
public
TRackMaterialRelation
selectTRackMaterialRelationById
(
Long
relationId
);
public
TRackMaterialRelation
selectTRackMaterialRelationById
(
Long
relationId
);
/**
* 查询料架和物料维护
* @param rackCode 料架号
* @return 料架和物料维护
*/
TRackMaterialRelation
selectTRackMaterialRelationByRackCode
(
String
rackCode
);
/**
/**
* 查询料架和物料维护列表
* 查询料架和物料维护列表
*
*
...
...
smart-rack-base-system/src/main/java/com/zehong/system/service/impl/shelf/ITShelfApiServiceImpl.java
View file @
18fd14d2
...
@@ -83,7 +83,7 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
...
@@ -83,7 +83,7 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@PlatformDockingTaskLog
(
type
=
DockingTaskType
.
CALL_RACK_SYSTEM
)
@PlatformDockingTaskLog
(
type
=
DockingTaskType
.
CALL_RACK_SYSTEM
)
public
String
rackInOutput
(
String
param
){
public
void
rackInOutput
(
String
param
){
log
.
info
(
"rackInOutput...param=========="
+
param
);
log
.
info
(
"rackInOutput...param=========="
+
param
);
JSONObject
paramJson
=
JSONObject
.
parseObject
(
param
);
JSONObject
paramJson
=
JSONObject
.
parseObject
(
param
);
if
(
paramJson
.
containsKey
(
"relationParam"
)){
if
(
paramJson
.
containsKey
(
"relationParam"
)){
...
@@ -91,13 +91,15 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
...
@@ -91,13 +91,15 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
addRelationInfo
(
paramJson
.
getJSONObject
(
"relationParam"
));
addRelationInfo
(
paramJson
.
getJSONObject
(
"relationParam"
));
String
result
=
HttpClientUtils
.
doPost
(
shelfApiUrl
+
RACK_IN_OUT_PUT_URL
,
paramJson
.
getString
(
"inStoreParam"
),
null
);
String
result
=
HttpClientUtils
.
doPost
(
shelfApiUrl
+
RACK_IN_OUT_PUT_URL
,
paramJson
.
getString
(
"inStoreParam"
),
null
);
if
(
StringUtils
.
isEmpty
(
result
))
throw
new
CustomException
(
"料架出入库接口错误"
);
if
(
StringUtils
.
isEmpty
(
result
))
throw
new
CustomException
(
"料架出入库接口错误"
);
return
result
;
JSONObject
resultJson
=
JSONObject
.
parseObject
(
result
);
if
(
"1"
.
equals
(
resultJson
.
getString
(
"FLAG"
)))
throw
new
CustomException
(
"料架入库失败"
+
resultJson
.
getString
(
"MESSAGE"
));
}
else
{
}
else
{
//出库
//出库
delRelationInfo
(
JSONObject
.
parseObject
(
param
));
delRelationInfo
(
JSONObject
.
parseObject
(
param
));
String
result
=
HttpClientUtils
.
doPost
(
shelfApiUrl
+
RACK_IN_OUT_PUT_URL
,
param
,
null
);
String
result
=
HttpClientUtils
.
doPost
(
shelfApiUrl
+
RACK_IN_OUT_PUT_URL
,
param
,
null
);
if
(
StringUtils
.
isEmpty
(
result
))
throw
new
CustomException
(
"料架出入库接口错误"
);
if
(
StringUtils
.
isEmpty
(
result
))
throw
new
CustomException
(
"料架出入库接口错误"
);
return
result
;
JSONObject
resultJson
=
JSONObject
.
parseObject
(
result
);
if
(
"1"
.
equals
(
resultJson
.
getString
(
"FLAG"
)))
throw
new
CustomException
(
"料架出库失败"
+
resultJson
.
getString
(
"MESSAGE"
));
}
}
}
}
...
@@ -163,6 +165,11 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
...
@@ -163,6 +165,11 @@ public class ITShelfApiServiceImpl implements ITShelfApiService{
if
(
"I"
.
equals
(
request
.
getString
(
"optype"
))){
if
(
"I"
.
equals
(
request
.
getString
(
"optype"
))){
tShelfStorageLocation
.
setInboundTime
(
new
SimpleDateFormat
(
"yyyy/MM/dd HH:mm:ss"
).
parse
(
request
.
getString
(
"operateDate"
)));
tShelfStorageLocation
.
setInboundTime
(
new
SimpleDateFormat
(
"yyyy/MM/dd HH:mm:ss"
).
parse
(
request
.
getString
(
"operateDate"
)));
tShelfStorageLocation
.
setRid
(
request
.
getString
(
"rid"
));
tShelfStorageLocation
.
setRid
(
request
.
getString
(
"rid"
));
//查询物料信息
TRackMaterialRelation
materialInfo
=
rackMaterialRelationMapper
.
selectTRackMaterialRelationByRackCode
(
request
.
getString
(
"rid"
));
request
.
put
(
"materialCode"
,
materialInfo
.
getMaterialCode
());
request
.
put
(
"materialName"
,
materialInfo
.
getMaterialName
());
request
.
put
(
"materialSpecifications"
,
materialInfo
.
getMaterialSpecifications
());
}
}
if
(
"O"
.
equals
(
request
.
getString
(
"optype"
))){
if
(
"O"
.
equals
(
request
.
getString
(
"optype"
))){
tShelfStorageLocation
.
setOutboundTime
(
new
SimpleDateFormat
(
"yyyy/MM/dd HH:mm:ss"
).
parse
(
request
.
getString
(
"operateDate"
)));
tShelfStorageLocation
.
setOutboundTime
(
new
SimpleDateFormat
(
"yyyy/MM/dd HH:mm:ss"
).
parse
(
request
.
getString
(
"operateDate"
)));
...
...
smart-rack-base-system/src/main/java/com/zehong/system/service/shelf/ITShelfApiService.java
View file @
18fd14d2
...
@@ -20,7 +20,7 @@ public interface ITShelfApiService {
...
@@ -20,7 +20,7 @@ public interface ITShelfApiService {
* @param param
* @param param
* @return
* @return
*/
*/
String
rackInOutput
(
String
param
);
void
rackInOutput
(
String
param
);
/**
/**
*4 获取料架所有储位信息
*4 获取料架所有储位信息
...
...
smart-rack-base-system/src/main/resources/mapper/material/TRackMaterialRelationMapper.xml
View file @
18fd14d2
...
@@ -48,6 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -48,6 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where relation.relation_id = #{relationId}
where relation.relation_id = #{relationId}
</select>
</select>
<select
id=
"selectTRackMaterialRelationByRackCode"
parameterType=
"String"
resultMap=
"TRackMaterialRelationResult"
>
<include
refid=
"selectTRackMaterialRelationVo"
/>
where relation.rack_code = #{rackCode}
</select>
<insert
id=
"insertTRackMaterialRelation"
parameterType=
"TRackMaterialRelation"
useGeneratedKeys=
"true"
keyProperty=
"relationId"
>
<insert
id=
"insertTRackMaterialRelation"
parameterType=
"TRackMaterialRelation"
useGeneratedKeys=
"true"
keyProperty=
"relationId"
>
insert into t_rack_material_relation
insert into t_rack_material_relation
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
...
...
smart-rack-base-web/src/views/pcbamanage/pcbashelflocation/index.vue
View file @
18fd14d2
...
@@ -310,6 +310,9 @@
...
@@ -310,6 +310,9 @@
if
(
"I"
==
message
.
optype
){
if
(
"I"
==
message
.
optype
){
const
locationInfo
=
this
.
shelfLayoutList
.
flat
().
find
(
location
=>
location
.
location
===
message
.
location
);
const
locationInfo
=
this
.
shelfLayoutList
.
flat
().
find
(
location
=>
location
.
location
===
message
.
location
);
locationInfo
.
rid
=
message
.
rid
;
locationInfo
.
rid
=
message
.
rid
;
locationInfo
.
materialCode
=
message
.
materialCode
;
locationInfo
.
materialName
=
message
.
materialName
;
locationInfo
.
materialSpecifications
=
message
.
materialSpecifications
;
}
}
//出库
//出库
if
(
"O"
==
message
.
optype
){
if
(
"O"
==
message
.
optype
){
...
...
smart-rack-base-web/src/views/producemange/produceshelflocation/index.vue
View file @
18fd14d2
...
@@ -310,6 +310,9 @@
...
@@ -310,6 +310,9 @@
if
(
"I"
==
message
.
optype
){
if
(
"I"
==
message
.
optype
){
const
locationInfo
=
this
.
shelfLayoutList
.
flat
().
find
(
location
=>
location
.
location
===
message
.
location
);
const
locationInfo
=
this
.
shelfLayoutList
.
flat
().
find
(
location
=>
location
.
location
===
message
.
location
);
locationInfo
.
rid
=
message
.
rid
;
locationInfo
.
rid
=
message
.
rid
;
locationInfo
.
materialCode
=
message
.
materialCode
;
locationInfo
.
materialName
=
message
.
materialName
;
locationInfo
.
materialSpecifications
=
message
.
materialSpecifications
;
}
}
//出库
//出库
if
(
"O"
==
message
.
optype
){
if
(
"O"
==
message
.
optype
){
...
...
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