parent
f24dac1263
commit
eb0c2a1604
|
|
@ -149,6 +149,11 @@ public class RecBillChangeListExtendPlugin extends AbstractListPlugin implements
|
|||
if (response != null) {
|
||||
try {
|
||||
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");
|
||||
JSONArray itItems = data.getJSONArray("IT_ITEMS");
|
||||
if (itItems != null && !itItems.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,11 @@ public class ClosingStatusValidator extends AbstractValidator {
|
|||
if (response != null) {
|
||||
try {
|
||||
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");
|
||||
JSONArray itItems = data.getJSONArray("IT_ITEMS");
|
||||
if (itItems != null && !itItems.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -640,7 +640,11 @@ public class SapUtils {
|
|||
|
||||
List<Map<String, Object>> items = new ArrayList<>();
|
||||
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<>();
|
||||
data.put("IT_ITEMS", items);
|
||||
|
||||
|
|
@ -648,9 +652,10 @@ public class SapUtils {
|
|||
String response = ApiUtils.sendPost(head, body, QUERY_STATE_URL);
|
||||
if (null != response) {
|
||||
boolean isSuccess = ApiUtils.parseResponse(response, billNumber, body, API_METHOD4, message);
|
||||
if (isSuccess) {
|
||||
return response;
|
||||
}
|
||||
// if (isSuccess) {
|
||||
// return response;
|
||||
// }
|
||||
return response;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.error(e.getMessage());
|
||||
|
|
|
|||
Loading…
Reference in New Issue