Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 7369c809
由
zshaohui
编写于
2024-08-25 22:37:41 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
手动tower区分BG/CG
1 个父辈
40365622
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
28 行增加
和
5 行删除
src/main/java/com/neotel/smfcore/custom/lizhen/wcs/LizhenController.java
src/main/resources/config/application.yml
src/main/java/com/neotel/smfcore/custom/lizhen/wcs/LizhenController.java
查看文件 @
7369c80
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
wcs
;
package
com
.
neotel
.
smfcore
.
custom
.
lizhen
.
wcs
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.bean.ResultBean
;
...
@@ -95,6 +96,9 @@ public class LizhenController {
...
@@ -95,6 +96,9 @@ public class LizhenController {
@Value
(
"${lizhen.manual.url}"
)
@Value
(
"${lizhen.manual.url}"
)
private
String
manualTowerUrl
;
private
String
manualTowerUrl
;
@Value
(
"${lizhen.manual.cgUrl}"
)
private
String
manualCgTowerUrl
;
private
static
Map
<
String
,
String
>
lineUrlMap
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
lineUrlMap
=
new
HashMap
<>();
//初始化加载需要配送的地址
//初始化加载需要配送的地址
...
@@ -109,6 +113,7 @@ public class LizhenController {
...
@@ -109,6 +113,7 @@ public class LizhenController {
F4Line
=
dataCache
.
getConfigCache
(
"F4Line"
,
F4Line
);
F4Line
=
dataCache
.
getConfigCache
(
"F4Line"
,
F4Line
);
F4Url
=
dataCache
.
getConfigCache
(
"F4Url"
,
F4Url
);
F4Url
=
dataCache
.
getConfigCache
(
"F4Url"
,
F4Url
);
manualTowerUrl
=
dataCache
.
getConfigCache
(
"manualTowerUrl"
,
manualTowerUrl
);
manualTowerUrl
=
dataCache
.
getConfigCache
(
"manualTowerUrl"
,
manualTowerUrl
);
manualCgTowerUrl
=
dataCache
.
getConfigCache
(
"manualCgTowerUrl"
,
manualCgTowerUrl
);
lineUrlMap
.
put
(
F2Line
,
F2Url
);
lineUrlMap
.
put
(
F2Line
,
F2Url
);
lineUrlMap
.
put
(
F3Line
,
F3Url
);
lineUrlMap
.
put
(
F3Line
,
F3Url
);
lineUrlMap
.
put
(
F5Line
,
F5Url
);
lineUrlMap
.
put
(
F5Line
,
F5Url
);
...
@@ -323,7 +328,24 @@ public class LizhenController {
...
@@ -323,7 +328,24 @@ public class LizhenController {
@AnonymousAccess
@AnonymousAccess
public
Map
<
String
,
String
>
manualTower
(
@RequestBody
JSONObject
jsonObject
)
{
public
Map
<
String
,
String
>
manualTower
(
@RequestBody
JSONObject
jsonObject
)
{
//转发到3楼料仓服务器
//转发到3楼料仓服务器
log
.
info
(
"收到WMS手动发料数据为:"
+
JSON
.
toJSONString
(
jsonObject
));
String
url
=
manualTowerUrl
;
JSONArray
data
=
jsonObject
.
getJSONArray
(
"DATA"
);
if
(
data
!=
null
&&
!
data
.
isEmpty
()){
for
(
int
i
=
0
;
i
<
data
.
size
();
i
++)
{
JSONObject
dataJson
=
data
.
getJSONObject
(
i
);
String
line
=
dataJson
.
getString
(
"LINE"
);
if
(
StringUtils
.
isNotEmpty
(
line
)){
if
(
line
.
contains
(
"-0"
)){
url
=
manualCgTowerUrl
;
log
.
info
(
"线体包含-0 为CG线,地址为:"
+
url
);
break
;
}
}
}
}
log
.
info
(
"收到WMS手动发料数据为:"
+
JSON
.
toJSONString
(
jsonObject
)+
",地址为:"
+
url
);
try
{
try
{
String
result
=
HttpHelper
.
postJson
(
manualTowerUrl
,
jsonObject
);
String
result
=
HttpHelper
.
postJson
(
manualTowerUrl
,
jsonObject
);
log
.
info
(
"WMS手动发料转发结果为:"
+
result
);
log
.
info
(
"WMS手动发料转发结果为:"
+
result
);
...
...
src/main/resources/config/application.yml
查看文件 @
7369c80
...
@@ -33,18 +33,19 @@ lizhen:
...
@@ -33,18 +33,19 @@ lizhen:
url
:
#http://172.30.88.19:8001/smf-core/api/Mes/machineCallMaterial
url
:
#http://172.30.88.19:8001/smf-core/api/Mes/machineCallMaterial
F3
:
F3
:
name
:
3F
name
:
3F
line
:
C03-
1FSMT-01,C03-3FSMT-13,C02-3FSMT-12,C02-3FSMT-18,C02-3FSMT-19,C03-1FSMT-12,C02-3FSMT-02,C02-3FSMT-09,C02-3FSMT-11,C03-3FSMT-03,C03-1FSMT-11,C02-3FSMT-01,C03-1FSMT-02,C02-3FSMT-08,C02-3FSMT-06,C02-3FSMT-07,C02-3FSMT-17,C02-3FSMT-04,C02-3FSMT-14,C03-1FSMT-12,C02-3FSMT-05,C02-3FSMT-13,C02-3FSMT-03,C02-3FSMT-16,C03-1FSMT-02
,C02-3FSMT-15
line
:
C03-
3FSMT-13,C02-3FSMT-12,C02-3FSMT-18,C02-3FSMT-19,C03-1FSMT-12,C02-3FSMT-11,C03-1FSMT-11,C02-3FSMT-17,C02-3FSMT-14,C03-1FSMT-12,C02-3FSMT-13,C02-3FSMT-16
,C02-3FSMT-15
url
:
http://10.68.27.85/smf-core/wcs/machineCallMaterial
url
:
http://10.68.27.85/smf-core/wcs/machineCallMaterial
F5
:
F5
:
name
:
#5F
name
:
3FCG
line
:
#A05-5FSMT-13S,A05-5FSMT-03S,A05-5FSMT-02S,A05-5FSMT-12S #,A05-5FARF-06,A05-5FSMT-01S,A05-5FSMT-11S
line
:
C03-1FSMT-01,C02-3FSMT-02,C03-3FSMT-03,C02-3FSMT-09,C02-3FSMT-01,C03-1FSMT-02,C02-3FSMT-08,C02-3FSMT-06,C02-3FSMT-07,C02-3FSMT-04,C02-3FSMT-05,C02-3FSMT-03,C03-1FSMT-02
url
:
#http://172.30.97.63:8001/smf-core/api/Me
s/machineCallMaterial
url
:
http://10.68.27.79/smf-core/wc
s/machineCallMaterial
F4
:
F4
:
name
:
#4F
name
:
#4F
line
:
#B03-4FSMT-11,B03-4FSMT-01,B03-4FSMT-13,B03-4FSMT-03,B03-4FSMT-14,B03-4FSMT-04
line
:
#B03-4FSMT-11,B03-4FSMT-01,B03-4FSMT-13,B03-4FSMT-03,B03-4FSMT-14,B03-4FSMT-04
url
:
#http://172.25.252.12:8001/smf-core/api/Mes/machineCallMaterial
url
:
#http://172.25.252.12:8001/smf-core/api/Mes/machineCallMaterial
manual
:
manual
:
url
:
http://10.68.27.85/smf-core/wcs/manualTower
url
:
http://10.68.27.85/smf-core/wcs/manualTower
cgUrl
:
http://10.68.27.79/smf-core/wcs/manualTower
#
#
#转发地址
#转发地址
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论