Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 17e9fc47
由
zshaohui
编写于
2024-09-25 13:53:05 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
迈征出料口做成可配置项
1 个父辈
8a524466
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
63 行增加
和
3 行删除
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/resources/config/application-prod.yml
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/rest/StorageExportController.java
0 → 100644
查看文件 @
17e9fc4
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
innerBox
.
rest
;
import
com.alibaba.fastjson.JSON
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.custom.lizhen.innerBox.util.StorageExportUtil
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
@RequestMapping
(
"/storageExport"
)
@RestController
public
class
StorageExportController
{
@Autowired
private
DataCache
dataCache
;
@ApiOperation
(
"修改迈征出料口"
)
@RequestMapping
(
"/updateMaiZhengExport"
)
@AnonymousAccess
public
ResultBean
updateMaiZhengExport
(
@RequestBody
List
<
String
>
maiZhengExportList
)
{
if
(
maiZhengExportList
==
null
||
maiZhengExportList
.
isEmpty
()){
return
ResultBean
.
newErrorResult
(-
1
,
""
,
"配置信息不能为空"
);
}
log
.
info
(
"修改迈征出料口配置:"
+
JSON
.
toJSONString
(
maiZhengExportList
));
dataCache
.
updateCache
(
StorageExportUtil
.
Cache_MaiZheng_Export
,
maiZhengExportList
);
return
ResultBean
.
newOkResult
(
""
);
}
@ApiOperation
(
"获取迈征出料口"
)
@RequestMapping
(
"/getAlleMaiZhengExport"
)
@AnonymousAccess
public
ResultBean
getAlleMaiZhengExport
(){
List
<
String
>
maiZhengExportList
=
dataCache
.
getCache
(
StorageExportUtil
.
Cache_MaiZheng_Export
);
if
(
maiZhengExportList
==
null
){
maiZhengExportList
=
new
ArrayList
<>();
}
return
ResultBean
.
newOkResult
(
maiZhengExportList
);
}
}
src/main/java/com/neotel/smfcore/custom/lizhen/innerBox/util/StorageExportUtil.java
查看文件 @
17e9fc4
...
@@ -27,6 +27,8 @@ public class StorageExportUtil {
...
@@ -27,6 +27,8 @@ public class StorageExportUtil {
dataCache
=
cache
;
dataCache
=
cache
;
}
}
public
static
final
String
Cache_MaiZheng_Export
=
"Cache_MaiZheng_Export"
;
public
static
final
String
OUT_STATION
=
"_outStation"
;
public
static
final
String
OUT_STATION
=
"_outStation"
;
/* private static String disableExport = "";
/* private static String disableExport = "";
...
@@ -117,7 +119,7 @@ public class StorageExportUtil {
...
@@ -117,7 +119,7 @@ public class StorageExportUtil {
//判断是否为迈征
//判断是否为迈征
if
(
maizheng
){
if
(
maizheng
){
if
(
"1"
.
equals
(
recvIndex
))
{
/*
if ("1".equals(recvIndex)) {
log.info("迈征数据获取出料口信息工单号为:" + orderNo + "出料口信息为:" + maizhengExport);
log.info("迈征数据获取出料口信息工单号为:" + orderNo + "出料口信息为:" + maizhengExport);
if (StringUtils.isNotBlank(maizhengExport)) {
if (StringUtils.isNotBlank(maizhengExport)) {
StorageExport export = getExport(maizhengExport);
StorageExport export = getExport(maizhengExport);
...
@@ -133,6 +135,15 @@ public class StorageExportUtil {
...
@@ -133,6 +135,15 @@ public class StorageExportUtil {
return maizhengBoxExport;
return maizhengBoxExport;
}
}
}
}
}*/
List
<
String
>
maiZhengExportList
=
dataCache
.
getCache
(
StorageExportUtil
.
Cache_MaiZheng_Export
);
if
(
maiZhengExportList
!=
null
&&
!
maiZhengExportList
.
isEmpty
()){
for
(
String
maizhengBoxExport
:
maiZhengExportList
)
{
StorageExport
export
=
getExport
(
maizhengBoxExport
);
if
(!
export
.
isDisable
()
&&
StringUtils
.
isBlank
(
export
.
getHSerial
()))
{
return
maizhengBoxExport
;
}
}
}
}
return
""
;
return
""
;
}
}
...
...
src/main/resources/config/application-prod.yml
查看文件 @
17e9fc4
...
@@ -76,8 +76,8 @@ file:
...
@@ -76,8 +76,8 @@ file:
#迈征配置
#迈征配置
maizheng
:
maizheng
:
stationStatusApi
:
http://10.190.196.124:8300/API/MZSM
stationStatusApi
:
http://10.190.196.124:8300/API/MZSM
export
:
MU3_1
export
:
boxExport
:
MU2_1
boxExport
:
line
:
line
:
transReelBoxApi
:
http://10.190.196.124:52232/API/TransReelBoxAuto
transReelBoxApi
:
http://10.190.196.124:52232/API/TransReelBoxAuto
prepareReelBoxApi
:
http://10.190.196.124:52232/API/PrepareReelBoxAuto
prepareReelBoxApi
:
http://10.190.196.124:52232/API/PrepareReelBoxAuto
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论