|
|
@@ -110,7 +110,8 @@ public class NonPoServerImpl implements NonPoServer {
|
|
|
uid = "CHN-0" + uid;
|
|
|
}
|
|
|
}
|
|
|
- // uid = "CHN-01000332";//测试过账人
|
|
|
+ // uid="CHN-01000332";
|
|
|
+ uid = "CHN-01000332";//测试过账人
|
|
|
sapJson.put("USNAM", uid); //过账人
|
|
|
sapJson.put("BUDAT", CusutUtil.getFormatDate((Long) dataForm.get("dateField_mhxdzyaa"))); //过账日期
|
|
|
sapJson.put("ZOA_TYPE", dataForm.get("selectField_mejfoona").equals("无票预付") || dataForm.get("selectField_mejfoona").equals("100%清预付款") || dataForm.get("selectField_mejfoona").equals("100%清收据") ? "AD" : "NP");//OA单据类型
|
|
|
@@ -666,7 +667,7 @@ public class NonPoServerImpl implements NonPoServer {
|
|
|
uid = "CHN-0" + uid;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ uid = "CHN-01000332";
|
|
|
|
|
|
List<Map> tableFils = ydService.queryDetails(YDParam.builder().formInstanceId(InstanceId).formUuid(formUuid).tableFieldId("tableField_mkxd96yv").build());
|
|
|
log.info("NPO冲销行项目, {}, {}", InstanceId, tableFils.size());
|
|
|
@@ -688,9 +689,10 @@ public class NonPoServerImpl implements NonPoServer {
|
|
|
body.put("GJAHR", UtilMap.getString(detail, "textField_mkxd96yy"));
|
|
|
body.put("STGRD", UtilMap.getString(detail, "selectField_mkxd96z6"));
|
|
|
body.put("USNAM", uid);
|
|
|
- if (!"".equals(detail.get("dateField_mkxd96z1"))) {
|
|
|
-
|
|
|
- body.put("BUDAT", CusutUtil.getFormatDate((long) detail.get("dateField_mkxd96z1")));
|
|
|
+ if (detail.containsKey("dateField_mkxd96z1")) {
|
|
|
+ if (detail.get("dateField_mkxd96z1").toString() != "") {
|
|
|
+ body.put("BUDAT", CusutUtil.getFormatDate((long) detail.get("dateField_mkxd96z1")));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -705,11 +707,11 @@ public class NonPoServerImpl implements NonPoServer {
|
|
|
detail.put("selectField_mkxoe0yk", "失败");
|
|
|
fail += 1;
|
|
|
}
|
|
|
- detail.put("textField_mkxd96z5", result.get("E_MESSAGE"));
|
|
|
+ detail.put("textareaField_mkxuo69d", result.get("E_MESSAGE"));
|
|
|
|
|
|
} catch (McException mc) {
|
|
|
detail.put("selectField_mkxoe0yk", "失败");
|
|
|
- detail.put("textField_mkxd96z5", mc.getMessage());
|
|
|
+ detail.put("textareaField_mkxuo69d", mc.getMessage());
|
|
|
fail += 1;
|
|
|
}
|
|
|
|
|
|
@@ -728,6 +730,11 @@ public class NonPoServerImpl implements NonPoServer {
|
|
|
ydClient.operateData(YDParam.builder().formInstanceId(InstanceId).updateFormDataJson(JSON.toJSONString(formData)).build(), YDConf.FORM_OPERATION.update);
|
|
|
|
|
|
}
|
|
|
+// {
|
|
|
+// "instanceId":"1e3e4ada-065f-4dc0-aa5d-5c4b5ec34561",
|
|
|
+// "type":"Non-PoToSAP0006CX",
|
|
|
+// "formUuid":"FORM-7E5114C1793141E086D9E0B13F7DFD568AYM"
|
|
|
+// }
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -740,7 +747,7 @@ public class NonPoServerImpl implements NonPoServer {
|
|
|
private Map _pushSPCX(Map body) {
|
|
|
|
|
|
log.info("NPO冲销推送 SAP, {}", JSON.toJSONString(body));
|
|
|
- String rsp = HttpUtil.post(QA_sapUrl + "SAP005", null, JSON.toJSONString(body), null);
|
|
|
+ String rsp = HttpUtil.post(QA_sapUrl + "SAP006", null, JSON.toJSONString(body), null);
|
|
|
log.info("NPO冲销 SAP 响应, {}", rsp);
|
|
|
List<Map> result = JSON.parseArray(rsp, Map.class);
|
|
|
McException.assertAccessException(result.isEmpty(), "Sap接口请求异常, 返回空集合, 需重新推送.");
|