Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 51e76bea
由
zshaohui
编写于
2024-09-26 16:00:57 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.迈征配置自动出料口和非自动出料口
1 个父辈
b5da796a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
53 行增加
和
28 行删除
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/StorageExportController.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/StorageExportUtil.java
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/StorageExportController.java
查看文件 @
51e76be
...
@@ -13,8 +13,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -13,8 +13,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Slf4j
@Slf4j
@RequestMapping
(
"/storageExport"
)
@RequestMapping
(
"/storageExport"
)
...
@@ -29,12 +31,23 @@ public class StorageExportController {
...
@@ -29,12 +31,23 @@ public class StorageExportController {
@RequestMapping
(
"/updateMaiZhengExport"
)
@RequestMapping
(
"/updateMaiZhengExport"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
updateMaiZhengExport
(
@RequestBody
Map
<
String
,
List
<
String
>>
paramMap
)
{
public
ResultBean
updateMaiZhengExport
(
@RequestBody
Map
<
String
,
List
<
String
>>
paramMap
)
{
List
<
String
>
maiZhengExportList
=
paramMap
.
get
(
"maiZhengExportList"
);
List
<
String
>
maiZhengAutoExportList
=
paramMap
.
get
(
"maiZhengAutoExportList"
);
//自动出料口
if
(
maiZhengExportList
==
null
||
maiZhengExportList
.
isEmpty
()){
List
<
String
>
maiZhengNoAutoExportList
=
paramMap
.
get
(
"maiZhengNoAutoExportList"
);
//非自动出料口
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"配置信息不能为空"
);
if
(
maiZhengAutoExportList
==
null
||
maiZhengAutoExportList
.
isEmpty
()){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"自动出料口配置信息不能为空"
);
}
}
log
.
info
(
"修改迈征出料口配置:"
+
JSON
.
toJSONString
(
maiZhengExportList
));
if
(
maiZhengNoAutoExportList
==
null
||
maiZhengNoAutoExportList
.
isEmpty
()){
dataCache
.
updateCache
(
StorageExportUtil
.
Cache_MaiZheng_Export
,
maiZhengExportList
);
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"非自动出料口配置信息不能为空"
);
}
log
.
info
(
"修改迈征出料口配置:,自动信息为:"
+
JSON
.
toJSONString
(
maiZhengAutoExportList
)+
",非自动出料口为:"
+
JSON
.
toJSONString
(
maiZhengNoAutoExportList
));
List
<
String
>
commonList
=
maiZhengAutoExportList
.
stream
()
.
filter
(
maiZhengNoAutoExportList:
:
contains
)
.
collect
(
Collectors
.
toList
());
if
(
commonList
!=
null
&&
!
commonList
.
isEmpty
()){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"自动和非自动出料口,配置错误,有相同的出料口:"
+
JSON
.
toJSONString
(
commonList
));
}
dataCache
.
updateCache
(
StorageExportUtil
.
Cache_MaiZheng_Export
,
maiZhengAutoExportList
);
dataCache
.
updateCache
(
StorageExportUtil
.
Cache_MaiZheng_NoAuto_Export
,
maiZhengNoAutoExportList
);
return
ResultBean
.
newOkResult
(
""
);
return
ResultBean
.
newOkResult
(
""
);
}
}
...
@@ -46,6 +59,14 @@ public class StorageExportController {
...
@@ -46,6 +59,14 @@ public class StorageExportController {
if
(
maiZhengExportList
==
null
){
if
(
maiZhengExportList
==
null
){
maiZhengExportList
=
new
ArrayList
<>();
maiZhengExportList
=
new
ArrayList
<>();
}
}
return
ResultBean
.
newOkResult
(
maiZhengExportList
);
List
<
String
>
maiZhengNoAutoExportList
=
dataCache
.
getCache
(
StorageExportUtil
.
Cache_MaiZheng_NoAuto_Export
);
if
(
maiZhengNoAutoExportList
==
null
){
maiZhengNoAutoExportList
=
new
ArrayList
<>();
}
Map
<
String
,
List
<
String
>>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"auto"
,
maiZhengExportList
);
resultMap
.
put
(
"noAuto"
,
maiZhengNoAutoExportList
);
return
ResultBean
.
newOkResult
(
resultMap
);
}
}
}
}
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/StorageExportUtil.java
查看文件 @
51e76be
...
@@ -29,6 +29,8 @@ public class StorageExportUtil {
...
@@ -29,6 +29,8 @@ public class StorageExportUtil {
public
static
final
String
Cache_MaiZheng_Export
=
"Cache_MaiZheng_Export"
;
public
static
final
String
Cache_MaiZheng_Export
=
"Cache_MaiZheng_Export"
;
public
static
final
String
Cache_MaiZheng_NoAuto_Export
=
"Cache_MaiZheng_NoAuto_Export"
;
public
static
final
String
OUT_STATION
=
"_outStation"
;
public
static
final
String
OUT_STATION
=
"_outStation"
;
/* private static String disableExport = "";
/* private static String disableExport = "";
...
@@ -118,30 +120,32 @@ public class StorageExportUtil {
...
@@ -118,30 +120,32 @@ public class StorageExportUtil {
}
}
//判断是否为迈征
//判断是否为迈征
if
(
maizheng
){
if
(
maizheng
)
{
/*if ("1".equals(recvIndex)) {
//非自动
log.info("迈征数据获取出料口信息工单号为:" + orderNo + "出料口信息为:" + maizhengExport);
if
(
"1"
.
equals
(
recvIndex
))
{
if (StringUtils.isNotBlank(maizhengExport)) {
log
.
info
(
"迈征数据获取出料口信息工单号为:"
+
orderNo
);
StorageExport export = getExport(maizhengExport);
List
<
String
>
maiZhengExportList
=
dataCache
.
getCache
(
StorageExportUtil
.
Cache_MaiZheng_NoAuto_Export
);
if (!export.isDisable() && StringUtils.isBlank(export.getHSerial())) {
if
(
maiZhengExportList
!=
null
&&
!
maiZhengExportList
.
isEmpty
())
{
return maizhengExport;
for
(
String
maizhengBoxExport
:
maiZhengExportList
)
{
}
StorageExport
export
=
getExport
(
maizhengBoxExport
);
}
if
(!
export
.
isDisable
()
&&
StringUtils
.
isBlank
(
export
.
getHSerial
()))
{
} else {
log
.
info
(
"orderNo:"
+
orderNo
+
"获取到出料口为:"
+
maizhengBoxExport
);
log.info("迈征数据获取出料口信息工单号为:" + orderNo + "出料口信息为:" + maizhengBoxExport);
return
maizhengBoxExport
;
if (StringUtils.isNotBlank(maizhengBoxExport)) {
}
StorageExport export = getExport(maizhengBoxExport);
if (!export.isDisable() && StringUtils.isBlank(export.getHSerial())) {
return maizhengBoxExport;
}
}
}
}
}*/
}
List
<
String
>
maiZhengExportList
=
dataCache
.
getCache
(
StorageExportUtil
.
Cache_MaiZheng_Export
);
//自动
if
(
maiZhengExportList
!=
null
&&
!
maiZhengExportList
.
isEmpty
()){
else
{
for
(
String
maizhengBoxExport
:
maiZhengExportList
)
{
log
.
info
(
"迈征数据获取出料口信息工单号为:"
+
orderNo
);
StorageExport
export
=
getExport
(
maizhengBoxExport
);
List
<
String
>
maiZhengExportList
=
dataCache
.
getCache
(
StorageExportUtil
.
Cache_MaiZheng_Export
);
if
(!
export
.
isDisable
()
&&
StringUtils
.
isBlank
(
export
.
getHSerial
()))
{
if
(
maiZhengExportList
!=
null
&&
!
maiZhengExportList
.
isEmpty
())
{
return
maizhengBoxExport
;
for
(
String
maizhengBoxExport
:
maiZhengExportList
)
{
StorageExport
export
=
getExport
(
maizhengBoxExport
);
if
(!
export
.
isDisable
()
&&
StringUtils
.
isBlank
(
export
.
getHSerial
()))
{
log
.
info
(
"orderNo:"
+
orderNo
+
"获取到出料口为:"
+
maizhengBoxExport
);
return
maizhengBoxExport
;
}
}
}
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论