Commit dfccd350 authored by Roger Wu's avatar Roger Wu

出差表单插件,修改参数不必填

parent d9cfdfbc
...@@ -33,15 +33,17 @@ public class BizPluginBusinessRestImpl implements BizPluginBusinessRest { ...@@ -33,15 +33,17 @@ public class BizPluginBusinessRestImpl implements BizPluginBusinessRest {
@Override @Override
public void submitTravelForm(BizPluginBusinessDto bizPluginBusinessDto) throws Exception { public void submitTravelForm(BizPluginBusinessDto bizPluginBusinessDto) throws Exception {
Assert.notBlank(bizPluginBusinessDto.getFormType()); Assert.notBlank(bizPluginBusinessDto.getFormType());
Assert.notBlank(bizPluginBusinessDto.getFormData()); Assert.notNull(bizPluginBusinessDto.getFromDataDto());
String formData = cn.com.yict.framemax.core.utils.JSON.serialize(bizPluginBusinessDto.getFromDataDto());
BizPluginBusinessEntity entity = new BizPluginBusinessEntity(); BizPluginBusinessEntity entity = new BizPluginBusinessEntity();
entity.setFormNo(String.valueOf(new Date().getTime())); entity.setFormNo(String.valueOf(new Date().getTime()));
entity.setFormData(cn.com.yict.framemax.core.utils.JSON.serialize(bizPluginBusinessDto.getFromDataDto())); entity.setFormData(formData);
entity.setFormType(bizPluginBusinessDto.getFormType()); entity.setFormType(bizPluginBusinessDto.getFormType());
BizPluginBusinessEntity save = service.save(entity); BizPluginBusinessEntity save = service.save(entity);
JSONObject jsonObject = JSON.parseObject(bizPluginBusinessDto.getFormData()); JSONObject jsonObject = JSON.parseObject(formData);
String email = jsonObject.getString("email"); String email = jsonObject.getString("email");
if (StringUtils.isBlank(email)) { if (StringUtils.isBlank(email)) {
return; return;
......
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