From 2c4cfb7ed1ece6c3b80f7d551a267e9367ddb12b Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 05 一月 2024 10:31:31 +0800 Subject: [PATCH] 整理 --- server/dmvisit_service/src/main/java/com/doumee/core/erp/ErpTool.java | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/erp/ErpTool.java b/server/dmvisit_service/src/main/java/com/doumee/core/erp/ErpTool.java index e4fa49f..1e15e58 100644 --- a/server/dmvisit_service/src/main/java/com/doumee/core/erp/ErpTool.java +++ b/server/dmvisit_service/src/main/java/com/doumee/core/erp/ErpTool.java @@ -81,7 +81,7 @@ ERPApiResponse<PageData <ErpUserListResponse>> response = JSONObject.parseObject(result, typeReference.getType()); if(response!=null && response.getData()!=null && response.getData().getRecords()!=null){ list.addAll(response.getData().getRecords()); - if(100*pageSize < response.getData().getTotal() ){ + if(pageSize*page < response.getData().getTotal() ){ hasLast =true;//杩樻湁涓嬩竴椤� } page++; @@ -99,14 +99,25 @@ * @return */ public static ApproveInfoResponse submitApprove(String url, ApproveAddRequest param){ + System.out.println(JSONObject.toJSONString(param)); String result = HttpsUtil.postJson(url, JSONObject.toJSONString(param)); if(StringUtils.isNotBlank(result)){ +// TypeReference typeReference = +// new TypeReference<ERPApiResponse<ApproveInfoResponse>>(){}; +// ERPApiResponse<ApproveInfoResponse> response = JSONObject.parseObject(result, typeReference.getType()); +// if(response!=null && response.isSuccess()){ +// return response.getData(); +// } TypeReference typeReference = - new TypeReference<ERPApiResponse<ApproveInfoResponse>>(){}; - ERPApiResponse<ApproveInfoResponse> response = JSONObject.parseObject(result, typeReference.getType()); + new TypeReference<ERPApiResponse<String>>(){}; + ERPApiResponse<String> response = JSONObject.parseObject(result, typeReference.getType()); if(response!=null && response.isSuccess()){ - return response.getData(); + ApproveInfoResponse approveInfoResponse = new ApproveInfoResponse(); + approveInfoResponse.setId(response.getData()); + return approveInfoResponse; } + + } return null; } -- Gitblit v1.9.3