Compare commits

...

2 Commits

2 changed files with 17 additions and 9 deletions

View File

@ -296,7 +296,9 @@ public class ObjectToJsonUtils {
}
}
}
jsonArray.add(entityObject);
if(entityObject.size()>0){
jsonArray.add(entityObject);
}
}
} else {
JSONObject entityObject = new JSONObject();
@ -382,7 +384,9 @@ public class ObjectToJsonUtils {
}
}
}
jsonArray.add(entityObject);
if(entityObject.size()>0){
jsonArray.add(entityObject);
}
}
}
}
@ -430,7 +434,9 @@ public class ObjectToJsonUtils {
}
}
}
jsonArray.add(entityObject);
if(entityObject.size()>0){
jsonArray.add(entityObject);
}
}
}
widgetValueEntry.put("widgetValue", jsonArray);

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 {
@ -230,7 +232,7 @@ public class intebilllogonDemo extends AbstractBillPlugIn {
}
if (fag) {
//获取云之家token
String url = YunzhijiaUtils.yzjurl+"/cmmpapi/cmmp/fileToken.do?tokenId=D4EB05B9FE9C41D0868D33EC92AAEDB4";
String url = YunzhijiaUtils.yzjurl + "/cmmpapi/cmmp/fileToken.do?tokenId=D4EB05B9FE9C41D0868D33EC92AAEDB4";
String Token = "";
try {
Token = YunzhijiaUtils.doPost(url, "");
@ -301,7 +303,7 @@ public class intebilllogonDemo extends AbstractBillPlugIn {
return;
}
//获取云之家token
String url = YunzhijiaUtils.yzjurl+"/cmmpapi/cmmp/fileToken.do?tokenId=D4EB05B9FE9C41D0868D33EC92AAEDB4";
String url = YunzhijiaUtils.yzjurl + "/cmmpapi/cmmp/fileToken.do?tokenId=D4EB05B9FE9C41D0868D33EC92AAEDB4";
String Token = "";
try {
Token = YunzhijiaUtils.doPost(url, "");