wanghaiwu 1 月之前
父節點
當前提交
ad42e0f6a0

+ 3 - 2
code/jyyy/nckd-jimin-jyyy-fi/src/main/java/nckd/jimin/jyyy/fi/plugin/operate/PrepayBillReturnOpPlugin.java

@@ -71,9 +71,10 @@ public class PrepayBillReturnOpPlugin extends AbstractOperationServicePlugIn {
                             errMessage.append(",");
                         }
                         errMessage.append("单据(" + billno + ")," + returnMap.get("msg"));
-                    } else {
-                        errMessage.append("获取单点地址:" + returnMap.get("msg"));
                     }
+//                    else {
+//                        errMessage.append("获取单点地址:" + returnMap.get("msg"));
+//                    }
                 }
             }
 

+ 12 - 4
code/jyyy/nckd-jimin-jyyy-fi/src/main/java/nckd/jimin/jyyy/fi/webapi/SRMSynAttacmentApiPlugin.java

@@ -70,9 +70,13 @@ public class SRMSynAttacmentApiPlugin implements Serializable {
             JSONObject requestJSON = XmlUtils.documentToJSONObject(request);
             JSONObject billBody = requestJSON.getJSONArray("BillBody").getJSONObject(0);
             JSONObject bill = billBody.getJSONArray("Bill").getJSONObject(0);
-            JSONArray fileArray = billBody.getJSONArray("Document")
-                    .getJSONObject(0).getJSONArray("Files")
-                    .getJSONObject(0).getJSONArray("File");
+
+            JSONArray files = billBody.getJSONArray("Document").getJSONObject(0).getJSONArray("Files");
+            if(files == null || files.size() == 0){
+                return returnResult("1000", "无file参数", null);
+            }
+
+            JSONArray fileArray = files.getJSONObject(0).getJSONArray("File");
 
             String billNO = bill.getString("billcode");
             String billType = bill.getString("billtype");
@@ -84,8 +88,12 @@ public class SRMSynAttacmentApiPlugin implements Serializable {
                 entityName = "er_prepaybill";
             }
 
+            if(StringUtils.isEmpty(billNO)){
+                return returnResult("1000", "单据号(billcode)参数为空", null);
+            }
+
             if(StringUtils.isEmpty(entityName)){
-                return returnResult("1000", "单据类型(" + billType + ")不匹配", null);
+                return returnResult("1000", "单据类型(" + billType + ")不匹配,只支持RC、XM、YF", null);
             }
 
             QFilter qFilter = new QFilter("billno", QCP.equals, billNO);