|
@@ -277,35 +277,42 @@ public class ProcessEventListener implements ActivitiEventListener, Serializable
|
|
|
node.getName(), SystemConstant.END_EVENT)) {
|
|
|
flowTaskResult.setFormKey(attr.getValue());
|
|
|
//从数据库取
|
|
|
- // List<FlowFormWidgetResult> listData = tdFormWidgetService.flowWidgetQuery(customTypeEnum, flowTaskResult.getSetup());
|
|
|
+ // List<FlowFormWidgetResult> listData = tdFormWidgetService.flowWidgetQuery(
|
|
|
+ // customTypeEnum, flowTaskResult.getSetup());
|
|
|
List<String> list = SystemConstant.FLOW_MAP.get(
|
|
|
resourceEntity.getDeploymentId() + SystemConstant.FLOW_FORM_ID_SPACE
|
|
|
+ attr.getValue());
|
|
|
String data = list.get(list.size() - 1);
|
|
|
- List<FlowFormWidgetResult> listData = JSONArray.parseArray(data,
|
|
|
- FlowFormWidgetResult.class);
|
|
|
- for (FlowFormWidgetResult f : listData) {
|
|
|
- String[] strs = flowTaskResult.getTaskKey().split("_");
|
|
|
- f.setFormId(f.getFormId() + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
- + Integer.parseInt(strs[strs.length - 1]));
|
|
|
- f.setFormName(f.getFormName() + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
- + Integer.parseInt(strs[strs.length - 1]));
|
|
|
- if (!CollectionUtils.isEmpty(f.getTablePropList())) {
|
|
|
- for (FlowTablePropResult t : f.getTablePropList()) {
|
|
|
- t.setTdId(t.getWidgetId() + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
- + Integer.parseInt(strs[strs.length - 1])
|
|
|
- + SystemConstant.FLOW_FORM_ID_UNDERLINE + t.getTdId()
|
|
|
- + SystemConstant.FLOW_FORM_ID_UNDERLINE + Integer.parseInt(
|
|
|
- strs[strs.length - 1]));
|
|
|
- t.setTdName(t.getWidgetId() + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
- + Integer.parseInt(strs[strs.length - 1])
|
|
|
- + SystemConstant.FLOW_FORM_ID_UNDERLINE + t.getTdName()
|
|
|
- + SystemConstant.FLOW_FORM_ID_UNDERLINE + Integer.parseInt(
|
|
|
- strs[strs.length - 1]));
|
|
|
+ if (Objects.nonNull(data) && !Objects.equals(data.trim(), "")) {
|
|
|
+ List<FlowFormWidgetResult> listData = JSONArray.parseArray(data,
|
|
|
+ FlowFormWidgetResult.class);
|
|
|
+ for (FlowFormWidgetResult f : listData) {
|
|
|
+ String[] strs = flowTaskResult.getTaskKey().split("_");
|
|
|
+ f.setFormId(f.getFormId() + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
+ + Integer.parseInt(strs[strs.length - 1]));
|
|
|
+ f.setFormName(f.getFormName() + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
+ + Integer.parseInt(strs[strs.length - 1]));
|
|
|
+ if (!CollectionUtils.isEmpty(f.getTablePropList())) {
|
|
|
+ for (FlowTablePropResult t : f.getTablePropList()) {
|
|
|
+ t.setTdId(
|
|
|
+ t.getWidgetId() + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
+ + Integer.parseInt(strs[strs.length - 1])
|
|
|
+ + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
+ + t.getTdId()
|
|
|
+ + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
+ + Integer.parseInt(strs[strs.length - 1]));
|
|
|
+ t.setTdName(
|
|
|
+ t.getWidgetId() + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
+ + Integer.parseInt(strs[strs.length - 1])
|
|
|
+ + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
+ + t.getTdName()
|
|
|
+ + SystemConstant.FLOW_FORM_ID_UNDERLINE
|
|
|
+ + Integer.parseInt(strs[strs.length - 1]));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ flowTaskResult.setFormProperty(listData);
|
|
|
}
|
|
|
- flowTaskResult.setFormProperty(listData);
|
|
|
}
|
|
|
}
|
|
|
} else {
|