Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a2bfe059
由
zshaohui
编写于
2024-08-13 15:27:59 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
上传库位模板和查询 增加机种字段
1 个父辈
04e819a3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
20 行增加
和
2 行删除
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
src/main/java/com/neotel/smfcore/core/storage/rest/dto/StoragePosDto.java
src/main/java/com/neotel/smfcore/core/storage/service/po/StoragePos.java
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
查看文件 @
a2bfe05
...
...
@@ -443,6 +443,7 @@ public class StorageController {
titles
.
add
(
"w"
);
titles
.
add
(
"pn"
);
titles
.
add
(
"whcode"
);
titles
.
add
(
"model"
);
for
(
int
i
=
1
;
i
<=
10
;
i
++)
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
...
...
@@ -453,6 +454,7 @@ public class StorageController {
map
.
put
(
"w"
,
7
);
map
.
put
(
"pn"
,
""
);
map
.
put
(
"whcode"
,
"W10B"
);
map
.
put
(
"model"
,
"X8"
);
maps
.
add
(
map
);
}
...
...
@@ -485,6 +487,7 @@ public class StorageController {
int
hIndex
=
csvRead
.
getCsvIndex
(
"高度"
,
"h"
);
int
wIndex
=
csvRead
.
getCsvIndex
(
"宽度"
,
"w"
);
int
whcodeIndex
=
csvRead
.
getCsvIndex
(
"库别"
,
"whcode"
);
int
modelIndex
=
csvRead
.
getCsvIndex
(
"机种"
,
"model"
);
int
row
=
1
;
int
newRowCount
=
0
;
...
...
@@ -500,6 +503,7 @@ public class StorageController {
Integer
height
=
0
;
Integer
width
=
0
;
String
whcode
=
lineValues
[
whcodeIndex
];
String
model
=
lineValues
[
modelIndex
];
try
{
priority
=
Integer
.
parseInt
(
lineValues
[
priIndex
])
;
height
=
Integer
.
parseInt
(
lineValues
[
hIndex
]);
...
...
@@ -524,10 +528,11 @@ public class StorageController {
if
(
posInfo
==
null
){
posInfo
=
new
StoragePos
(
storageId
,
posName
,
height
,
width
,
priority
);
posInfo
.
setWareHouseCode
(
whcode
);
posInfo
.
setModel
(
model
);
newRowCount
++;
newList
.
add
(
posInfo
);
}
else
{
boolean
needUpdate
=
posInfo
.
updatePosInfo
(
storageId
,
posName
,
height
,
width
,
priority
,
whcode
);
boolean
needUpdate
=
posInfo
.
updatePosInfo
(
storageId
,
posName
,
height
,
width
,
priority
,
whcode
,
model
);
if
(
needUpdate
){
updateRowCount
++;
storagePosManager
.
save
(
posInfo
);
...
...
src/main/java/com/neotel/smfcore/core/storage/rest/dto/StoragePosDto.java
查看文件 @
a2bfe05
...
...
@@ -93,4 +93,7 @@ public class StoragePosDto implements Serializable {
@ApiModelProperty
(
"库别"
)
private
String
wareHouseCode
;
@ApiModelProperty
(
"机种"
)
private
String
model
=
""
;
}
src/main/java/com/neotel/smfcore/core/storage/service/po/StoragePos.java
查看文件 @
a2bfe05
...
...
@@ -32,7 +32,7 @@ public class StoragePos extends BasePo implements Serializable {
setCoordinate
(
new
double
[]{
point
.
getX
(),
point
.
getY
()});
}
public
boolean
updatePosInfo
(
String
storageId
,
String
posName
,
int
h
,
int
w
,
int
priority
,
String
whCode
){
public
boolean
updatePosInfo
(
String
storageId
,
String
posName
,
int
h
,
int
w
,
int
priority
,
String
whCode
,
String
model
){
boolean
needUpdate
=
false
;
if
(!
getPosName
().
equals
(
posName
)){
needUpdate
=
true
;
...
...
@@ -60,6 +60,11 @@ public class StoragePos extends BasePo implements Serializable {
needUpdate
=
true
;
}
if
(
StringUtils
.
isNotEmpty
(
model
)){
setModel
(
model
);
needUpdate
=
true
;
}
Point
point
=
PointUtil
.
getPosPoint
(
getPosName
());
if
(
getCoordinate
()==
null
||
getCoordinate
().
length
!=
2
||
(
getCoordinate
()[
0
]!=
point
.
getX
())
||(
getCoordinate
()[
1
]!=
point
.
getY
())){
...
...
@@ -154,6 +159,11 @@ public class StoragePos extends BasePo implements Serializable {
*/
private
String
wareHouseCode
;
/**
* 机种
*/
private
String
model
;
public
String
getLabelStr
(){
String
posNameLabel
=
posName
;
int
index
=
posNameLabel
.
lastIndexOf
(
":"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论