diff --git a/com.actionsoft.apps.coe.pal.batch/lib/com.actionsoft.apps.coe.pal.batch.jar b/com.actionsoft.apps.coe.pal.batch/lib/com.actionsoft.apps.coe.pal.batch.jar index 080e7052..33643f61 100644 Binary files a/com.actionsoft.apps.coe.pal.batch/lib/com.actionsoft.apps.coe.pal.batch.jar and b/com.actionsoft.apps.coe.pal.batch/lib/com.actionsoft.apps.coe.pal.batch.jar differ diff --git a/com.actionsoft.apps.coe.pal.batch/src/com/actionsoft/apps/coe/pal/batch/web/create/shape/ImportShapeExcel1.java b/com.actionsoft.apps.coe.pal.batch/src/com/actionsoft/apps/coe/pal/batch/web/create/shape/ImportShapeExcel1.java index cf8a0daa..cb23491e 100644 --- a/com.actionsoft.apps.coe.pal.batch/src/com/actionsoft/apps/coe/pal/batch/web/create/shape/ImportShapeExcel1.java +++ b/com.actionsoft.apps.coe.pal.batch/src/com/actionsoft/apps/coe/pal/batch/web/create/shape/ImportShapeExcel1.java @@ -44,7 +44,7 @@ import java.text.SimpleDateFormat; import java.util.*; /** - * 导入模型结构 + * 导入模型结 * @author sunlh * */ @@ -97,6 +97,7 @@ public class ImportShapeExcel1 { LogUtil.appendLog("--------------------------------", simpleLogFile, fullLogFile); LogUtil.appendLog("若模型存在多版本,只与模型使用中版本进行匹配,过往版本忽略不进行任何处理,若最新版本模型非可编辑状态(已发布、已停用、审批中),直接跳过该模型,不做任何调整", simpleLogFile, fullLogFile); + JSONObject data = object.getJSONObject("data"); @@ -114,6 +115,12 @@ public class ImportShapeExcel1 { this.transformCollectBranchToCellMap(fileData,fileDataMap,specialMap); + // 放入cache + int totalCount = fileDataMap.size(); + LogRealTimeCountModel countModel = new LogRealTimeCountModel(); + countModel.setTotalCount(totalCount); + countModel.setSuccessCount(0); + LogRealTimeCountCache.getCache().put(logId, countModel, true); //根据基准数据绘制图形+连线关系 @@ -191,8 +198,23 @@ public class ImportShapeExcel1 { } + + endTime = System.currentTimeMillis(); + Timestamp endDate = new Timestamp(endTime); + LogRealTimeCountModel model = LogRealTimeCountCache.getCache().get(logId); + String takeTimeText = takeTime(endTime, startTime); + String resultMsg = "导入完成,总耗时" + takeTimeText + ",模型清单总共[" + model.getTotalCount() + "],导入成功[" + model.getSuccessCount() + "]条,导入失败[" + (model.getTotalCount() - model.getSuccessCount()) + + "]条)"; + + LogUtil.appendLog("\n" + BatchConst.LOG_END + resultMsg, simpleLogFile, fullLogFile); + LogUtil.appendLog("\n" + "PAL批量导入模型 End " + UtilDate.datetimeFormat(endDate), simpleLogFile, fullLogFile); + LogUtil.appendLog("--------------------------------", simpleLogFile, fullLogFile); + LogUtil.appendLog(BatchConst.END_LOG, simpleLogFile, fullLogFile); LogUtil.appendLog(BatchConst.LOG_END + "[执行结束][Excel导入完成]", simpleLogFile, fullLogFile); + + LogRealTimeCountCache.getCache().remove(logId); + // 关联属性缓存重新刷新 DesignerShapeRelationCache.getCache().reload(); } @@ -288,6 +310,8 @@ public class ImportShapeExcel1 { //绘制当前节点图形 JSONObject shape = this.drawShape(node, levelNodeIndex, offset, level, i); + LogUtil.appendLog(BatchConst.LOG_START + "[新增][" + node.getShapeName() + "]形状", simpleLogFile, fullLogFile); + LogUtil.appendLog(BatchConst.LOG_START + "[新增][" + node.getShapeName() + "]形状,形状类型[" + node.getShapeType() + "]", fullLogFile); //计算最右边边界 rightMaxLine = this.getrightMaxLine(shape, rightMaxLine); @@ -325,8 +349,6 @@ public class ImportShapeExcel1 { Double changeLeftMinLine = object.getDouble("leftMinLine"); Double changeRightMaxLine = object.getDouble("rightMaxLine"); rightMaxLine = Math.max(changeRightMaxLine,rightMaxLine); -// leftMinLine = Math.min(leftMinLine,changeLeftMinLine); - //比较返回左边界的属性内容设置为: " + cellData.getString("value"), simpleLogFile, fullLogFile); } if (attributesJsonArray.size() > 0) { @@ -1255,8 +1277,14 @@ public class ImportShapeExcel1 { definition.put("elements",element); defineModel.setDefinition(definition.toString()); + + LogUtil.appendLog(BatchConst.LOG_START + "[执行阶段][保存处理模型内容]模型" + I18nRes.findValue(CoEConstant.APP_ID, palModel.getMethodId()) + "[" + palModel.getName() + "]模型,模型ID[" + palModel.getId() + "]", simpleLogFile, fullLogFile); // 保存文件 CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作 + LogUtil.appendLog(BatchConst.LOG_END + "[执行阶段][处理模型内容]", simpleLogFile, fullLogFile); + + // 记录成功日志记录 + LogRealTimeCountCache.getCache().get(logId).setSuccessCount(LogRealTimeCountCache.getCache().get(logId).getSuccessCount() + 1); } private String getCellObjectUUID(CellObject node){