Compare commits

...

2 Commits

2 changed files with 17 additions and 9 deletions

View File

@ -296,8 +296,10 @@ public class ObjectToJsonUtils {
}
}
}
if(entityObject.size()>0){
jsonArray.add(entityObject);
}
}
} else {
JSONObject entityObject = new JSONObject();
for (int j = 0; j < yem_subentryentity.size(); j++) {
@ -382,10 +384,12 @@ public class ObjectToJsonUtils {
}
}
}
if(entityObject.size()>0){
jsonArray.add(entityObject);
}
}
}
}
} else { //单据提拼接
if (StringUtils.isEmpty(yem_erpfiledformid)) {
continue;
@ -430,9 +434,11 @@ public class ObjectToJsonUtils {
}
}
}
if(entityObject.size()>0){
jsonArray.add(entityObject);
}
}
}
widgetValueEntry.put("widgetValue", jsonArray);
json.put(yem_iaformid, widgetValueEntry);
Object.put("details", json);//分录数据

View File

@ -194,10 +194,12 @@ public class intebilllogonDemo extends AbstractBillPlugIn {
if (key.equals("generatejson_zz")) {
DynamicObject yemFormid = dataEntity.getDynamicObject("yem_formid");
if (yemFormid != null) {
Map map = new HashMap<>();
map.put("entityName", yemFormid.getString("number"));
// map.put("billtype","yem_orderproreqbill_DB");
JSONObject json = ObjectToJsonUtils.ObjectToJson(dataEntity.getLong("yem_formcode"), map);
long yem_formcode = dataEntity.getLong("yem_formcode");
if(yem_formcode==0){
this.getView().showErrorNotification("请选择单据后重试!");
return;
}
JSONObject json = ObjectToJsonUtils.ToJson(dataEntity, yem_formcode, yemFormid.getString("number"), " ");
this.getView().getModel().setValue("yem_generatejson", json);
this.getView().showSuccessNotification("获取完成!");
} else {