Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5b78e07e
由
hc
编写于
2024-07-26 09:18:45 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge remote-tracking branch 'origin/SO1434' into SO1434
2 个父辈
b50db589
689cbc20
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
25 行增加
和
7 行删除
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
src/main/java/com/neotel/smfcore/core/storage/service/po/StoragePos.java
src/main/java/com/neotel/smfcore/core/storage/rest/StorageController.java
查看文件 @
5b78e07
...
@@ -6,10 +6,7 @@ import com.neotel.smfcore.common.bean.PageData;
...
@@ -6,10 +6,7 @@ import com.neotel.smfcore.common.bean.PageData;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.csv.CsvReader
;
import
com.neotel.smfcore.common.csv.CsvReader
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.FileUtil
;
import
com.neotel.smfcore.common.utils.*
;
import
com.neotel.smfcore.common.utils.PointUtil
;
import
com.neotel.smfcore.common.utils.QueryHelp
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.storage.enums.DeviceType
;
import
com.neotel.smfcore.core.storage.enums.DeviceType
;
...
@@ -445,6 +442,7 @@ public class StorageController {
...
@@ -445,6 +442,7 @@ public class StorageController {
titles
.
add
((
"h"
));
titles
.
add
((
"h"
));
titles
.
add
(
"w"
);
titles
.
add
(
"w"
);
titles
.
add
(
"pn"
);
titles
.
add
(
"pn"
);
titles
.
add
(
"whcode"
);
for
(
int
i
=
1
;
i
<=
10
;
i
++)
{
for
(
int
i
=
1
;
i
<=
10
;
i
++)
{
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
Map
<
String
,
Object
>
map
=
new
LinkedHashMap
<>();
...
@@ -453,7 +451,8 @@ public class StorageController {
...
@@ -453,7 +451,8 @@ public class StorageController {
map
.
put
(
"pri"
,
i
);
map
.
put
(
"pri"
,
i
);
map
.
put
(
"h"
,
8
);
map
.
put
(
"h"
,
8
);
map
.
put
(
"w"
,
7
);
map
.
put
(
"w"
,
7
);
map
.
put
(
"pn"
,
"虚拟仓填写料号"
);
map
.
put
(
"pn"
,
""
);
map
.
put
(
"whcode"
,
"W10B"
);
maps
.
add
(
map
);
maps
.
add
(
map
);
}
}
...
@@ -485,6 +484,7 @@ public class StorageController {
...
@@ -485,6 +484,7 @@ public class StorageController {
int
priIndex
=
csvRead
.
getCsvIndex
(
"优先级"
,
"pri"
);
int
priIndex
=
csvRead
.
getCsvIndex
(
"优先级"
,
"pri"
);
int
hIndex
=
csvRead
.
getCsvIndex
(
"高度"
,
"h"
);
int
hIndex
=
csvRead
.
getCsvIndex
(
"高度"
,
"h"
);
int
wIndex
=
csvRead
.
getCsvIndex
(
"宽度"
,
"w"
);
int
wIndex
=
csvRead
.
getCsvIndex
(
"宽度"
,
"w"
);
int
whcodeIndex
=
csvRead
.
getCsvIndex
(
"库别"
,
"whcode"
);
int
row
=
1
;
int
row
=
1
;
int
newRowCount
=
0
;
int
newRowCount
=
0
;
...
@@ -499,6 +499,7 @@ public class StorageController {
...
@@ -499,6 +499,7 @@ public class StorageController {
Integer
priority
=
0
;
Integer
priority
=
0
;
Integer
height
=
0
;
Integer
height
=
0
;
Integer
width
=
0
;
Integer
width
=
0
;
String
whcode
=
lineValues
[
whcodeIndex
];
try
{
try
{
priority
=
Integer
.
parseInt
(
lineValues
[
priIndex
])
;
priority
=
Integer
.
parseInt
(
lineValues
[
priIndex
])
;
height
=
Integer
.
parseInt
(
lineValues
[
hIndex
]);
height
=
Integer
.
parseInt
(
lineValues
[
hIndex
]);
...
@@ -512,14 +513,21 @@ public class StorageController {
...
@@ -512,14 +513,21 @@ public class StorageController {
log
.
warn
(
"第"
+
row
+
"行中有空白内容,此行忽略"
);
log
.
warn
(
"第"
+
row
+
"行中有空白内容,此行忽略"
);
continue
;
continue
;
}
}
if
(
StringUtils
.
isEmpty
(
whcode
)){
log
.
warn
(
"第"
+
row
+
"行中有空白内容,此行忽略"
);
continue
;
}
// StoragePos posInfo = storagePosManager.getByPosName(posName);
// StoragePos posInfo = storagePosManager.getByPosName(posName);
StoragePos
posInfo
=
findFormList
(
storagePosList
,
posName
);
StoragePos
posInfo
=
findFormList
(
storagePosList
,
posName
);
if
(
posInfo
==
null
){
if
(
posInfo
==
null
){
posInfo
=
new
StoragePos
(
storageId
,
posName
,
height
,
width
,
priority
);
posInfo
=
new
StoragePos
(
storageId
,
posName
,
height
,
width
,
priority
);
posInfo
.
setWareHouseCode
(
whcode
);
newRowCount
++;
newRowCount
++;
newList
.
add
(
posInfo
);
newList
.
add
(
posInfo
);
}
else
{
}
else
{
boolean
needUpdate
=
posInfo
.
updatePosInfo
(
storageId
,
posName
,
height
,
width
,
priority
);
boolean
needUpdate
=
posInfo
.
updatePosInfo
(
storageId
,
posName
,
height
,
width
,
priority
,
whcode
);
if
(
needUpdate
){
if
(
needUpdate
){
updateRowCount
++;
updateRowCount
++;
storagePosManager
.
save
(
posInfo
);
storagePosManager
.
save
(
posInfo
);
...
...
src/main/java/com/neotel/smfcore/core/storage/service/po/StoragePos.java
查看文件 @
5b78e07
...
@@ -3,6 +3,7 @@ package com.neotel.smfcore.core.storage.service.po;
...
@@ -3,6 +3,7 @@ package com.neotel.smfcore.core.storage.service.po;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.common.utils.PointUtil
;
import
com.neotel.smfcore.common.utils.PointUtil
;
import
com.neotel.smfcore.common.utils.StringUtils
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.data.geo.Point
;
import
org.springframework.data.geo.Point
;
...
@@ -31,7 +32,7 @@ public class StoragePos extends BasePo implements Serializable {
...
@@ -31,7 +32,7 @@ public class StoragePos extends BasePo implements Serializable {
setCoordinate
(
new
double
[]{
point
.
getX
(),
point
.
getY
()});
setCoordinate
(
new
double
[]{
point
.
getX
(),
point
.
getY
()});
}
}
public
boolean
updatePosInfo
(
String
storageId
,
String
posName
,
int
h
,
int
w
,
int
priority
){
public
boolean
updatePosInfo
(
String
storageId
,
String
posName
,
int
h
,
int
w
,
int
priority
,
String
whCode
){
boolean
needUpdate
=
false
;
boolean
needUpdate
=
false
;
if
(!
getPosName
().
equals
(
posName
)){
if
(!
getPosName
().
equals
(
posName
)){
needUpdate
=
true
;
needUpdate
=
true
;
...
@@ -53,6 +54,12 @@ public class StoragePos extends BasePo implements Serializable {
...
@@ -53,6 +54,12 @@ public class StoragePos extends BasePo implements Serializable {
needUpdate
=
true
;
needUpdate
=
true
;
setPriority
(
priority
);
setPriority
(
priority
);
}
}
if
(
StringUtils
.
isNotEmpty
(
whCode
))
{
setWareHouseCode
(
whCode
);
needUpdate
=
true
;
}
Point
point
=
PointUtil
.
getPosPoint
(
getPosName
());
Point
point
=
PointUtil
.
getPosPoint
(
getPosName
());
if
(
getCoordinate
()==
null
||
getCoordinate
().
length
!=
2
||
if
(
getCoordinate
()==
null
||
getCoordinate
().
length
!=
2
||
(
getCoordinate
()[
0
]!=
point
.
getX
())
||(
getCoordinate
()[
1
]!=
point
.
getY
())){
(
getCoordinate
()[
0
]!=
point
.
getX
())
||(
getCoordinate
()[
1
]!=
point
.
getY
())){
...
@@ -142,6 +149,9 @@ public class StoragePos extends BasePo implements Serializable {
...
@@ -142,6 +149,9 @@ public class StoragePos extends BasePo implements Serializable {
*/
*/
private
String
source
;
private
String
source
;
private
String
wareHouseCode
;
public
String
getLabelStr
(){
public
String
getLabelStr
(){
String
posNameLabel
=
posName
;
String
posNameLabel
=
posName
;
int
index
=
posNameLabel
.
lastIndexOf
(
":"
);
int
index
=
posNameLabel
.
lastIndexOf
(
":"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论