Excel导入流程图获取空模型空指针问题修复
This commit is contained in:
parent
a6f3133cf3
commit
a45de11bc5
Binary file not shown.
@ -168,6 +168,27 @@ public class ImportShapeExcel1 {
|
||||
LogUtil.appendLog(BatchConst.LOG_END + "[执行阶段][保存模型阶段]", simpleLogFile, fullLogFile);
|
||||
this.saveDefine(repositoryId,nodeMap,rightMaxLine,maxLevel);
|
||||
|
||||
|
||||
//关联属性处理
|
||||
DesignerShapeRelationDao relationDao = new DesignerShapeRelationDao();
|
||||
if (relationList.size() == 0) {
|
||||
LogUtil.appendLog(BatchConst.LOG_WARNING + "新增形状属性关联属性内容忽略", simpleLogFile, fullLogFile);
|
||||
} else {
|
||||
LogUtil.appendLog(BatchConst.LOG_START + "新增形状属性关联属性内容", simpleLogFile, fullLogFile);
|
||||
boolean insertProps = relationDao.barchInsert(relationList);
|
||||
if (insertProps) {
|
||||
for (int i = 0; i < relationList.size(); i++) {
|
||||
String name = relationList.get(i).getAttrId();
|
||||
String value = relationList.get(i).getRelationShapeText();
|
||||
|
||||
LogUtil.appendLog(BatchConst.LOG_DESC + "形状属性关联属性内容[" + name + "],属性内容值为[" + value + "]", simpleLogFile, fullLogFile);
|
||||
}
|
||||
LogUtil.appendLog(BatchConst.LOG_END + "新增形状属性关联属性内容,总共新增[" + relationList.size() + "]条", simpleLogFile, fullLogFile);
|
||||
} else {
|
||||
LogUtil.appendLog(BatchConst.LOG_WARNING + "新增形状属性关联属性内容失败,详情查看BPM平台运行日志", simpleLogFile, fullLogFile);
|
||||
}
|
||||
}
|
||||
|
||||
// 更新其他自定义属性
|
||||
LogUtil.appendLog(BatchConst.LOG_START + "完善模型内形状自定义属性配置", simpleLogFile, fullLogFile);
|
||||
PALRepositoryAPIManager.getInstance().updateRepositoryProperty(repositoryId);
|
||||
@ -175,6 +196,9 @@ public class ImportShapeExcel1 {
|
||||
|
||||
}
|
||||
LogUtil.appendLog(BatchConst.LOG_END + "[执行结束][Excel导入完成]", simpleLogFile, fullLogFile);
|
||||
|
||||
// 关联属性缓存重新刷新
|
||||
DesignerShapeRelationCache.getCache().reload();
|
||||
}
|
||||
|
||||
private JSONObject drawBranchShape(String repositoryId,Map<String, Map<String, Map<String, List<CellObject>>>> branchData,double originOffsetX,Map<String,List<JSONObject>> nodeMap,
|
||||
|
||||
@ -884,6 +884,10 @@ public class ValidShapeExcel {
|
||||
String palId = repositoryMap.get(key);
|
||||
PALRepositoryModel plModel = PALRepositoryCache.getCache().get(palId);
|
||||
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(plModel.getId(), 0);
|
||||
if (defineModel == null) {
|
||||
defineModel = CoeDesignerUtil.createModel(palId, 0);
|
||||
defineModel.setCreateHistory(false);
|
||||
}
|
||||
String define = defineModel.getDefinition();
|
||||
JSONObject definition = JSON.parseObject(define);
|
||||
JSONObject elements = definition.getJSONObject("elements");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user