parent
f24dac1263
commit
eb0c2a1604
|
|
@ -149,6 +149,11 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
try {
|
try {
|
||||||
JSONObject json = JSONObject.parseObject(response);
|
JSONObject json = JSONObject.parseObject(response);
|
||||||
|
String code = json.getString("code");
|
||||||
|
if (!"0".equals(code)) {
|
||||||
|
this.getView().showTipNotification("SAP收款凭证清账状态查询接口调用失败,错误信息:"+json.getString("msg"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
JSONObject data = json.getJSONObject("data");
|
JSONObject data = json.getJSONObject("data");
|
||||||
JSONArray itItems = data.getJSONArray("IT_ITEMS");
|
JSONArray itItems = data.getJSONArray("IT_ITEMS");
|
||||||
if (itItems != null && !itItems.isEmpty()) {
|
if (itItems != null && !itItems.isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,11 @@ public class ClosingStatusValidator extends AbstractValidator {
|
||||||
if (response != null) {
|
if (response != null) {
|
||||||
try {
|
try {
|
||||||
JSONObject json = JSONObject.parseObject(response);
|
JSONObject json = JSONObject.parseObject(response);
|
||||||
|
String code = json.getString("code");
|
||||||
|
if (!"0".equals(code)) {
|
||||||
|
this.addErrorMessage(dataEntity, "SAP收款凭证清账状态查询接口调用失败,错误信息:"+json.getString("msg"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
JSONObject data = json.getJSONObject("data");
|
JSONObject data = json.getJSONObject("data");
|
||||||
JSONArray itItems = data.getJSONArray("IT_ITEMS");
|
JSONArray itItems = data.getJSONArray("IT_ITEMS");
|
||||||
if (itItems != null && !itItems.isEmpty()) {
|
if (itItems != null && !itItems.isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -640,7 +640,11 @@ public class SapUtils {
|
||||||
|
|
||||||
List<Map<String, Object>> items = new ArrayList<>();
|
List<Map<String, Object>> items = new ArrayList<>();
|
||||||
items.add(item);
|
items.add(item);
|
||||||
|
LocalDateTime date = LocalDateTime.now();
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
|
||||||
|
String dates = date.format(formatter);
|
||||||
|
body.put("rootContextID", "" + System.currentTimeMillis());//唯一事务ID,采用UUID或其他强唯一性ID
|
||||||
|
body.put("requestTime", dates);//请求时间,格式为yyyy-MM-dd HH:mm:ss.SSS
|
||||||
Map<String, Object> data = new HashMap<>();
|
Map<String, Object> data = new HashMap<>();
|
||||||
data.put("IT_ITEMS", items);
|
data.put("IT_ITEMS", items);
|
||||||
|
|
||||||
|
|
@ -648,9 +652,10 @@ public class SapUtils {
|
||||||
String response = ApiUtils.sendPost(head, body, QUERY_STATE_URL);
|
String response = ApiUtils.sendPost(head, body, QUERY_STATE_URL);
|
||||||
if (null != response) {
|
if (null != response) {
|
||||||
boolean isSuccess = ApiUtils.parseResponse(response, billNumber, body, API_METHOD4, message);
|
boolean isSuccess = ApiUtils.parseResponse(response, billNumber, body, API_METHOD4, message);
|
||||||
if (isSuccess) {
|
// if (isSuccess) {
|
||||||
return response;
|
// return response;
|
||||||
}
|
// }
|
||||||
|
return response;
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error(e.getMessage());
|
logger.error(e.getMessage());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue