Browse Source

大小写

master
han\hanst 2 months ago
parent
commit
bc23a527d7
  1. 14
      src/main/java/com/gaotao/modules/api/service/impl/RfidMachineApiServiceImpl.java

14
src/main/java/com/gaotao/modules/api/service/impl/RfidMachineApiServiceImpl.java

@ -21,7 +21,7 @@ import org.springframework.stereotype.Service;
@Slf4j @Slf4j
@Service @Service
public class RfidMachineApiServiceImpl implements RfidMachineApiService { public class RfidMachineApiServiceImpl implements RfidMachineApiService {
@Value("${custom.rfid-url}") @Value("${custom.rfid-url}")
private String rfidApi; private String rfidApi;
@ -36,12 +36,12 @@ public class RfidMachineApiServiceImpl implements RfidMachineApiService {
@Override @Override
public void pushCheckToRfid(RfidTunnelOrderRequest request) { public void pushCheckToRfid(RfidTunnelOrderRequest request) {
//------Rfid通道机--------- //------Rfid通道机---------
log.info("开始推送订单信息到RFID通道机 - rqrq,托盘条码={}, 产品数量={}",
log.info("开始推送订单信息到RFID通道机 - rqrq,托盘条码={}, 产品数量={}",
request.getPalletBarcode(), request.getProductCount()); request.getPalletBarcode(), request.getProductCount());
Long logId = null; Long logId = null;
String url = rfidApi + "binding/goods_info"; String url = rfidApi + "binding/goods_info";
try { try {
// 记录接口调用日志 - rqrq // 记录接口调用日志 - rqrq
String requestJson = JSONObject.toJSONString(request); String requestJson = JSONObject.toJSONString(request);
@ -63,8 +63,8 @@ public class RfidMachineApiServiceImpl implements RfidMachineApiService {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
JsonNode jsonNode = mapper.readTree(responseStr); JsonNode jsonNode = mapper.readTree(responseStr);
int code = jsonNode.get("resCode").asInt();
String msg = jsonNode.get("resMsg").asText();
int code = jsonNode.get("ResCode").asInt();
String msg = jsonNode.get("ResMsg").asText();
if(code!=200){ if(code!=200){
throw new RuntimeException("调用WCS接口失败,错误码:"+code+",错误信息:"+msg); throw new RuntimeException("调用WCS接口失败,错误码:"+code+",错误信息:"+msg);
} }
@ -76,12 +76,12 @@ public class RfidMachineApiServiceImpl implements RfidMachineApiService {
} catch (Exception e) { } catch (Exception e) {
log.error("推送订单信息到RFID通道机失败 - rqrq,错误信息:{}", e.getMessage(), e); log.error("推送订单信息到RFID通道机失败 - rqrq,错误信息:{}", e.getMessage(), e);
// 更新接口日志为失败 - rqrq // 更新接口日志为失败 - rqrq
if (logId != null) { if (logId != null) {
interfaceCallLogService.updateCallResult(logId, null, "FAILED", e.getMessage(), null); interfaceCallLogService.updateCallResult(logId, null, "FAILED", e.getMessage(), null);
} }
throw new RuntimeException("推送订单信息到RFID通道机失败:" + e.getMessage()); throw new RuntimeException("推送订单信息到RFID通道机失败:" + e.getMessage());
} }
} }

Loading…
Cancel
Save