Commit dc16502a authored by 赵啸非's avatar 赵啸非

添加解析表单参数数据

parent 3357f84d
Pipeline #2783 canceled with stages
...@@ -40,8 +40,9 @@ public class DatumInfoFieldServiceImpl extends AbstractCRUDServiceImpl<DatumInfo ...@@ -40,8 +40,9 @@ public class DatumInfoFieldServiceImpl extends AbstractCRUDServiceImpl<DatumInfo
@Override @Override
public Rest<List<DatumInfoFieldEntity>> parseFormContent(MatterDatumPrintEntity matterDatumPrintEntity, Context context) { public Rest<List<DatumInfoFieldEntity>> parseFormContent(MatterDatumPrintEntity matterDatumPrintEntity, Context context) {
JSONObject json = JSON.parseObject(matterDatumPrintEntity.getFormContent());
List<DatumInfoFieldEntity> infoFieldlist = new ArrayList<DatumInfoFieldEntity>(); List<DatumInfoFieldEntity> infoFieldlist = new ArrayList<DatumInfoFieldEntity>();
try {
JSONObject json = JSON.parseObject(matterDatumPrintEntity.getFormContent());
for (String key : json.keySet()) { for (String key : json.keySet()) {
DatumInfoFieldEntity infoField = new DatumInfoFieldEntity(); DatumInfoFieldEntity infoField = new DatumInfoFieldEntity();
infoField.setDatumPrintId(matterDatumPrintEntity.getId()); infoField.setDatumPrintId(matterDatumPrintEntity.getId());
...@@ -124,6 +125,10 @@ public class DatumInfoFieldServiceImpl extends AbstractCRUDServiceImpl<DatumInfo ...@@ -124,6 +125,10 @@ public class DatumInfoFieldServiceImpl extends AbstractCRUDServiceImpl<DatumInfo
} }
infoFieldlist.add(infoField); infoFieldlist.add(infoField);
} }
}catch (Exception e){
log.error("解析json错误,json=====>{}",matterDatumPrintEntity.getFormContent());
}
return Rest.ok("解析保存成功!", infoFieldlist); return Rest.ok("解析保存成功!", infoFieldlist);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment