diff --git a/base-service/src/main/java/com/hzya/frame/sysnew/grovy/service/impl/GroovyIntegrationServiceImpl.java b/base-service/src/main/java/com/hzya/frame/sysnew/grovy/service/impl/GroovyIntegrationServiceImpl.java index ac291935..e8d26555 100644 --- a/base-service/src/main/java/com/hzya/frame/sysnew/grovy/service/impl/GroovyIntegrationServiceImpl.java +++ b/base-service/src/main/java/com/hzya/frame/sysnew/grovy/service/impl/GroovyIntegrationServiceImpl.java @@ -41,42 +41,49 @@ public class GroovyIntegrationServiceImpl implements IGroovyIntegrationService { static class A88772 { String execute(String jsonStr) { - com.alibaba.fastjson.JSONObject returnObject = new com.alibaba.fastjson.JSONObject(); - com.alibaba.fastjson.JSONObject bodys = new com.alibaba.fastjson.JSONObject(); - com.alibaba.fastjson.JSONObject reqData = com.alibaba.fastjson.JSON.parseObject(jsonStr); com.alibaba.fastjson.JSONObject data = reqData.getJSONObject("data"); - com.alibaba.fastjson.JSONObject ufinterfaceObject = new com.alibaba.fastjson.JSONObject(); - ufinterfaceObject.put("billtype", "customer"); - ufinterfaceObject.put("isexchange", "Y"); - ufinterfaceObject.put("replace", "Y"); - ufinterfaceObject.put("sender", "openUser"); - ufinterfaceObject.put("account", "ycjf"); - ufinterfaceObject.put("groupcode", "ycjf"); - com.alibaba.fastjson.JSONObject billObject = new com.alibaba.fastjson.JSONObject(); - com.alibaba.fastjson.JSONObject billheadObject = new com.alibaba.fastjson.JSONObject(); - billheadObject.put("code", data.get("code")); - billheadObject.put("custprop", data.get("custprop")); - billheadObject.put("custstate", data.get("custstate")); - billheadObject.put("pk_custclass", data.get("pk_custclass")); - billheadObject.put("pk_country", data.get("pk_country")); - billheadObject.put("pk_timezone", "P0800"); - billheadObject.put("pk_format", "ZH-CN"); - billheadObject.put("enablestate", data.get("enablestate")); - billheadObject.put("name", data.get("name")); - billheadObject.put("pk_group", data.get("pk_group")); - billheadObject.put("pk_org", data.get("pk_org")); - billheadObject.put("taxpayerid", data.get("taxpayerid")); - billObject.put("billhead", billheadObject); - ufinterfaceObject.put("bill", billObject); - bodys.put("ufinterface", ufinterfaceObject); - returnObject.put("bodys",bodys.toJSONString()); + + com.alibaba.fastjson.JSONObject returnObject = new com.alibaba.fastjson.JSONObject(); + com.alibaba.fastjson.JSONObject sendData = new com.alibaba.fastjson.JSONObject(); + sendData.put("accbookCode","X0644-0001"); + sendData.put("prepareddate","2023-09-19"); + sendData.put("year","2023"); + sendData.put("num","4"); + sendData.put("period","09"); + sendData.put("vouchertype","01"); + sendData.put("attachment","0"); + sendData.put("prepared","zhuc"); + com.alibaba.fastjson.JSONArray detail = new com.alibaba.fastjson.JSONArray(); + for (int i = 0; i < 1; i++) { + com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject(); + object.put("detailindex","1"); + object.put("explanation","测试"); + object.put("accountCode","150401"); + object.put("currtypeCode","CNY"); + object.put("amount","1000"); + object.put("localdebitamount","1000"); + object.put("localcreditamount","0"); + object.put("groupdebitamount","1000"); + object.put("groupcreditamount","0"); + object.put("globaldebitamount","1000"); + object.put("globalcreditamount","0"); + object.put("busidate","2023-09-19"); + com.alibaba.fastjson.JSONArray ass = new com.alibaba.fastjson.JSONArray(); + + for (int j = 0; j < 1; j++) { + com.alibaba.fastjson.JSONObject assdetail = new com.alibaba.fastjson.JSONObject(); + assdetail.put("checktypecode","0004"); + assdetail.put("checkvaluecode","X0015"); + ass.add(assdetail); + } + object.put("ass",ass); + detail.add(object); + } + + sendData.put("detail",detail); + returnObject.put("sendData",sendData); return returnObject.toJSONString(); - - - - - } }