Commit 2bbb59bd LN

韩华接口修改。

1 个父辈 34f8cb99
...@@ -179,4 +179,15 @@ public class Constants { ...@@ -179,4 +179,15 @@ public class Constants {
*/ */
public static final String CACHE_shelfDelayCloseTime = "CACHE_shelfDelayCloseTime"; public static final String CACHE_shelfDelayCloseTime = "CACHE_shelfDelayCloseTime";
/**
* 科博达XLR料仓锁定的里侧库位号key
*/
public static final String XLR_lockPosS="lockPosS";
/**
* 科博达XLR料仓锁定的外侧库位号key
*/
public static final String XLR_lockPos="lockPos";
} }
package com.neotel.smfcore.custom.hanwha.controller; package com.neotel.smfcore.custom.hanwha.controller;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.custom.hanwha.handler.TMSApis;
import com.neotel.smfcore.custom.hanwha.handler.bean.TMSPart;
import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Slf4j
@RestController
@RequiredArgsConstructor
@Api(tags = "韩华接口测试")
@RequestMapping("api/hanwha")
public class HanwhaController { public class HanwhaController {
@Autowired
private TMSApis apis;
@ApiOperation("requestGetPartInfo")
@GetMapping("/requestGetPartInfo")
@AnonymousAccess
public ResultBean requestGetPartInfo(@RequestParam String barcode) {
List<TMSPart> result= apis.RequestGetPartInfo(0,barcode);
return ResultBean.newOkResult(result);
}
} }
...@@ -186,7 +186,12 @@ public class TMSApis { ...@@ -186,7 +186,12 @@ public class TMSApis {
sendData.put("data", dataMap); sendData.put("data", dataMap);
String responseStr = PostJson(url, sendData); String responseStr = PostJson(url, sendData);
if (ObjectUtil.isNotEmpty(responseStr)) { if (ObjectUtil.isNotEmpty(responseStr)) {
return Integer.parseInt(responseStr); Map<String, Object> resultMap = JsonUtil.toMap(responseStr);
Integer v = getMapValue(resultMap, "result");
if (v != null && v > 0) {
return v;
}
} }
return 1; return 1;
} catch (Exception ex) { } catch (Exception ex) {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!