| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | public Boolean stockTransfer(List<StockTransferParam> params) { |
| | | public Result1 stockTransfer(List<StockTransferParam> params) { |
| | | try { |
| | | String response = new HttpHandler.Builder() |
| | | .setUri(asrsBaseUrl) |
| | |
| | | .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); |
| | | } |
| | | } |
| | | |