From af73582c1bd3c20e2e805d4df56c111073d3fd6f Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期四, 25 三月 2021 13:02:35 +0800 Subject: [PATCH] # --- src/main/java/zy/cloud/wms/common/service/asrs/AsrsService.java | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/zy/cloud/wms/common/service/asrs/AsrsService.java b/src/main/java/zy/cloud/wms/common/service/asrs/AsrsService.java index 3560d4b..c6590d1 100644 --- a/src/main/java/zy/cloud/wms/common/service/asrs/AsrsService.java +++ b/src/main/java/zy/cloud/wms/common/service/asrs/AsrsService.java @@ -4,6 +4,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import zy.cloud.wms.common.service.asrs.entity.Result; +import zy.cloud.wms.common.service.asrs.entity.Result1; import zy.cloud.wms.manager.entity.param.StockTransferParam; import zy.cloud.wms.manager.utils.HttpHandler; @@ -34,7 +35,7 @@ } } - public Boolean stockTransfer(List<StockTransferParam> params) { + public Result1 stockTransfer(List<StockTransferParam> params) { try { String response = new HttpHandler.Builder() .setUri(asrsBaseUrl) @@ -42,15 +43,10 @@ .setJson(JSON.toJSONString(params)) .build() .doPost(); - Result result = JSON.parseObject(response, Result.class); - if (result.getCode() == 200) { - return true; - } else { - return false; - } + return JSON.parseObject(response, Result1.class); } catch (IOException e) { e.printStackTrace(); - return false; + return new Result1(500, "鏈嶅姟鍣ㄥ紓甯�", null); } } -- Gitblit v1.9.1