Commit 5d1d73ac 孙克

接收WMS手动发料信息并转发Tower

1 个父辈 02f5b187
package com.neotel.smfcore.custom.lizhen;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps;
import com.neotel.smfcore.common.bean.ResultBean;
......@@ -22,6 +23,8 @@ import com.neotel.smfcore.core.system.service.manager.IDataLogManager;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.custom.lizhen.innerBox.bean.PreWarningItem;
import com.neotel.smfcore.custom.lizhen.innerBox.util.PreWarningItemCache;
import com.neotel.smfcore.custom.lizhen.third.maicheng.bean.AskReelBoxList;
import com.neotel.smfcore.custom.luxsan.api.LuxsanApi;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -87,6 +90,9 @@ public class LizhenController {
@Value("${lizhen.F4.url}")
private String F4Url;
@Value("${lizhen.manual.url}")
private static String manualTowerUrl;
private static Map<String, String> lineUrlMap = new HashMap<>();
//初始化加载需要配送的地址
......@@ -100,6 +106,7 @@ public class LizhenController {
F5Url = dataCache.getConfigCache("F5Url", F5Url);
F4Line = dataCache.getConfigCache("F4Line", F4Line);
F4Url = dataCache.getConfigCache("F4Url", F4Url);
manualTowerUrl = dataCache.getConfigCache("manualTowerUrl", manualTowerUrl);
lineUrlMap.put(F2Line, F2Url);
lineUrlMap.put(F3Line, F3Url);
lineUrlMap.put(F5Line, F5Url);
......@@ -295,6 +302,26 @@ public class LizhenController {
return ResultBean.newOkResult("");
}
@ApiOperation("手动发料信息转发Tower")
@RequestMapping("/manualTower")
@AnonymousAccess
public String manualTower(@RequestBody List<AskReelBoxList> itemList) {
//转发到3楼料仓服务器
log.info("收到WMS手动发料数据为:" + JSON.toJSONString(itemList));
try {
String result = HttpHelper.postJson(manualTowerUrl, itemList);
log.info("WMS手动发料转发结果为:" + result);
return result;
} catch (ApiException e) {
log.error("缺料预警转发失败---" + e.getMessage());
}
Map<String, String> resultMap = new HashMap<>();
resultMap.put("MSGTY", "E");
resultMap.put("MSGTX", "接收失败");
return JSON.toJSONString(resultMap);
}
/**
* 根据唯一码,查找最近的一次工单信息
......
......@@ -109,7 +109,7 @@ public class LineController {
/**
* 线体第二个扫码器扫码调用,判断是否过账
*/
@ApiOperation("获取栈板信息")
@ApiOperation("获取是否过账完成信息")
@RequestMapping("/fetchPalletInfo")
@AnonymousAccess
public synchronized ResultBean fetchPalletInfo(@RequestBody Map<String, String> paramMap) {
......
......@@ -42,6 +42,8 @@ lizhen:
name: #4F
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
manual:
url: http://10.68.27.85/smf-core/wcs/manualTower
#
#转发地址
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!