diff --git a/src/main/java/com/glxp/api/http/ErpInvClient.java b/src/main/java/com/glxp/api/http/ErpInvClient.java index 1b947d411..48bb0fff6 100644 --- a/src/main/java/com/glxp/api/http/ErpInvClient.java +++ b/src/main/java/com/glxp/api/http/ErpInvClient.java @@ -79,28 +79,15 @@ public class ErpInvClient { } public BaseResponse> getInvResult(FilterInvProductRequest invProductRequest) { -// ThrSystemEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(invProductRequest.getThirdSys()); -// String url = basicThirdSysEntity.getThridUrl() + "/udiwms/erp/inv/getInvResult"; -// String url = basicThirdSysEntity.getThridUrl() + invProductRequest.getThirdSysUrlValue(); + ThrSystemEntity basicThirdSysEntity = basicThirdSysService.selectByThirdId(invProductRequest.getThirdSys()); + String url = basicThirdSysEntity.getThridUrl() + invProductRequest.getThirdSysUrlValue(); try { -// String response = httpOkClient.uCloudPost(url, invProductRequest); - ThrInvResultResponse thrInvResultResponse = new ThrInvResultResponse(); - thrInvResultResponse.setThrCode("70151"); - thrInvResultResponse.setOutCount("2"); - thrInvResultResponse.setBillType(ConstantType.TYPE_OUT); - ArrayList objects = new ArrayList<>(); - objects.add(thrInvResultResponse); - PageSimpleResponse thrInvResultResponsePageSimpleResponse = new PageSimpleResponse<>(); - thrInvResultResponsePageSimpleResponse.setList(objects); - BaseResponse> pageSimpleResponseBaseResponse = new BaseResponse<>(); - pageSimpleResponseBaseResponse.setCode(20000); - pageSimpleResponseBaseResponse.setData(thrInvResultResponsePageSimpleResponse); - return pageSimpleResponseBaseResponse; -// BaseResponse> listBaseResponse = -// JSONObject.parseObject(response, new TypeReference>>() { -// }); -// -// return listBaseResponse; + String response = httpOkClient.uCloudPost(url, invProductRequest); + BaseResponse> listBaseResponse = + JSONObject.parseObject(response, new TypeReference>>() { + }); + + return listBaseResponse; } catch (Exception e) { log.error("获取第三方库存明细异常", e); return ResultVOUtils.error(500, "连接第三方系统接口服务出错");